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

Fix some problems with importing OBJ and FBX #444

Merged
merged 6 commits into from
Mar 19, 2022

Conversation

sts1skj
Copy link
Collaborator

@sts1skj sts1skj commented Mar 8, 2022

For importing OBJ:

For importing FBX:

For exporting FBX:

  • Swap x,y,z for normals the same way it already did for vertex coordinates (bug fix).

- Preserve vertex order.
- When merging data with an existing shape, give option to update normals.
- Correctly handles faces with more than 4 vertices.
- Handle OBJ comments correctly.
- Clean up a few things in ObjFile.{h,cpp}.
- Don't duplicate vertices when normals or uvs are duplicated in the file.
- Handle negative OBJ vertex/texture/normal indices correctly.
-Polygons with more than three vertices were not handled.
-Ask user if they want to update normals when merging.
@sts1skj sts1skj changed the title Fix some problems with importing OBJ Fix some problems with importing OBJ and FBX Mar 9, 2022
sts1skj and others added 4 commits March 13, 2022 17:22
I misread the code and fixed something that wasn't broken.
- Made FBX import split vertices with differing UVs or normals.
- For OBJ/FBX import with a merge into an existing shape, only ask if the
user wants to update UVs/normals if the file has them.
- Swap x,y,z around for normals on FBX import/export to match what it does
for vertex coordinates.
@ousnius ousnius merged commit 378065c into ousnius:dev Mar 19, 2022
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

Successfully merging this pull request may close these issues.

Automatically triangulate imported meshes Import Custom Normals From OBJ and FBX files.
2 participants