PDA

View Full Version : Help. Rendering times through the roof



heynewt
11-14-2008, 06:55 AM
Hi,

I'm working on an HD project (720 X 1280) with scenes of ships on the water. I'm using really dense SubD water mesh for wave displacement. I've got raytrace reflection on and of course raytrace shadows. Raytrace recursion is at 8.

I'm rendering with a dual Quad core 2.6.

Taking about 49 min/ frame. That's not acceptable for my delivery. Very little difference between classic camera or perspective in terms of render times.

Fprime previews take about 3 minutes to get the same result, though the water looks like crap in Fprime so I can't use it for final output.

Has anyone else run into surprisingly long render times with 9.5?

Robert N.

Andrew March
11-14-2008, 07:22 AM
Okay, what are your AA settings and are you using Radiosity, please show screengrabs of both.

heynewt
11-14-2008, 07:36 AM
Okay, what are your AA settings and are you using Radiosity, please show screengrabs of both.

Nope, no radiosity. Sorry, should have said that.

Lighting: 1 distant light, 1 point, 2 spotlights as specular only

Andrew March
11-14-2008, 10:42 AM
Okay, change your AA to 4, you really don't need 15 anymore and change the motion blur to photo not dithered.

Change adaptive sampling to 0.03, 0.1 is way too high.

Change sampling pattern to classic.

Make sure that your render is making full use of your processor cores.

I've got Ocean renders using radiosity rendering at 7mins per frame.

If you've still got problems, upload the scene file (don't need the objects) and I'll have a look at it for you.

Do me a favour though and let me know your computer specs.

Hope that helps

heynewt
11-14-2008, 10:47 AM
Andrew,

Thanks for those tips. I'm going to try all of them.

Maybe I don't get adaptive sampling any more. Didn't it used to work that if you went down to, say, .03 you were going to take a HUGE render hit vs .1?

Or is that the tradeoff from taking down the aa to 4?

Robert

Andrew March
11-14-2008, 11:26 AM
Have a read of this: http://www.except.nl/lightwave/aa/index.htm

Any questions, just ask.

Tobian
11-14-2008, 01:34 PM
Do you actually need 4 motion blur passes? 2 might be enough, even if there is huge motion in the sea.

As a tip, try altering your reflection and refraction quality settings (number of samples per ray) on a per surface basis, you can find them in the surface environment tabs (or the advanced tabs in nodes). If you have a decent enough adaptive sampling, or a very low amount of reflection blur, then a quality as low as 1 in both can speed up rendering time, though it's often frame dependant.

If possible lower your ray recursion, so it's the absolute minimum you need for the scene too.

heynewt
11-14-2008, 01:43 PM
There's an explosion, debris - torpedo, etc. 4 MBs is about as few as I can get away with.

Great advice though about altering reflection and refraction on a per surface basis. Didn't consider that. (no refraction in this case, but still good advice)

If the ray recursion gets too low I'm worried my ship reflections get funky.

On another note, I upgraded to Fprime3 v.2 and that is much nicer than v1. Water looks 90% as good as LW. If I have to I can do it in Fprime, but LW shouldn't be taking this long. It's not THAT big a scene.

Robert N.


Do you actually need 4 motion blur passes? 2 might be enough, even if there is huge motion in the sea.

As a tip, try altering your reflection and refraction quality settings (number of samples per ray) on a per surface basis, you can find them in the surface environment tabs (or the advanced tabs in nodes). If you have a decent enough adaptive sampling, or a very low amount of reflection blur, then a quality as low as 1 in both can speed up rendering time, though it's often frame dependant.

If possible lower your ray recursion, so it's the absolute minimum you need for the scene too.

