Ideal lighting conditions for a material testing scene.

Hey folks,

When I make my materials in a testscene to determine correct color/reflections/… I use an HDRI to light my scene. But the annoying thing is, for some reason the materials I create don’t always work too well in other lighting conditions. So my question would be, what would be the perfect lighting conditions to light a scene so the material could be used in about any other lighting condition.

Thank you.

This might seems weird (as it’s old and really low ress), but as a start I (as all my colleges) we use kitchen.hdr from Paul Debevec as our base light scenario.

Scroll down about middle of the page
Direct link (as spherical) : https://dl.dropboxusercontent.com/u/368267/kitchen.hdr

We then rotate the HDRI to make sure the highlight and gloss etc works from all angles.
As a bonus, if we have time, we load in some other HDRI to make sure it’s working in other lighting condition, but kitchen.hdr is our reference.

Stan

Thank you for that, I’ll give it a shot. Also. I was thinking as it is common to shoot textures on an overcast day, wouldn’t it be logic to test the materials in the same conditions first?

So you’ve got three aspects to any material, the material settings itself (duh), the amount and colour of light hitting it, and then the camera settings themselves. To make a really good test environment, you’ve got to cancel out two parts of the equation to know that the third part is correct.

For the camera settings, that’s kind of an easy one since you can read off your lens, shutter and iso data from any still you shoot and then set your vray camera to the same. That’s one of the three parts gone. For the second part, you have the tricky process of needing to get your light levels correct. Here’s where it gets a wee bit more annoying as say for example you’re trying to match a mid grey value that’s in your photo, there’s a few possibilities for how that was arrived at. It could be a dark grey and a very bright sky, it could be a light grey with a dull sky, or it could be a mid grey with a mid brightness sky. You need to have a known value for either the colour or the light now. What a lot of people will do is buy themselves a macbeth colour chart. It’s a chart with a few colour swatches and a grey scale brightness section at the bottom. The nice thing about the chart is that all of the values of the swatches are known and given out as rgb values so we can make ourselves a virtual macbeth chart and place it in our 3d scene with our correct camera. Now all we need to do is gradually tweak our light source until the values on our rendered macbeth chart match the ones in our reference photo - now we know our light values are pretty close to being realistic and we can start making shaders.

This is something I’ll have to do soon and I’ll try to document the process and give away some calibrated scenes afterwards for exactly this use so here’s everything I’ll be doing in order:

Making a small collection of different types of physical objects that are made of the types of materials I want to make and mounting them on stands. The idea is I’ll include those in my photos to see how a real plastic, metal, wood or whatever reacts in the light I’m trying to recreate. This idea is robbed from the geniuses in Blizzard. Any time they’re making a new environment, they go out and shoot lots of lighting reference similar to the environment they’re trying to build. The have a rack of 5 inch balls which they’ve covered in samples of the materials they typically use, so they have a ball covered in cloth, leather, silk and then various gold, bronze, iron, steel and wooden balls. They plop this rack of objects into the place they’re photographing so they’ve got a good idea what each material should look like.

Take my rack of materials, a camera with a fisheye lens and a pano head and a macbeth chart out to whatever place I’m shooting a hdri for. Shoot the hdri, making sure to pop in the macbeth chart into each of the angles. A grey ball and a chrome ball can be nice too as extra things to aid in matching stuff after.

Run all the images through ptgui to assemble a hdr. Once this comes out, you might find that your hdr isn’t perfectly linear - it’s a subtle thing but a lot of cameras will shoot with a tiny bit of a gamma curve on them. Thankfully we can use the macbeth chart which has lots of nice grayscale swatches to try and even out any mid tones issues. Here’s my hdri that I’ll work with in vray. I’ll also take out a middle exposure from the set of images to use as a backplate to aim towards - something that has my macbeth chart nicely exposed.

Go into 3dsmax, make a vray camera and pop in the iso, white balance and exposure values from the middle exposure photo I pulled from the set. Make a small plane with the macbeth chart image mapped on to it in a vray material and place it in the position and angle that it is in my middle exposure photo. Now if I bring in my hdri, align it to the same angle as the photo (having a chrome ball on set makes this a bit easier as you use the reflections to line up the rotation of your hdri) and then start playing with the brightness until my virtual macbeth rgb values match my real one in my mid exposure photo.

Once I’ve got that, I kind of have a calibrated environment. In theory any material I make here that looks realistic, should react properly in any other scene I bring that material in to, once the new scene also has lighting that’s using realistic light levels. If I’ve also got my wee rack of reference objects sitting in one of my photos to act as starting off points to match also, so if I want to make a metal or a plastic, I’ve got something to aim for.

Wow as usual, a very elaborate explanation John. I’ll post my findings here based on your ideas.

I’ve really got to get off my ass and actually do this, I think it’d be well worth a proper tutorial thing on afterwards too. If you want to get a slightly old but very, very thorough course on part of this, Robert Harrington from framestore did a course for fxphd a few years ago, MYA214 which was all about production lighting and rendering with mental ray in maya. It doesn’t matter about the software and renderer though, the majority of the course was about the data that he shot on set, calibrating and matching hdri’s and then using those fairly correct bits of lighting to make some realistic materials. Very thorough and well worth it.

I kinda like what Siger did with Peters 1123 Sun Clouds HDRi
-6.05 Exposure and -70 Saturation in Photoshop.

Images using 1 EV


John, IMHO one thing worthnoting is the key to fill ratio of calibrated lighting in this process, especially if taking the HDR under direct sun light. After color balance the HDR with Macbeth chart matching, tweaking globally the exposure of HDR won’t necessarily give you a calibrated lighting as one would observe how the lit area transits to shadowed area on the rendered gray ball won’t match the photographed one…

Less of an issue and more of a straight forward process when the HDR was taken under overcast day or an interior where the most underexposed bracket wasn’t clipped and full dynamic range was covered in the HDR.

That’s a very good point Jason, I’ve found that you need to measure the sun value separately and after you’ve gotten your 0 - 1 values in the hdr in the right place, then you’ve to pin those and then scale the sun value to the right place. Let’s add that to the list of things to play with though!

I like John’s suggestion of using the Macbeth chart and taking lots of photos to match camera settings and colors.

I’ve got a more janky approach. I’ll take a color chart from a google search with rgb numbers embedded to match and use it to texture my scene.

http://www.rags-int-inc.com/PhotoTechStuff/AcrCalibration/MacbethCC-NumsRGB.jpg

Then I’ll adjust the camera & lighting until those values appear correct when color picking them. Then remove the texture and start building materials into the scene. But this method doesn’t guarantee that materials will react correctly in different lighting conditions.

Cool, John. Would be very interesting to learn how you measure the sun value separately and how to tweak and pin the value 0 -1 area in the HDR.

Not very precisely on the sun :smile:

I’ve worked at a studio that went to great lengths to create calibrated lighting environments for doing lookdev in. They set things up pretty much the same way joconnell was describing. They also had the series of real materials to photograph in the real world lighting. They took it one step further and stayed at this location all day and shot multiple hdrs at different times of day and night.

It was shocking how different your cg materials would look at different times of day at the exact same location. A shader that looked totally correct at noon looked totally wrong at 6pm or late at night. We would adjust our shaders until they looked good in all times of day. The main thing I took away from this process is that nearly every material should be less reflective than you think.

Tim J

Great points, Tim. Especially the part to go further and take multiple HDRs of the same location different times of day. Added to my list for creating my calibrated HDR environments.
Do you know possible reasons of why nearly every material are less reflective than you think?

It probably depends a little on the environment your making an HDR of, but in our case it was a parking lot with a building behind it. There was a lot of direct light and bounced light during the day. The sky was also clear blue with no clouds. So the diffuse was fairly evenly lit. Because of that it was just too hard for your eyes to judge if your reflections were too strong or not because visually they were competing with the diffuse. So artists would turn the reflections up brighter just so they could actually see there was reflections. However, if you rendered with the night HDR where there was very little direct lighting and it was mostly spec highlights from street lamps. Suddenly you could tell just how reflective your object really was because it wasn’t competing with the diffuse so much. You would dial down the reflection amount till it looked right in the night HDR then switch back to the daytime one and visually it looked the about the same as it did before. It was just too hard to tell in the daytime lighting how strong your reflections actually are.

Tim J

Thanks Tim. Appreciate you spent the time to explain the concept behind.

Definitely knicking that idea.

I´m just making the same thing, xD. The tricky parts to me it´s making sure the HDRI it´s made from pure lineal images and were to buy a mid grey ball for reference. I´m testing 2 options, one using a profile generated using the x-rite colorchecker software and light room disabling all the post effects, and i want to try this: mikeboers.com

The other problem i have it´s dynamic range, i´m using 5D Mk II and a Sigma 8mm fisheye so i can´t use ND filters. Sometimes, f22 ISO100 V1/8000 it´s not enough to capture all the dynamic range (well it´s enough but not really accurate y usually want more).

I will make some final test once i get some kind of reference ball or material and share my thoughts here.

Do you need photos in linear colorspace to achieve a correct HDRI? Or just make sure you’re using the right colorspace type in the VrayHDRI and Vray will make the corrections for you?

the key to a correct HDRI is purely shooting it with a gray reference, and ideally another two known points (a second gray reference for the visible part, and a known-intensity light source for the HD part),and working around that data to achieve a dome which will light a gray patch in LWF conditions to exactly the same intensity as the shot reference.
However, this type of approach introduce arbitrary (if perfectly captured) lighting into the look-dev phase, with potentially disastrous results (The case made by Seraph is one.).

Personally, I prepare my shaders ENTIRELY under GanzFeld lighting (Spherical IBL with 1.0F white color, in modern CG lingo), and my references are always shot with a colorChecker by the side, so the lighting gets neutralised.
Only after my albedo coefficients, and if i had the polarised refs, the different components of the shader, have been matched to the reference, i move the shader unto the model, into a light rig or ten.

This has two benefits, for me:
*) Lighting is neutral, the colors i pick in my VFB ARE the shader colors.
*) Any value on the test sphere exceeding 1.0f is a sure sign of energy creation by the shader, while any suspect darkening at the edges shows energy losses. Both need to be corrected, and ONLY under GanzFeld lighting can this be done both accurately and very directly (with a custom light rig, one would have to divide by the light’s intensity and colour, and so on…).

This method has been widely tested in VFX and ArchViz, with predictable, consistent, and visually appealing results.
In some instance, the model and shaders were given to a different location, or studio, entirely, and even converted and rendered with another engine, and the results remained correct.

I used to keep these as my very own trade secrets, but apparently i’m not working in production for a while, so here, i spilt me beans.