I have either simple or complex soft body object, collision plane and run simulation in bge(recording is turned on). What i get is recorded animation containing transformations only. Mesh deforms during simulation- squeeze and stretch, has hull around, but does not record deformations. What would be solution?(tried latest release and older as well, probably have bad setup but can`t figure it out)
2 Answers
You can write a BGE script that reads the vertex positions from the mesh.
Store this positions in a way that you can match them with the vertices of the according Blender object.
When you run the BGE embedded you can access Blender (bpy) while your game session is running. Be aware changes will apply AFTER the game session ended.
Therefore I suggest:
- read the BGE mesh vertex
- write to Blender object data (e.g. create shape keys)
I do not have a ready to use script nor do I want to write one here. This answer means is more an idea than a complete solution.
-
$\begingroup$ Thank you, tought it would be, and seems should be straightforward. Will get back to it if i couldnt go with softbody in blender(not bge now.) $\endgroup$ May 22, 2017 at 16:12
You cannot record a Soft Body deformation with keyframes, since it transforms the vertices of the object itself. There is, however, a Soft Body option in the Physics panel of BI and Cycles. The settings there are more in depth, and you can get an even cleaner simulation than the Game Engine.
-
$\begingroup$ At first i found blender physics too slow(i have complex object as end use) so i tried bullet and bge. I will try again and tweak it maybe. Thank you, you encouraged me. $\endgroup$ May 22, 2017 at 16:10