Sunday 7 November 2010

Protip: heres a trick to getting a good DOF effect with no cost to render time

 :) Here's a great trick that some of you might find useful if you ever get into 3d rendering. Personally its one of my favourite cheats in 3d and if you ever find yourself in a tight deadline it could really lighten the situation for you.
Its how to fake a depth of field effect with no cost to rendering times. Usually if you were to do a DOF effect directly in the render  you would set up your camera to  work as a physical camera, add a lens shader like a bookeh effect which would simulate the depth of field you get using a real camera, but this can drastically increase you render time because the render engine has to compute the blur in real time across a 3d space. However you can just render your scene with no blur and also render out a Zdepth pass ... which looks a little like this.
What it is is a greyscale representation of the whats found in the z-axis. So the closer something is the blacker it is. Now you take this image into photoshop and paste it into the alpha layer of the original rendered image, load up lens blur from the effects list and just click on the part you want to focus on. This is what you get as a final result.
:) Check out the preview. Its as simple as that and faster than anything around and looks great. Also this is crucial if you really want to get a photo realistic image because this is one of those small details that make a good image great.

Thursday 4 November 2010

Getting quality renders with vray

Okay so I'm going to take some time to explain Anti Aliasing, its one of the core elements you need to set up before you start any render you plan on doing. The render engine i use is vray so I'm going to talk about some of different methods you can use and some of the  pro's and con's that come with using them.
First a little explanation about AA.
AA is a technique in computer technology that  minimizes the distortion artifacts known as aliasing.
 As you can see in the image above, the jagged form in the top pic  is a consequence of  no AA being computed onto the line, the image being pixelated  gives of a sharp look and most of the quality is lost when zoomed in or scaled up.
Onto the bottom pic AA is applied , in 3d software the render engine fires out samples to determine how to color the pixels around the line, effectively faking a smooth look.
When viewed from a distance i think all would agree that the bottom example looks more attractive.

Now about setting up your render with vray. I myself use vray for maya and am presented with 3 different types of AA, but this may vary for different apps.These are the 3 methods you can use.
-Fixed
-Adaptive DMC
-Adaptive subdivision
What i will state now are some guidelines i like to abide to, but they are not a strict set of rules, and rearly apply to every scene your working on. More or less they should be a starting point from which you should start tweaking to get the best quality vs speed results.

The fixed sampler rate should be used for scenes that have over 75% of the image in high detailed areas. Because the fixed sampler always takes the same number of samples per region it renders.
I prefer to start of with a 1 subd  sample rate for test renders and 3-6 for production renders.

the Adaptive DMC takes a variable number of samples per pixel depending on the difference in the intensity of the pixels. So it should be used for scenes that have less than 75% of high details in the image.
Some values i like to use are 1/4 for test renders and 3/6 for productions renders

And finally the Adaptive subdivision method. This sampler divides the image into an adaptive grid-like structure and refines depending on the difference in pixel intensity. So this method should be used for images with a large amount of flat surfaces. Values i use here range from -1/2 for test renders and 2/5 for production renders.

Here is a small preview. Its a hand i did some time ago, the left side is rendered with an Adaptive DMC method with a sample setting of -3/0 and the right side with the fixed method and a total of 3 subdivs per render region. The left side rendered relatively quickly whilst the right side took a descent amount of time.


Again these values are not a strict guide line and most of the time you will have to play around to get good render times but they really are a good starting point. If  anyone does any renders i hope this help you out if you were having any trouble before. Thanks for reading :)

Wednesday 3 November 2010

Sorry for the wait, im back.

So after a lengthy break from blogging I'm back. A lot of things have come up in the past couple of days, most of my time was  spent at setting up the render for the coke and other certain non work related things :) Some of the work related stuff I'm going to talk about these days.
Here is the coke render i spent 3 days tuning to get a descent render time,

it takes around 12 min. per frame which is not that bad considering that it was rendering one frame at around an hour and 30 Minuit's. And on top of that for ten seconds it takes 250 frames, so all together i was looking at a couple of days of my processor being drilled from all sides just to get the render completed.
Also the next thing I'm going to get finished is a armchair for the reel. Here's just a reference image i plan on using.
see you tomorrow :)