PDA

View Full Version : Reducing Rendering time



Skinner3D
01-02-2008, 01:41 PM
I know that this has been talked about on the forum before, as I did a search before posting, but I need help and I didn't find what I needed.

I have a scene that is 950 frames long and it currently takes upwards of 40 minutes per frame to render. That is using the standard camera, 800 x 600, 5 pass AA (Only shadows turned on as well)

If I do the adaptive sampling method, 1 pass AA, it takes around 5 min, but the textures on a book get messed up and smoothing is non exsistant.

Could someone please give me ideas as to how to get my render times down?

Skinner3D
01-02-2008, 01:56 PM
weeellll I feel stupid

I just rerendered it at 1 pass AA and 50 adaptive and it turned out really nice. I think I rendered it with no passes of AA for the previous post.

With the adative sampling the book image is still a little bit messed up, and it puts miniscule grey flecks all over the image; but its definately better render time wise.

If you have any suggestions as to the above two minor problems I would love to hear them
:D

avkills
01-02-2008, 02:16 PM
Have you tried the perspective camera? AA set to 1 and adaptive at .2, .3 or maybe even .5 would work for ya.

-mark

avkills
01-02-2008, 11:05 PM
Oops, sorry guys, I meant AS at .02, .03 or ,.05 or less. That is interesting about the detailed textures neverko, I will keep that in mind also.

-mark

Greenlaw
01-03-2008, 12:15 AM
Hi,

Like neverko, I've found Perspective Camera with the new AA and Adaptive Sampling to be much faster too--it's all in how you tweak the settings. I don't know all the rules yet, but for what it's worth here are my current guidelines. Some of this may seem basic, but maybe it will help users who are still intimidated by LightWave's new AA system:

The suggested 'Production Quality' setting according to the 9.3 addendum is AA level 1 and Adaptive Sampling threshold at .01. Personally, I've found that, depending on your shot, this setting can be overkill or inadequate, but it's a good place to start your tweaks.

In general, I'll start out using AA 1, but usually wind up using AA 2 to 4, with Adaptive Sampling set at .01, but if I'm also using Photoreal Motion Blur with multiple passes, I may increase the Adaptive Sampling setting up to .05. I rarely have set AA higher than 4 or 5, but you may have to if you have very fine 'micro' details in your textures or geometry. Do small limited region tests of 'noisy' spots of your frames--you'll save a lot of time, and if you can get these areas to look good, the rest of the image should be fine. When doing tests, don't waste your time rendering pixels that aren't telling you anything new about your settings.

For Photoreal Motion Blur, I may use anywhere from 9 to 24 passes. Usually I find 12-14 is adequate, but this depends on how much movement is in your scene. You can save some time on Motion Blur by enveloping the number of passes; more passes for extreme movements and fewer for near static frames. Keep in mind that this won't work if you're using spinning lights because this trick depends on a constant MB passes setting to work correctly. Be careful where you transition the number of passes as this may visibly effect the look of your AA over time. As with AA, I like do limited region renders of areas that have the most extreme blur to make sure I'm setting it high enough.

For the Reconstruction Filter, I think the settings are pretty subjective--some settings are soft, some are crisp, and some are in between. For what it's worth, I like Mitchel (which is sort of in between but leaning to the crisp side.) For the Sampling Pattern I like Fixed. For me Blue Noise is just too, well, noisy, and it seems to make the edges ragged even when AA is cranked up.

As for other scene optimizations here are more suggestions:

1. For color textures use .png with no alpha, and if possible convert you image with Photoshop's Index Color mode. Don't forget to back up your image before making the conversion as it will irreversibly degrade your image. It will also make the file size significantly smaller, making load times a lot faster. Even if it affects load time slightly, this time savings can be dramatic if you render accross a network. In many cases, the image degradation is particulary noticeable in a LightWave render because its smoothing and antialiasing can typically make up for lost data. In some situations, you'll need the full 24-bit image to avoid banding, for example, images for sky balls. In this situation, I'll compare the file size with a .png and a comparable quality .jpg and use the smaller one.

