Thursday, March 18th, 2010

Tutorials

Gen­eral Appli­ca­tion Spe­cific Tutorials:

Please note that I am only pro­vid­ing a Vray-​​related HDR tuto­r­ial on this web­site. For other appli­ca­tions and HDR usage, please con­sult your prod­uct man­u­als and doc­u­men­ta­tion, per­form an Inter­net search, or inquire within product-​​related forums.

A Basic Vray HDR Tutorial:

I am going to out­line a few easy steps for using High Dynamic Range Images with Vray 1.5 SP3 and 3dsMax. This should apply to any HDRs you may have in your tex­ture and light­ing libraries. Most of you are prob­a­bly already aware of most of these basic steps but for those that don’t, I will try to walk you from the begin­ning with­out going into too much detail and theory.

1) First, you will want to use Lin­ear Work­flow for more accu­rate color repro­duc­tion. Tech­ni­cally, you do not have to use LWF but you will often find your­self man­u­ally adjust­ing your images in post-​​production in order to get them to look real­is­tic. This is true regard­less of any scene using Vray. You will want to open up Max and browse to the top menu bar: \Customize\Preferences\Gamma and LUT\ and set the fol­low­ing parameters:

01. Linear Workflow Settings

01. Lin­ear Work­flow Settings.

2) It’s gen­er­ally good prac­tice to set your scene dimen­sions to real world units. Again, this is not nec­es­sary but it is very help­ful for repro­duc­ing more accu­rate light­ing con­di­tions as well as work­ing with both archi­tec­tural and prod­uct mod­els. I almost always try to approx­i­mate the dimen­sions of my mod­els even if the mea­sure­ments aren’t com­pletely accu­rate. It is a very good habit to get into. Browse to: \Customize\Units Setup\ and set your para­me­ters (I often use US Stan­dard because I work with many US-​​based architects):

02. Units Setup

02. Units Setup.

3) Insert your model into the scene or cre­ate a new item such as a teapot in the top view­port. I’ll set the teapot radius to 1′ as an example.

4) Right click your model, select move from the con­text menu, and zero out the coor­di­nates in the XYZ boxes at the bot­tom of your screen so this way your model is per­fectly cen­tered. Again, this isn’t nec­es­sary but it’s? just a good habit if you’re a modeler.

5) Cre­ate a plane in the top view­port near the cen­ter of the scene. Usu­ally, I start to drag out the object as I’m hold­ing the con­trol but­ton down — this way the plane is cre­ated from the cen­ter instead of an edge. I usu­ally zero out all of my objects. Your scene should look some­thing like this:

03. Scene setup.

03. Scene setup.

6) VRay works best if you use Vray mate­ri­als instead of stan­dard ones. On larger scenes, it can eas­ily shave off sev­eral min­utes of ren­der­ing time. I always avoid non-​​Vray mate­ri­als when­ever pos­si­ble. Cre­ate a plain white Vray Mate­r­ial and apply it to the plane. Please note with LWF, pure white col­ors can cause extremely long ren­der times. I usu­ally reduce my white val­ues by sev­eral points out of habit. In this case I’m set­ting it to 254:

04. White Vray Material

04. White Vray Material.

7) Cre­ate another Vray mate­r­ial of your choice. For this exam­ple, I’m going to use a basic chrome type of mate­r­ial as it will show some good reflec­tions and apply it to your model/​teapot:

05. Chrome Material.

05. Vray Chrome Material.

8) Cre­ate a Vray­Phys­i­cal­Cam in your scene like below:

06. VRayPhysicalCam

06. VRay­Phys­i­cal­Cam.

Hit ‘c’ after lay­ing out your cam­era in order to view the scene as the cam­era sees it. You may want to adjust the posi­tion of your cam­era with the rota­tion con­trols in the lower right-​​hand side of your screen. My Phys­i­cal Cam­era set­tings for my files usu­ally ren­der nicely at F1.2. Some­times I also set the White Bal­ance set­tings to neutral.

9) Now we will set up the HDR light­ing. There’s sev­eral ways to insert a HDR into a scene, but Vray pro­vides a very effi­cient light (from a speed and sampling/​noise reduc­tion stand­point) called a dome­light. This light can be inserted any­where in your scene (posi­tion does not mat­ter.) Occa­sion­ally upon insert­ing a light into a scene, the col­ors in the view­port will shift because the default Max light­ing changes — just hit ‘ctrl+l’ sev­eral times in a view­port to change the default light­ing setup in the view­ports until you find some­thing you can work with again.

