Problems with texture coordinates in OpenGL.

It’s a shame the moderators here have turned off IMG UBB Code. Why is that? It makes problems much easier to explain.

I am importing single mesh ASE files which are exported from MAX. When I use certain mapping modes some of the triangles disappear!

There doesn’t seem to be a problem when using planar mapping and exporting from MAX. This may be because it is only exporting UV and not UVW corrdinate data.

Also, it seems that the 3D card drivers may another problem.

I thought a few screenshots might help.

Program importing a planar mapped object (Z-AXIS). http://www.cee.hw.ac.uk/~ceenda/pic1.jpg

Program importing a cylinder mapped object (X-AXIS). http://www.cee.hw.ac.uk/~ceenda/pic2.jpg

Program importing a cylinder mapped object (X-AXIS) using SGI’s software renderer. http://www.cee.hw.ac.uk/~ceenda/pic2_software.jpg

Any ideas appreciated.

I’m not an expert, but I expect that your problem comes with having more than one UV per vertex when you use a cylindrical mapping in Max. To check this, open up your MaxScript window and (with the object selected) type $.numVerts. Then apply a planar map. Type $.numTVerts. Finally, change the mapping type to cylindrical and type $.numTVerts again. You should see that the number of vertices and tverts using planar mapping is the same, but the number of verts and tverts in cylindrical mapping is different.

Max will allow you to have more than 1 UV per vertex. I don’t know that OpenGL will.

Nathan

the easier way (not the fastest to render a .ASE file is to render a triangle at a time.

.ASE easily allows to build a structure like this:

struct ASEtriangle {
point3f va,vb,vc;
point2f ta,tb,tc;
}

…i think you know what pointXXX are meant to

then, you can render triangles with a for loop, maybe using a display list… see what’s good to you.

if you are already doing something like this, forget my words

DMY