3ds Max’s 3DS export creates duplicate vertices

Ok so you are probably at the point where you have some code working to calculate smooth normals using 3ds Max’s smoothing groups (for instance on spheres) or just by taking the average normal of adjacent triangles.

But although your code is working fine you see ugly seams on your mesh because of different normals at the same vertex/position (yellow-marked):

So what happened? When you export your scene/mesh with 3ds Max, the option Preserve MAX’s Texture Coordinates generates duplicate vertices with equal x,y,z coordinates:

The result is a mesh that can contain adjacent faces not sharing the same vertices (indices) although the coordinates of their vertices are equal thus your smoothing algorithm won’t work as expected.

What can you do?

If you don’t need the texture coordinates you could export the object with „Preserve MAX’s Texture Coordinates“ turned off and then import it again into your scene. Now it is somehow „clean“ without any texture coordinates assigned thus no duplicate vertices will be generated when you export your scene the next time with the „Preserve MAX’s Texture Coordinates“ option turned on.

This workaround only succeeds if you don’t do anyhting with the object which could make 3ds Max to re-add texture coordiantes. Removing the duplicate vertices and rearranging the related arrays at runtime is not really an option since it would slowdown your 3ds loader. Sucks? Yep, somehow, so maybe it is time to switch to a new fresh 3d file format.

Dieser Beitrag wurde unter IT abgelegt und mit , , , , , , , , , , , , , , , , , , verschlagwortet. Setze ein Lesezeichen auf den Permalink.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.