Question about Animated Meshes

For rigging, I assume I rig the collision geometry and it will work fine in UE4? I know the collision geometry will move in my DCC when animated, but I just want to make sure that is indeed how UE4 handles it.

Also, before I go through all the trouble, I want to see if anyone else has tried this. Lets say I have a cabinet, with a drawer, and I make an animation of that drawer opening, with collision geo and everything. Will UE4 physics be able to handle putting an object in that drawer while the animation plays? So if a player decides to open the drawer, press E or whatever and the animation plays, and there will be, idk, a can of beans in there, will the can of beans behave normally? Or will it clip through the drawer and fly everywhere? I want to see if anyone else has tried anything similar, if not I will still try, but I would like to check before hand anyways.

Thanks guys!

You make a physics asset which will attach collision objects to the bones of your skeletal mesh.
As for a drawer type thing, the precision for physics in games is not very high, since it takes more processing power. I don’t think you could make a collision object in the correct shape if you have the drawer as a skeletal mesh. However, if you import it as a static mesh you could create the more complex collision and then use blueprints to animate the drawer. I’m not sure how well it would simulate something in a drawer though.

Hmmm, I was going to make the collision object in my DCC and it be a near exact representation of the inside of the drawer. I assume if I animate it with a blueprint that they would need to be two separate meshes? I am thinking either of doing it like this, or doing something like Skyrim, where the drawer opens partially, and its all black inside and then an inventory window opens up. I would really like for this first method to work though. Guess I will give it a shot then, thanks.

EDIT: Oh I see, you can’t import custom physics assets, so you have to make it in editor. Ok, time to do some more research haha

I don’t think you will be able to get the physics of the drawer and objects in it to be stable enough to have it work as a physical drawer. With a lot of work you may get it to work but its not going to be worth it.

I would have the drawer attach the meshes of the objects being put into it but without physics (Similar to how Borderlands handle loot chests). This way you can have the drawer open and it will show the objects it contains without using an inventory screen. You will need to implement a way to pick where the objects should be attached though so they don’t overlap. Possibly doing something like an RPG style inventory grid if you want to get very fancy or just limit the amount of objects and always put them at the same spot. Or if you want to get super fancy implement a collision based packing algorithm.

Having the actual drawer as a physics object might work pretty well but probably still just easier to move the drawer from blueprint.

Hmmm I like the idea of attaching the meshes, that would be a good in between method I believe. I guess I would need to use sockets then?

Sorry for the double post, but I can’t believe I forgot to mention this. What is more expensive? Rigging the cabinet with a bone for each drawer, or importing the cabinet and drawers as separate meshes and making a blueprint prefab with the doors rotating? I was thinking of rigging the cabinets with a few bones for drawers/doors then making an opening animation and a closing animation, and triggering those with key presses. But if a blueprint prefab is cheaper, I will go that way. I hope someone with experience can chime in and let me know! Thanks guys!

Yea.

As far as doing it as one skeletal mesh or two static meshes it probably is not that big of a difference in this case. Two draw calls will be needed if you have two static meshes but at the same time the individual draw calls should be faster then a skeletal mesh draw call. If you are going to have a lot of cabinets it might be worth looking into the performance aspect. But otherwise I would use the method you find the easiest to work with rather than worry about which is better performance wise.

Animation will give you more artistic control while two static meshes gives you an easier blueprint to work with.