1
00:00:06,100 --> 00:00:13,300
Hi. In this tutorial, I am going to explain 
how we can connect a vray sun with an hdri 
map properly,

2
00:00:13,400 --> 00:00:17,600
when we want to use these two light sources 
together in our scene.

3
00:00:17,700 --> 00:00:19,400
Why do we need to match and connect them?

4
00:00:19,500 --> 00:00:27,300
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,

5
00:00:27,400 --> 00:00:35,200
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.

6
00:00:35,300 --> 00:00:41,800
Then, we need to match the direction of the 
vray sun with the hdri sun, and connect them 
together,

7
00:00:41,900 --> 00:00:47,100
so that, when we want to change the rotation 
of the hdri map, the vray sun moves with 
it.

8
00:00:47,700 --> 00:00:49,600
Now let’s see how we can do it.

9
00:00:49,700 --> 00:00:53,900
I have prepared this graphic for you to easily 
understand the logic.

10
00:00:54,000 --> 00:01:01,100
A dome light is a spherical or hemispherical 
light source that shines inward at the scene 
as if from outside the scene extents.

11
00:01:01,200 --> 00:01:08,300
It is generally used for image-based lighting, 
using panoramic 360 degree HDR images.

12
00:01:08,500 --> 00:01:15,000
Now think as if we draw a line from the scene 
origin point to the center of the sun in 
the hdri image.

13
00:01:15,100 --> 00:01:21,100
Then, the vray sun has to be positioned somewhere 
on this line, in order to be matched directionally.

14
00:01:21,200 --> 00:01:27,200
By the way, note that the position of the 
vray sun icon only defines the direction 
of the vray sun,

15
00:01:27,300 --> 00:01:30,600
not the real position of the vray sun itself, 
when rendered.

16
00:01:30,800 --> 00:01:37,200
The visible vray sun in render is positioned 
at the same angle but somewhere far from 
the icon in the scene,

17
00:01:37,300 --> 00:01:40,200
when not used with an hdri environment map.

18
00:01:40,600 --> 00:01:45,600
If there is an hdri map as the sky, you can’t 
see the vray sun in render.

19
00:01:46,000 --> 00:01:48,700
Now let’s apply this logic to our scene.

20
00:01:49,000 --> 00:01:51,000
First, create a dome light.

21
00:01:51,200 --> 00:01:56,100
From vray toolbar, choose vray dome light 
and click somewhere in the top view viewport.

22
00:01:57,100 --> 00:01:59,800
Now, let’s assign an hdri map to it.

23
00:02:00,100 --> 00:02:01,600
Open material editor.

24
00:02:02,100 --> 00:02:03,100
Under maps.

25
00:02:03,700 --> 00:02:04,900
Vray.

26
00:02:05,200 --> 00:02:09,600
With Vray 5, Vray HDRI Map renamed as Vray 
Bitmap.

27
00:02:10,200 --> 00:02:12,100
Double click Vray Bitmap.

28
00:02:13,300 --> 00:02:16,700
Go to parameters and click to choose an HDRI 
image.

29
00:02:17,100 --> 00:02:19,400
Locate your HDRI map folder.

30
00:02:19,700 --> 00:02:20,800
I will use this one.

31
00:02:24,200 --> 00:02:24,900
Click open.

32
00:02:34,300 --> 00:02:36,100
Choose the mapping type as spherical.

33
00:02:37,700 --> 00:02:40,900
Now, we need to assign it as the Dome Light 
texture map,

34
00:02:41,000 --> 00:02:43,400
and then as the background environment map.

35
00:02:43,900 --> 00:02:47,700
Select the Dome Light and go to modify tab 
of the command panel.

36
00:02:53,600 --> 00:02:56,500
Click, drag, and drop the bitmap as an instance.

37
00:03:01,200 --> 00:03:04,600
Open environment window with the shortcut 
key 8, and do the same.

38
00:03:15,600 --> 00:03:16,300
Ok.

39
00:03:16,400 --> 00:03:18,300
Now let’s create a Vray Sun.

40
00:03:18,400 --> 00:03:19,900
Go to Vray Toolbar.

41
00:03:20,000 --> 00:03:20,900
Vray Sun.

42
00:03:21,000 --> 00:03:23,400
Click and drag somewhere like this.

43
00:03:25,200 --> 00:03:30,200
We are using an HDRI map as the sky. So, 
we say no for a Vray Sky.

44
00:03:33,000 --> 00:03:36,400
Now we need to look from origin point to 
the HDRI sun.

45
00:03:37,200 --> 00:03:39,500
For this, place a Vray Camera to the scene.

46
00:03:41,000 --> 00:03:41,900
Create tab.

47
00:03:43,000 --> 00:03:43,600
Cameras.

