miércoles, 30 de octubre de 2013
Tipps for Render Optimizing by Stefan Laub
1) the global render setting flags in vray render settings/options:
>> don't render final image: this is good if you want to save only a GI solution, doesn't render the unneeded final image then. the result can be loaded in "from file mode then" in irradiance map (secondary GI set to "none"), normally used in "multi-frame incremental mode" (=camera animation)
>> reflection on/off, you can for rendering only GI passes, turn off the reflection overall. the result will not be fully correct obviously but might work for many scenes and specially for animation might save some time.
>> in the same manner you can turn off only glossy reflection calculation, but this might not save a lot time for gi passes, it might however save quite some time for fast test renderings, and can be very useful.
>> filter maps, this can be turned off and will save quite some overall time, as the c4d shaders have already mip mapping per default on it is normally not needed that vray filters the maps again, so this option can be turned off most time and will save also ram.
>> Limit ray depth: this option can be used almost in every rendering, it reduced the refractive and full reflection to 5 iterations, note that the transparency itself is still calculated in much more depth, which is extra set in the "max transparency level", this one can be often set also to lower values like 25 or less, but do some tests, if you have many layered alpha trees p.e you might want this unchanged.
>> "transparency cutoff", to save a little time you can raise the transparency cutoff, higher will cutoff earlier but render quite faster, we use often 0.005 instead of 0.001
>> "override material", this is also a neat trick to get "fake"(wrong) but usable super fast gi calculations, good if time is really tight. you can use a medium to light grey color to override all but transparent materials (these you best exclude totally from GI and shadow)
>> secondary ray bias: this can help to repair bad modeling. in case you have co planar faces which should never be in ok modeling you can here set a value like 0.01 and vray will try to automatically separate them. note this will only work on opaque materials and also not in all cases. might be a very good helper to render "dirty" imported models you get from clients or from Internet.
2) the compositing tag:
>> comp properties: turning off "cast shadows" for very transparent objects can help saving some time
>> comp properties:generate GI, it is an good idea to turn that off for any glass like material, or semi transparent, translucent materials, this can save a bit of extra time
>> when using object visibility, it is recommended to also turn off "generate GI" , this greatly saves render time in that case
>> surface properties: generate and receive GI, in our tests for glass like materials it can further save some time to also set the generate and receive gi to 0 here, generate caustics set and receive to 0 is a good way to exclude certain objects from participating in the caustics calculation to save time in case.
>> mic properties: GI quality multiplier:
here you can reduces or raise the GI quality on certain objects direct. it can save a lot of time to use a lower or medium subdivision in GI, and raise only on the some complex objects where it is needed. this prevent from the need to render an global high GI setting, when it is needed only on certain parts (like ceilings, louvers etc), of course you can also use the other way around and lower settings, p.e for far away objects, outdoor elements etc
this option can greatly save render time!
3) V-Ray render settings:
>> AA Tab: use DMC AA not the subdivision method, in almost all cases beside very simple scenes the DMC is way faster and sharper
>> AA Filter: V-Ray AA has optional AA filters, but for many things they aren't needed at all, default is off. normally for rendering small buckets are faster and more efficient, when using a filter (for animations it is often nice and good to use a filter, like "parzen" p.e.), it is wise to render in bigger buckets as the filter has to render an extra border for each bucket which leads to extra render time, specially if you use high blending values. you can save 20-30% in not using filters or if used raise the default bucket site to 48,64 p.e(depending on your ram and render output size)
>> AA: as vray DMC is a very intelligent and complex system which deals not only with AA on the end,
but with any calculation in vray (GI, Glossy, lights, materials, image sampling), raising the max value of the AA often speeds up the scene greatly.
as the max value reduces the need to sample the max subdivisions in lights and materials (as it is the same engine),
a max AA of 100 renders faster than a max value of 4 if the scene uses area lights and glossy materials. the rendering might get a little more noisy when raising the AA max value, but you can compensate that in using the AA threshold value and lower it from 0.01(default) to 0.005 or lower.
1x100x 0.003 will be faster in many things than 1x4x 0.01 (!) see also this paper here about DMC background infos: http://www.interstation3d.com/tutorials/vray_dmc_sampler/demistyfing_dmc.html
overall in vray it is often faster to use better subdivisions than too low ones.
herean DMC sample calculator showing nice the difference. you see with 1x32you get in average the best sample performance: http://www.cggallery.com/tutorials/dmc_calculator/
>> GI tab/Irradiance map: you can lower the min and max values of any preset if you double the render output size. so when you setup a scene and it is fine for 800px with min/max: -3-1, you can lower the min max to -4/-2 to render at the double resolution. this is possible as vray GI itself is NOT pixel or render size related, (only the placement due the min max values is)
>> G Tab/Lightcache: "use Lightcache for glossy rays": this option can save huge render times. it is best used with a small value of "enable LC retrace" to be more precise, we use here 0.2-0.25 often seldom more like 0.5 (more is more precise but slower), this is best used in stills but also good to be used in BR_LC animations.
>> color mapping tab/subpixel mapping, this is best turned on all time, results will be slightly less physical but render times greatly enhanced and images smoother with less noise.
>> color mapping tab/clamp output: for most work it is intended to use this at a value of 1, this prevents AA steps at very bright parts and let AA do the full work. for 32 bit output where you know that you will post process you can turn it off or raise the clamp value to get more range, super bright pixels you can use then for lens glow and bloom effects p.e.. note that also with clamp 1 you get a wider range in 32 bit saving that in an 8 bit image.
4) Light and cameras:
>>use of photometric lights and V-Ray physical camera with real world camera settings:
setting up a scene with calibrated real world settings greatly speed up scenes. so best use lights always with inve4rse day fall off and lumen or watt units, shadows on, and use the camera with usual shutter fstop and ISO settings (any info about real world SRL cameras will suit also vray)
>> use area lights most time: vray is optimized to use real world light with sizes. so best use them where ever you can, they are the "native vray" lights. IES and sunlight are also same optimized. so instead of a point light use a spherical area light p.e.
>> store into irradiance map option, if you use an IR based GI setup it can save a lot of time to activate this option in area lights, will eliminate fake speculars, but render much faster and more realistic
Overbright materials: Materials are light filters and absorbers, no independent effect or "color"
an very usual error in rendering, made also by many pro users is to setup the colors in a way of thinking on the color you want direct in the final result. directly said this is simply wrong (true for any physically based app).
material are nothing else as how an surface react on the incoming light energy, not the end result. it absorbs a lot of the incoming light and reflects some parts of it again. how many and which wave lengths exactly are absorbed make what we call colors ( if more red is absorbed mat will be more green, etc), how wide or dense spread the light rays are gives us info on the material if it is more glossy or diffuse.
what we see in end is the material PLUS the light, PLUS the setting of the camera or eye sensitivity, which changes every second(floating)
for render speed the most important is to NOT MAKE OVER BRIGHT UNREALISTIC materials which reflect an unnatural amount of energy, and do not exist in reality.
as example: a very very bright shining white wall reflects not more then 70-80% energy in total (diffuse+specular). as even a matte looking material does have specular reflection the diffuse texture or color is A LOT darker than we see it in end in the camera or eye. so its much darker as one would maybe assume on first sight.
RGB example values: a bright sheet of paper is around RGB 213,
superb high tech extreme white surfaces aren't more that RGB 220.
the same is for color saturation, no color in diffuse or spec channel should ever be 100% saturated, also no RGB channel best at 255.
this doesn't mean at all that our image has no RGB 255 (or a lot more), but this comes due the light gi and camera sensitivity. still the materials as "light reflectors" only lead to the end result but are much darker themselves.
if you use to bright colors, the light(GI ) will travel near endless which makes unrealistic images and unneeded long render times, so take very much care on this point, it will improve your render and speed it up! (this is not vray related but true for any renderer which is based on physical rendering, some reduce your colors internally, which we do not do as this can make unwanted results)
reflection in specular channel: the glossy rays in spec channel are per default using 5 bounces of reflections, this is normally more than enough. for very glossy materials also it can be reduced without any problem to a lower valie. specially if you do physical materials which al have true refelctions, but are often very glossy (below 0.6 p.e) you can reduce the reflection depth to a lower value, for things like a plaster wall 1 or 2 might be very well enough. in addition to this you can use the exit color to fine tune the effect. the nice in vray is that this is material based. so some material can have high reflection values where needed, and others low, where only some reflection is going on.
in the same way the cutoff threshold can be raised (longer rendertime, more precission), or lowered (faster, less precission), for many materials the threshold can be raised to optimize a material a bit more. specially materials with glossyness below 0.6 or where reflection is not super important visually, one can have quite lower cutoff values. 0.01 is the default and very good for most. 0.015 or 0.02 already can save a plenty of time, specially for longer animation where every second counts. for superb surfaces where you need very light but detailed reflection best lower the value to 0.005. using this value in a scene can raise quality and speed at the same time ion giving the right materials greater detailed and others less.
refraction: refraction can also be limit the ray depth per material and set exit colors, note that after this refraction depth vray still renders full transparency(!), so it can be lower veryvery often to a lower value, specially of archviz where we seldom need more than 2-3 levels of real refraction and are happy with normal transparency(=archglas). so when you have a depth of 3, vray renders for the 4th refraction an ior of 1 (=simple transparency). the simple transparency limit you can set in vray options for further optimization.
if you use an exit color other than pure black, the exit color is used instead of the simple transparency, this looks less real but gives even greater speedup. for very glossy glass this might be a very effective and still not very noticeable scene optimizing possibility (specially for animations every second counts p.e )
>> this is really not needed but if you want to squeeze out a little extra speed and specially if you want to save ram, use square textures a format that is a multiple of 4 pixels (4,16,32,64...). best use a multiple of 512pixels. so possible formats are 1024, 2048, 4096, 8192, etc specially in using many bigger textures this can save quite some ram and little extra speed.
>> save uncompressed images, tiff (uncompressed), psd or tga are optimal us eless ram and cost less time to uncomress, png , jpg etc can be also used but need a little extra time to convert in pure format and a lot more ram than a pure tiff, specially jpgs. tiff LZW compression we recommend not to use, best use pure tiffs with no compression (these tiffs like to go corrupt sometimes or are slower to handle)
>> trivial but important, never ever use CMYK textures in rendering.
architect & 3d architecture viz