mattd Posted July 6, 2009 Share Posted July 6, 2009 I have been banging my head on the wall trying to get a fluid sim to render within a maya scene I have been using fbx export but ran into a bunch of issues: -the polys come over as separate polygons that need to be merged in maya. maya is very touchy about this and gets very slow and painful to manage, especially on big objects -the fbx format seems to have a 2GB limit on vertex caches -houdini does not seem to support exporting a cache per frame -then in maya, the mesh still needs smoothing, which is too slow so I just tried something new : I exported the object as a .mi file sequence and it does work with a few caveats that require some meddling You can use a .mi file within maya in a proxy workflow -I can't seem to get houdini to not set a default material, so I have to delete it out of all the .mi files so maya can reassign -I am a little unsure about the whole bounding box thing, working on it -maya of course does not do simple things like file$F.mi so a script has to be called from the pre render.mel to set the current frame. I'll post it when I get it working better. So a question: is there a way to call custom text in the mental ray ROP? it seems like it does not have a lot of control, but then again this is my first time to mess with it. I want there to be no call to a material or a 'render' statement when the .mi file gets written. Right now I need to write a pythons script to go in and delete them after the fact. the other bonus is that maya renders this actually pretty fast so I am happy to find that this works even with the caveats. MD Quote Link to comment Share on other sites More sharing options...
mattd Posted July 7, 2009 Author Share Posted July 7, 2009 here is the simple mel expression to animate the .mi sequence setAttr -type "string" fill_MIproxyShape.miProxyFile (("houdini/mi/fill8.")+ (`currentTime -q`) +(".mi")); sadly, motion blur does not work, I am guessing that there could be a solution to get it to blur when making the .mi files, but I have to research more. The editing of the files was simple, I used notepad++ to remove the line where the material is set in the file sequence, so I did not have to mess with a script. The other thing is the bounding box, maya sets a line up in the comments section. If you don't care about optimizing for objects that go out of view, you can just make it really big. # assembly root bbox: -1000 -1000 -1000 1000 1000 1000 Quote Link to comment Share on other sites More sharing options...
SpencerL Posted July 7, 2009 Share Posted July 7, 2009 here is the simple mel expression to animate the .mi sequencesetAttr -type "string" fill_MIproxyShape.miProxyFile (("houdini/mi/fill8.")+ (`currentTime -q`) +(".mi")); sadly, motion blur does not work, I am guessing that there could be a solution to get it to blur when making the .mi files, but I have to research more. The editing of the files was simple, I used notepad++ to remove the line where the material is set in the file sequence, so I did not have to mess with a script. The other thing is the bounding box, maya sets a line up in the comments section. If you don't care about optimizing for objects that go out of view, you can just make it really big. # assembly root bbox: -1000 -1000 -1000 1000 1000 1000 Getting Motion Blur is a muti step process. Basically, you need to have your mi have 2 positional values per frame. To do this, its a matter of moving the point along the velocity vector for subframes. In a point SOP > position, replace $TX, $TY, $TZ with $TX+(($VX/$FPS)*(($FF-round($FF)))) $TY+(($VY/$FPS)*(($FF-round($FF)))) $TZ+(($VZ/$FPS)*(($FF-round($FF)))) You need to set your shutter on your camera in Houdini to something below 0.5 ie, 0.4 which means it will read in 2 values per frame and then on your Mental Ray ROP turn on Motion Blur and set the Xform/Geo Samples to 2. Once in Maya, you need to set your motion blur to Frame Forward, ie set the Motion Offset to 0. Set your maya camera shutter angle to 180. and in your custom text you need to set motion box -1100 -1100 -1100 1100 1100 1100. The motion box just needs to be slightly larger than your bounding box to incorporate the blurring. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.