48
00:03:46,200 --> 00:03:47,600
Vray.

49
00:03:48,800 --> 00:03:49,700
Physical camera.

50
00:03:51,200 --> 00:03:52,400
Look towards the lights.

51
00:03:56,600 --> 00:03:59,300
Okay. We have created all the objects.

52
00:03:59,500 --> 00:04:01,900
Now it is time to set up their positions.

53
00:04:02,200 --> 00:04:08,700
Select all and move them onto the x axis, 
by using transform type-in coordinate fields, 
here at the status bar.

54
00:04:09,500 --> 00:04:11,300
Enter 0 for the y field.

55
00:04:13,700 --> 00:04:15,800
They are aligned on the x axis now.

56
00:04:16,500 --> 00:04:21,300
We need to move the Dome Light, the Vray 
Sun Target and the camera target to the origin 
point.

57
00:04:22,100 --> 00:04:26,000
Select these three objects and move them 
by setting the x value as 0.

58
00:04:31,900 --> 00:04:35,100
Okay.Let’s turn off the grids now, for a 
clear view.

59
00:04:36,700 --> 00:04:39,800
Activate camera view, simply by clicking 
c.

60
00:04:40,800 --> 00:04:44,000
Now we need to set up the camera to see the 
HDRI Sun.

61
00:04:44,600 --> 00:04:46,300
Move the camera to see the sky.

62
00:04:53,400 --> 00:04:55,400
Okay. This looks good for now.

63
00:04:55,500 --> 00:05:00,300
Let’s turn off this grid also.

64
00:05:00,400 --> 00:05:05,200
The HDRI we used does not have a clear sun.

65
00:05:05,300 --> 00:05:10,100
So, we need to decrease the value of overall 
multiplier to see a clear sun.

66
00:05:10,200 --> 00:05:15,000
Something like 0.05 should work fine.

67
00:05:15,100 --> 00:05:19,900
Okay. Much better now.

68
00:05:20,000 --> 00:05:24,800
But we are still not seeing the sun.

69
00:05:24,900 --> 00:05:29,700
We need to rotate the map by playing with 
the horizontal rotation value.

70
00:05:29,800 --> 00:05:34,600
Here it is.

71
00:05:34,700 --> 00:05:39,500
Click the camera to see the grid of camera 
field of view.

72
00:05:39,600 --> 00:05:44,400
I need to center the sun to this vertical 
line in the middle because it corresponds 
to x axis.

73
00:05:44,500 --> 00:05:49,300
Okay, perfect. Now we aligned the HDRI sun 
with the objects over x axis.

74
00:05:49,400 --> 00:05:54,200
Next, we will match the direction of the 
Vray Sun with the HDRI sun.

75
00:05:54,300 --> 00:05:59,100
To do this, we need to move the Vray Sun 
over the HDRI sun in the camera view.

76
00:05:59,200 --> 00:06:04,000
Simply move the Vray Sun upwards.

77
00:06:04,100 --> 00:06:08,900
Are we done?

78
00:06:09,000 --> 00:06:13,800
Of course not.

79
00:06:13,900 --> 00:06:18,700
Because the direction of the camera is different 
than the direction of the Vray Sun.

80
00:06:18,800 --> 00:06:23,600
These two lines must be at the same angle 
as if there is one single line.

81
00:06:23,700 --> 00:06:28,500
We can easily do that with moving them to 
the same coordinate numbers for x and z axes.

82
00:06:28,600 --> 00:06:33,400
Lets round up these numbers for easy entry.

83
00:06:33,500 --> 00:06:38,300
The same numbers but negative values for 
the camera.

84
00:06:38,400 --> 00:06:43,200
Okay. We matched their directions to each 
other but the HDRI sun has a different direction 
angle.

85
00:06:43,300 --> 00:06:48,100
We need to change the z numbers till we have 
them at the same place in the camera view.

86
00:06:48,200 --> 00:06:53,000
Let’s try 80.

87
00:06:53,100 --> 00:06:57,900
Good but not exactly.

88
00:06:58,000 --> 00:07:02,800
Nope.

89
00:07:02,900 --> 00:07:07,700
Last time.

90
00:07:07,800 --> 00:07:12,600
Yes, that is okay.

91
00:07:12,700 --> 00:07:17,500
Now we matched the suns properly.

92
00:07:17,600 --> 00:07:22,400
This is like a single line and we are looking 
the HDRI sun from a point on this line.

93
00:07:22,500 --> 00:07:27,300
What we need to do next is, to create a connection 
between the Vray Sun and the HDRI map

94
00:07:27,400 --> 00:07:32,200
so that if we rotate the map, we don’t lose 
the matching we have done.

95
00:07:32,300 --> 00:07:37,100
We will create an indirect connection over 
the Dome Light.

96
00:07:37,200 --> 00:07:42,000
First, we will link the Vray Sun to the Dome 
Light, and then,

97
00:07:42,100 --> 00:07:46,900
We will use the parameter wiring feature 
for connecting the z rotation of the Dome 
Light, to the horizontal rotation of the 
HDRI map.

98
00:07:47,000 --> 00:07:51,800
But before doing the linking, we need to 
equalize these rotation values.

99
00:07:51,900 --> 00:07:56,700
The positive or the negative rotation directions 
for the Dome Light and the HDRI map are reverse.

100
00:07:56,800 --> 00:08:01,600
So, for the positive rotation value of the 
map, we are going to set the same number 
but as negative for the light.

101
00:08:01,700 --> 00:08:06,500
Minus 36.4.

102
00:08:06,600 --> 00:08:11,400
Okay, now let’s do the linking.

103
00:08:11,500 --> 00:08:16,300
I am going to link not only the Vray Sun, 
but also the camera to the Dome Light,

104
00:08:16,400 --> 00:08:21,200
in order to be able to easily check from 
the camera view that the connections are 
okay.

105
00:08:21,300 --> 00:08:26,100
We can use the select and link command but 
I will show you a more practical way.

106
00:08:26,200 --> 00:08:31,000
Open Scene Explorer panel.

107
00:08:31,100 --> 00:08:35,900
I am using the shortcut key d, but you can 
open it from here on the main toolbar.

108
00:08:36,000 --> 00:08:40,800
Make sure you are at the hierarchy mode.

109
00:08:40,900 --> 00:08:45,700
Here we see a list of existing objects in 
the scene.

110
00:08:45,800 --> 00:08:50,600
To link one object to another, just click 
the object, and drag and drop it over the 
target one.

111
00:08:50,700 --> 00:08:55,500
Link Vray Sun to its target.

112
00:08:55,600 --> 00:09:00,400
Link the camera to the camera target.

113
00:09:00,500 --> 00:09:05,300
Then link both targets to the Dome Light.

114
00:09:05,400 --> 00:09:10,200
Now the linking is done.

115
00:09:10,300 --> 00:09:15,100
It works as child, parent, child, parent, 
and grandparent.

116
00:09:15,200 --> 00:09:20,000
To unlink any object, just drag it to somewhere 
empty.

117
00:09:20,100 --> 00:09:24,900
Now let’s check the linking.

118
00:09:25,000 --> 00:09:29,800
Rotate the Dome Light.

119
00:09:29,900 --> 00:09:34,700
And yes, the others are also rotating.

120
00:09:34,800 --> 00:09:39,600
Next, we are going to connect the HDRI to 
this rotation.

121
00:09:39,700 --> 00:09:44,500
Open parameter wire dialog window.

122
00:09:44,600 --> 00:09:49,400
I have added it here to quad menu, but, it 
can also be opened from animation menu group, 
under wire parameters.

123
00:09:49,500 --> 00:09:54,300
For the left parameter, let’s choose the 
Vray Dome Light.

124
00:09:54,400 --> 00:09:59,200
Under transform, rotation, and click z rotation.

125
00:09:59,300 --> 00:10:04,100
For the right parameter,

126
00:10:04,200 --> 00:10:09,000
Environment, texture map, and click horizontal 
rotation.

127
00:10:09,100 --> 00:10:13,900
Add a minus for z rotation of the light, 
because, as I said before, the turning directions 
are not the same.

128
00:10:14,000 --> 00:10:18,800
Let’s do it as a two way connection.

129
00:10:18,900 --> 00:10:23,700
This way, both parameter changes affect the 
other one.

130
00:10:23,800 --> 00:10:28,600
Click connect to complete the connection.

131
00:10:28,700 --> 00:10:33,500
Let’s check it over both the light and the 
map.

132
00:10:33,600 --> 00:10:38,400
When rotating the Dome Light, the HDRI map 
turns with it.

133
00:10:38,500 --> 00:10:43,300
Rotate the map, and yes, the Dome Light and 
the Vray Sun rotate with it, keeping the 
suns together.

134
00:10:43,400 --> 00:10:48,200
Now let’s have a look at the scene from a 
perspective view.

135
00:10:48,300 --> 00:10:53,100
Notice that the directions of the suns remain 
equal to each other.

136
00:10:53,200 --> 00:10:58,000
Okay. We have set up the connection as we 
wanted it to be.

137
00:10:58,100 --> 00:11:02,900
Now before ending this tutorial, there are 
two more things I want to show you.

138
00:11:03,000 --> 00:11:07,800
Let’s create a simple scene for this.

139
00:11:07,900 --> 00:11:12,700
A couple of boxes is enough.

140
00:11:12,800 --> 00:11:17,600
Let’s add a Vray plane.

