Ossim - Bake simulations to armature (UE4, Unity)


(Peter Gubin) #1

Ossim is a simulation baking tool. It allows you to generate an armature and skinned geometry based on physics simulation to use in game engines and realtime applications such as Unreal Engine 4 or Unity3d or any other realtime application that supports animated armatures.

Ossim on Blendermarket

Geometry for simulations can be made in a lot of ways. There’s built in addon for Blender called CellFracture.
Or you can bring it from other 3d software.

Generated armature in Blender:

Result exported to UE4:

Blendermarket: https://blendermarket.com/products/ossim
Gumroad: https://gum.co/ossim
Cubebrush: http://cbr.sh/zvu75x

(dr_after) #2

Very nice!

Two questions before buy:

  1. How does keyframing in pose mode look? Is that a matter of pressing a button or is it manual process bone by bone, frame by frame? Because for many pieces it would be cumbersome
  2. Can I rig this way also other animations? (for example: I would like to create five boxes, rotate them freely, bake keyframes and export them as a single skeletal mesh to Unreal)

(Peter Gubin) #3


  1. As you can see in a video it’s done manually. Autokeyframing is something I want to roll out with next update, though I’m thinking right now about the best way possible to implement this.
    It’s not a big problem though atm. You can select all bones (ctrl+A) in Pose Mode and just add LocRot keyframe every 5 frames for example using right arrow key to offset frames.
  2. Yes, you definitely can. You can use it not only for destructibles but also if you just have non-rigidbody objects. It will still create duplicated geometry that is rigged to the skeleton and you can just hide initial objects (it’s better not to delete them) and work directly with Pose Mode just like with regular animations.
    I recreated your situation and it worked. Write me up and I can demonstrate it through gif if it’s necessary.

I hope that make sense :slight_smile:

(dr_after) #4

Nice to hear that! I will definetely buy it, don’t know if this month though, because I already bought a dozen of addons and soft lately :slight_smile: But since I am working with UE4 almost exclusively, I think it will be very useful to me. Keep it up and have a great weekend :slight_smile:

(Coverop) #5

It’s always nice to see some features from other 3D softwares to be re-created in Blender.
Do you play on creating an addon that will with liquids?

(Peter Gubin) #6

I actually didn’t look at other implementations of this concept, figured it out on my own :slight_smile: Can you point me to other softwares that do the same? Could be interesting to look at some ideas I can use. I imagine there is something like this for 3ds max but I’m not sure.
Yes, fluids is on the list, there is plenty of features that are planned such as auto keymapping, overall nicer workflow and so on.

(Evandro Costa) #7

Hello, can I make a suggestion?
Nowadays I often manually create associations between bones and vertices on softbodies/cloth simulations to export them to Unity.
My suggestion is for you to expand your addon to work with softbodies and cloth, maybe with modifiers as well. I know that Naughty Dog developers made a script to do exactly that, export simulations to their engine by associating a bone with each vertex.

As you can see on the video, they are calling it “skinning a deformer” which is creating an armature for a modifier, in that case an ocean modifier.

If it could automate my process it would be great. I’d do it myself If I knew how to code, but maybe your addon can be my go-to solution. I’d gladly pay for it.
Nowadays this is my process:

  1. Duplicate a part of a skinned mesh (ex: character) that I want to be dynamic (ex: cape). Apply softbody/cloth to dupli-object (ex: dupli-cape) and set up pinning/goal to vertices that will follow the skinned mesh (for example the top of the cape that goes on the neck of the character).
  2. Create multiple Empties that are each Child of each vertex of the dupli-cape. (When you parent, you can parent to object, vertex or triple-vertex, in this case I parent to vertex). So now the empties are attached to the simulation by following the vertices.
  3. Next I create a secondary armature that has one bone for each empty with it’s bone-head on each empty location. And apply a Child-of constraint to each bone so that it will follow the corresponding empty.
  4. Then on the main armature (character) I also create a bone for each empty as well, and use a Copy Transforms for the corresponding bones on the secondary armature.
  5. Finally I weight paint each cape-bone of the main armature to control each vertex of the main cape mesh. So now if I play the animation, the main rig will move the main mesh and the dupli-mesh, the dupli-mesh will be dynamic, with it the empties will move, the secondary bones will follow the empties and the main bones will follow the secondary bones.

