Home
Setting up a Daylight Scene With V-Ray

This tutorial shows you the basics of how to set up daylight lighting in V-Ray using VRaySun and a 3ds Max daylight system for precise control of time of day and location.

In this tutorial we will start by lighting our scene with a VRaySun inside a 3ds Max daylight system in order to have accurate time and location control.

1
Switch to top view and go to the create menu > systems > daylight system. Now click and drag a daylight in the center of your scene. (see image below)

2
Now we need to change the settings of the Max daylight system so that it uses a VRaySun to light our scene. Select the daylight system and in the modify panel select VRaySun from the Sunlight dropdown menu. Accept the request to automatically add a VRaySky environment map. We will be using the automatically created VRaySky environment map to light the scene, so we also need to disable the Skylight. Select <no skylight> from the Skylight dropdown menu. (see image below)

3
We can now use the daylight system to accurately position our VRaySun and we do so by clicking on the setup button in the modify panel and then adjust our time and location to our needs. In this example I have set it to 15:45 and this gives me a low angel for the sun, thus creating a nice afternoon mood. (see image below). TIP: Having the sun at close to a 90 degree angle will resemble 12:00 mid-day resulting in a brighter scene.

Before we go to rendering we need to adjust our VRaySun and create a VRayPhysicalCamera in order to have physically correct exposure.

4
Go to the VRaySun rollout of the daylight system in the modify panel, and select CIE Clear from the sky model dropdown menu. This setting gives you a few presets of physically correct sky models that will contribute to the overall lighting of our scene. (see image below)

5
Now in the top viewport create a VRayPhysicalCamera and point it at the object. (see image below)

6
Select the VRayPhysicalCamera and go to the modify panel and adjust the distortion to 0.25. This will curve the camera lens slightly just like the lens in real world cameras. Then set the vignetting to 1.3 which will mimic an effect produced by the lens that darkens the corners of your image. This will help draw the eye to the center of the image. White balance is important because it will affect the overall color tone of the image, a light blue will balance the image and a dark blue will give us a more yellowish tone whereas a light orange will give us a cold blue tone. Feel free to play with this, and at the end of this tutorial there are a few images showing the effect of color balance. The last thing to set in the VRayPhysicalCamera is the film speed. The higher the value the brighter the image just like in real world films. This value represents the films sensitivity to light, and in this case we set it to 120 (see image below).

7
If you render your scene at this point it will look like the image below.

