Information

Connecting V-ray Sun with HDRI Map

Basic shortcuts

Ctrl + SSave subtitles
Ctrl + click
Double click
Edit highlighted caption
TabEdit next caption
Shift + TabEdit previous caption
EscLeave edit mode
Ctrl + SpacePlay / pause video
Ctrl + HomePlay selected caption
Ctrl + EnterSplit caption at cursor position
at current time

Advanced shortcuts

Ctrl + InsertAdd new caption
Ctrl + DeleteDelete selected caption
Ctrl + IEdit currently played segment
Shift + EnterNew line when editing
Ctrl + LeftPlay from -1s
Ctrl + RightPlay from +1s
Alt + LeftShift caption start time -0.1s
Alt + RightShift caption start time +0.1s
Alt + DownShift caption end time -0.1s
Alt + UpShift caption end time +0.1s

Annotation shortcuts

Ctrl + 1Hesitation
Ctrl + 2Speaker noise
Ctrl + 3Background noise
Ctrl + 4Unknown word
Ctrl + 5Wrong segment
Ctrl + 6Crosstalk segment
You are in the read-only mode. Close
00:06.1
00:13.3
Hi. In this tutorial, I am going to explain how we can connect a vray sun with an hdri map properly,
00:13.4
00:17.6
when we want to use these two light sources together in our scene.
00:17.7
00:19.4
Why do we need to match and connect them?
00:19.5
00:27.3
Because, if we prefer to have a vray sun and a vray dome light with an hdri map texture assigned to it as the light surface,
00:27.4
00:35.2
together to create a more realistic environment, and if the hdri map has a visible sun, that means we will have two suns in the scene.
00:35.3
00:41.8
Then, we need to match the direction of the vray sun with the hdri sun, and connect them together,
00:41.9
00:47.1
so that, when we want to change the rotation of the hdri map, the vray sun moves with it.
00:47.7
00:49.6
Now let’s see how we can do it.
00:49.7
00:53.9
I have prepared this graphic for you to easily understand the logic.
00:54.0
01:01.1
A dome light is a spherical or hemispherical light source that shines inward at the scene as if from outside the scene extents.
01:01.2
01:08.3
It is generally used for image-based lighting, using panoramic 360 degree HDR images.
01:08.5
01:15.0
Now think as if we draw a line from the scene origin point to the center of the sun in the hdri image.
01:15.1
01:21.1
Then, the vray sun has to be positioned somewhere on this line, in order to be matched directionally.
01:21.2
01:27.2
By the way, note that the position of the vray sun icon only defines the direction of the vray sun,
01:27.3
01:30.6
not the real position of the vray sun itself, when rendered.
01:30.8
01:37.2
The visible vray sun in render is positioned at the same angle but somewhere far from the icon in the scene,
01:37.3
01:40.2
when not used with an hdri environment map.
01:40.6
01:45.6
If there is an hdri map as the sky, you can’t see the vray sun in render.
01:46.0
01:48.7
Now let’s apply this logic to our scene.
01:49.0
01:51.0
First, create a dome light.
01:51.2
01:56.1
From vray toolbar, choose vray dome light and click somewhere in the top view viewport.
01:57.1
01:59.8
Now, let’s assign an hdri map to it.
02:00.1
02:01.6
Open material editor.
02:02.1
02:03.1
Under maps.
02:03.7
02:04.9
Vray.
02:05.2
02:09.6
With Vray 5, Vray HDRI Map renamed as Vray Bitmap.
02:10.2
02:12.1
Double click Vray Bitmap.
02:13.3
02:16.7
Go to parameters and click to choose an HDRI image.
02:17.1
02:19.4
Locate your HDRI map folder.
02:19.7
02:20.8
I will use this one.
02:24.2
02:24.9
Click open.
02:34.3
02:36.1
Choose the mapping type as spherical.
02:37.7
02:40.9
Now, we need to assign it as the Dome Light texture map,
02:41.0
02:43.4
and then as the background environment map.
02:43.9
02:47.7
Select the Dome Light and go to modify tab of the command panel.
02:53.6
02:56.5
Click, drag, and drop the bitmap as an instance.
03:01.2
03:04.6
Open environment window with the shortcut key 8, and do the same.
03:15.6
03:16.3
Ok.
03:16.4
03:18.3
Now let’s create a Vray Sun.
03:18.4
03:19.9
Go to Vray Toolbar.
03:20.0
03:20.9
Vray Sun.
03:21.0
03:23.4
Click and drag somewhere like this.
03:25.2
03:30.2
We are using an HDRI map as the sky. So, we say no for a Vray Sky.
03:33.0
03:36.4
Now we need to look from origin point to the HDRI sun.
03:37.2
03:39.5
For this, place a Vray Camera to the scene.
03:41.0
03:41.9
Create tab.
03:43.0
03:43.6
Cameras.
03:46.2
03:47.6
Vray.
03:48.8
03:49.7
Physical camera.
03:51.2
03:52.4
Look towards the lights.
03:56.6
03:59.3
Okay. We have created all the objects.
03:59.5
04:01.9
Now it is time to set up their positions.
04:02.2
04:08.7
Select all and move them onto the x axis, by using transform type-in coordinate fields, here at the status bar.
04:09.5
04:11.3
Enter 0 for the y field.
04:13.7
04:15.8
They are aligned on the x axis now.
04:16.5
04:21.3
We need to move the Dome Light, the Vray Sun Target and the camera target to the origin point.
04:22.1
04:26.0
Select these three objects and move them by setting the x value as 0.
04:31.9
04:35.1
Okay.Let’s turn off the grids now, for a clear view.
04:36.7
04:39.8
Activate camera view, simply by clicking c.
04:40.8
04:44.0
Now we need to set up the camera to see the HDRI Sun.
04:44.6
04:46.3
Move the camera to see the sky.
04:53.4
04:55.4
Okay. This looks good for now.
04:55.5
05:00.3
Let’s turn off this grid also.
05:00.4
05:05.2
The HDRI we used does not have a clear sun.
05:05.3
05:10.1
So, we need to decrease the value of overall multiplier to see a clear sun.
05:10.2
05:15.0
Something like 0.05 should work fine.
05:15.1
05:19.9
Okay. Much better now.
05:20.0
05:24.8
But we are still not seeing the sun.
05:24.9
05:29.7
We need to rotate the map by playing with the horizontal rotation value.
05:29.8
05:34.6
Here it is.
05:34.7
05:39.5
Click the camera to see the grid of camera field of view.
05:39.6
05:44.4
I need to center the sun to this vertical line in the middle because it corresponds to x axis.
05:44.5
05:49.3
Okay, perfect. Now we aligned the HDRI sun with the objects over x axis.
05:49.4
05:54.2
Next, we will match the direction of the Vray Sun with the HDRI sun.
05:54.3
05:59.1
To do this, we need to move the Vray Sun over the HDRI sun in the camera view.
05:59.2
06:04.0
Simply move the Vray Sun upwards.
06:04.1
06:08.9
Are we done?
06:09.0
06:13.8
Of course not.
06:13.9
06:18.7
Because the direction of the camera is different than the direction of the Vray Sun.
06:18.8
06:23.6
These two lines must be at the same angle as if there is one single line.
06:23.7
06:28.5
We can easily do that with moving them to the same coordinate numbers for x and z axes.
06:28.6
06:33.4
Lets round up these numbers for easy entry.
06:33.5
06:38.3
The same numbers but negative values for the camera.
06:38.4
06:43.2
Okay. We matched their directions to each other but the HDRI sun has a different direction angle.
06:43.3
06:48.1
We need to change the z numbers till we have them at the same place in the camera view.
06:48.2
06:53.0
Let’s try 80.
06:53.1
06:57.9
Good but not exactly.
06:58.0
07:02.8
Nope.
07:02.9
07:07.7
Last time.
07:07.8
07:12.6
Yes, that is okay.
07:12.7
07:17.5
Now we matched the suns properly.
07:17.6
07:22.4
This is like a single line and we are looking the HDRI sun from a point on this line.
07:22.5
07:27.3
What we need to do next is, to create a connection between the Vray Sun and the HDRI map
07:27.4
07:32.2
so that if we rotate the map, we don’t lose the matching we have done.
07:32.3
07:37.1
We will create an indirect connection over the Dome Light.
07:37.2
07:42.0
First, we will link the Vray Sun to the Dome Light, and then,
07:42.1
07:46.9
We will use the parameter wiring feature for connecting the z rotation of the Dome Light, to the horizontal rotation of the HDRI map.
07:47.0
07:51.8
But before doing the linking, we need to equalize these rotation values.
07:51.9
07:56.7
The positive or the negative rotation directions for the Dome Light and the HDRI map are reverse.
07:56.8
08:01.6
So, for the positive rotation value of the map, we are going to set the same number but as negative for the light.
08:01.7
08:06.5
Minus 36.4.
08:06.6
08:11.4
Okay, now let’s do the linking.
08:11.5
08:16.3
I am going to link not only the Vray Sun, but also the camera to the Dome Light,
08:16.4
08:21.2
in order to be able to easily check from the camera view that the connections are okay.
08:21.3
08:26.1
We can use the select and link command but I will show you a more practical way.
08:26.2
08:31.0
Open Scene Explorer panel.
08:31.1
08:35.9
I am using the shortcut key d, but you can open it from here on the main toolbar.
08:36.0
08:40.8
Make sure you are at the hierarchy mode.
08:40.9
08:45.7
Here we see a list of existing objects in the scene.
08:45.8
08:50.6
To link one object to another, just click the object, and drag and drop it over the target one.
08:50.7
08:55.5
Link Vray Sun to its target.
08:55.6
09:00.4
Link the camera to the camera target.
09:00.5
09:05.3
Then link both targets to the Dome Light.
09:05.4
09:10.2
Now the linking is done.
09:10.3
09:15.1
It works as child, parent, child, parent, and grandparent.
09:15.2
09:20.0
To unlink any object, just drag it to somewhere empty.
09:20.1
09:24.9
Now let’s check the linking.
09:25.0
09:29.8
Rotate the Dome Light.
09:29.9
09:34.7
And yes, the others are also rotating.
09:34.8
09:39.6
Next, we are going to connect the HDRI to this rotation.
09:39.7
09:44.5
Open parameter wire dialog window.
09:44.6
09:49.4
I have added it here to quad menu, but, it can also be opened from animation menu group, under wire parameters.
09:49.5
09:54.3
For the left parameter, let’s choose the Vray Dome Light.
09:54.4
09:59.2
Under transform, rotation, and click z rotation.
09:59.3
10:04.1
For the right parameter,
10:04.2
10:09.0
Environment, texture map, and click horizontal rotation.
10:09.1
10:13.9
Add a minus for z rotation of the light, because, as I said before, the turning directions are not the same.
10:14.0
10:18.8
Let’s do it as a two way connection.
10:18.9
10:23.7
This way, both parameter changes affect the other one.
10:23.8
10:28.6
Click connect to complete the connection.
10:28.7
10:33.5
Let’s check it over both the light and the map.
10:33.6
10:38.4
When rotating the Dome Light, the HDRI map turns with it.
10:38.5
10:43.3
Rotate the map, and yes, the Dome Light and the Vray Sun rotate with it, keeping the suns together.
10:43.4
10:48.2
Now let’s have a look at the scene from a perspective view.
10:48.3
10:53.1
Notice that the directions of the suns remain equal to each other.
10:53.2
10:58.0
Okay. We have set up the connection as we wanted it to be.
10:58.1
11:02.9
Now before ending this tutorial, there are two more things I want to show you.
11:03.0
11:07.8
Let’s create a simple scene for this.
11:07.9
11:12.7
A couple of boxes is enough.
11:12.8
11:17.6
Let’s add a Vray plane.
11:17.7
11:22.5
Okay. A simple view.
11:22.6
11:27.4
Assign a Vray material to the boxes.
11:27.5
11:32.3
Select both.
11:32.4
11:37.2
And assign it.
11:37.3
11:42.1
Let’s change the color a little bit.
11:42.2
11:47.0
Okay.
11:47.1
11:51.9
Change the overall multiplier back to 1.
11:52.0
11:56.8
Let’s choose a green color for the Vray plane.
11:56.9
12:01.7
Okay.
12:01.8
12:06.6
Now change the view to a camera view.
12:06.7
12:11.5
Go to render settings.
12:11.6
12:16.4
Lock the view.
12:16.5
12:21.3
And, add a Vray Denoiser Element.
12:21.4
12:26.2
Okay.
12:26.3
12:31.1
Vray frame buffer.
12:31.2
12:36.0
And start IPR.
12:36.1
12:40.9
The environment is too dark.
12:41.0
12:45.8
Let’s increase the render multiplier of the HDRI map.
15:12.0
15:13.1
20 should be fine.
15:19.3
15:20.8
IPR again.
15:23.4
15:24.3
Yes, good now.
15:27.2
15:29.2
Let’s enlarge the image size a bit.
15:43.5
15:44.0
Okay.
15:44.1
15:45.0
Rendering done.
15:45.8
15:46.9
Open history panel.
15:47.0
15:48.1
And save the image.
15:52.4
15:55.4
Okay, now the first thing i wanted to show you was this:
15:55.6
16:00.0
If you need, you can move the Vray Sun to somewhere far from the current position.
16:00.1
16:02.4
But you have to keep the direction as the same.
16:02.6
16:05.2
This way, it does not change your lighting set up.
16:05.4
16:06.0
Let’s see.
16:06.3
16:09.6
I am going to multiply all coordinate values by 10.
16:09.8
16:11.5
This will keep the direction as the same.
16:26.3
16:27.6
Now the sun is far away.
16:29.5
16:30.6
Let’s render again.
16:38.5
16:39.1
Done.
16:40.5
16:42.8
Save image and compare with the previous one.
17:06.0
17:07.8
As you see there is no difference.
17:08.1
17:12.6
Like I said in the beginning, the position of the Vray Sun icon is not important.
17:12.8
17:14.3
It is the direction that matters.
17:20.2
17:26.0
The second issue is that the position of the lights can be changed also without affecting the illumination.
17:26.2
17:28.0
They don’t have to be at the origin point.
17:28.2
17:32.3
It is better that we keep them away from the main elements of our scene for clarity.
17:38.4
17:39.6
Let’s see the render.
17:45.8
17:46.6
Render done.
17:50.9
17:52.9
Let’s compare it with the previous one.
18:13.8
18:15.4
Again no difference.
18:27.7
18:34.6
Finally I’ll show you the first camera view to see whether the matching of the two suns is changing or not, while we are moving the lights.
18:55.5
18:56.0
It is not.
18:56.2
19:03.2
And this is simply because the HDRI map is located at the extents of the scene which is theoretically at an infinite distance.
19:05.4
19:06.9
And that’s it for this tutorial.
19:07.1
19:08.2
Thanks for watching.
19:08.4
19:10.8
You can leave any comments or questions below.
19:11.0
19:14.6
And if you like this video, don’t forget to subscribe to my channel.
19:14.8
19:17.4
It encourages me to prepare more tutorials.
19:17.6
19:18.3
Bye for now.