Jump to content

Export Of Dynamic Objects' Baked Simulation


Zanozza

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!

Link to comment
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?

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 3 months later...
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
Link to comment
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?

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...