3ds model extra vertices problem

Has anyone else seen this type of problem using 3ds files?

We made a model in Max and exported it to 3ds format. But it seemed to duplicate some vertices at run time.

I checked the max file…each vert
is welded, so each intersection does not have overlapping points…I
checked the faces and they are only one sided…unless the export takes
the material editor data, I had 2-sided checked on the materials for
display purposes in max…finally, I did an STL-check, the terrain does
not have Multiple edges/Spikes/Double faces/or Open edges…???

Also, it adds extra polys going from one corner of the “cube” to the opposite corner?

Any help greatly appreciated!

Have you tried the 3dsmax support forums at discreet.com ?

Anyway, you’re probably seeing verts getting split because of texture/material differences or smoothing group/normal differences. The subject of “tverts” versus “glverts” has been beaten to death in this forum before, a quick search should find many explanations of it.

this isn’t actually a “problem” it is just a locical consequence.
3ds does store the texture coordinates (u/v) in the vertex structure and not in the face structure. it now can happen, that one vertex would become assigned different u/v values (like a cube which has the same texture on each side, this is the most common example)
thus 3ds doubles or (even more…) the vertex but with another u/v value.
hope that helped you.

Everyone here seems to be right. Basically Max will create multiple duplicates of a vert for both normals and texture coords. This is simply a result of the two faces sharing a vert that requires different normals for the 2 faces and/or 2 texture coords for the 2 faces. Its very obvious when this happens in Max if you are using UVEdit and you break a texturecoordvert. What it did was duplicate it so you can move the texture coord. You end up with 2 tex coords for one vertice in the model. Same thing happens when you start messing around with smoothing groups.

Its the fact of life.

That makes sense, but makes it very hard for me because I definitely need all of the polygons to share the same vertices.

What would you suggest I do to keep the vertices from multiplying? Is there a way the artists can map the texture on the model to avoid this from happening? Is this all caused by the way the texture is applied to the model?

Should I try to find out which vertices “should” be shared and make some sort of lookup table so I can tell that these vertices are actually the same one?

Is this just a 3ds problem? Would loading a different model format make a difference?

Sorry, so many questions…Thanks!

This is simply a fact of life like I said. Someone else actually posted about using indexed arrays and their complaint was that the indexes for the verts, texcoords and normals aren’t the same. Each has its own index. Of course opengl won’t allow this. Which I can understand, its definately a performance thing.

As for texturing, my guess for the easiest way to avoid the most splitting is to unfold the model in half. In this case you are splitting the texture coords around a silloette of the model. You don’t actually have to split all of them, just enough to unfold the models tex coords. But if you look at almost any game (counterstrike, and of the quake games) the artists generally split the models up something awful. It may look messy but you can fit more into the texture which is more efficient.

I don’t see why duplicating vertices is such a problem. I currently have my own 3d studio max exporter and I simply accept the duplicated vertices. I use arrays for verts, normals, and texcoords. And I simply send duplicated verts down the pipeline. It is a bit inefficient but I don’t think it really makes that much of a problem. You can also index but you must pick the largest split (verts, texcoord, normals) and replicate the rest so that the indexing works for all three. This is messy.

I seriously say just don’t worry about it. Its just the way things go. I really don’t see any way around it. Sorry

Well, for the experiment that I am doing, I absolutely have to have the vertices shared without creating new vertices on me. :slight_smile:

Are you saying if the model had no texture at all, it should not create any extra vertices then?

Just to be more explicit no texture coordinates would mean that 3d Studio Max would not duplicate texture coordinates for the same vertex. The actual Application of a texture is unimportant.

The same applies to normals. If any smoothing is applied normals may need to be duplicated.

You need to watch 3d Studio Max carelfully though. Certain objects may by default assign texture coordinates (even if you don’t use the UVW Map modifier). Usually there is a check box during creation of primitive objects. Again the same thing applies to Normals. Some objects may Smooth Automatically (sphere’s for example do that). Again there is a checkbox during creation that will override this.

// ****** THIS IS PROBABLY THE MOST IMPORTANT ****************
I want to clarify something. For example you set 2 texture coordinates for the same vertice. You will notice that max doesn’t really duplicate the vertex. If you select it, no matter how you select it, there will be only one there. But there are still 2 texture coordinates. The texture coord that is used in not dependent on the vertex but on the face that references that vertex. So in this case you have 2 Triangles, 1 vertex and 2 texture coords. Each triangle contains an index to the same vertex. But two different indexes for the 2 texture coords. Again the same thing applies to normals as well.
// End ****** THIS IS PROBABLY THE MOST IMPORTANT ****************

This is common among almost every modeling package I know of. Its simply is a way to reduce the total amount of data but at the cost of extra indexing. As for whether the amount of memory required for duplicating actual vertices is more than maintaining the extra indexes, there probably isn’t much difference. For a modeling program like Max. It tries to conserve memory even at the cost of speed. There is so much computation going on during rendering that extra indexing becomes almost irrelevant in comparison. In realtime with opengl, the amount of data (vertices, tris, etc.) is generally much lower and realtime speed is much more important.

Everything in opengl is a tradeoff between speed and quality. You always have to make sure one never wins against the other. Unless of course you want one too. ( :

Hope this helps. I always seem to write too much. Anyway if you need me to clarify anything just let me know.

You can email me too if you want at devulon@hotmail.com

I actually am working on a new 3d Studio Max plugin so I am quite familiar with what you are going through.

[This message has been edited by Devulon (edited 04-09-2002).]

If you use no sharp edges (everything’s the same smoothing group) and no texturing, or some simple continuous texturing mode like Planar with no UVW unwrap, then there will be a 1:1 correspondence between your “Max position verts” and your “OpenGL render verts”.

Any experienced games artist should be able to tell you about this difference, as it’s existed for any accelerated hardware forever.