Tobian
11-14-2008, 02:03 PM
Ok well 2 things.. reflection quality makes zero difference to Fprime, and secondly, the trick is to find a balance here, the adaptive sampling in modern cameras (perspective, real lens etc) will iron out any noise caused by a low sample rate in your reflection, and the advantage is materials which are not interacting with the scene much won't have to shoot out as many rays. Don't forget here, that each ray spawns an equal number of child rays based on the seed number (it's not literally the same number as the seed, even 0 will shout out at least 3 rays per sample, and often looks acceptable).

The trick is to find the golden number on a scene by scene /surface by surface/object by object basis, because sometimes the number of re-samplings defeat the utility of the initial render speed.

On the flip side, low reflection quality also speeds up the radiosity calcs, if you're doing any :D

You might also want to lower the light quality, if you're using an area light, as again the adaptive sampling takes care of that.

Nangleator
11-14-2008, 02:38 PM
Try lowering ray trace precision.

Any internal reflections happening anywhere? That can kill time.

Is the ocean plane slowing things down? How many polys? I've used a non-APS trick to cut down on poly count... Make a "hero" patch of ocean that only extends a certain distance from the camera. Beyond that, and slightly below, have a low res subdivided plane that uses the same surface and the same displacement. You probably won't see the border, but if you do you can always use a weight map to fade out the edges of the hero ocean plane.

Of course, ocean planes don't cast or receive shadows, and the low res doesn't receive.

Nangleator
11-14-2008, 02:40 PM
Oh, if your ocean displacement is set to World, you can have that hero patch of ocean follow the camera around without ill effects.

Andrew March
11-14-2008, 02:52 PM
All excellent advice from the guys, I would really like to have a look at this scene, minus the objects/effects, just simply to see if I can replicate the rendering times you are suffering and see if i can iron them out for you.

Tobian
11-14-2008, 03:05 PM
Here's an idea.. why not make an envelope for the motion blur passes, because your whole scene might not need them. Also with a low adaptive sampling it's surprising how smooth a result you can get.. The PR blur is radically different! Take a look at my fog experiments, made with a plane in motion ! http://www.spinquad.com/forums/showthread.php?t=24203

toby
11-14-2008, 10:20 PM
If the ray recursion gets too low I'm worried my ship reflections get funky.

A ray recursion of 8 wil give you no less than :

a reflection of the ship reflecting the water reflecting the ship reflecting the water reflecting the ship reflecting the water reflecting the ship reflecting the water.

2 is enough for most feature films, you can probably get away with 4 or less, and that'll make a big difference in speed.

Tobian
11-15-2008, 02:54 AM
I think the issue here is you need to test these things, there are ways of mitigating the speed, but there's no magic number you can type in which will fix it :D

heynewt
11-15-2008, 08:02 AM
Thanks for all this. Yes, I'm using the hero patch trick, but not in the present scene.

All of the above advice is great. In a little while, I'll post the actual scene. I'm sure it's some setting/combination of settings that I've got wrong that's just killing me. Would love anyone's advice on it.

One thing I forgot to mention is that I'm using ACID from Worley's Polk collection to create foam trails on the water from the torpedo and the ships. It looks great. There's a little rendering hit from it, but it's not extreme, because the trails are small in the shot.

Robert



Do you actually need 4 motion blur passes? 2 might be enough, even if there is huge motion in the sea.

As a tip, try altering your reflection and refraction quality settings (number of samples per ray) on a per surface basis, you can find them in the surface environment tabs (or the advanced tabs in nodes). If you have a decent enough adaptive sampling, or a very low amount of reflection blur, then a quality as low as 1 in both can speed up rendering time, though it's often frame dependant.

If possible lower your ray recursion, so it's the absolute minimum you need for the scene too.


Try lowering ray trace precision.

Any internal reflections happening anywhere? That can kill time.

Is the ocean plane slowing things down? How many polys? I've used a non-APS trick to cut down on poly count... Make a "hero" patch of ocean that only extends a certain distance from the camera. Beyond that, and slightly below, have a low res subdivided plane that uses the same surface and the same displacement. You probably won't see the border, but if you do you can always use a weight map to fade out the edges of the hero ocean plane.

Of course, ocean planes don't cast or receive shadows, and the low res doesn't receive.

MooseDog
11-15-2008, 08:31 AM
also un-check "render lines" if it's not necessary.

after all the excellent advice above, start looking at your surface editor. i've found that occlusion nodes add time, blurring reflections always adds time, any node that might be sending out a bunch of rays looking for information iow.

heynewt
11-15-2008, 08:45 AM
Once again, great advice. I've got no occlusion or even soft reflections dialed in to the surfaces.

I love that this thread has become almost a Master Class in optimizing render times in LW. Very helpful to me, and I've been using LW for years.

Robert N.

Tobian
11-15-2008, 09:12 AM
Haha a little, however, LW has changed so much over the last year, that yes, you do need to learn to refine your skill set a lot! Every time I get the hang of something, they start bringing out new ways of doing things!

multipass
11-15-2008, 11:03 PM
is photoreal mb supposed to be faster than dithered?? when i go photoreal i never have the time to wait around for the renders to finish lol.

Andrew March
11-16-2008, 12:16 AM
Photoreal isn't faster but it acts a bit like additional Anti Aliasing, so you can have relatively low AA settings with a few MB passes and get a good result without taking too much of a hit on render times. And of course it's unbeatable for propeller blurs :D

Litebright
11-17-2008, 06:07 PM
Heynewt,

You should be tickled pink that your have a Quad Core machine at your disposal for rendering!! I agree though that 49 minutes per frame is insane for a Quad Core machine, it is absolutely terrible for what you are doing.

I say this with confidence because I am doing basically the same thing you are.. I'm doing visual effects scenes for a low budget feature film that involves a rogue U-Boat shortly after WWII. The budget it so tight that I am rendering all the shots on a 5 year old 3.0 Ghz Pentium 4 using Hyperthreading, via LW 8.5 lol. I sure wish I had one of those new Core i7 Quad processors that just came out this month!

I also have sub-patched water, raytraced shadows and reflections like you mentioned. My Ray Recursion limit is set to 4. I also have a few area lights, but they don't cast any shadows. I am using Classic Medium Enhanced AA with adaptive AA set at .06 for my surface shots. I only used Motion Blur for my torpedo firing scene and just used the "Normal" mode. All other scenes have no MB, just takes way too long to render. My frame resolution is 1280 x 555, versus your 1280 x 720, which I am thankful I didn't have to do. A loose 2.35 to 1 ratio is the aspect for this film.

As a comparison, my longest render times for a frame were between 15 to 17 minutes for the motion blurred torpedo firing scene. My longest renders for surface shots have been about 12.5 minutes per frame. That was from the most complex scene, which contains a surfacing U-boat, a burning cargo ship in the background along with fire and water spray hypervoxel effects (don't have any of that fancy stuff you mentioned for making water spray etc). If i had your machine, the render times would be about about 2 to 3 minutes per frame for my slowest rendering scenes! About 6x faster..

That is what you get when a film's entire budget is equivolent to a Hollywood film's coffee budget and you can't afford to buy newer hardware and software.

heynewt
11-17-2008, 06:37 PM
Ha, we're working on the same film!

Actually mines for a tv series. But it's the same shots. Uboat attacking a convoy of ship. Explosions, fire, death - great stuff.

Yeah, there's something insanely wrong in my settings I think. I mean it could be the motion blur that's killing me. I have to have it because all the CGI is "handheld" with snap zooms in every shot (not to mention rack focus blurs). Before I went to Fprime I was dividing the shots up between the frames that needed MB and the ones that didn't. That was sort of working.

Now I've done a bunch of tests with Fprime and normal renders, adn the new vsn of Fprime3 - vsn 2 - is awesome. It's spitting out frames that are 99% as good as LW's native renderer, but about 10X faster. I still have to comp in my ship foam wake trails (done with ACID) and my sun flares, but Fprime is saving my butt.

When I get a break from these long days just trying to make my shot list, I'm going to do a bunch of tests. But for the moment I'm going to make my deadline so if it ain't broke I ain't gonna fix it right now.

But I couldn't imagine doing this without an office full of quads and dual quads (well 2 quads and 1 dual quad).

Robert N.

Litebright
11-17-2008, 07:55 PM
You have 2 Quads and a Dual Quad machine??!! You sure you don't work for Industrial Light & Magic? I've got one lone P4...all by itself, struggling to crank out frames. I might as well be rendering with an Enigma machine ;)

Snap blurs, rack focus and your on ACID! Maybe the ACID is making you just hallucinate that your render times are taking soo long.. I've got none of that, don't have FPrime either. I guess it was either use what I have or shoot the scenes live action with a Revell 1/72 U-boat model in a swimming pool.. but I don't have a pool, so that wouldn't have worked either.

Its back to work for me as time just isn't on my side.

toby
11-17-2008, 09:45 PM
The budget it so tight that I am rendering all the shots on a 5 year old 3.0 Ghz Pentium 4 using Hyperthreading, via LW 8.5 lol. I sure wish I had one of those new Core i7 Quad processors that just came out this month!
OMG!

You must have lead an evil life. Does the guy who's making you do this have red horns sticking out of his head? HV on a single proc??? That's the cruelest thing I've ever heard of! I'd give them shadow maps and spherical map reflections if someone did that to me!

biliousfrog
11-18-2008, 03:46 AM
Of course, one of the fastest ways to speed up rendering is doing motion blur and DOF in post ;)

