Jump to content
Zanozza

Export Of Dynamic Objects' Baked Simulation

Recommended Posts

Hi!

I would like to pass the next steps:

1. To bring, for example, 100 single objects from Maya.

2. Create simulation in Houdini.

3. Save the baked animation for using in Maya.

Do Houdini have any solution for this? :blink:

Thank you so much!

Share this post


Link to post
Share on other sites
Hi!

I would like to pass the next steps:

1. To bring, for example, 100 single objects from Maya.

you can use collada plugin for M to export stuff

2. Create simulation in Houdini.

create simulation in Houdini, depends what you need

3. Save the baked animation for using in Maya.

I'm not sure if I understand. You wanna create sim in DOPs and bake it again in M?

Share this post


Link to post
Share on other sites

Is there any particular reason why u don't just do the simulation in maya's RBDs?

Share this post


Link to post
Share on other sites
Is there any particular reason why u don't just do the simulation in maya's RBDs?

1. Unfortunatelly, Maya's RB engine can't work properly with 200-300 dynamic objects with complex shape.

2. If you'll have at least 1 intersection between any objects, Maya's RB engine won't work.

3. You can't change the collision type (like real shape, bounding box etc).

4. You can't use the collision layers, and more, you can't animate the collision layer number.

I can continue if you wish so.

Currently, I should use XSI' physX for dynamic simulations, but I hate the speed of XSI script' speed.

Share this post


Link to post
Share on other sites
1. To bring, for example, 100 single objects from Maya.

In Maya, just select all the objects that you want to bring into Houdini and export them as an .obj. When you bring the obj into Houdini, add a Connectivity SOP and a Partition SOP in order to create a group for each object. You will also need to add a reverse SOP to reverse your vertex order as well as a point SOP and flip your normals (-$NX, -$NY, -$NZ) since Maya brings them in reversed.

2. Create simulation in Houdini.

Do what you got to do in Houdini. Export your geo as an .obj sequence

3. Save the baked animation for using in Maya.

This is the complicated part. Since Maya cannot read objs as a sequence the most straight forward and simplest way (yet can be very heavy) to get around this is to import all your objs that were exported from Houdini (should be one obj for each frame of your sim). Turn all their visibilities off. And then create a mel script that will turn on the visibility for each obj for their respective frame, so GEO_1.obj will turn on at frame one and turn off all other frames. GEO_2.obj will turn on at frame 2 and turn off all other frames, etc...

The other way is to somehow transfer the point positions from Houdini and apply it to the geo in Maya, but that involves a lot more R and D and it would probably be easier to just do the shading and rendering in Houdini instead.

Share this post


Link to post
Share on other sites
I can continue if you wish so.

Yes please... :cry2: continue!

No, seriuosly, this is quite interesting not because of this very obviuos reason..., but it good to know the limitations as we all works around Maya (me not actually) and quite often we have to make serious decisions which way to go.

thanks,

sy.

Share this post


