View Full Version : speeding up fluids without changing result?
dougie0047 04-17-2009, 07:05 PM Hello! I'm creating a steam effect, and the fluids are looking ok'ish by now, but the steam moves much too slowly. Is there a way that I can speed up the movement without destroying the look? the effect will be composited into a shot with a camera move, so I cannot just speed up the rendered clip in, say after effects or similar, because then it would no longer match the camera move.
Also, a couple of quick basic question. I'm kind of new to Maya fluids, and one thing I haven't gotten my head around yet is: what is the difference between scaling the container, changing the container size in the attribute editor, and changing the container resolution, in terms of the effect it has on how the fluids move?
thanks,
Doug
|
|
Duncan
04-17-2009, 09:35 PM
You can increase the simulation rate scale, but the simulation will come out a bit different. To speed up the exact simulation you can first cache the simulation then retime the cache. If you are using Maya2009 you should be able to simply retime the fluid cache in trax. In earlier version you would need to use a single cache file(cache per frame OFF) and connect a new time node to the currentTime attribute on the fluid, keyframing the time on the new time node.
In terms of fluid scaling here is some info I posted earlier:
When you increase the scale on the fluid shape it is like increasing the amount of space the fluid operates in. One will see more of the texture and the speed of the flow(buoyancy etc) will be slower relative to the bounds of the fluid. Also the opacity of the fluid will appear greater relative to the bounds( although be the same per worldspace unit ).
If instead you scale the transform then everything will generally behave the same (as if you had first cached the fluid before scaling) The fluid will look the same, but will be more transparent per worldspace unit.
Note that if one non-proportionately scaled the fluid then it would appear more transparent along some axis than others. As well the texturing would be more squished in some directions. In general one should handle non-proportionate fluid sizes with the size attribute on the shape node and keep the transform uniform. The resolution of the fluid should also be kept in proportion to the size values so that voxels are square.
Note that there are some additional factors that could cause confusion: the default fluid emitter is a point, but it always emits into at least one voxel or one unit of world space(whichever is larger). Thus if you create a default fluid with an emitter and scale it down to one unit the emitter fills the entire fluid. If instead you use a volume emitter then it will not have this restriction. However the emitter dropoff is relative to worldspace, not the fluid scale. Thus if you scale the fluid up and have some dropoff there will be less emission. Thus the fluid emission is identical for scaling only when a volume emitter is used and the dropoff is zero.
Duncan
dougie0047
04-17-2009, 10:02 PM
Thank you very much Duncan! Great info!:)
Hmm, maybe this is a shot in the dark, but you wouldn't happen to know how to get proper renders of fluids with mental ray? As long as I use the buildt in light, also with self shadowing mr renders the same as maya software, but much faster and better. Then I created my own directional light and switched to use real lights, and the self shadowing appears to dissapear, while the render is still really fast. But, then if I switch on ray traced shadows, a frame that rendered in less than 2 minutes, suddenly takes 26 minutes to render!?? What on earth is going on? I thought I could use mental ray to get good renders of fluids...
Sorry, if this is off topic relative to my post, but I just thought I'd throw it out there...
Thanks,
Dag
linuxInferno
04-19-2009, 02:09 AM
you wouldn't happen to know how to get proper renders of fluids with mental ray?
Dag
The way I render fluids: (not including control passes)
-Create new Render Layer
-Create Lighting (usually a light-linked spot light with raytracing default settings)
-Create a plane where ground is. (primitive will work fine.)
-Add the light, the plane, and the fluid to your render layer
-Change the render settings of the layer to include segmented shadows, reduce raytracing settings as the defaults are too much 90% of the time.
-On the plane's attributes turn off primary visibility. (fluid shadows don't work properly without a plane under the container)
-Render
If you are going to composite the fluid like most people do. Turn off premultiplied image and then remultiply the image in your compositing program. (in shake it's mMult)
Raytraced fluids always take more time to render but they come out looking the best. Use the lowest raytracing settings to decrease render time. If you are still impatient maybe you need a faster computer =)
dougie0047
04-19-2009, 12:56 PM
thanks a lot mthorson! I'll try out exactly what you are suggesting. There is only one thing that stumps me a bit. When you say to put a plane underneath the fluids to get the shadows working; do you mean shadows inclusive self shadowing, or just cast shadows on some other surface? And do you, or anyone else for that matter, know why shadows don't work unless you use a plane to simulate the ground?
I'm going to render steam in a darkish setting (mostly close ups of the soup plate), so they won't cast much shadow on the table in the scene anyways, but I would like to have some self shadowing to improve the volumetric quality of things. This was totally missing in my previous render with raytraced shadows in mr. All i got was the same look as with the default light with self shadowing un-checked.
Also, I'm curious, what would you, in an average scene consider to be a good starting point for "lowest ray trace settings"?
Thanks again. Very helpful information!
Doug
linuxInferno
04-19-2009, 06:07 PM
When you say to put a plane underneath the fluids to get the shadows working; do you mean shadows inclusive self shadowing, or just cast shadows on some other surface? And do you, or anyone else for that matter, know why shadows don't work unless you use a plane to simulate the ground?
Also, I'm curious, what would you, in an average scene consider to be a good starting point for "lowest ray trace settings"?
When I say put a plane underneath It is for the raytracing to calculate propely. When you use raytracing you have to have something for the light to bounce off of in order for accurate shading.I would create a seperate pass for the fluid ground shadow where instead of going into the attribute spreadsheet for the ground and turning off primary visibility in the render tab. I would create a material override for the ground as a useBackgroundShader and turn the primary visibility of the fluid off.
If you are doing a separate pass for the fluid like we have been discussing, you dont need reflections or refrations. i would set the raytracing section to 1 1 2 2 1 1 and then increase the shadows depending on distance from cam and such.
Duncan
04-20-2009, 07:22 PM
Just note that Mental Ray in general does better and faster raytracing of the fluid shadows than the Maya software renderer. It is a bit different in the settings... you must have raytraced shadows ON for your light, while Maya renderer automatically does raytraced fluid selfShadowing for all lights if realLights is on( which can be bad in some cases ). Be careful about the number of lights as two lights can take almost twice as long as one, given that the self shadowing of the fluid is the major computation. Depending on your fluid and the sampling settings you could try lowering the shading quality attribute on the fluid to speed things up. (if thin bits look noisy then it is too low)
Duncan
dougie0047
04-23-2009, 08:28 AM
again thanks for the info mthorson and Duncan!
Unfortunately nothing has really changed... I've done everything above, but my mr renders still come out almost exactly the same regardless of whether I use raytracing, self-shadowing or none of them. There is a minute change when using raytracing, but it's so small that it is barely detectable, whereas if I use maya's renderer the change between with or without self shadowing is huge.
I read something about the segment shadow setting in mental ray's render settings needing support from the shadow shader, but I don't really know what that means or where to start trouble shooting. Do you have any more ideas? I could possibly upload a couple of test images later today.
thanks
Dag
Duncan
04-23-2009, 05:11 PM
If you have Maya2009 then all you should need to do is enable raytraced shadows on your light sources. For earlier versions I think you also needed to set ShadowMethod to Segments in the render settings (for Mental Ray under quality).
Duncan
linuxInferno
04-23-2009, 05:20 PM
If you have Maya2009 then all you should need to do is enable raytraced shadows on your light sources. For earlier versions I think you also needed to set ShadowMethod to Segments in the render settings (for Mental Ray under quality).
Duncan
Yep, If you are using earlier versions the things you need are real lights in the fluid attrs, Raytracing turned on in your lights ( I wouldn't use more than one ) then in the render settings turn on segmented shadows
CGTalk Moderation
04-23-2009, 05:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.