As you can see this is very tiresome work. It would be similar to creating and associating manually each bone of the fracture example you give on your addon page.

The secondary armature is necessary to avoid cycle-dependency, because Blender is unable to differentiate singular bones on an armature on a dependency hierarchy, it only considers the entire armature, therefore if the main armature is controlling the pinning/goal of the simulated dupli-object, therefore parent of it, and therefore is also parent of the empties, if you use a copy transforms of the main armature to the empties direcly (instead of passing through a secondary armature) you create a dependency cycle.

(Peter Gubin) #8

Hi! Yes, cloth is next on my list for 1.2 update as well as export templates (ue4, unity, etc).
1.1 release is almost done, it will include bugfixes, ui/ux improvements and autokeyframing. Thanks for the video, I will take a look - seems really interesting.

(Peter Gubin) #9

Ossim 1.1 Release Notes:

  • https://github.com/JacquesLucke/animation_nodes is supported (dm me if there are any issues)
  • Code refactor - now introducing new features will be easier
  • Autokeyframing feature (now keyframing can be done with 1 click)
  • UI/UX improvements (more options and context-aware tools)
  • Bug fixes for armature generation:
    • Duplicated geometry now use the same modifiers/mesh data/materials as the originals
    • Generator now properly treats modifiers and non-mesh object in the selection
    • Animated physics assets now treated correctly

Plans for the next release (1.2 and 1.3):

  • Cloth simulation bake
  • Export templates
  • Morph targets bake
  • Bugfixes such as reducing produced fbx filesize and more
    Also I will probably make video sequence in UE4 showcasing actual scene with lighting, assets, etc (some destruction sequence similar to Elements Demo from Epic).

If you have any suggestions for features let me know!

(Evandro Costa) #10

I have a suggestion regarding the cloth simulation that you will implement.

Since I believe your addon will add a bone for each vertex of the original cloth mesh, maybe there could be a couple settings to control how many bones the addon will generate because clothes are not the same as debris, in the sense that on a cloth every vertex is connected, while debris (explosions, breakage) every piece are separate objects, therefore every broken piece must have necessarily an individual bone for it, while clothes could have a bone not only on every vertex, but also only on every second or third vertex, and still work. It would only appear to be of less resolution the more space (vertices) there is between bones.

So these are the options that I think would be interesting:

-a dropdown menu where you can select the “resolution” of the copied baked mesh, where you determine the spacing (in vertex count) between bones.
–0 = a bone every vertex
–1 = a bone every other vertex
–2 = a bone every third vertex etc.
– maybe up to 5, so each bone every 6th vertex.

If the option above is greater than zero, this means that on the boundaries of the cloth some vertex are gonna be lacking bones, and maybe the user wants the boundaries to have a vertex every bone to guarantee more fidelity on the edge movement. So it would be good to have a:
-option to place bones on every vertex of the outer edge (extreme boundaries) of the cloth,
-option to place bones on every vertex of open spaces boundaries in the middle of the cloth.
(If you press F on edit mode with a mesh with holes in it selected, blender will try to fill in the holes with faces, maybe this code can be used to detect boundaries of holes in the mesh, and place bones on the vertices there).

-option to place bones on every vertex of a specified vertex group, so the user can have more control over which areas of the cloth will have it’s baked movement more detailed. (This could also be used to place bones on every vertex of the edges, but would require the user to create a vertex group containing the edges, so it’s more convenient to have the option separated.)

(Peter Gubin) #11

Thank you for you suggestion! I will definitely consider this as an implementation option maybe in a form of operator options or in the general ossim tool panel.

(Peter Gubin) #12

Hey guys, 1.2 progress

Cloth sim bake prototype is working, now I'm working on custom bones setup cases. #b3d #Ossim #ue4 pic.twitter.com/lzAImWaTjq

— Peter Gubin (@GubinPetr) October 24, 2018

(Peter Gubin) #13

Ossim 1.2 Release Notes:

  • Cloth simulations bake
  • UI improvements
  • Bug fixes

Let me know of any sorts of bugs or feature ideas.