Here is my HDR light­ing setup:

07. VRayHDRI Setup

07. VRay­H­DRI Setup.

Note that there is a res­o­lu­tion num­ber which defaults to 512 under the Tex­ture sec­tion of your light. This num­ber can be dialed up or down (I used 1024 here) depend­ing on the qual­ity you desire. But it also adds ren­der­ing time. You can also choose ‘Spher­i­cal (full dome)’ under your light’s ‘Dome light options’ (not shown/​cut-​​off above) if you want the light to com­pletely encom­pass the scene from an angle below the hori­zon (the rea­son why this option is there is because it adds ren­der­ing time and not every­one is going to always see that portion.)

10) Drag the Vray­Light Vray­H­DRI mate­r­ial over to an empty slot on your mate­r­ial edi­tor (short­cut = m) and select ‘instance’ on the pop-​​up win­dow. In the mate­r­ial edi­tor, browse to the HDR/​EXR of your choice:

08. HDR selection.

08. HDR selection.

I chose a HDR from one of my own libraries which I cre­ated. My HDRs fit Spher­i­cal Map­ping. You can usu­ally tell which map­ping type you have by look­ing at the lit­tle mate­r­ial pre­view win­dow. If the image looks dis­torted, try the other type of map­ping images.

11) Now we are ready to run a test ren­der­ing. Open up your ren­der­ing setup win­dow from the top menu bar: \Rendering\Render Setup…\ (short­cut =F10.) I’ve pro­vided a very effi­cient test ren­der­ing setup below:

09. VRay Test Rendering Settings

09. VRay Test Ren­der­ing Settings.

12) Select your Cam­era in the view­port or hit the ‘c’ key after select­ing your view­port if it isn’t already. This should switch you to your cam­era view. Now you are ready to make your first ren­der­ing test. Hit ‘ren­der.’ Here is my result using my test set­tings and default cam­era values:

10. Test rendering output.

10. Test ren­der­ing output.

13) The scene may look per­fect, too dark, or too bright depend­ing on the HDR used. There’s sev­eral dif­fer­ent options you have at this point. You can always change the cam­era angle, change the F-​​Stop (F Num­ber) of the cam­era (lower num­ber for a brighter scene and vice-​​versa), or adjust the bright­ness and con­trast in post with a pro­gram like Pho­to­shop. Also note that you may have vignetting turned on in the cam­era which may darken the image cor­ners. And last but not least is your cam­era White Bal­ance which may lend your image a cer­tain tint. I usu­ally turn mine to neu­tral but some­times the day­light set­tings (default) works well.

14) As an alter­nate option, some­times I add a Vray­light set to sphere, No Decay checked on, and slightly tinted yel­low to my scenes in direct posi­tion of the sun. This will some­times add a more defined shadow as well as a lit­tle bit more over­all tint to your scenes. You may have to dial up and down your light mul­ti­plier. This is really depen­dent on the HDR being used as well as the look you are going for. In the image above, my teapot is in the shade (just like the HDR which was shot) and I’m fine with the light­ing. I might dial down the F-​​Number of the cam­era .5−1.0 to make it a lit­tle bit brighter.

15) At this point, you can try out as many HDRs as you like by sim­ply load­ing them in the Mate­r­ial edi­tor. Also note you can change the cam­era angle man­u­ally, or turn the actual HDR by enter­ing in new ‘Horiz. rota­tion’ val­ues in the Mate­r­ial slot.

16) When you are ready to ren­der the final image, adjust the ‘Width’ and ‘Out­put’ size under the ‘Com­mon’ ren­der tab to your lik­ing. You may want to turn on the ‘Antialias­ing fil­ter’ under the ‘Vray’ ren­der tab for sharper edges. Under the ‘Indi­rect Illu­mi­na­tion’ tab, you can change your ‘Pri­mary Bounces’ to ‘Brute Force’ (leave default) or ‘Irra­di­ance Map’ (change to medium or high set­tings) and set your ‘Light Cache’ to around 1500 ‘Sub­divs.’ Last but not least, under the ‘Set­tings’ tab, you can dial up the ‘Global sub­divs mul­ti­plier’ to some­thing like 2 or 3 (even higher) if you want to increase the over­all ren­der­ing set­tings. Please note that all of these set­tings will increase ren­der­ing times as well as quality.