Skip to main content
gamedev.net
🔒 Locked

Mesh problem

Started by UriKiller Aug 2, 2006 at 6:01 PM 2 replies 550+ views
Original Post
UriKiller
UriKiller
I use Panda exporter to make .x files from 3dsmax8. I made a box and extruded one of its sides straight forward so it would be like 2 connected boxes (sharing a rectangular side), then I detached them so they would be 2 subsets in the x file (but they were still appear connected because they share 4 same vertices). The problem is that these 4 vertices are duplicated and I cannot get rid of one of these two groups. No matter what optimization I did, No matter what options I did inside the exporter, these 4 vertices existed twice. Must I create a clone mesh and start removing clone vertices so that there are only unique vertices? BTW, the reason that I don't want these vertices to appear twice is because if I move one of them, there will be a hole in the object because there are 2 subsets. [Edited by - UriKiller on August 2, 2006 7:31:08 PM]
circlesoft
circlesoft
3ds Max doesn't store it's vertex info in a way that maps directly to D3D. For example, it doesn't have a simple GetVertex() function that returns a structure like:

struct Vertex{   float3 pos;   float3 norm;   float2 texCoord;   float4 tangent;};


Instead, each vertex can have a variable number of texture coordinates and tangents (if they are shared by different polygons). However, for real-time use, you generally only want to have one primary tex coord, so exporers duplicate each vertex n times, where n is the number of texture coordinates.

The same behavior goes for vertices with multiple tangents. They can be duplicated, or sometimes averaged, or a combination of both.
UriKiller
UriKiller
Ok I understand why they are duplicated but how to get rid of the duplications after the mesh is loaded?
circlesoft
circlesoft
Quote:
Original post by UriKiller
Ok I understand why they are duplicated but how to get rid of the duplications after the mesh is loaded?

You could try removing them by hand, when you load the mesh. Since it appears that you already know which vertices these are, that might not be so bad. I'm not sure if you could fix this is in your art tool, since they are already shared between different surfaces that have varying texcoords.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.