Mesh Manipulation(increase/ decrease) in real time

Hello, I am just a two days old jmonkey user and a three weeks old CG student. I am working on a project to create a 3d Sculptor editor. I want to create a simple editor which will help me perform the basic sculpting operations on a model. From my research and studies (still ongoing), I have learnt that the model will be made of meshes. I want to know if jmonkey supports increasing and decreasing the number of meshes in realtime? For instance, regular shapes are made up of less number of meshes whereas irregular ones have more. When I operate on a model with a bulge operation(say), it would create an irregularity and I would want new small and tiny meshes to be created in and around the bulging region to make the model look smooth. Does jmonkey support this?



Thanks in advance you for your help.

you mean vertexes not meshes dont you?

1 Like

Well from what I know, a model is made up of meshes which in turn are made up of small triangles.

This is what I precisely want to do. In the second sphere you can see that the number of meshes has increased because of the irregularity(inflation) in the shape. Is this increase in number of meshes( or vertices if i got the terminology wrong) in real time supported by the jmonkey engine?http://imgur.com/hvdPq







Thanks :smiley:

That’s still one mesh - just with more vertexes/triangles in it.



And yes, that is supported (I’ve done it) although you would need to be careful to keep track of your vertex indices etc.

1 Like

Thank you so much for clearing a misconception in addition to the doubt. Cheers :smiley:

You should go through all of the basic tutorials and the math/scene graph ones (even if not using all the features it will help explain a lot of concepts), then the specific one you want is:



https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:custom_meshes



To modify a mesh simply modify the contents of the byte buffers. You can do that dynamically and the mesh will deform on screen.



To add or remove vertices is a bit more tricky as you need to change the size of the buffer - so basically you create a new buffer of the new size, fill it with the correct data and then swap it for the old one on the geometry.

1 Like

Thanks a lot. I am already going through them. Cheers :smiley:

@chandanchawhan said:
I am just a two days old jmonkey user and a three weeks old CG student


Just remember this isn't basic stuff for a beginner. Searching for voxels should yield some custom mesh stuff as well.