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

OBJ Import: Reorders Vertices #43

Open
ItsEasyActually opened this issue May 12, 2019 · 3 comments
Open

OBJ Import: Reorders Vertices #43

ItsEasyActually opened this issue May 12, 2019 · 3 comments

Comments

@ItsEasyActually
Copy link
Contributor

When importing obj models, the vertex order is not the same as the file being imported. This causes issues when writing vertex welding. Most notably it's an issue when editing existing models and reimporting them.

The only solution would be to re-export the obj once it's imported into SAMDL and work from that export to create your indices for the vertex welding. That's not really an optimal solution to this issue as it creates a lot more work.

This is likely a universal issue across the entire toolset since the import/export functions are shared (I think) between the tools. It doesn't really affect level models, but it's definitely the cause of some issues with SAMDL due to characters having welding.

Quick Note: I do know this issue may not be relevant as this whole import/export system is planned to be rewritten. I just hope that when it is, this issue does not persist when that rewrite happens.

@PiKeyAr
Copy link
Member

PiKeyAr commented Jul 27, 2021

This is still a problem, and Assimp only made it worse as it completely shuffles vertices around and also changes the mesh type.

@ItsEasyActually
Copy link
Contributor Author

The mesh thing may be hard to fix since the data being supplied would already be different for the mesh itself. At least if I'm following correctly.

Thankfully the Blender Addon doesn't have these issues, but that's not entirely a solution for users who don't want to use Blender or use an older version where the addon doesn't work.

@PiKeyAr
Copy link
Member

PiKeyAr commented Jan 6, 2022

So apparently it's because vertex data in SAModel is processed by going through the list of polys, and vertices are added to MeshInfo in the order they are used in the polys.

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