Archived

This topic is now archived and is closed to further replies.

Wikkyd

Progressive Meshes

Recommended Posts

I have been messing around with the progressive mesh interface and have been running into a problem. Whenever I try and reduce the detail level, the minimum detail level will not go very low. For instance I have a 750 vertices model. The lowest detail it will go is 556 vertices. Has anyone else had similar problems with progressive meshes? [edited by - Wikkyd on December 25, 2002 3:29:28 PM]

Share this post


Link to post
Share on other sites
Progressive mesh methods (speaking from the pure algorithmic point of view rather than D3D specific) won''t collapse (ecol) "sharp" edges. So if for example you have lots of places where the textures coordinates (or vertex colours etc) change between triangles, even if the vertex positions are shared, PM can''t collapse those polygons - the only way it could would be to re-texture your model! PMs should work ok if (in the modelling package) a single texture is simply wrapped over the whole mesh.

Other (related) issue could be non-manifold meshes (i.e. the mesh has "holes" where you can see the insides).

A mesh which indexes well with plain indexed triangles (i.e. ~1.5-2 vertices per triangle) should also work well with PMs - particularly with D3D PMs


Another thought: do the indices in the source mesh jump around a lot in the vertices - if so, try running the D3DX Optimize (and similar) calls on the mesh before converting to PMs. Of particular interest are those which give decent locality of reference/vertex cache optimisations.
IIRC D3DX PMs use the sliding window method of performing edge collapses rather than modifying vertex data and I''m not sure whether it''ll bother re-indexing the base data for you.

[Warning waffle alert: XMAS day alcohol now kicking in (3:25am)]


--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Thanks for the suggestions.

You said ''have lots of places where the textures coordinates (or vertex colours etc) change between triangles, even if the vertex positions are shared''

Im unclear what you mean by this. Does this mean for example where a vertex is duplicated due to it having 2 different texture coordinates? For example like what could happen if you use the UV Unwrap modifier in 3ds Max?

Another thing.

Ive loaded the exact same model with the Progressive Mesh SDK sample. It will go to a much lower vertex count. Im using the exact same method the SDK sample is using except I initially load my model in as a ID3DXSkinMesh and then convert it to a progressive mesh.

Could this be the source of my problem?

Share this post


Link to post
Share on other sites
If you load it as a skin mesh, I believe it divides the subsets based on material AND which bones are in effect. So it should have more subsets and that could effect the PM that you convert it to. Thats just a guess, but I''d try loading it both ways and display the number of subsets for each one.

Share this post


Link to post
Share on other sites
quote:
Im unclear what you mean by this. Does this mean for example where a vertex is duplicated due to it having 2 different texture coordinates?


Yes, with those cases the edge which would otherwise be shared can''t be collapsed.

quote:
If you load it as a skin mesh, I believe it divides the subsets based on material AND which bones are in effect. So it should have more subsets and that could effect the PM that you convert it to. Thats just a guess, but I''d try loading it both ways and display the number of subsets for each one.


Aha - yep, I think that''s probably what''s happening here. More things which change = less that can be collapsed without those things going screwy.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
Ok thanks a bunch guys.

So I guess this is just something Ill have to live with.

I am thinking maybe Ill just export 2 .x files of the same skinned character. 1 high detail and 1 very low detail. This will take more memory but I cant think of any other way to get this effect.

What do you guys think?

Share this post


Link to post
Share on other sites
That works reasonably well in most cases as long as you can live with the large amount of popping that comes with the transition. But then again, progresive meshes give you popping as well. It seems to me that if you''re doing good high level object culling, then you don''t need much LOD on your models. A higher and a lower detail level should be prenty in most cases.

Share this post


Link to post
Share on other sites