Jump to content
Pancho

Instance rotations in asset

Recommended Posts

Starting to get a depression.

What seemed to be the most simple task turns into a headache.

I instanced cogwheels in my asset which turn nicely. Different sizes, different rpms depending on their teeth/diameter.

Animates brilliantly in Houdini. Since the cogwheels are instances I thought they would turn nicely in UE4, too.

NOPE. I guess it's about that the asset just cooks once and then is "stached" by UE4. No more "Hey, do you have updates concerning the rotation of your cogwheels? I'd like to spin them. If you want to." questions between the engine and unreal.

It's 2020 and turning objects inside a 3d app isn't anymore state of the art, but I guess unreal makes an exception.

How can I spin a lot of cogwheels in UE4? Just by setting an individually angle on each instance. No collisions or so required. Everything gets calculated by time and diameter. That's all.

If a blueprint is the only way to go, how then do I access the instances in my asset and update their rotations or even positions? Technically? Is there something like "get all instances by name" function which creates an array I could loop over and update values? Looked up the web for half a day without success.

If you have an idea how to do that, I'd be really happy to hear about it.

Cheers
Tom

Share this post


Link to post
Share on other sites

You could consider using the Labs Vertex Animation Textures ROP. This will bake your animation into a texture that describes the transform matrix of each cog as RGBA data. You'll have to build a shader inside UE4 to have this work properly, but the ROP will handle most of that for you.

Share this post


Link to post
Share on other sites

Thanks for sharing this idea. Came across this method, too. I just hope that there's a way to just rotate the instances. Otherwise I would need to convert all instances to geo which creates a lot of vertices.

Managed to create a blueprint which turns my asset. Quite easy. What's missing now is to get to the instance geo and do this per cogwheel. If this is possible, than I would at least find a way to come up with several solutions for my work.

 

Share this post


Link to post
Share on other sites

I'm not sure I understand the problem. If your cogs are packed geometry, and you're rotating them in Houdini, those rotations should export via VAT, just like rigid body simulations would.

Share this post


Link to post
Share on other sites

That would indeed be a game changer. So far I thought it's not used in this way, but rather for deforming geo, like a flag in the wind for example. Will need to look into this option closer. Thanks!!

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×