Fluid rendering optimization


#1

Hi

Just have a question for a fluid render tips.
I tried to render a fluids - animation lenght is about 200 frames.
Thing which is bothering me is that at the beginning of the animatiof fluids rendering quite fast - about a 2 - 3 minutes per frame in Full HD resolution. After 40 or 50 frames rendering time is going incremental bigger. from 10 minutes , 15 and up to 30 or even 40 minutes per frame in the frame around 150. Is there any common tips to avoid render time going so big? It doesn’t help when i test a resolution for example at single still let’s say in frame around 120 and it renders fast - 3 minutes , anyway when i batch render whole animation in the same frame the time grows to 30 - 40 minutes !!! what the hell ? I optimized my scene really fine ( at least i think so) . one direct light , low depth , shadowing low , segments , ray tracing 2 in mental ray. All the settings are quite low , including shading quality of the fluid like 1 or 2. Rendering is with MR of course.
I also found iteresting when i use mia exposure simple in the lens shader of my camer - render time goes bigger and shadow quality of the fluid go bad quality - almost one black mass instead of fine semi transparent cloudy shadows like was without using any lens shaders…

I’ve checked some blog fluid tips like agentfx.com has on his website long time ago and it seems my settings for the fluid and MR are o.k …

Any tips from masters ?

best greetings

czaps


#2

First, what’s your fluid resolution? The higher the resolution is and the more fluid is in the container, the longer your scene will be rendering.

Do you really need a ray tracing setting of 2? For fluids, 0 is sufficient in the most cases. If you don’t urgently need real Lighting, use the fluid light option.


#3

Thx Phlok

My fluid resolution vary from one sim to another one. It’s usually between 120 up to even 300. It doesn’t matter really to be honest. I found that the resolution doesn’t have a big influence on render times in my situation. I tested it before many times.

I don’t use real lights in fluid , I will check and go lower with raytraces as You suggested. We will see if that will be helpfull.

best greetings

czaps


#4

Lower the shading quality attribute on the fluid to as low as you can tolerate the noise.

Duncan


#5

Are you rendering on a farm? It sounds like it may not be able to access the cache, assuming you cached it, and is having to sim the scene from frame 1, for each frame you are rendering. Worth checking.


#6

im having very similiar issues with fluid shots in maya 2011. Ive tried setting initial state and turning evaluate fluids off on cached fluids. Ive had some success with these but still get the occasional sim that takes forever at higher frames to render. for those ones i set start frame for ten or so renders and break it up for rendering… One thing i have learnt is yah if the warning bar saying this file contains an uncached fluid comes up (even if it isn’t true) your farm machines will render exponentially longer than if it isn’t there (by setting initial state)

all these answers i found on cgtalk after doing a search.


#7

Thank You Guyz for help !

I’m not rendering on the farm . My workstation is dual Xeons - 8 core machine.
It’s strange but sometimes even when your fluid is uncached the render time is still the same.
I didin’t find a lot of improvments in render times with cached fluids - on single worjstation machine of course and not on renderfarm where caching is neccesary to handle the files on many PC’s…

Duncan : my shading quality for fluids tends to be around default 1 - sometimes 2. Not any higher values cause of render time goes bigger .The same i try to increase up fluid resolution instead turning on texturing for color, incandesence and opacity.
If i play with that - effects are very nice even with med to low res fluids but render times again - jumps to much higher per frame.

best greetings

czaps


#8

Have you watched your system’s RAM use during the render? You may be hitting your limit, and going into swap, which will slow things down considerably.


#9

Depending on the resolution and size attributes of the fluid sometimes values less than 1 can look OK. Don’t be afraid to try settings like .1, especially when using a fluid as a particle shader.

Duncan


#10

Derek :
My RAM usage is not very high - usually about 4 - 6 gb max.
I have 8GB here on my machine.

greetz

czaps


#11

Well, I will try to play with shading quality settings for the future rendering of Fluids.
Will let You know if that helps… i hope so ,

best greetings

czaps


#12

After 40 or 50 frames rendering time is going incremental bigger. from 10 minutes , 15 and up to 30 or even 40 minutes per frame in the frame around 150.

This may happen if the fluid density expands, in which case the raytracing phase of the render would be slow down… more density means more shadow feeler rays, which is generally the big slowdown. This can get particularily slow if one has motion blur. Turning off real lights on the fluid can speed up the render significantly, in some cases, if that is an option for you.

However a second cause of a slowdown towards end frames can be runups. In general if you render frames in a sequence then you shouldn’t get a runup, however rendering frames across a farm will cause runups unless the fluid is cached. Sometimes even cached fluids can get runups, though, where they load all the previous cached frames(which can take nearly as long a simulating). Setting your dynamic fluid grids to static after caching can help this if it happens. One needs to make sure that there is nothing else in the scene that could be triggering a runup, like a particle system. A sign that a runup is the problem can be a long pause before it starts rendering the frame.

Duncan


#13

thanks Duncan ill try those tips!


#14

Thanx Duncan ! ;)) You are the best !

best greetings

czaps


#15

Did you solve the issue? What was your solution, please?


#16

well it looks like my stupidity was the reason of long render times…

I used couple of particles following fluid as well . I cached them out , cached fluid and render times was huge in the frames above 140 smthg.

Then i separate fluid , particles to the two scenes. Fluid renders normally now and accordingly fast time per frame…

It looks like it was the reason = to don’t render fluid and particles in the same scene…

best greetings

czaps


#17

sounds a lot like maya doing a caching on the particles even if it should not. this is really a very old problem.
if you encounter problems with increasing render times you could check if the cache is used or not by simply adding a small expression in your scene like
print (currentTime -q).

if you now look at the command line output and you see maya counting up like
1
2
3
4

something goes wrong and the cache is not used.

cheers

alex


#18

As Alex points out you may be getting a runup and the print he suggests would show if this is the case.

Another possible problem is that if the particles cast shadows and overlap the fluid then they could make the render slower because the shadow feelers from the fluid would need to intersect and evaluate the particle densities. This is made even worse if the particles are moving and motion blurred.

Duncan


#19

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.