GL_SMOOTH - Not so smooth ?

Started by
10 comments, last by RobTheBloke 14 years, 7 months ago
I worked with .3ds too,
If there's texture mapping in 3dsMax, some triangles vertexes will brake in 3dsMax exports, because I think they are optimized for VBO or the old vertex buffer or something, where you have to index normal/vertex/texture coordinates in the same way, and texturing may brake triangles (the same vertex can have different texture coordinates on the different triangles). You wont recognize these braked vertexes in the 3dsMax itself.
By looking at your model, it seems a typical case, when the mesh has more polygons than vertices. (if they are shared)

If you create a 'geosphere' in 3dsMax, by default, it will have 320 polys, and 162 verts. (So more polygons!)
But you have a lot more vertices, than polygons.
So I guess I'm right.

I don't know how to overcome this, I think max has some logic in the indexing, but to puzzle it out how, pfff that's really hard.

I suggest you simply consider vertexes to be same, if their all coordinates are the same. (I think they should be precisely equal)

So find these somehow, than find the triangles they are on, find out the smoothing group ID of that triangle, than average those normals.

You don't have to do it realtime, calculate them at the beginning.
Advertisement
Quote:Original post by viewon01
So, how can I reorganize my vertices... it sounds a complex task to keep good performance!


It is the job of the artist and not the programmer. How do you know that the faceting wasn't intentional?

Quote:If there's texture mapping in 3dsMax, some triangles vertexes will brake in 3dsMax exports, because I think they are optimized for VBO or the old vertex buffer or something,


The actual reason is that the 3ds max SDK is ass-backward when it comes to vertex normals. As the developer of an exporter you have 2 choices.

1) Fart around with some very ropey data stored in multiple formats in multiple locations, then cross reference all of that with the relevant smoothing groups.
2) Sod it off and just write out data without shared normals.

I'll let you guess which path they chose....

This topic is closed to new replies.

Advertisement