Optimize mesh to generate trianglestrip

Started by
3 comments, last by eppo 11 years ago

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?

Advertisement

Indexed triangle lists are generally more efficient on modern hardware than triangle strips. See this thread for a good discussion on the same subject.

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

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.

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.

This topic is closed to new replies.

Advertisement