Reuse + Store

Reuse + Store rollup

The Reuse + Store rollup has 2 main usages:

  • speedup rendering
  • create a seperate pass/renderlement/layer for later use in a compositing or painting program

For V-Ray the rollup also allows to write to a RenderElement directly, see the different descriptions for V-Ray and mental ray below. In general RichDirt supports saving values to an image (false color, red is used for AO, green is used for IO). These saved images can be later read from disc, instead of having to regenerate the effects by shooting rays. This can add a huge speedup to rendering
How to get the image saved ?

mental ray

mental ray is a little tricky, a ´shader´ can not directly write to a 3ds Max Render Element. Starting with version 1.10 RichDirt checks if a ´named framebuffer´ called ´richdirt´ exists. Only use this path if you are technically very advanced. You will need a plugin to create so called ´geometry shaders ´ which in turn can be used to add a shader that then creates a named framebuffer. Autodesk did ship a plugin called mrGeomShaderObject.dlo with the maxsdk, for example in 2011 this was (C:\Program Files (x86)\Autodesk\Autodesk 3ds Max 2011 SDK\maxsdk\plugin\mrGeomShaderObject.dlo) this plugin allows to add a geometry shader to a 3dsmax scene. mental images (now NVidia) sponsored the website http://www.writingshaders.com/framebuffers.html for an example of a geometry shader that creates framebuffer. You would need a ´named´ framebuffer (not an ´indexed´ framebuffer). In case this is to tricky for you today - the easier way for mental ray users is to directly write the result to the main image (beauty image). Without any changes the main image would contain shadows, lights etc, which one doesn´t want here. Use the ´mental ray´ material, and paste an -instance- of the RichDirt texture into its ´surface´ slot.

Save falsecolor image via mental ray material

This bypasses any shading like shadows, lights. It is possible to use several mental ray materials, when using several RichDirt textures. The easiest way is to enable the material globally in the ´Processing´ tab - use it for ´Material Override´.

V-Ray

V-Ray supports direct access to Render Elements from RichDirt. Switch on either ´V-Ray: write to vrayextratex render element ´ or ´V-Ray: write false color to vrayextratex render element´. Then RichDirt writes both to the main image and the the RenderElement. False color images can be used later for "load from image file", instead of shooting rays.

´V-Ray: write to vrayextratex render element´ is for later use in a compositing or paint program.

Possible workflows:


Compute with high quality (many samples) and save to an image file or RenderElement. Later do further scene tweaking, like changing textures/color of the materials. Even changes to lights are supported as RichDirt is not dependent on light sources. Use ´Load From Image File´ to get the high quality without the performance hit.

You want to tweak AO/IO in a paint/photo software or a compositor. Save to file. Do the tweaking. Use ´Load From Image File´ to get the tweaked result.

You want to use a 2k RichDirt texture image for a 8k rendering. Save to file in 2k resolution. Change rendering resolution to 8k. Use ´Load From Image File´ to load the 2k file. The 2k file is automatically projected on the 8k image. Speedup is factor 16 via image size and even more because no rays are shot. Dependencies : aspect ratio of images may not be changed for this workflow.

Gamma

To save the VRayExtraTex make sure to check the gamma of the file. Often you need to manually set it to 1.0 in the 3ds Max image save dialog. This is due to differences in file formats. For example if you store twice as 8b-bit rla and say once gamma 1.0 and once gamma 2.2 you will later get a good result with gamma 1. Gamma 2.2 however will make midtones of dirt weaker. This can be confusing as one might expect that saving with gamma 2.2 would change pixels in the image file, but it doesnt. Gamma 2.2 is only added like a "comment". Later when the file is loaded this makes a difference as pixel values are de-gammaed with 2.2 so you suddenly get a change. There is no general solution to this, as file formats have different specs for gamma (apply to pixel values or not). Simply make a test with your favorite image format. 3ds Max documentation says that 32 bit by default uses gamma 1.0 which should handle everything smoothly, but ... jpeg for example does not have a 32 bit version. Testing jpg with Max 2017 saving to jpg with default settings creates to short dirt, because on load it pretends to be 2.2. If you manually set gamma 1.0 (for jpeg) , 3ds Max changes the pixel values. So ... on load you get even shorter dirt. Try rla with gamma manually set to 1.0.


Copyrights
mental images and mental ray, are registered trademarks, and are trademarks of mental images GmbH, in the U.S.A. and/or other countries. V-Ray and the V-Ray logo are registered trademarks of Chaos Software Ltd. in Bulgaria and/or other countries. Autodesk and 3ds Max are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and/or other countries. finalRender is a registered trademark of cebas Computer in Germany. All other brand names, product names, or trademarks belong to their respective holders.