Dynamic (programatic) mesh modification... Can be done?


15-03-2007 20:24:48

Hi everybody. I've been using Mogre for a while, however I haven't gone through all the documentation and the engine capabilities yet. I'm working in a 3D environment project where I need to modify the objects' structure according to the collisions or intersections between them.

Is there any way to modify the geometric shape of an object (mesh) in the scene? I'm guessing that, maybe, this can be done by using or manipulating the vertex data, but I don't have any idea about how to do that yet.

Let's say, for example, that I want to simulate the action of a drill over some box, and I want the hole to appear dynamically. Does anybody know how I can do something like that? Even else, can I do that in Mogre?

Any help would be greatly appreciated.


21-03-2007 00:19:57

Try asking the same question on the main Ogre forums, about how you would achieve this using native C++ Ogre (preferably with the new 1.4 version) and then we'll talk if the solutions are possible with Mogre or not :)


21-03-2007 07:03:56

This is usually done by modifying the hardwarevertexbuffer associated with an ogremesh. Haven't touched this part in Mogre yet though so I don't know wether it's doable or not.

However, since the Eihort release the manualobject has gotten some new functionallity which let you update the vertices in an very simple manner.

You can do that with the ManualObject in Dagon as well but that's mean you'll have to clear the vertexbuffer and recreate it which I assume takes away some performance.