Frishluft's lens care and reelsmart motion blur are awsome...although exporting motion vectors is still a nightmare in Lightwave.

heynewt
11-18-2008, 07:10 AM
I'm doing my DOF in post, but I've used reelsmart with not great results. I've got some old Final Effects Compete filters that actually do a little better job of MB in After Effects. I bought them years ago, and I have to use them with AE 5.0 to get 'em to really work, but they do work.


Robert

Mr Rid
11-18-2008, 12:44 PM
In 12 years of production have never needed a ray recursion of more than 2 for any reflective surface. A widespread misunderstanding is that RR works like a quality setting. As Toby mentioned it is just the number of times a reflection bounces back and forth between two surfaces.

Most people leap for the Perspective camera and photoreal blur when it may not really be necessary. I usually find Classic camera settings that look as good but render way faster.

Litebright
11-18-2008, 02:38 PM
OMG!

You must have lead an evil life. Does the guy who's making you do this have red horns sticking out of his head? HV on a single proc??? That's the cruelest thing I've ever heard of! I'd give them shadow maps and spherical map reflections if someone did that to me!

Ah ha ha, ha! No horns, but he has two furry little ears sticking out of his head.. Bow to Kitty! Kitty made me do it!

I'm going to test some frames with Ray Recursion set to 2 instead of 4. I've also started using Extra Trace Optimization.

