PDA

View Full Version : faster and good rendering?


(B-HOLM)
01-03-2003, 06:01 PM
I was just wondering if there was any tips on rendering faster?
It's just because I'm rendering this movie in high details and all (a 6 seconds long movie) and it takes like 8 hours or more :(

ACFred
01-03-2003, 08:00 PM
There are a bunch of things that'll help speed up renders if you have a complex scene.

You can decrease the tesselation on NURB surfaces that are in the background of your scene. Decreasing texture size on those same objects will help, too (assuming you're using texture maps and not procedurals).

Check your antialiasing. Is it higher than you really need?

Number of lights will affect the render time. Can your scene be lit with fewer lights? Also, the type of lights can affect it. Remember, that if you have a point light casting shadows, by default it'll create six shadow depth maps which will suck up some more time.

Shadow casting. If you're using depthmap shadows, a large depth map can take up a chunk of time. Make sure that the depth map is as small as your quality standards will allow.

Complex procedural shaders can really add to the time of a render.

Huge texture maps add to render time. Try converting them to BOT files. Sometimes converting the textures to BOT (block ordered textures) will help decrease render times. Sometimes it helps me quite a bit, other times render time actually increases a touch, so experiment.

Paint Effects. My knowledge on PFX is limited, but I'm pretty sure it'll add significant time to a render.

Fur. Depending on the density of the fur you have, you can really see huge increases in render time.

Lastly is, of course, to turn off raytracing if you have it on and don't absolutely need it. There are ways to efficiently fake some of the effects of raytracing.

Hope that helps.

Alec

beaker
01-03-2003, 08:30 PM
ACFred has a good list, here a few more I have to add:

If you have any static lights with shadows that dont change at all, pregenerate the shadow map for it. Shadow map generation sucks up lots of ram and time. Maya regenerates that same exact shadow map for each frame no matter if it moves or not.

Hide any geometry that isn't in the view of the camera.

If your working with any effects like glows/optic fx, do them in post, not in maya. Nothing worse then having to rerender a scene because the object glows too much when its close to the camera, but not enough when its far away, or it just plain screws up.

If your doing any motion blur, render in layers. MB can easily screw up and the render times for it are horrible. So if it screws up on your character/model, you only have to rerender the character only, not the entire scene. If possible, just skip MB in maya all together and just do it in post(Same rules apply for DOF).

If you have a big environment that is in the background with lots of geometry, just render it as a still and use it as a camera map on lowrez geometry. Then you can blow away all the expensive background geometry and textures.

Another option to the last one is if you have a static camera, just render your background in a separate layer from the foreground and just composite it. Why render the same exact thing that is not changing for the entire length of a shot.

If your using anything for a GI look(MR, raydiffuse) then you might want to consider baking the radiance into the texture maps.

If you can do anything in 2d or post then do it. Don't listen to anyone or your conscience that says its cheating, or it's not the same as 3d because thats BS. If it looks 95% of what doing it the "real" way and it takes 1/4 the time, then your better off with a 2d way.

(B-HOLM)
01-03-2003, 10:17 PM
uhm, would you mind explaining to me what Post is?
and are there any tuts for rendering in layers?
I'm still so new to quality rendering and all the options there is.

InnerVortex
01-03-2003, 11:28 PM
well.. just for curiosity i now have tested the follow:
the same scene (some primitive objects) with basic shading.
camera locked for some rigor:p
128 lights dmap rez 512, dmap Filter size 3.
first render with spot lights(the 128 of them): 35 secs rendertime
secound render with directional lights(all 128 again): 54 sec rendertime.
i did 2 renders with both just to be sure.
well.. i just had to test it.. maybe it is the the maya help something like "spotlights render something% faster than directional ones" but im too lazy to look for it, was the test right? do u have teory to suport it?

fango
01-04-2003, 02:18 AM
this is taken from the Highend3d living maya faq (can t access the site here, so just copy pasting my text file), lotsa other useful stuff too in there, check it out )



Subject Q: How do I optimize Maya's Renderer [re: admin]
Posted by gmask (member)
Posted on 06/24/01 06:03 PM



From: armanmatin

After some research here is some guidelines for getting the most out of Maya. Thought I would share it
with you:

General Performance

if you're running many rendering jobs on a multi-processor: it might be faster if you turned off
RenderGlobals->useFileCache. This is because th I/O will likely dominate and slow down all the rendering jobs.
avoid motion blurring everything: if you have objects which are not moving, or barely moving, don't motion blur
those objects. It'll render faster, and produce higher quality imagery. Motion blurring can be turned off on a per object
basis.
avoid shadow casting for every light: shadows are expensive, avoid for all lights. Be selective. You might also
want to avoid shadow casting surfaces. The fewer shadow casting surfaces the faster the shadow map
generation/shadow casting will be. The smaller the world space bound of the shadow casters the higher the density
of the shadow maps. (ie, better quality shadows).
reuse shadow map: on a per light basis, you can choose to reuse the shadow map generated only once (at the
beginnning of rendering). By reusing this shadow map, you avoid producing shadow maps for subsequent frames.
This can be a significant savings in time, and potentially some memory (due to less fragmentation). This only works
properly if nothing in the database, other than the camera, changes over subsequent frames.
shading samples: Quality->Shading Samples, Quality->Max Shading Samples, Shape->shading samples.
Don't just bump up the shading sample (represents the minimum #shading samples per pixel) value to get good quality
images. It is best to keep this value as low as possible for performance efficiency, allow the adaptive nature of our
algorithm to catch color differences. Keep this to either 1 or 2. Increasing the max shading sample is more
reasonable, as it is the upper bound for #shading samples when the adaptvie algorithm catches color differences. If
you have small, specific set of objects that are very noisy and require many shading samples to get a good quality,
just set the shading samples override on a per object basis - then the rest of the scene is not penalized by just the
noisy nature of this object.
visibility samples: Quality->Visibility Samples,. This is only relevant for motion blur. If jagged edges appear, this
is likely due to visibility samples. But instead of increasing the minimum visibility samples, please increase the max
visibility samples first, with the first attempt at 8 max visibility samples.
convert solid to texture. If you are using a very expensive procedural texture, instead of computing the procedural
at each sample, you can use convert-solid-to-texture to produce a file texture representing a snapshot of the
procedural texture onto the object. The file texture usually prove to be much faster. It also comes with filtering,
which may bring better anti-aliased quality to the procedural texture as well.
share textures: unlike PA/studio, it is easy to share the same texture node. It is much more optimal, storage wise,
to have such sharing.
the most optimal image file format to use: IFF. This will help in batch rendering, but mostly during the interaction
with the multi- lister. If you know a certain image file will be used often as a file texture, converting this file to IFF
will help performance.

Raytracing Performance

avoid raytracing everything: be selective what you need to raytrace. Raytracing is an expensive process. Even for
transparent objects which do not require refraction, don't raytrace.
reflection, refraction, shadow limits: Quality->Reflections, Quality->Refractions, Quality->shadows. Keep
these numbers low, particularly the reflections and shadows. Usually 1 bounce of reflection is more than sufficient to
have mirror effects. If the limits are higher, potentially much more raytracing will be done, even at 2 bounces of
reflection (in conjunction with refraction).
whenever possible, use depth map, shadow casting lights instead of raytracing shadows.
avoid huge floors: if you have a huge floor with very complex geometry occupying one small region, this will slow
down the raytracer. Scale down the floor so you can still get the raytracing you want.

Preview Performance

render active: Globals->Renderable Objects. You can render selected objects if you wish to, by turning on this
option, then selecting the active objects in the modeling view. There is no need to select a light (as you do in PA) - all
lights are assumed to be lighting the active objects.
partial image rendering: you can select a marquee region to do partial image rendering. This will save you time
from rendering the entire scene. This can be used in conjunction with the render active option above to save even
more time.
turn off all shadows: Globals->Enable Depth Maps. For quick previews without any shadowing, you can quickly
disable all depth map, shadow casting lights with this option.
turn off specific lights: by hiding the light, you have explicitly indicated that you want to turn off that light. So no
lighting will come from this hidden light. This can save you time from avoiding to with this light, which might be
insignificant in the area of your concentration.
reuse shadow map: if shadows are absolutely needed in your preiews, and if you only intend to modify lighting
colors or shader/texture attributes, you can save the shadow map, then ask it to be reused during subsequent preview
renders. Then the shadow map prepass can be avoided, for faster previews.

Controlling Memory

memory cap: Globals->Maximum Memory. Keeping this at 64mb is usually a good idea, unless you have lots of
memory. If you find that you are swapping too much, lowering this value will help. A limit of 64mb means the
renderer will try to use at most this amount. There will still be other users of memory beyond this limit: memory used
by the database, and memory used by texture maps. The database memory can easily be swapped out during
rendering, so it is not a concern. Memory capping texture maps require the below solution.
use texture file cache: Globals->Use File Cache. This can be turned on a per texture basis, in which mipmap
tiles can be cached into RAM from disk. This means that the entire mipmap does not need to be in RAM all at the
same time. There is a global cache keeping track of the mipmap tiles of all the texture files (with the cache turned
on), and it is retrieved and dumped on a LRU basis. This global cache then keeps the entire set of textures' memory
down (usually to less than a meg). To use this cache, it is even best to save the image files as the native mipmap
format, or as we call it, the BOT (block ordered texture) format.
reuse tessellation: Globals->Reuse Tessellations. This is ideal only when you have more than 1 shadow casting
light. Then an object is tessellated at most once. But keeping the tessellation around means more memory used (some
is swapped out if the memory cap is hit). If memory is really low, turning this option off can help.
don't over-tessellate: always keep the triangle count down. If some object can be single-sided, mark it as such. If
it is a degree 1 surface, set the tessellation to 1x1 with no secondary criteria. If an object is insignificant in your
rendering, lower the tessellation.
shadow maps: if you have a high resolution shadow map for point lights, the memory used up is several times more
than spotlights - this is because multiple shadow maps are needed. One way to save on memory for pointlights is to
choose which direction (of the 6 directions forming a cube) shadow casting is really needed for your scene. This will
save memory and performance.
out of disk space: to avoid over-burdening RAM, a temporary file is written out to disk to avoid system swapping
(which is very slow). But on out-of-disk situation, particulary on really big databases, this can lead to system
swapping easily. The temporary file is usually written to /usr/tmp. If you have a partiton in which you have plenty of
disk space, this temporary file can written here by setting "setenv TMPDIR xxx".

Image Quality

multi-pixel filtering: Globals->Use Multi Pixel Filtering. This will produce very high quality when dealing with
thin geometries or thin highlights.
non-square textures: in some situations in which non-square textures are being used and the image quality does not
look as good as needed, try resizing (with proper filtering) the image to a base-2 square resolution - by base-2, I mean
1,2,4,8,16,32,64,128,256,512,1024,2048,etc.
higher order texture filters: Texture->Filter Type. For noisy file textures, the default mipmap filter type may be
insufficient in terms of anti-aliasing spatially and temporally. Setting the filter type to quadratic usually provides much
better quality, though at a small increase in performance cost. Avoid increasing the shading samples just because of
the texture aliasing.
avoid Phong for skinny highlights: Anti-aliasing phong highlights are very tricky, because they are hard highlights.
Blinn highlights are much softer and realistic. They are also much better when facing skinny or noisy highlights.
avoid user error aliasing:
check composite render is not turned on
check that the edge-anti-aliasing is turned on at HIGHEST QUALITY
check that your textures do not have their filters turned to OFF


how to control render globals' performance + memory options for raytracing:


subdivision Power: this determines the (x,y,z) resolutions of the voxels.

recursion Depth: with a fixed resolution for voxels, it is possible that a voxel may contain many triangles, thus
raytracing will be very slow if this voxel is hit, because the ray will need to intersect against many triangles. We recommend
that this stay at 2, because there is a trade-off of voxel traversal time vs. triangle intersection time. Larger does not mean
better. Larger also means more memory used (by the voxels).

leaf Primitives: in the above description, we need to determine what is considered to be "many triangles". This
attribute
determines the number of triangles in a voxel before we recursively create voxels.

Render globals->performance + memory options->file caching is turned on, additional cached information for
tessellation and voxel pointers will be done to make sure we don't explode memory usage too much. I.e., a not-too-often
used voxel and its tessellations will be purged onto disk until needed later. This is done so that other more often visited
voxels and tessellations will be handy for raytracing to deal with in RAM quickly. If there is available memory to be used for
raytracing, increasing the render globals' maximumMemory memory value can improve the speed of raytracing, because it
will do less disk caching.

selective raytracing: as mentioned in the FAQ, it is possible that a surface does not need to be tagged as visible in
reflections, visible in refractions, or shadow casting. When a surface is not turned on for any of the above 3 attributes, that
surface is not added to the voxel structure.

linear transparency: if your index of refraction is 1.0, there is no reason for one to use raytracing for refractions. To
avoid raytracing expenses, it is best to not use raytraced refractions.

if you can afford the memory: to avoid lots of disk caching, increase the maximum memory value and you should get a
big improvement in performance. This can be done in the command line with "-mm ###", where ### is the number of megs
to be used as the memory limit.


Hope it helps


Rhinoceros Visual Effects

Slater
01-04-2003, 07:11 AM
...good find fango!

CGTalk Moderation
01-14-2006, 02:00 AM
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.