8
Lets quickly set the 3ds Max gamma setting to a Linear Workflow (If you haven't already) so we can get the correct colors. Go to the customize menu > preferences, and then select the Gamma and LUT tab. Check enable Gamma/LUT correction, and adjust your gamma value to 2.2 and set input gamma to 2.2 and output gamma to 1.0 (see image below). Editor's note: We will soon feature a Linear Workflow tutorial on the site, exploring this in depth with regards to Why and How.

9
Now let's jump to the render settings. Hit F10 to open the render dialog box, go to the VRay tab and enable built-in frame buffer. This will allow us to further control our exposure and colors after the rendering is done and will be a huge time saver. To ensure image sampling happens at the correct gamma level for our render we need to adjust the gamma to 2.2 and enable Don't affect colors(adaptation only). Unless we do this the image sampler will be using gamma 1.0 to determine if sampes are within acceptable noise thresholds, and we end up with a more noisy image when viewed at gamma 2.2 (see image below).

10
Move to the Indirect Illumination tab and enable GI. For primary bounces we will use Irradiance map, and for secondary bounces we will use Light cache. This combination gives us a fast plus clean render. well… fast-ish (see image below).

11
Now that we have chosen our GI method combination we need to adjust them, so go to the Irradiance map section and choose medium. Or if your computer is slow you can set it to low or very low and do a bit of compromising. Enable show calc phase, this will let you see the irradiance map while it's being calculated (see image below).

12
In the Light cache section set the subdivs to 1500 and (or if your computer is slow set it to around 800, but not lower if you need a good quality image). Also enable show calc phase to see the light cache while it's being calculated (see image below).

13
We are done now, and you can render the scene. In the VRay Frame Buffer you have to click on the sRGB button to see the final result of our gamma correction. Also and notice that you can enable the curve editor by clicking its icon at the bottom of the VRay Frame Buffer window and then adjust the color to your liking. Remember to save your images in a linear format, like Open EXR, as this will ensure that the image displays correctly further down your pipeline (see image below). If you want to save to a format line PNG, TIFF or JPG you should change the output gamma in the save dialog to 2.2 to burn in the gamma.

14
here is the final image:

Some variations in color balance:

I hope that you have enjoyed this tutorial and happy rendering .



Comments
tirdad kiafar | 08.01.2010 | Alert moderator
now thats what i call a real tutorial, with no additions! thx so much!
moh shadid | 08.01.2010 | Alert moderator
very good man...thanx
Jonas Andersen | 08.01.2010 | Alert moderator
It is possible to choose VraySun as Sunlight emitter in the Daylight system... this will automatically add a VraySky in the environment slot as well. This way you avoid having to link up a seperate VraySun to the Max Daylight system. You might have to turn off the Skylight though.
Torgeir Holm | 08.01.2010 | vray.info | Alert moderator
The tutorial is now updated with the more efficient way of linking the VRaySun to the Daylight system.
niksoftarg | 10.01.2010 | Alert moderator
great Tutorial, the CIE sky is from SP3 right?
Torgeir Holm | 10.01.2010 | vray.info | Alert moderator
CIE sky is from SP4
Kinetix | 11.01.2010 | Alert moderator
Don't mess with the max Gamma settings.
You will get many problems and have to adjust the image a lot to get a nice picture.

Just use color mapping like Reinhard and lower the burn value setting.
Much quicker result.
Torgeir Holm | 11.01.2010 | vray.info | Alert moderator
Kinetix: That depends on what work flow you have set up further down the pipeline. If you have set up a pipeline with linear work flow, like many people have, you want to set the gamma like in this tutorial. If you are not using Linear work flow you can of course use Reinhard etc.

LWF might not be right for everyone, and it does take some getting used to, but there are several good reasons to use LWF, and we'll soon have a tutorial here explaining LWF in detail: why to use it, how to set it up correctly, how to composite and color correct etc.
Sevensheaven | 11.01.2010 | www.sevensheaven.nl | Alert moderator
Great tutorial, thanks a lot!
Kinetix | 12.01.2010 | Alert moderator
You won''t get better looking renderings when you are using linear workflow.
You will get a lot of problems if you adjust your max gamma setting.

The people trying this out won''t have a linear workflow adjusted pipeline,
especially since this is a beginner tutorial.

Don''t get me wrong, i think it is very kind of you to share your knowledge but It doesn''t make sense to confuse people with LWF when there are so many more useful things they could learn in that time.
Torgeir Holm | 12.01.2010 | vray.info | Alert moderator
Kinetix: While I believe there are strong reasons to use LWF (which we'll cover in detail in our upcoming tutorial), I do see your point about this being advanced for people starting out with V-Ray in an existing sRGB workflow.

I appreciate your feedback, and we'll keep this in mind for future tutorials. Comments like this is what lets us improve!
maxmad | 14.01.2010 | Alert moderator
I''ll be interested to learn more from Kinetix''s workflow, as most experienced used used to tweak alot of multiplier couple years ago when lwf was not know as now.
Kinetix | 21.01.2010 | Alert moderator
Hi Maxmad:

We have used "Linear Workflow" for about one year in productions when there was no color mapping in vray.
It caused many problems in vray and extra work to setup all the color corrections and post programs.
Now we simply use max default gamma settings again.

If you want to get sunlight to illuminate an interior you can adjust your physical camera until the room is bright enough and then lower the Reinhard color mapping burn value to get rid of the burned out areas where the sunlight hits the floor.

It''s a powerful local tonemapper built right into vray.
Chris | 21.01.2010 | Alert moderator
You forgot to mention that to get a physically correct Vray skylight you also have to add an instance of the Environment VraySky map to the VRAYEnvironment: GI (skylight) override and Reflection/Refraction override. Vray doesn`t do it autmatically, unfortunately.
Chris | 21.01.2010 | Alert moderator
BTW - why do you suggest to simulate a poor quality lens? (all those vignettes and distortions - you really want to have as less as possible of that in real world photography)
Torgeir Holm | 21.01.2010 | vray.info | Alert moderator
You don't need to use the environment overrides. Placing the VRaySky in the overrides gives the same result as when it is in the Max environment. However you would use the override slots if you need to render against a black background or need some other kind of special effect that requires separate control of the background, GI and reflection/refraction environments.

I am guessing Shadi added vignetting and distortions because they can give added realism to an image. Imperfections like vignetting, distortions, and even chromatic aberrations, bokeh and lens flares all help sell an image as real when used correctly. But they can of course easily be turned back off for a more pure arch-viz look. Personally I do vignetting in compositing whenever I need it :-)
Chris | 22.01.2010 | Alert moderator
Torgeir ---> is that a fix in the new release (SP4)?
I`m using the old SP1 and the image looks totally different if I don`t use the overrides - just like it wasn`t using the VraySky map for GI environment. That is why I always did it this way.

As for the camera imperfections, I understand what you mean, maybe the key word is "correct use". Not over-use ;) Really expensive lens used in photography have those imperfections at really low levels, almost unnoticable.
ViganMalazogu | 01.02.2010 | Alert moderator
The best ever tutorial. I have been looking for this sort of tutorial for years, and I mean FOR YEARS... Simple and very clear tutorial.

Thanks

Vigan
AMAN | 13.02.2010 | a_mans_creation@hotmail.com | Alert moderator
Hi
First of all i would like to thnx for such a detailed tutorial.
but i hav some confusion regarding this tutorial and the final image.
In this tutorial u set camera from sun towards building and in the output we see shadow towards camera.
How could this come
ha ha ha
Do u have some special plug-in for mirror the cam
ha ha ha

Anyways guys

if sun light hit direct to the object, its veryt difficult to get this quality according to this tutorial.
always try to set sun on the other face.

thnx
shadi | 15.02.2010 | Alert moderator
Thank you all for your comments,, @ aman >>you are right the sun have been moved :) but this is a personal preference to where you like to position your sun, but in certain cases you might be forced to have the sun behind the camera specially if you are asked to simulate day light in a very specific place on earth and the sun happen to be behind you, just like in real life camera you will have to play with the f-stop and or film speed (ISO).
thanks to all of you once again and a special thanks to Torgeir Holm for his support.
dimmerpixel | 19.02.2010 | Alert moderator
hmm, i just wondering how can i replace the "sky model" option with another trick because there's no such option in SP2... :(
W!m | 20.02.2010 | Alert moderator
I use your tut settings in my scene, but building the licht cache takes 60 ours. Is there a faster way?
pep | 24.02.2010 | Alert moderator
Thanks again, those tuts are very good explained, all of them, this particularly is interesting for the gamma setup and the 3dsmax+vray mixing.

Best regards.
Add comment
Name


Your URL (optional)
Comment
Please enter the
Verification Code
(case sensitive)
Verify Code

Shadi Younis is a 32 year old self-taught 3D artist from Jordan, at the moment living and working in the kingdom of Bahrain as a 3D visualization specialist.

He has been using 3ds Max for the past 5 years and using V-Ray for about 3 years.

Currently he is in the preparation stage of an interesting project called THE QUICKSAND PROJECT, in which a team of 2D and 3D artists from Jordan join forces to create a unique mixture of both worlds. A link to the project will be announced soon.

Download scene file
3ds Max 2010, 1.06MB
(Textures not included)
VRay.info v2.0 | VRay.info is NOT the official VRay site. VRay is property of Chaos Group