Link to post
Share on other sites
This is the complicated part. Since Maya cannot read objs as a sequence the most straight forward and simplest way (yet can

I bet there are mel scripts on highEnd which can do that

Share this post


Link to post
Share on other sites

Well i don't understand what's your problem!

I work in Maya for over 5 years and in Houdini for one year, i've done rigid bodies with around nearly thousand pieces in maya and everything is fine.

Well there ain't easy and fast way of doing dynamics, you have to know the pipeline, it has nothing to do with the particular application, it's all about how you work around.

So in your case i would you proxy objects nearly match your highres geometry, do you think people who work in Houdini, doesn't do that?

Of course in production case we use always proxies, when dealing with dynamics etc, large scenes.

Share this post


Link to post
Share on other sites
The other way is to somehow transfer the point positions from Houdini and apply it to the geo in Maya,

Yet another way is to extract the dobject Position, rotation and pivot data out of DOPs in to CHOPs, then write out the data as ascii then apply these Transforms to your original objects in Maya. Here you are Just matching what the DOP Transform SOP does.

Matching the channels to the pieces in Maya is the tricky bit in this workflow but it is important to note that the result from the RBD sim is the Transforms applied to geometry objects.

Share this post


Link to post
Share on other sites

You could potentially use the realflow plugins to read out the Houdini sequence, and bring it into Maya.

Share this post


Link to post
Share on other sites
Yet another way is to extract the dobject Position, rotation and pivot data out of DOPs in to CHOPs, then write out the data as ascii then apply these Transforms to your original objects in Maya. Here you are Just matching what the DOP Transform SOP does.

Matching the channels to the pieces in Maya is the tricky bit in this workflow but it is important to note that the result from the RBD sim is the Transforms applied to geometry objects.

Hello,

Matching the channels to the pieces in Maya is exactly my problem, I cannot get the correct .chan transforms to match up with the objs I import into maya. I'm using the chandumper.mel script and when I apply the ascii information to my 15 pieces of debris and hit play they all go crazy.

In Houdini I partition my fractured objects based on color. So the naming is: color_310_62_601 etc. the numbers are based on RGB i'm guessing. Perhaps the issue is when I import these 15 objs into maya, maya trys to sort them alphabetically or numerically and when I go to select these objs and apply the ascii transforms they are being applied in the incorrect order.

How can I go about renaming the primitive names the Partition Sop outputs?

Now I ran this workflow with a simple cube so I know it works. The challenge now is applying it with 15 or 1000 primitives.

Thanks for your time.

- Geronimo

Edited by Geronimo Moralez

Share this post


Link to post
Share on other sites
How can I go about renaming the primitive names the Partition Sop outputs?

I'm not sure what is going there but generally speaking groups name from Partition SOP is completely arbitrary - just evaluate any Houdini's expression in that field. It doesn't have to finish with numbers if that brings you trouble in Maya. See Partition SOP help for details. Maybe you can recreate the same order as in DOPs sim?

Share this post


Link to post
Share on other sites

Export DOP simulation from Houdini in OBJ Sequence.

Then in Maya try this script...

Maya .Obj Sequence Importer Node

This node loads .obj file sequences into a Maya scene according to the actual frame.

So your able to import sequences of exported simulation data into your Maya scene without

importing them all at once, just the necessary file according to the actual frame is loaded.

For a fast replay there is also a caching function available.

http://www.subsites.org/241.0.html

Share this post


Link to post
Share on other sites

Thank you for answer, but...

Can you imagine the size in megabytes of 300-500 chunks with 1000 frames of baked animation?

That why I trying to find the cheap way for Houdini->Maya animation export...

Share this post


Link to post
Share on other sites
Export DOP simulation from Houdini in OBJ Sequence.

This works! As far as texturing and UVing each frame, would it not be difficult?

_______

ALTERNATIVE Workflow:

My previous post is solved. With all my exported OBJs jumping around everywhere using .CHAN data in maya.

The issue was in the .CHAN export from Houdini, I simply did not delete my ground plane and unnecessary geo channels. I Export: t? r? only, no need for p? .

As you export all the fractured objs back into maya, Center the pivots.

Using the ChanDumper.mel v.7 script, simply select the objects in the outliner, top to bottom and add those transforms to the script gui and read in the .CHAN data.

Zanozza - Reading the .CHAN data to the transforms of the maya objects is actually baking all the houdini simulation onto the objects.

Thus an excellent DOP workflow from Houdini to Maya. I did this with 86 simulated objects. So the only limit is RAM.

-Regards

Geronimo

Edited by Geronimo Moralez

Share this post


Link to post
Share on other sites

it's great to find someone actually made a better obj seq importer in maya. The main issue is motion blur though. The baked animation approach ends up solving that, but no object deformation

The one elegant solution that may be worth looking into is the new maya geometry cache format. It would allow deformations and give motion blur, plus maya is optimized for it. When I get better with python, I will look into writing a houdini exporter

MD

Export DOP simulation from Houdini in OBJ Sequence.

Then in Maya try this script...

Maya .Obj Sequence Importer Node

This node loads .obj file sequences into a Maya scene according to the actual frame.

So your able to import sequences of exported simulation data into your Maya scene without

importing them all at once, just the necessary file according to the actual frame is loaded.

For a fast replay there is also a caching function available.

http://www.subsites.org/241.0.html

Share this post


Link to post
Share on other sites

Did you guys ever find a solution in Houdini on how to bake an animated simulation to the geometry? I'm facing a similar problem.

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

×