141
00:11:17,700 --> 00:11:22,500
Okay. A simple view.

142
00:11:22,600 --> 00:11:27,400
Assign a Vray material to the boxes.

143
00:11:27,500 --> 00:11:32,300
Select both.

144
00:11:32,400 --> 00:11:37,200
And assign it.

145
00:11:37,300 --> 00:11:42,100
Let’s change the color a little bit.

146
00:11:42,200 --> 00:11:47,000
Okay.

147
00:11:47,100 --> 00:11:51,900
Change the overall multiplier back to 1.

148
00:11:52,000 --> 00:11:56,800
Let’s choose a green color for the Vray plane.

149
00:11:56,900 --> 00:12:01,700
Okay.

150
00:12:01,800 --> 00:12:06,600
Now change the view to a camera view.

151
00:12:06,700 --> 00:12:11,500
Go to render settings.

152
00:12:11,600 --> 00:12:16,400
Lock the view.

153
00:12:16,500 --> 00:12:21,300
And, add a Vray Denoiser Element.

154
00:12:21,400 --> 00:12:26,200
Okay.

155
00:12:26,300 --> 00:12:31,100
Vray frame buffer.

156
00:12:31,200 --> 00:12:36,000
And start IPR.

157
00:12:36,100 --> 00:12:40,900
The environment is too dark.

158
00:12:41,000 --> 00:12:45,800
Let’s increase the render multiplier of the 
HDRI map.

159
00:15:12,000 --> 00:15:13,100
20 should be fine.

160
00:15:19,300 --> 00:15:20,800
IPR again.

161
00:15:23,400 --> 00:15:24,300
Yes, good now.

162
00:15:27,200 --> 00:15:29,200
Let’s enlarge the image size a bit.

163
00:15:43,500 --> 00:15:44,000
Okay.

164
00:15:44,100 --> 00:15:45,000
Rendering done.

165
00:15:45,800 --> 00:15:46,900
Open history panel.

166
00:15:47,000 --> 00:15:48,100
And save the image.

167
00:15:52,400 --> 00:15:55,400
Okay, now the first thing i wanted to show 
you was this:

168
00:15:55,600 --> 00:16:00,000
If you need, you can move the Vray Sun to 
somewhere far from the current position.

169
00:16:00,100 --> 00:16:02,400
But you have to keep the direction as the 
same.

170
00:16:02,600 --> 00:16:05,200
This way, it does not change your lighting 
set up.

171
00:16:05,400 --> 00:16:06,000
Let’s see.

172
00:16:06,300 --> 00:16:09,600
I am going to multiply all coordinate values 
by 10.

173
00:16:09,800 --> 00:16:11,500
This will keep the direction as the same.

174
00:16:26,300 --> 00:16:27,600
Now the sun is far away.

175
00:16:29,500 --> 00:16:30,600
Let’s render again.

176
00:16:38,500 --> 00:16:39,100
Done.

177
00:16:40,500 --> 00:16:42,800
Save image and compare with the previous 
one.

178
00:17:06,000 --> 00:17:07,800
As you see there is no difference.

179
00:17:08,100 --> 00:17:12,600
Like I said in the beginning, the position 
of the Vray Sun icon is not important.

180
00:17:12,800 --> 00:17:14,300
It is the direction that matters.

181
00:17:20,200 --> 00:17:26,000
The second issue is that the position of 
the lights can be changed also without affecting 
the illumination.

182
00:17:26,200 --> 00:17:28,000
They don’t have to be at the origin point.

183
00:17:28,200 --> 00:17:32,300
It is better that we keep them away from 
the main elements of our scene for clarity.

184
00:17:38,400 --> 00:17:39,600
Let’s see the render.

185
00:17:45,800 --> 00:17:46,600
Render done.

186
00:17:50,900 --> 00:17:52,900
Let’s compare it with the previous one.

187
00:18:13,800 --> 00:18:15,400
Again no difference.

188
00:18:27,700 --> 00:18:34,600
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.

189
00:18:55,500 --> 00:18:56,000
It is not.

190
00:18:56,200 --> 00:19:03,200
And this is simply because the HDRI map is 
located at the extents of the scene which 
is theoretically at an infinite distance.

191
00:19:05,400 --> 00:19:06,900
And that’s it for this tutorial.

192
00:19:07,100 --> 00:19:08,200
Thanks for watching.

193
00:19:08,400 --> 00:19:10,800
You can leave any comments or questions below.

194
00:19:11,000 --> 00:19:14,600
And if you like this video, don’t forget 
to subscribe to my channel.

195
00:19:14,800 --> 00:19:17,400
It encourages me to prepare more tutorials.

196
00:19:17,600 --> 00:19:18,300
Bye for now.

