Sign in to follow this  
greg2fs

Modify a LPD3DXMESH ? (number of vertices...)

Recommended Posts

greg2fs    123
Hello, I need to remove vertices which are in double in a LPD3DXMESH. They are in double because they have different UV or normals, but only position are need by my program and I need not to have double vertices. My question is how can I remove these vertices, I tried to put all the normal to 0,1,0 and all the UV to 0,0 and do OptimizeInplace but it changed nothing. THanks [Edited by - greg2fs on August 18, 2008 12:49:00 PM]

Share this post


Link to post
Share on other sites
Evil Steve    2017
From what I understand using Google Translate, you're saying you need to duplicate vertices that have different normals or texture coordinates, and you're asking if you can change the number of vertices in a mesh?

Does your source mesh have the duplicated vertices in it then? If so, why do you want to get rid of the duplicated vertices - they're not really duplicates because they differ in UV coordinates or normals.

There's no GenerateAdjency or equivalent for a vertex buffer - a vertex buffer is just a random pool of vertices; there's no way to tell what vertices are connected to make up a triangle - you'd need an index buffer for that too, which is presumably what ID3DXMesh uses internally.

Share this post


Link to post
Share on other sites
greg2fs    123
Sorry to put a message in french I forgot I was on an english website, then I translated my message.
From what you say, the only way is to use a vertexbuffer and build the adjency on my own ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this