• Advertisement
Sign in to follow this  

VertexWeights SimplificationMesh AttributeWeights Quert

This topic is 4920 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone, my first post so please be gentle ! I'm having real trouble getting the concept of VertexWeights to work in the Managed Dx9 C# SimplificationMesh (and ProgressiveMesh). I'm using an array of Meshes to simplify a terrain heightfield and due to their limitations on indexes (i.e. int16) I have to break them up into lots of small meshes, simplify individually, then remerge. I've googled to within an inch of my life and found only one or two related NG posts which mentioned the use of VertexWeights and VertexAttributeWeights to inform SimplificationMesh not to simplify the boundary vertexes. So I've tried using them, over and over again in as many combinations as I can. I can't seem to get them to make any difference. Does anyone with any experience of using them have any tips n tricks to share. Briefly, I'm sending to the SimplificationMesh a VertexWeighting array of Floats the same length as my Vertexes length, with either 1000f or 0.1f depending on whether it forms part of my boundary or not. If I send a negative number in either case the SimplificationMesh hangs. Apart from that irrespective of any values I enter it seems to ignore the setting and merrily merges vertexes lying on the boundary. Ok - it never actually removes any boundary vertexes that I can see, and the merging is very topographically pleasing, but of course when I try lining my meshes back up I get tearing everywhere. So I've attempted to use VertexAttributeWeights by passing in the single allowed AttributeWeight structure to the SimplificationMesh initialiser. I've altered the Boundary value to 100 , but again, not to any effect. Interestingly the SimplificationMesh has a property "VertexAttributeWeights" which you can use to return an array (one per vertex) of the weights used in the simplification - but you cannot set a AttributeWeights per vertex and the arrays first item is the value sent in on the initialiser with the rest set to zeros. Has anyone any idea how all this is supposed to work ? Thanks in advance, Phillip Hamlyn

Share this post


Link to post
Share on other sites
Advertisement
Has anyone successfully used Vertex Weights with SimplificationMesh or ProgressiveMesh ? I pass it in but it makes no difference - the vertexes still get simplified.

Phillip Hamlyn

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement