How to cut down render times?


#1

Hi all,

I’ve been doing a lot of freelance work lately, and slow render times are really impeding my work.

I’m using a capable system (Quad core, 4 gigs of ram, 512 meg vid card, etc. etc), but some of my scenes, despite the fact that they’re quite simplistic, seem to be taking longer than they should be to render.

Having said that, I should note that I am rendering in HD (1280x720). Now I know that obviously slows down render times, but again, it seems like it could be going faster.

Just wondering, what are the “broad stroke” things to look for when cutting down render times? What are the most import things to consider in this area?

Unfortunately, in my 3D schooling, my college didn’t put as much emphasis on rendering as I would have liked, and I feel like I’m probably missing something. Really looking to streamline my work.

Thanks in advance,

Matt


#2

Most of the time the slowness comes from shader used.
But it’s really hard to describe how to optimize render time if we don’t have more specific information.

What are you trying to achieve ? in which version of XSI ?
What kind of stuff are included in your scene ? Hair ? Displacement ? FG ? Glossy reflection ?

Try to be more specific and then we can help.


#3

Well the main thing is what kind of lighting and rendering options you have going. You need to consider things like number of lights, type of lighting, whether area lights are being used, what the samples are set to etc…

But assuming you’re not using features that aren’t strictly needed there are a few tricks you can use to speed up renders. For instance… Suppose you’re using reflections and you have some gloss to blur up the reflected environment on a surface. You could try blurring the ACTUAL environment instead and reflecting the blurred environment simply. Another thing you can consider doing is baking ambient occlusion and some detail back into your textures so you don’t need to compute fine detail bumps and cracks every frame. Also if you look carefully, a lot of the options for lighting etc… have cache options. So in some cases you can use these caches to speed up the render by computing data only once and storing the result.

A lot of these little optimizations are scene specific though. Some wont work well in a given circumstance. So optimizing a render can be about looking at the scene and analyzing it and saying… ok what can I get away with in this particular case?


#4

Thanks for the responses.

I can try and give a little more info about the scenes I’ve been working on lately. I guess what I was after were things that notoriously cause slower render times. Just to make sure there are no obvious things that I’m missing.

As well, if anyone has any links to tutorials about the optimization of scenes and such, please let me know.

But for example, here’s the low down on a scene I was recently working on (using XSI 6.5 on Vista):

Contains:

3 infinite lights.
One model of a Boat (about 40,000 ploys)
A mesh representing the ocean (probably a few thousand polys at most)
The boat and water surface have a texture, and there’s a one ploygon plate in the background with a sky texture on it.
Boat translates through frame.
Mesh animated using 2 wave deformers.

That’s it… so a pretty simple scene to say the least.

Then I rendered that scene basically with your stock render settings, except I made these changes:

Made the resolution 1280x720
Uped the Aliasing to 1 and 3
Turned down the sampling filter size to 1
Changed format to Targa

With these settings, each frame was taking about 1:30 a frame to render. Perhaps that’s not a lot? I don’t know.

What I do know is that I was rendering a very simple scene, and I was waiting hours and hours for the render to finish. I will undoubtedly in my work encounter scenes that are much more complicated than this one. If these are normal rendering times, than perhaps I should look into getting a machine just for rendering?

Or, perhaps the render times should not be that long, and I’m doing something very wrong. That’s basically what I’m trying to discover here.

Thanks,

Matt


#5

I think you may get better/faster results with something like:

-1,2 triangle filter 2
if it needs a bit more AA go with
0,2 triangle filter 2

Also you should evaluate your threshold… I usually start with 0.176 on everything and work my way down incrementally until any problem areas are resolved with AA.

I try to avoid going into the 1,3-4 range unless there is moire noise or edge flickering.

Also, how large is your scene in SI units? Is the ocean large (like over 1000siu) or is the bg plate far away. This could be wacking your BSP tree. Removing the plate and adding it in a compositor can save headaches.

Efficient BSP optimization is whole art on it’s own. There’s a write-up or two on approaches that different artists/tds use… can’t recall their location off-hand though. Google perhaps.


#6

That sampling filter size might be a slowness issue. (Im assuming you mean sampling contrast of .1? That’s what it’s called in 7.0… maybe it changed… can’t recall) – Anyway … Unless you’re dealing with a lot of fine detail you might try notching that up and see what effect it has. As well you may get away with reducing your max and min aliasing. That will certainly speed things up if you can. If you’re motion blurring or you continue using the small sampling contrast you may actually not see that much difference. It might also be possible to do the sky itself in a separate pass if you need higher aliasing on the boat and waves. The sky texture is probably already anti aliased so you could render that with little or no aliasing if its filling large portion of the screen and post composite it in the fx tree or some other app.

What lighting model is the boat using? How about the water… Reflection? transparency? If you’re reflecting the sky with gloss that would be slow. You could try reflecting from a blurred sky and keep the normal quality one for the render view if you’re doing that.


#7

Correct me if I’m wrong in anything I’m about to say. Here’s my understanding of your comment:

As for the Frame buffer and sample filtering, I noticed that when it’s on it’s default setting of 3, it makes the rendered image look blurry. Hence why I turned it down to 1, to get a more crisp image.

I gather from what you’re saying that the frame buffer can act like a pseudo AA if used properly?

Of course, the deault filter type is “gauss”, and I’ve never tried any other type. Perhaps that’s what was contributing to the blurriness too.

Basically, if I use settings similar to the ones you suggested, I won’t need to use as much AA, yes? If so, can you still achieve a crisp image?

Thanks a bunch,

Matt


#8

Hi, the ocean was using no relfection or transparency.

As for the Aliasing, again, perhaps I’m doing something wrong, but I found that I did in fact need to crank the AA up to AT LEAST 1 and 3, otherwise there would be some pretty gross crawling, especially on the water texture.

Of course, perhaps there are other, less resource heavy ways to rid a render of “crawling”?

Matt


#9

Only to render larger than target at lower AA values, and scale down to target size. But you’re already rendering at a pretty high resolution…


#10

Try setting your AA to 0,2 contrast 0.05 Framebuffer: Mitchell 4

It should get you the sharpness you need and not kill render times.

Any reason to start with .176? It kinda blew my mind.


#11

I take it you have a texture (normal or bump map) etc. on your water? Is it a procedural texture? At any rate you might want to experiment with converting it to a .map file(s) and using elliptical filtering to see if you can get the look you want without killer AA settings. Elliptical filtering is a trade off worth testing in many cases.

You could also set up a distance and incidence based gradient mixer so that as things get closer to the horizon the texture is lower res and blurred and the bump/normal mapping diminishes. This is a very common issue you’ve ran into when faced with things like wood, tiles, water etc.

Any chance you could post a wireframe AND render along side some of your textures/materials from the rendertree AND your render settings?


#12

Yep, that’d be it. The guassian filter is designed to make your renders appear as if viewed when half-drunk. Stick to triangle (size 2), or mitchell, lancsoz (size 4), if you can afford them. Watch out as the falloffs of these two filters stray into negative values giving sometimes excessive sharpening…

If your sea texture it an image map, try using eliptical filtering. It’s designed for exactly this situation and can save you from having to sample the hell out of your scene just to solve the crawling near the horizon.

Doesn’t sound too bad to me.

This tip can be pretty shot specific, but you’ll find a decrease in render times if you raise the tile size above the default 16x16, or whatever it is. However, depending on the shot, if you make the tile too big, you might leave a lot of details to be handled by just one or two cores at the end of your render. For simple scenes on a quad core, the sweet spot may be 64x64.


#13

0.200 often wasn’t enough, 0.150 often was enough… splitting it was a good starting point for speed… upped it to 0.176 and set my motion blur 0.175 as automatic starting values (I always set my mblur threshold a tiny bit lower than my AA to avoid artifacts).

BTW… I would never start as low as 0.05… that means that on average 95% of the time (recursively) you would go to the highest sub-pixel. That would really slow renders down unnecessarily.


#14

Hmmm… first off, an ocean with no reflectivity doesn’t sound like it would look like an ocean (at all). It would be interesting to see a render.

The “crawling” that you are compensating for does sound strange… I think an image will be worth a thousand words this time.


#15

I’m not sure reducing the filter size to “1” makes much sense with a gaussian filter; It won’t have much to sample from… Better use another filter like box or triangle with such a size?

There are many ways to speed up renders but it entirely depends on your scene and machine. It could be memory, or aa settings, or reflections, lights, etc. I often find that the easiest and most dramatic variables though are the aa sample settings. I’d tweak them first if I was you.

Then, I’d switch diagnostics (logged messages) on and see whats going on there.


#16

Correct, with a size of 1 box is really the only thing worth using. But then a size of 1 is hardly worth using at all except for some very, very soft and already smoothed out changes in tone.

Gauss will be indistinguishable from triangle below 3.


#17

Still waiting on those images of the render and settings!

The consensus is that the AA settings are most likely your #1 issue, but while we’re at it it would not hurt to scrutinize some of the other settings.


#18

Hey all.

First off, thanks for all the help. Greatly appreciated.

Secondly, you’re all right. It does sound like the AA is my major problem. Fact of the matter is, until this conversation, I had no idea what the framebuffer was all about. I simply just turned it down to “un-blur” my images, and that was it.

But by the sounds of it, had I known how to use this aspect of the render properly, I could have been saving myself a lot of time! I did a little fooling around with it yesterday, and I was able to achieve nice results with much lower AA than before.

I guess that’s the pitfall of 3D schooling that only focus’ on particular areas (I came out of school feeling like (and still feeling like) I know little to nothing about rendering/lighting.)

I any case, you guys are again right on the money about the ocean texture being a problem. Because the texture is high in detail in the foreground, it causes “crawling” in the background (or along the horizon line).

As a solution to this problem, mocaw suggested: “you might want to experiment with converting it to a .map file(s) and using elliptical filtering”

Would anyone be willing to explain that. I have to be pefectly honest, I don’t know what mocaw means by that at all.

In saying that, I think I know what he’s getting at, and would love to know how to do it. Textured planes that run into the horizon have been a thorn in my side in a number of things I’ve worked on. Either your texture quality is high (for the foreground) and you get really bad crawling in the back… or your quality it low to avoid that crawling.

Finally, I will try to post some renders and such this evening.

Oh, and about the lack of reflection on the ocean. 1. I had to take it out, cause it was killing my render times too much… and 2. The scene has an overcast sky, thus you don’t miss a whole lot. Doesn’t look terribly realistic, but the client was happy, so that’s all that matters.

Thanks again for all the help!

Matt


#19

Many of us could explain how to use elliptical filtering, some better than others, but I think the best way would be to watch the videos here under the Elliptical Filtering subject:

[http://www.vast.ws/resources/xsi/tutorials/tutorials.html](http://www.vast.ws/resources/xsi/tutorials/tutorials.html)

You'll find a lot of other good stuff there to including info on .map files etc. even though the tutorials/samples are older.

For quick map conversion, there is a batch file you can use. Here is one- download it and change its extension to .bat. You should be able to drag and drop any mr natively supported file on it (like a standard tiff) and have it spit out the .map equivalent in the same directory as the source file.

On a side note- there maybe other ways to go about it- but if you’re using a normal map as opposed to a bump map you’ll find that the image connection node for normal maps does not have elliptical filtering. You’ll need to pipe your image through the image texture node (the one that is normal to use for textures) and then into the normal map nodes texture port so you can take advantage of the image texture nodes elliptical filtering.

As far as the reflection goes, there are ways to deal with rendertimes on them- a good start is lowering your ray count (if you’re raytracing them). Often for something like this you might be able to get away with as low as 1 in conjunction with the use of an environment map. Like wise you could always render out the ocean at 1 and your boat on a seperate pass at a higher level ( or maybe just the hull of the boat). Look into passes and try to think creativly about working around such things. Reflections and bump maps can be an issue- and sometimes going to displacement can be faster.


#20

For reflections on bodies of water, unless there’s a coastline involved or objects on the sea, you often don’t need to raytrace.

Environment reflections don’t need raytracing, all they do is look-up the normal, run it through a spherical function, and find the colour of what they are supposed to reflect in the environment map. No secondary rays are cast at all.
If that constitutes the largest majority of your reflections you can turn it back on, the impact should be relatively low.
If you have object around or on the body of water it’s usually convenient to run a second pass and trim the fat from that one, so that a secondary iteration of the rays doesn’t cost as much as raytracing the whole scene.