Hi Guys,
when using an HDRI to light my scene, is there an easy way to determine where in the scene the main light source is coming from?
Cheers.
-- DJ
Hi Guys,
when using an HDRI to light my scene, is there an easy way to determine where in the scene the main light source is coming from?
Cheers.
-- DJ
You can put the hdr on the viewport background (alt+B), and rotate it from the material editor till it fits your purposes. Then just instance it to vray environment slot(s).
the way i personally would do it is make sure you have show calc phase for both the IR and LC ticked, and especailly with the LC you get a pretty good idea of where the light is coming from within seconds of the LC calculation.
I’ve found if I use Vray HDRI map type, with spherical HDRI maps, that the map in the material editor slot is like 80 degrees rotated from how it is actually mapped into the environment. As such it can be difficult to tell where the sun is coming from. This is not the case if you use assign the HDRi using the bitmap Splutterfish option.
My workaround is simple, I just assign the HDRI to the max environment, and enable viewing the environment map in the background. Then just spin the view around until you can see where the sun is. Then just rotate the map until its coming from the desired direction.
If this sounds familiar, its how Chris Nichols did it in his Gnomon exteriors DVD.
basically how I do it as well.
I recently discovered this, my sun is dead centre within a hdri image but in material editor its -90 degrees out. has anyone figured out why this is?
Very likely the orientation of the camera in the material editor is not exactly the same as the camera in your scene, so it’s natural that it will see a different portion of the HDRI.
Best regards,
Vlado
Is there a way to match them up? So you can start from a known position.
Yep! That’s how I do it, too.
I don’t think I follow, you put the hdri as an environment map and enable it in the viewport. Then you spin around in perspective view until the sun is in view in the viewport. I get that bit, but what do you mean by “Then just rotate the map until its coming from the desired direction.”
Rotate the map in the material editor? How do you know when its at the right rotation, you can only see the front of a material ball in the material editor.
Pull a camera, pointing towards the sun. You can place a sun system to get the sun in an accurate location and rotate the HDRi until lit matches.
maybe im just being thick here, but when you say pull a camera pointing towards the sun, you mean the sun that’s in the hdri that is the environment background? That still doesn’t explain why you would rotate the hdri in the material editor as well.
“My workaround is simple, I just assign the HDRI to the max environment, and enable viewing the environment map in the background. Then just spin the view around until you can see where the sun is. Then just rotate the map until its coming from the desired direction.”
what if you wish to change the location of the sun? ie if the hdri map had the sun behind a building and you wanted it in front.
I want to be able to do the following:
Load in a hdri and put on a vray dome light. Then add a VraySun and position it where the sun is on the hdri. To do this i would need to see the sun within the hdri in the viewport. So i can either spin the camera to see it or rotate the hdri via the material editor.
Then if desired i want to be able to spin the hdri map and at the same time the VraySun spins with it. I can do this by wiring parameters, but its the initial aligning the VraySun up with the sun within the hdri that i dont fully understand.
take a look at the video I reordered… I posted it a couple thread up.
In your videos, the HDRI is already in the viewport and the sun spot is in view. What if, you dropped the hdri in the viewport and the sun spot wasnt in view? How would you know where the sun spot is? You would have to look for it through a camera, no? Then you can add a VraySun, look where the camera is pointing to and then place the VraySun there.
Which gets me to the start of your video. But my confusion is with what people have said in regards to finding that sun spot if its not initially in view.
I rotate the HDRI untilI see it. I darken the HDRI so I can see the hotpot better.
If you want to be able to align them very accurately you could try my approach:
1.With your VRAY sun, render an image with a 2 to 1 aspect ratio (ex. 360x180) that uses a spherical camera with a FOV of 360 (Best not to have a shift in your camera settings or it will distort the image).
2.Turn off your VRAY sun and load your HDRI image and render a second spherical image.
3.You now have images of both of your sky types. Bring each into Photoshop and determine there sun’s exact placement. If the image is 360pixels wide with a 360 degree FOV then 360/360= 1 degree
4. Each pixel is 1 degree. Count the pixel difference of your suns and go back to 3DS Max and rotate your HDRI exactly.
5. Just for verification rerender your spherical HDRI map and compare with your original VRAY sun image. You can get them dead on.
I do this a little differently and its really quick.
I apply hdri to a sphere. and switch between a standard map and vray light material. so i can see it in the viewport to align it. then render with the light material.
to get the mapping right i use uvw unwrap. and then leave it all as default settings. this work’s perfectly with a equirectangular hdr’s. (no distortion at top and bottome like you would get with sphereical mapping).
I’ve done some testing between vray dome light and this method and it dosen’t seem to look any worse and much quicker to align everything.
I have just tried to locate my sun in the viewport background by moving the camera target and the viewport background doesn’t move, its static. I’m using Max 2010, it works fine in Max 2011. Any ideas why this is happening?
my mathematic way to do it is very accurate…usually spherical HDRI skies in the market have the sun in “x” right in the middle so you do need “Y” distance to get the correct azimuth.
open it in photoshop pick the center of the source then you will get the pixel in Y(amount of pixels from the bottom of the HDRI)…let’s say that the dimensions are 7000*3500(HDRI) then Y*90/3500= Azimuth
now you can match a vraysun with your hdri and link them…if you need more shadow definition increasing vray sun will do the trick. pg tutorial shows how link both and how you can control them together.
Fernando
I’ve been meaning to work out the math for a while… thanks fernando!