For grayscale images, such as for Bump or Diffuse textures, you should use grayscale mode when saving to .png. If you don't need all 256 levels of gray, then use Index Color.

2. Remove any objects that don't actually appear in the render. These objects can unneccessarily affect both load and render times.

3. Turn off any Ray Trace features you're not actually using. Do test renders of a frame that represents your shot to see which settings have not visible effect.

4. Set Ray Recursion as low as possible for the quality want. Unless there's a lot of layered transparency in your scene, you can set this as low as 2 to 6, which may result in dramatically faster render times than the default setting of 16. For most shots, I usually default to 4.

5. Switch off lights that don't have any effect in front of the camera. A few thoughtfully placed lights can usually look much better than a lot of hastily placed one, and may render your scene faster too.

6. If you use Sub-division objects, set your preview sub-d level to match your render sub-d level. This eliminates a conversion step during rendering that can really add up in time.

7. Be careful when using the Reflection Blurring option...this can kill your render times. If possible, do the blurring in post using a compositing package like Fusion or After Effects. For example, if the blurring needs to be on a ground, render an gradient pass for the floor based on incidence angle to use as a blur mask. This is a lot faster than rendering the effect in LightWave.

There are a ton of other tweaks I could write down if I had the time but these are some of the general ones that I can think of. I hope these tips help.

If other artists here would like to add to this list or offer alternative opinions, please do! I think it will be helpful to everybody.

DRG

Greenlaw
01-03-2008, 12:25 AM
In many cases, the image degradation is particulary noticeable in a LightWave render because its smoothing and antialiasing can typically make up for lost data.

Oops! Of course I meant to say "...is NOT particulary noticeable...".:)

Also, when comparing the .png with a comparable quality .jpg, I mean 24 bit versions of the image, not indexed color.

DRG

Steamthrower
01-03-2008, 07:14 AM
Thanks Greenlaw for those tips. Very helpful. I hadn't even considered setting my preview sub'd level to be the same as my render sub'd level. Or using index color. *slaps head in exasperation at the thought of wasted hours of render time*

starbase1
01-03-2008, 08:26 AM
Thanks Greenlaw for those tips. Very helpful. I hadn't even considered setting my preview sub'd level to be the same as my render sub'd level. Or using index color. *slaps head in exasperation at the thought of wasted hours of render time*

Yes, using indexed colour PNG's can save massive amounts of memory and therefore make rendering a lot quicker. (It will also let you use MUCH larger image maps - I was able to get up to about 8000 pixels square, couldn't get close using JPG's).

Also look at your shadowing options - you can often turn off shadows for fill lights, or make them shadow mapped with the results cached if nothing moves through the light...

starbase1
01-03-2008, 08:31 AM
Forgot to say - if you are using procedural textures, particularly if they are ones you downloaded rather than creating yourself, check the number of octaves / levels where relevant. Few levels and a higher small power (closer to 1) can often get the same effect but faster.

Lowering those can speed things up, and reduce your need for aa too.

Steamthrower
01-03-2008, 08:35 AM
So, somewhat related: do procedural textures render faster than image mapped textures as a rule of thumb?

I've been able to create much more realistic liquid surfaces using procedurals than I ever could by using image maps, but with the project I have at the moment I'm wondering what would end up rendering faster.

Skinner3D
01-03-2008, 11:28 AM
:thumbsup: Thanks for all the tips. I'm going to have to sit down later today and actually try them in my scene. I will also post a couple of images.

arrow1234
01-03-2008, 11:40 AM
...
7. Be careful when using the Reflection Blurring option...this can kill your render times. If possible, do the blurring in post using a compositing package like Fusion or After Effects. For example, if the blurring needs to be on a ground, render an gradient pass for the floor based on incidence angle to use as a blur mask. This is a lot faster than rendering the effect in LightWave.
...

oh ye i noticed this one, my rendering time sometimes boost up to x1.5 or even x2 because of the reflection blur.
but do u mind telling me where the compositing package that you are talking about?, i would like to try it

and i also noticed there is a decrease in time length if you lower the Rays per Evaluation under GI tab from default 48 down to like 12 or even lower. I dont really see the difference, what does it exactly do?


thanks for the tips

JeffrySG
01-03-2008, 11:42 AM
So, somewhat related: do procedural textures render faster than image mapped textures as a rule of thumb?
I would think that generally the opposite would be true. Image textures would render faster than procedurals. All procedurals need to be computed before being applied to the surface.

Steamthrower
01-03-2008, 12:35 PM
Good, thanks. I've never run a test but I guess I need to in order to see just how much time I can cut off renders.

Greenlaw
01-03-2008, 01:57 PM
So, somewhat related: do procedural textures render faster than image mapped textures as a rule of thumb?

I've been able to create much more realistic liquid surfaces using procedurals than I ever could by using image maps, but with the project I have at the moment I'm wondering what would end up rendering faster.

This has always been debatable as it depends on the procedurals you use and how many you may have stacked as layers. I prefer to use procedurals either to enhance bitmap textures or when they can offer an animated effect that would be difficult to do with bitmaps (i.e., water, plasma, pyro effects, etc.)

Generally, I prefer bitmaps for texturing as I almost always base my textures on photographs. Photo-based textures will always get you closer to 'photoreal' more quickly than procedurals, and with today's digital still cameras it's so easy to go out and shoot what ever you need for textures. There are also a lot of great sources for photo-based textures out there; for example http://mayang.com/textures/ is a terrific source.

Back to .png and index color, just watch out for banding. It can be a problem anywhere there exists subtle gradient changes over a large area. For us, this has really only been an issue with sky images, but for almost anything else, you should not notice much difference in quality from the original 24-bit texture

And yes, this is a great RAM and loading-time saver. A few years ago, when we did our first Call of Duty trailer we condensed over 300MB of textures down to about 70MB by switching to Indexed Color .png. Prior to format conversion, we were not able preview the full scenes in FPrime, but afterwards FPrime worked fine. Also, loading 300MB of textures to a hundred procs all at the same time made our poor network at the time cry; it was much happier after the optimization.

Oh, another important thing is to scale down your images to only as large as you need. Texture maps rarely needs to be larger than the size they will appear on the screen. Do this before making the Index Color conversion; scaling a converted image may result in horrible mush.

DRG

Skinner3D
01-03-2008, 04:24 PM
:bangwall: :compbeati
I'm thoroughly confused now.

I rendered out 4 images for you to look at and they all turned out pretty much the same. Meaning the grey flecks are probably my light/shadow setup.

fenton1 - 1 pass AA no AS
fenton2 - 1 pass AA 5 AS
fenton3 - perspective camera 1 AA no AS, blue noise (whatever that means)
fenton4 - same as 3 expect with 5 AS

In all of these the book is mostly readable.

Render times got progressively smaller from 1 to 3 and then went up again at 4. I forgot to save 3 and 4 the first time I rendered them, and they both took a minute longer to render the second time :?

The perspective camera did not turn out as smooth as the classic camera. I didn't try reducing any of the rays etc, but would it help if shadows is the only thing on?

arrow1234
01-03-2008, 07:32 PM
...
...A few years ago, when we did our first Call of Duty trailer we condensed over 300MB of ....


are you saying the trailer of Call Of Duty was done in LW?

robk
01-03-2008, 09:34 PM
fenton2 - 1 pass AA 5 AS
fenton3 - perspective camera 1 AA no AS, blue noise (whatever that means)
fenton4 - same as 3 expect with 5 AS

I hope you meant 0.5 AS. I don't think 5 AS would do anything.

Greenlaw
01-03-2008, 10:11 PM
are you saying the trailer of Call Of Duty was done in LW?

We did three of them, and yes, they were all done using LightWave. I think you can still see them on the R+H website. Just checked. Go here and then click on Games:

http://rhythm.com/commercials/index.shtml

Actually all the trailers, commercials, and shorts on these three pages were created using LightWave and Fusion by the Box. We also did the Ninja Gaiden teaser a few months ago which you can see here:

http://www.gametrailers.com/game/5481.html

Like the others, it's all LightWave. Oh, yeah, and some very talented artists probably helped. :)

Hope you enjoy them.

DRG

3dworks
01-04-2008, 04:07 AM
skinner3d,

there's a very good explanation of how AA is working with perspective cam in latest LW versions here:

http://www.except.nl/lightwave/aa.htm

using an oversampling of 0.1-0.2 together with a good AA + AS combination gives you back the 'softer' look of classic camera. you could try for example AA=4 with AS=0.025.

hope that helps...

markus

Giacomo99
01-04-2008, 05:57 AM
I would think that generally the opposite would be true. Image textures would render faster than procedurals. All procedurals need to be computed before being applied to the surface.

JeffrySG is correct. Heedless use of procedural textures can really cause one's rendering times to rocket upward, not only from the additional time required to calculate the procedural but also from the massive computational burden of anti-aliasing an extremely grainy procedural. My personal approach has been to use image maps unless a procedural is absolutely necessary.

For whatever it's worth regarding the camera/anti-aliasing issues--I've found that using the Perspective Camera with Anti-Aliasing set at 1 and Adaptive Sampling checked and set to .1 produces optimum results in about 95% of cases. If one's render times are too high, the problem is almost always with one's lights and textures and almost never with the Camera.

Greenlaw
01-04-2008, 01:03 PM
Hi Skinner3D,

A quick addition to what the others are saying about Adaptive Sampling--this may help clarify what the settings mean. The way AS works with the Perspective Camera is that it will double your AA levels with each pass, up to seven passes if I'm not mistaken. So, if you set your AA to 2, AS will use 4 in the second pass, 8 in the third, all the way up to 128 in the seventh pass. Now, depending on your threshold setting, it may not go that many passes--Lightwave will only go as far as necessary to meet the threshold level.

A good way to see what AS is doing is to pay attention to what Lightwave is doing in each pass in the render preview window. If all of the pixels are highlighted in each AS pass, then either your AA setting is too low for the scene, or your AS setting is too low (all your pixels are falling within the threshold in every pass.) Some users will recommend leaving AS at the default of .1 and increasing your AA with each test. I prefer to go even lower, to .01 to start and gradually raise the AS threshold if the renders are taking too long. I rarely raise it higher than .05 for final renders though. With this setting I find that I can usually keep the AA level pretty low. The idea is to get Lightwave to antialias all the pixels with a minimum setting in the first pass and get it to only antialias the most 'troublesome' pixels using the highest setting by the final pass, and of course to meet an acceptable quality at a reasonable render time. It's very much a balancing act and the settings will totally shot dependent, but you'll learn what AA/AS settings work best for you with experience.

You should definitely read the AA document that 3Dworks recommended. It's a little intimidating at first but after working with the new AA system a while, the document can be an eye opener. There is also a handy chart by Dave Jerrard somewhere in this forum--I'm sure a search will turn it up. At the very least, read the LightWave 9.3 What's New Guide--there is a page in there that will give you the most basic information which is still very helpful.


The perspective camera did not turn out as smooth as the classic camera.

This is probably because you selected Blue Noise. As mentioned in my earlier post, this setting can make your AA look noisy and is really rough on the edges. Try using Fixed instead.

DRG

Greenlaw
01-04-2008, 01:29 PM
1 AA is the same as no AA.

I think that's only if you use Classic Reconstruction, isn't it? Just wondering.

(I'm still figuring this stuff out too.) :)

DRG

Skinner3D
01-04-2008, 02:11 PM
I think I figured out a good balance between speed and smoothness of pictures (with speed being the more valued)

I have another problem though, my doors seem to have lost their glass :(
You can see in the picture

I copied and pasted the door, so they all have the problem. I checked in modeler and each pane of glass is only 2 polys, one facing each way. They arent overlapping either.
:help:

ty so far for what you have helped me with
:D

Giacomo99
01-05-2008, 09:32 AM
I can't really see what the problem is from looking at the image you posted. Could you post a render from a different camera angle to it's clearer what's going on?

Skinner3D
01-05-2008, 11:19 AM
:D I figured it out. Although I give credit to giacomo for making me look at in a different perspective. If you look in the previous picture you can see where the reflection stops about 1/4 the way down the door. I had it reflecting the backdrop, I set it to reflectiong map and everything is good :D

Thank you all again for your help.

I go now to put this on my 1 computer farm.

toby
01-06-2008, 12:23 AM
:bangwall: :compbeati
I'm thoroughly confused now.

I rendered out 4 images for you to look at and they all turned out pretty much the same. Meaning the grey flecks are probably my light/shadow setup.

fenton1 - 1 pass AA no AS
fenton2 - 1 pass AA 5 AS
fenton3 - perspective camera 1 AA no AS, blue noise (whatever that means)
fenton4 - same as 3 expect with 5 AS

In all of these the book is mostly readable.

Render times got progressively smaller from 1 to 3 and then went up again at 4. I forgot to save 3 and 4 the first time I rendered them, and they both took a minute longer to render the second time :?

The perspective camera did not turn out as smooth as the classic camera. I didn't try reducing any of the rays etc, but would it help if shadows is the only thing on?
I don't know if it's been mentioned already, but the pattern in your floor here is sharp, file line and high-contrast, all of which take more anti-aliasing to get a good quality image. If you reduce the contrast and blur the texture a little, it will look better, with the same amount of aa.

mrpapabeis
01-06-2008, 07:40 PM
I've been playing with the real lens cameras. I've good some good results with these settings. It has a "Hyper-Real" look that I like. And a not so bad render hit considering I'm on an old Power PC Mac. Much faster than Classic camera.


GP

jameswillmott
01-06-2008, 09:34 PM
This is probably because you selected Blue Noise. As mentioned in my earlier post, this setting can make your AA look noisy and is really rough on the edges. Try using Fixed instead.


Fixed has a bad sample distribution at low levels. Use Classic for low levels of AA, Blue Noise for high levels.

Greenlaw
01-06-2008, 11:15 PM
Fixed has a bad sample distribution at low levels. Use Classic for low levels of AA, Blue Noise for high levels.

Good to know. Thanks for the tip!

DRG

mrpapabeis
01-07-2008, 02:05 PM
....
Back to .png and index color, ......
And yes, this is a great RAM and loading-time saver.
DRG

I am ashamed to say that I didn't think of doing this. It's so obvious. Thank you very "shorter renders" much!

GP

Exception
01-09-2008, 06:22 PM
Here's a bit of a hint:

Numer ONE speed boost EVER in ANY rendering engine is to reduce the number of ray recursions as low as your scene allows.

:)

Steamthrower
01-10-2008, 03:54 PM
Here's a bit of a hint:

Numer ONE speed boost EVER in ANY rendering engine is to reduce the number of ray recursions as low as your scene allows.

:)

Gotcha.

JonW
01-11-2008, 02:35 AM
My "Lounge Room" render in “Lightwave v9.3 Discussion / Quad Core and 8 Core Super Uber Mega Users” was a complex architectural model with about a 100 layers (which needed to be kept for changes). Including layered building, about 210 objects in total (including out door tables & chairs, people etc) in the scene. I did a test for my own interest, with the main object (building) rendered as Layered & Flattened.

The Layer building in the scene, 32 hours to render.
The Flattened building (as much as I reasonably could) 14 hours to render.

Attached 3d image (crop of building, main view) before adding trees etc in Photoshop.