Open agorgl opened 3 years ago
Hi @agorgl , I think you're seeing this because tobj
triangulates obj files by default. So the quads in the OBJ file are turned into 2 triangles. This is why the floor ends up with 6 indices (two triangles) instead of 4 (a quad).
You can now pass the LoadOptions
struct to tobj to tell it to not triangulate the mesh. Then I think the indices should match what you expect, since you'll get the quads back.
Using CornellBox-Original.obj from https://casual-effects.com/data/ the following snippet:
shows: