HDRI - High Dynamic Range Image
Hello and welcome to the english version of HDRI 101.
I tried to detail as much as possible the steps that one has to follow, in order to help the ones with the means, but haven't used them yet. This tutorial is divided in two parts, first one concentrating on V-Ray and the second one on Brazil r/s. I may do a sequel on Final Render but it's highly unlikely (I may do it if there is a request for it, and if Cebas decides to give me a copy of it, as I don't have it or use it).
The tutorial is organized as follows:
1.2. Tech Stuff - Boring stuff for the action type
1.3. The Scene
1.4. Environment And Rendering
1.4.1 Standard Environment
1.4.2 V-Ray Environment
1.4.3 Brazil Environment
First and foremost, go and get Fiat Lux, an incredible short by Paul Debevec. For all those that didn't see it, the subject is the schism between Galileo Galilei and the church, and from a technological point of view what stands out is the recreation of St Peter's Basilicum in 3D, introducing some artificial objects there, dynamics simulations on them and rendering all with a technique called Image Based Lighting - IBL in short.
You can download the movie in MPEG-1 format from: www.Pocketmovies.net.In the forementioned movie you will see HDRI being used extensively. But what's that? HDRI = High Dynamic Range Images. Yeah? And what are those? See next section for an explanation. And you probably should visit Mr Debevec's site also. It's www.debevec.com, and it's a great inspirational link.
1.2. Tech Stuff - Boring stuff for the action type
There are two types of images. Low Dynamic Range Image(LDRI) and High Dynamic Range Image(HDRI).
The first one comprises "normal" bitmaps [like JPEG, TIFF, BMP...], bitmaps which have 8 bits per pixel, with values between 0-255 [in RGB mode]. Which means that there are only 256 levels of luminosity, which doesn't cover by far the range that can be captured by a camera, with different levels of exposure.
On the other side we find HDRI, whose values can get a lot higher then 256. The main feature is that the value of each pixel is proportional with the quantity of light on each pixel. Basicaly, instead of just storing colors on the screen like normal bitmaps do, the HDR format sotres the quantity of light per pixel.
1.3.0 First things first (or: things that you must know or have)
- Brazil r/s
- HDRI Import plugin (3D Studio Max doesn't know how to use floating point images), as it is the case with the HDR format, so you will need HDRI.bmi, a free I/O plugin from the good folks at Splutterfish.
- HDRI Files (try Mr Debevec's site or get the one i used in this tutorial here - rnl_probe.zip)
- HDR Shop - software for modyfing HDR files. Get it at: www.debevec.org/HDRShop
1.3.1. The Scene
A typical scene for the regual GI addict MUST contain some spheres (if not spheres, at least some cubes :) )
Ok. Now let's create a simple scene. A Stand and a sphere. Now let's add some objects to make it a little more complicated. You guessed it: some more spheres ;)
I'll leave the texturing to you. I made the main sphere out of dark marble, the stand lighter marble, and the rest of the the spheres are glass, different colors of it. At the end i decided to throw in a gold teapot, just to test some metal materials.
For this tutorial I used rnl_probe.hdr (you can find it in this archive rnl_probe.zip). It's a very nice forest, a little dark for my taste but it will do.
1.3.2. Modifying the HDR file
File > Open
and select rnl_probe.hrd (figure on the left)
Image > Panorama > Panoramic Transformation
At Source Image under Format select Light Probe(Angular Map) and at Destination Image under Format select Latitude/Logitude. The rest of the settings are left default. Now you have a usable HDR you can import in Max.
File > Save As...
select Radiance Format and save the new image under a different name. I just named it padure.hdr. (Below)
...proceed to page two to learn more...
1.4. Enviroment and Rendering
To obtain a great image with IBL you need GI (Global Illumination), so don't even think about rendering with Max's own scanline renderer. Here's an image rendered in V-Ray, just out of curiosity, to see how it looks. It doesn't have GI turned
on, hence the lack of spark and natural illumination.
Now this is where the techniques get separated. And they differ only in the way the HDR is mapped.
1.4.1. Standard Enviroment Mapping
Rendering > Environment.
There you press the Environment Map slot and select Bitmap.
Locate padure.hrd and then click on Setup.
A new window pops up and we see a histogram of the luminosoity values of the selected image.
Under it we find White Point value, controled by a spinner. This White Point controls the luminosity, actually the range of light values the image can take. As I said earlier, Max doesn't use floating point images so with this setup window we are actually converting floating point images to standard images. It does that by setting a White Point, which is the point with the highest luminosity value. Any value after the White Point is interpreted as white. It's also known as the clamping value or point. Â
We see that there are two values for the White Point. One is Log. , the logarithmic value and the Linear one. We increase the spinner until the vertical red line is at the end of the histogram values. Now look at the Linear value. Write it down somewhere. Press Ok twice.
Open the Material Editor, open the Environment Map you've just created. Open the Output slot and under RGB Level input the Linear value you wrote earlier, From the image you can see i used a higher level. That is because through trial and error I liked it better like this.
22.214.171.124 Rendering in V-Ray
Select Rendering > Render. From here go the the Current Renderers tab, click on Assign and select V-Ray. Now click on the Image Sampler tab and select Adaptive Subdivision. Select Indirect Illumination (GI) and select On. Select Irradiance Map and at Min Rate/Max Rate use -6/-5. These settings are good for test renders. For final rendering I recommend using Simple Two-Level, under the Image Sampler tab, and for Min Rate/Max Rate use -3/0 or -2/0, depending on the scene. Also use Clr tresh: 0.3, Nrm tresh: 0.4, Dist tresh: 0.2 and HSph subdivs at 25. Be prepared for big rendering times. But the main advice is EXPERIMENT. Of particular good use is Neil Blevins's tutorial on Undersampling. I strongly recommend reading it. Even if it's about Brazil you will find the theory of particular good use.
Now select the materials. It's not a tutorial on how to do materials so i will not tell you how to create the marble, glass or gold. I will give you some hints though, and through experimenting with the settings you will get some nice results.
...proceed to page three to learn more...
Start of with a Standard-Blinn, Diffuse and Ambient locked together, and select the color of the glass. For Specular Level and Glossiness choose some high values like 110/70. Check 2-Sided. Under the Extended Parameters tab at Index Of Refraction (IOR) input 1.56. This is the Glass IOR. Here you will find a list with other IOR's. Under the Maps tab, in the Refraction slot choose VRayMap. Here select Refract, and play with the parameters, especially Filter
Color and Fog Color.
For gold, start with a Standard-Metal. The Ambient color is dark green, Diffuse color is a goldish yellow. Specular Level and Glossiness at close values, something like 75-80. Under the Maps tab, in the Specular slot put a b/w bitmap resembling metal scratches. The value of the slot is something like 20-30. At Bump, same map, but with a value of 5-7, considering it's a polished object.
At Reflection slot choose a simple Falloff. In the second slot put a VRayMap, select Reflect and with a very light Filter Color.
The marble on the main sphere is standard Max, Stones_Benedeti, and the one on the stand is Stones_Traverti, with the exception that in the Reflection slot it has a VRayMap with Reflect selected and with Filter Color very close to black, but retaining some reflectivity. Also check Glossy, as the reflection on marble is somewhat blurry. The values I used are 250 for Glossiness and 25 for Subdivs.
Now getting back to the scene. Creat an Omni Light anywhere in the scene, and turn it OFF. Hit Render, see what you got.
Is it good enough? If not, tweak your materials or something. then hit Render again. If you're satisfied, use the values for the final render that I mentioned earlier and Render the scene.
I added some extra images with some tweaking. One has DOF with focus on the main sphere (right), one has DOF with focus on the teapot(low right) and the last one has some negative lights to help model the general lighting(below).
1.4.2. V-Ray Enviroment
Select Rendering > Render.Make sure V-Ray is selected as the default renderer, and click on the Environment slot. There check Override MAX's, and click on Map. Select VRayHDRI Map.Here we notice that we can select the type of HDRI map. We have Angular Map (standard format for HDR files, the one that looks like a sphere) and Spherical Environment (we used it for our HDR map in the Longitude/Latitude format). This choice can seem to make HDRShop redundant. Redundant but not so. Here we have some images rendered with the two formats. The first one is rendered with the original rnl_probe in Light Probe format, with Map Type set to Angular, and the second one is rendererd using padure.hrd(longitude/latitude format) with Map Type set to Spherical Environment. In my opinion, the second one looks a lot better. You've set the Environment from Vray, now hit Render to test it and if all ok, Render the final version.
1.4.2. Brazil Enviroment
Now this is another story, which will be covered in depth in the second part of this tutorial. You will not be able to render properly now, because you've used a number of vraymaps and vraymaterials which are not compatible with Brazil r/s. If you want to render with Brazil, just make a new set of materials, using either standard materials or Brazil's own(i recomend using Brazil's, it's faster and they are REALLY good). final version. Now let me tell you how to set the environment using Brazil.
In Rendering>Render make sure Brazil is selected as the current renderer, open the Brazil Luma Server slot, check Skylight under Direct Illumination and check Enabled and Skylight at Indirect Illumination. In the SkyLight section if you check Use Environment Settings you will use the Environment Map you made earlier. If not you can put a map in the slot next to Color, and redo the steps you took when you made the Environment Map.
This concludes the first part of this tutorial. It covers MOST things you should know about IBL and HDRI, but it focuses on V-Ray. The second part will probably be more like an addendum, helping you make the materials in Brazil, and helping you select the right parameters.
For more info you can find me in this forum using the nick Azra, or email me.
I would love to hear your opinions, corrections and see your final images. Enjoy!