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

Vertex Optimization on Export #709

Open
ian-m-carr opened this issue Oct 5, 2022 · 0 comments
Open

Vertex Optimization on Export #709

ian-m-carr opened this issue Oct 5, 2022 · 0 comments

Comments

@ian-m-carr
Copy link

I have been doing some investigation into round tripping models using the import/export flow and the code from the feat_import branch. But I beleive this applies in general across branches.

When exporting with optimization switched on vertices which duplicate location,normal and uv within each object are aggregated and output only once. But this optimisation is reset per object exported. In my case (C90B_cockpit_2) this results in the vertex table increasing in size by a factor of 3 on round trip. The cockpit object contains many duplicate instances of the same switch mesh.

Moving the dictionary initialization out of the object loop returns the vertex table size to approximately the original number ~30000-> ~10000 VT entries.

vertices_dct = {}

The resulting obj file appears to render correctly in XP-12 animations and textures appear as expected.

Unfortunately I am unable to get the unit tests to run on Windows, so cannot indicate if this impacts the behaviour in any other way.

This commit from my fork indicates the changes I made
93195c9

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

No branches or pull requests

2 participants