Wednesday, December 3, 2008

Render trees fast!

Ever wondered why opacity mapped multi-layered trees were slow in rendering when using GI? Well here is a quick workaround on getting those trees to render about 4 or 5 times faster with full GI.The image below shows an opacity mapped tree with standard Max materials and full GI and area shadows.The image below shows the same tree with the same material, but with filtering set to none in the opacity bitmap. The tree shows much more detail which I like a lot more as the image above

So setting filtering to none in the opacity bitmap does little to nothing with the render time.There is a material that handles opacity in a much faster way. Its the B2 Utility material. So to speed up the render we want to use that Utility material in combination with the leaves material. For this you should use the Blend material, set up the way that is shown in the image below.The Utility material is setup as shown on the image below. If the leave patches needs a double sided material then click the 2-sided option. Set the Trans color to pure white.The leaves material is the original leaves material but without the opacity bitmap, shown below.

Finally we'll have to put the opacity bitmap in the Mask slot of the Blend Material. I've set the filtering to None.
If you hit render now it will render a lot faster.Have fun rendering....... faster......

edit: links to full size images now work....

edit2: In previous journeys of mine finding a faster render of that same tree I used to slap the whole material in a Utility material and then Use Local Sample Rate of 1.

So if you even want to speed things up more (ofcourse getting a lesser quality) you can put the blend material, or in my case a multi/sub, in a B2 Utility material and set that value to 1 as shown below.
Now the rendertime is even faster but at a cost of indirect shadows/light quality. This will work on trees far away from the camera though.

edit3: Pixel_Monkey found out that there was no GI in the tree, because of the way that the Blend material gets its properties from the sub-materials. So disabling the GI in the Utility material resulted in the whole Blend material not getting and sending any GI.

Rhino Tip - saving z-buffer data

This works differently than it does in the 3ds Max verion, and it just came up in the Rhino newsgroup, so I thought it was worth a mention here:

Question: Is there a way for Brazil to make an output of a depth map to use it with
DOF pro?

Answer: Once you've rendered, switch to "Z buffer" mode in the render window. You
can now press the "Save" button to save it.