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.