Manipulate Mesh at Run-time

Hey there.

I’m developing a simple scene containing a sphere and a knife (attached as mouse cursor) in Blender Game Engine (BGE).

I want to user be able to slice the sphere using knife at run-time and, slicing should be real! (slicing should be dynamicly changes due to the user act)

It seems there is’nt any built-in solution using python in blender (not sure), because the MeshProxy has only a few tools; Also, it seems the bmesh module is not accessible in BGE.

  • Any idea or same case to this problem? (using blender as game engine is optional, but preffered)

  • After some research, I’ve found OpenGL Shaders. But it seems, GLSL only makes some artifact and its not affects real/physically.

  • I know I’ve used blender and its preffered for me; but because the game engine in this problem is optional, I’ve asked my question here.

  • If your answer includes some code sample, project file, etc. its so much better. :slight_smile:

    TL;DR Is there any way to manipulate the object mesh in run-time? (Blender is preffered)

(Copied from: Here)

Please guide me to solve this problem (either in this forum or in StackExchange)

Well, AFAIK the BGE does not support mesh topology modification, as stated in the documentation:

Now, if you really want to stick with the BGE, then you’ll end up making your own GL context and managing your very own meshes, I think Youle (UPBGE developer) already made a proof of concept, here are some links to his work:
spherebgl2 .blend (541 KB)
Basically, the meshes will not be managed by the BGE, but by yourself. Its easier said than done, ikr.

I don’t know how to make it simplier, in terms of actual mesh edition.

upbge is adding a true mesh editing api now*

someday we will all scream RULES OF NATURE in bge, not today

Thanks all for your answers. :slight_smile:

I think development using this approach is too hard… is it true?

I’m using the last stable version of UPBGE. this API is working now? is there any beta/alpha version?!


Off-Topic: what about another Game Engine? the same problem exists in other Game Engines (e.g. Unity, UE, …)?