Next project will definitely use a new Core i7 Wonder Weapon with LW 9.5. The P4 will be decommissioned from Lightwave service after this project is completed. In a time of war, any available vessel must be used to carry on the fight. Victory will eventually be had though... It is Kitty's unshakeable belief!

Interestingly enough, I tested some of my scenes in the LW 9.5 trial, and when using the Classic Cam, they actually took LONGER to render than in LW 8.5! Also my Uboat model did not agree very well with the Perspective Cam. Kitty was not happy to see that. My 9.5 trial has expired now anyway, so LW 8.5 was it for this one.

toby
11-18-2008, 03:37 PM
I'm going to test some frames with Ray Recursion set to 2 instead of 4.
Yea I usually use 2 or 3. I just did a render that took 6 days on 2, old machine here as well.


I've also started using Extra Trace Optimization.

I did some experiments with this, it does speed up raytracing but the time to optimize is huge - so your render time needs to be very long to benefit. My test was something that took an hour and 1/2 to do one pass, or 1 hour with the optimization turned on. You have to test it at full size to see if it helps or not, too small and the render may go faster than the optimization.


Next project will definitely use a new Core i7 Wonder Weapon with LW 9.5. The P4 will be decommissioned from Lightwave service after this project is completed. In a time of war, any available vessel must be used to carry on the fight. Victory will eventually be had though... It is Kitty's unshakeable belief!

Interestingly enough, I tested some of my scenes in the LW 9.5 trial, and when using the Classic Cam, they actually took LONGER to render than in LW 8.5!
I heard about that, it could be that the optimization is on all the time now, the button is gone in [9] and the first time I saved a scene it showed up as turned ON when loaded back into [8].


Also my Uboat model did not agree very well with the Perspective Cam. Kitty was not happy to see that.
Seems like the Perpesctive cam is not as tolerant as the Classic cam, n-gons and non-planar polys cause artifacts more often -

Cageman
01-11-2009, 06:45 AM
A ray recursion of 8 wil give you no less than :

a reflection of the ship reflecting the water reflecting the ship reflecting the water reflecting the ship reflecting the water reflecting the ship reflecting the water.

2 is enough for most feature films, you can probably get away with 4 or less, and that'll make a big difference in speed.

Yeah... a very good tip!

The default setting of 16 is quite crazy actually. I usually use 2-4. Now, this is confusing because it is not mentioned in the manual, but RRL also affects transparency, right?

Because when I rendered a sequence way back I had a single frame where the rendertime went through the roof (RRL set to 8) and I didn't have any reflective materials in that particular scene. However, that particular frame had 8 transparent surfaces aligned on top of each other. I set the RRL to 4 instead and the frame rendered as fast as the rest of the images in the sequence.

So...if RRL doesn't affect transparency, then what the heck happened in that particluar frame?

:stumped:

EDIT: Just got it confirmed... RRL does indeed affect transparency as well.

So, I'll take the liberty to inform how it works, since the information is not avaliable in the manual.

Lets say you have 8 transparent surfaces lined up in a row, and you set RRL = 4, only the first 4 surfaces will be raytraced, after that, the background colour will become visible. This will create some colour distortions in your transparent materials, so in such a case, it is important to have a similar colour as your background in order to aviod most of the issues. The best solution though, is to have RRL set to as many transparent surfaces you know will overlap eachother. Hence it would be very, very usefull to be able to envelope RRL.

Time to write a feature request... ;)

