Montag, 2. Januar 2012

#Vray #c4d getting a clean alpha from vraysky

Here is a simple procedure to pull a clean alpha from an object against the Vraysky background. I've had so many white fringes around my object I was foaming, but the setup is simple once you know how it works.
  1. Add a vraysky (VrayLight Tag under Sun/PhysicalSky switch to on) 
  2. In the Sun light Tab switch the Override BG Env to Off, making the sky invisible to the camera.
  3. The camera needs to have a VrayPhysicalCamera tag, otherwise it will not work.
  4. The alpha *has NOT* to set to Straight Alpha in the Save tab. (it is always straight, I messed this up in the last edit, sorry)
Haven't checked out how it works with Multipass On/Off - I had multipass on in my setup.

Sonntag, 1. Januar 2012

#Vray #C4d Antialiasing optimizing - magic DMC settings.

One of the biggest issues for me in Vray4c4d that the forum posts are confusing to me. The documentation is at places hard to understand and I have huge problems understanding the instructions given.

Here I am trying to figure out what was meant in one of the forums for "speeding up animation".

The original tip went like this:

9) a very speedy very high quality render method is to use an universal DMC approach: basically it works in combining high AA subdivision with very high material and light subdivision. for that set the AA to some between 1x32 (or 1x50-1x100), as you like, and set the material and light subdivisions to the maximum value (256 in 1.2.6, in next versions 400). the trick is that the AA will divide the material and light subdivision so if you use the 256 subdivision which looks very high it actually gets divided by the AA subdivision via DMC which is therefore 256 / 32 = 8 the lowest default again. the only difference to default setting is then that you give the very adaptive vray DMC sampler all possible room to decide itself on each pixel how much to subdivide and or antialias. the result are amazing fast and clean renderings:-) 

Ha! Just what I need! Fast and clean renderings. But...!? Where the hell are all those buttons and what do they mean?

So let me try to disentangle this 
  1. I am using Vray4C4d 1.2.6 with R13 Studio. 
  2. Claim: By setting Antialias settings very high in different places we can get speedy renderings.
  3. Some of those settings can be set in the Render settings for Vray.
  4. There are 3 mechanisms for dealing with antialiasing in Vray
    1. Fixed - you know what's coming at you
    2. Adaptive Subdivision - The classic subdivision: The corners of every pixel are evaluated and if their difference is above a threshold, the pixel is subdivided until "Max rate" is reached or the new pixels all have similar colors.
    3. DMC - this is the new (and much smarter) AA method used in Vray. It compares all surrounding pixels and then decides if it should subdivide the pixel. 
Ok, so it's all about the DMC. Two great pointers to read about on the DMC sampler and its inner workings are here:
  • Official manual: http://www.spot3d.com/vray/help/150SP1/render_params_imagesampler.htm
  • And how it really works:  http://www.interstation3d.com/tutorials/vray_dmc_sampler/demistyfing_dmc.html
The essence is that DMC implements a much better mechanism deciding if a pixel should be subdivided for additional rendering compared to adaptive subdivision.

Which means, we have to LET the DMC algorithm decide on its own. The penalty for setting high subdivision max values is small and the image quality WAY better.

Another important point is that all the calculations and the number of subdivisions are related. So lets assume the following example:
  • Material X has Glossiness subdivs of 256
  • The Adaptive DMC image sampler has a Max subdivision of 32
  • Now the actual subdivs are 256/32=8 - because DMC knows that it can subdivide the pixel if it needs to.
  • 8 subdivs are the minimal number of samples that DMC will look at. There is probably no need to go to a lower number. 
The same argument works for lights (shadow subdivision), DOF and Motion Blur.

They all play together, but not quite sure about how right now.