Sign in to follow this  
jor1980

Optimize mesh to generate trianglestrip

Recommended Posts

Hi, i needto transform a mesh based on trianglelist into a mesh based on trianglestrip, so i am trying to do it using Mesh.Optimize but i think that i haven´t obtain a mesh based on triangle strip.

 

here is my code:

 


cloneMesh.GenerateAdjacency(0.5f);
cloneMesh.ComputeNormals();
            
SlimDX.Direct3D9.Mesh meshOptimizada = cloneMesh.Optimize(SlimDX.Direct3D9.MeshOptimizeFlags.StripReorder);

 

 Is it possible to do what i want using slimdx?if it not How can i make this transformation?

Share this post


Link to post
Share on other sites

I want triangle strip no because of efficience but because the file format over i want to import my mesh needs trianglestrip, so i need to create the strip from a trianglelist and i want to know if i can do it using some directx function, i tried it with mesh.optimize but i couldn´t do it, so i want to know if what i want is possible

Share this post


Link to post
Share on other sites

NVIDIA has a tool for that. It is pretty old though. It would convert your TriangleList to TriangleStrip for you. I tried looking for a link for you, but it seem that the tool is deprecated and no longer supported. I cannot even find a link to it. Also to answer your question as well, DirectX has no function in there that will convert from List to strip.

You will have to either find a tool that will do it for you or write one yourself.

Edited by BornToCode

Share this post


Link to post
Share on other sites

Nvtristrip is so slow, it's practically unusable on larger meshes.

 

The only reason to still use strips instead of lists is to save a bit of memory space. What's most important is the (optimal) ordering of triangles in a list/strip. Manually generating a strip based on what D3DX.OptimizeFaces and D3DX.OptimizeVertices output, should be fairly trivial.

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