Ossim - Bake simulations to armature (Unreal Engine, Unity) - Now with Blender 4.0 support!

hi karl36, what animation do you mean?

paper rolling up,this is my filetest1.zip (3.9 MB)

Hi karl36, checked your file but the curve modifier does not bake correctly

Thank you ,I try to changer to use the hook modifier and bake the armature twice . It can work

I bought yours Ossim for a couple days ago, thank you for that.
I noticed that there is also “Cloth”.
I only see a fracture video on yours youtube channel and think mine is not working correctly with the cloth.
Can you make a video how to make cloth to work and import into UE4, please.?

Hey,

I got the addon and it works. But my simulation contained many chunks and it took several hours to generate the armature for it.

I have done some tests and it appears that 1 object takes 2 seconds to get a bone assigned to it. 10 objects took 24 seconds and 20 objects 43 seconds. 100 objects took 3 minutes 48 seconds.
My simulation was 3876 chunks and I ran the addon overnight. When I returned it did what it was supposed to.

I do not know how to optimize the workflow, I really need one skeletal mesh in UE4 and this addon does something similar to Houdini but in a crude way.

It works though and I am glad it is available for the latest blender builds.

Do your armatures generate so long too? On the video, it was a few seconds.

Thanks.

There is an offset with RigidBody.

Update:
Downloaded Blender 2.79b again and use the old version, everything works, no problem.

Tried Cloth Bake with Blender 3.1.2
Again the offset…The Bone is at the right place, but the cloth is waaay off to the side…this is the same problem with rigidbody.

I got an offset problem.
Finally I have found the solution.
Set Parent type “OBJECT”.
Default is “ARMATURE”

I have solved the problem I had before (stated above). I wrote a script that works much faster, but it works only for rigid body meshes. It creates an Armature, places a bone at the selected object’s origin, and then creates “child of” constraint with the corresponding object name as a target. You can then bake the animation in pose mode and export it as a skeletal mesh to Unreal Engine.

It may be crude, but I am no programmer. The script worked just fine for me on any Blender version.

Copy and paste the script and run it inside Blender with selected objects.


import bpy

# Create a new armature and enter edit mode
armature = bpy.data.armatures.new("Armature")
obj = bpy.data.objects.new("Armature", armature)
bpy.context.collection.objects.link(obj)
bpy.context.view_layer.objects.active = obj
bpy.ops.object.mode_set(mode='EDIT')

from mathutils import Vector

# Create a new vector and add it to obj_iter.location
offset = Vector((0.0, 0.0, 1.0))

# Iterate over the selected objects
for obj_iter in bpy.context.selected_objects:
    
    # Create a new bone at the same location as the object
    bone = armature.edit_bones.new(obj_iter.name)
    bone.head = obj_iter.location
    bone.tail = obj_iter.location + offset

# Exit edit mode and enter pose mode
bpy.ops.object.mode_set(mode='POSE')

# Set the obj variable to the armature object
obj = bpy.context.active_object

# Iterate over the bones in the armature
for bone in obj.pose.bones:
    # Add a "Child Of" constraint to the bone and set the target to be the object
    constraint = bone.constraints.new("CHILD_OF")
    constraint.target = bpy.data.objects[bone.name]

I am not interested in cloth simulation and assigning bones to it but I guess it would be the same, but instead of objects you would have to somehow parent bones to vertices and bake it.

Hi all,

I updated the tool to version 1.5.0 with Blender 4.0+ support. Let me know if there are any bugs with it or some ideas I can implement in upcoming updates!

By the way, @Miko I incorporated your much simpler but faster version (hope you don’t mind), it is located under object type as Rigidbody Fast.

image

The reason that slower procedure exist is that it does more work (duplicating original geometry removing physics and so other stuff).

Changelog:

  • Added support for Blender 4.0+
  • Code refactoring and cleanup
  • Fixed small issues with the armature generation procedure
  • Added faster rigidbody generation procedure (simplier version of rigidbody armature generation)