praa
01-14-2009, 09:39 AM
yes but you can override this in the material of your object

keep the RRL to 8 and in the environment tab of the texture get your reflection samples down to 2

heynewt
01-14-2009, 09:49 AM
I'm confused (as usual). If I keep RRL at 2 in render globals, doesn't that override reflection samples settings of individual textures?

Tobian
01-14-2009, 10:16 AM
Ray recursion level and reflection quality samples are NOT the same thing at all.

Ray recursion is a value of how many times a ray will be bounced OR pass through an object before it stops (I wish they were separate for reflection and refraction, and you could do it per surface, but I think it's been asked for so many times we're horse asking!)

Reflection quality is to do with the number of sample rays a spot sample (the pixel of your render) will fire out. It's explained in the manual what each value represents, but it's not the same as the numeber.. I.e. 0=1x3 samples or the standard 8=9x27 samples....

Now this is where LW could do with some 'after the first' optimisation, as when you have a sampled ray (i.e. reflection or refraction blur) each ray will shoot out child rays equaling the sample, then each one of those will shoot out the same number... so with 8 samples and 16 bounces... on a blurry material, you are shooting out THOUSANDS of rays PER PIXEL, then on the AA pass, each re-sampled pixel has to shoot out those thousands of rays.

I typically set my reflection quality to 0 and then use adaptive sampling to smooth out the resultant noise from a lower sampling quality. The trick is to find the sweet spot.. too low a quality often means LW has to do more work doing AA passes, than it would if you had just selected 8 samples in the first place, but it's really situation specific. Exterior scenes, where rays typically fire off into space usually render MUCH faster than interior one's where they will bounce off any reflective surface, back and forth till it reaches the recursion limit x the number of sample rays per bounce, means it gets super slow! :)

As a note: I find that with reflection sample quality low radiosity also calculates faster :)

heynewt
01-14-2009, 10:30 AM
Aahh, ok, I get it. Much better understanding of those relationships now. Thanks Tobian for that great explanation.

Robert

praa
01-14-2009, 02:31 PM
i stand corrected (in fact i did some tests after my post to discover it was not working...)

but then what is raytrace transparency in the render globals / render / tab ?

if we have a 8 or 10 transparent surfaces alligned if i get ray recursion limit down to 4 i get black opaque would disabling raytrace transparency allow it ?

i will try later

Sensei
01-14-2009, 02:57 PM
The default setting of 16 is quite crazy actually. I usually use 2-4. Now, this is confusing because it is not mentioned in the manual, but RRL also affects transparency, right?

ANY ray-tracing execution must be checked against whether it's out of ray-recursion limit. Otherwise renderer is simply crashing because out of cpu stack space (Windows default is 1 MB).

Which means that Node Editor's materials (usually in Shaders catalog) are affected as well..


Hence it would be very, very usefull to be able to envelope RRL.


Ray Recursion Limit constant might be used to allocate enough space at renderer initialization stage for memory used for ray tracing structures..
If you want to stop rendering for less than Ray Recursion Limit, you can do that using Node Editor and checking Spot Info > Bounces in logic node, and take Background color if it's higher than your own limit, otherwise take color from one of Reflection shaders. This must be connected to Surface's Reflection/Refraction Diffuse channel.

Sensei
01-14-2009, 03:04 PM
but then what is raytrace transparency in the render globals / render / tab ?


Transparency is when Transparency > 0.0 and Refraction Index = 1.0.
Refraction is when Transparency > 0.0 and Refraction Index > 1.0.

toby
01-14-2009, 11:29 PM
but then what is raytrace transparency in the render globals / render / tab ?

if we have a 8 or 10 transparent surfaces alligned if i get ray recursion limit down to 4 i get black opaque would disabling raytrace transparency allow it ?

LW doesn't raytrace any transparency unless you have that checked, if you're using the classic camera ( the new cameras are all raytracing ). They added this so that things like Hypervoxels could be rendered through transparencies.

Classic with no raytracing may be an option if you have dozens of layers of transparency (which is best avoided in any case), there is no limit to non-raytraced transparency. The other option is to use an environment map, which will be used when the recursion limit is reached, to keep it from going black.

praa
01-18-2009, 03:06 PM
isn't there a node that controls the ray bounces by surface ?

Sensei
01-18-2009, 03:56 PM
Take Spot Info->bounces as input to logic node comparing two integers/scalars, and if it's greater than some value there is read first input, otherwise second.. Can be used as input to Scalar/Color/Material Mixer opacity input..