Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertices Not Indexed Properly? #57

Open
maxattack opened this issue Jun 22, 2020 · 5 comments
Open

Vertices Not Indexed Properly? #57

maxattack opened this issue Jun 22, 2020 · 5 comments

Comments

@maxattack
Copy link

Some vertices appear indexed improperly (a handful out of ~1k, so it's <1%?)

No triangulation going on. However, even so, the indexing code is hard to follow as I debug this issue. Is there any guidance you can give me for possible leads?

(Left: OpenFBX imported geometry, Right: same FBX imported into maya)
image

@maxattack
Copy link
Author

No malformed-data warnings importing into maya or anything.

@nem0
Copy link
Owner

nem0 commented Jun 22, 2020

Without triangulation indices/vertices are basically raw data from fbx, so it's probably something else. The code for that was contributed by some other user, so I don't guarantee it's correct. If you want you can upload the model and I will take a look.
Note: raw indices have negative values marking end of polygon: https://github.com/nem0/OpenFBX/blob/master/src/ofbx.cpp#L2299

@maxattack
Copy link
Author

Yeah, I'm accounting for those. BTW, (-idx - 1) is just bitwise complement, so you can use ~idx and save some instructions.

mecha.zip

@nem0
Copy link
Owner

nem0 commented Jun 22, 2020

Note: singed integer binary representation before c++20 is implementation defined

@nem0
Copy link
Owner

nem0 commented Jun 28, 2020

I tried to import the model in Lumix Engine and it seems ok (although it's with triangulation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants