3ds_export_duplicate_vertices

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):

3ds_export_duplicate_vertices

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:

Preserve_MAXs_Texture_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.

Kommentare

Schreibe einen Kommentar

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

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.