JohnArtbox Posted January 11, 2008 Posted January 11, 2008 The starting point for some tests on using HDRI images in AM. Even with this fairly simple image there were a number of pitfalls and workarounds but I think I'm getting it. Am I right in thinking that HDRI images are no good for reflections? I had to tonemap my HDRI and convert it to a 24 bit image to improve the reflections. Quote
MattWBradbury Posted January 11, 2008 Posted January 11, 2008 Your reflections most likely looked bad at that exposure because the reflection of the sphere at that exposure has quite a lot of black in it. You should try saving your renders as and Open EXR image, and then tone map that. You should get much better results that way. Do you have that background image in HDR formate or did you just take them of your mirrored ball? You'll want to tone map them the same so you can make it believable. Quote
JohnArtbox Posted January 11, 2008 Author Posted January 11, 2008 Thanks Matt, I redid the render using a HDR Map for the reflection and the background image, then ran it through tone mapping. Before tone rendering the image looked completely Bleah. And even in the tonemapped version the rendered models appear flatter than the initial rendering. There's obviously stuff still to work out Quote
PeterS Posted January 11, 2008 Posted January 11, 2008 Hi John: I am very interested in what you are doing and how you are doing it. As Matt already asked, did you use a sphere to transfer the reflections? If so, what kind and size? What type of camera, resolution, etc? If not, what kind of HDR map did you use? And what exactly is tone mapping and why is it necessary? Are you following any tutorials? I've started to play around with IBL and am having all sorts of trouble with the renders getting a heavy oversaturated blue cast anytime I change the Ambiance settings. I think it may be a bug or possibly related to my video card. It happens with any HDR image I use in any project I try it in. Keep posting your progress and experiences please. Quote
ypoissant Posted January 11, 2008 Posted January 11, 2008 Am I right in thinking that HDRI images are no good for reflections? I had to tonemap my HDRI and convert it to a 24 bit image to improve the reflections.I will try to explain a couple things but there are so many angles to cover that it might take a few Q and A to get all information out. HDRI are excellent for reflections. Much better than LDRI especially on colored reflective surfaces. But getting the correct light range right can be tricky. First, here is a procedure I use to cap the range of HDRI files: This works in Photoshop CS but it might be different for CS2 and/or CS3 because I know that Adobe now can process HDRI files directely without the need to convert them. So say, I want to cap my HDRI file to +2f-stops. I open the file and in the EXR preview dialog, I drop the exposure by -2f-stops (and make sure the gamma is set to 1). When loaded, the file is converted to 16 bits. I then save the file back as an EXR format. Photoshop asks me is I want to recompensate for the dropped f-stop (or something like that). I click Yes and voilà. THe EXR file have now a maximum of 2 f-stops of dynamic range. In version of Photoshop that can process HDRI files without conversion, I would probably need to drop the f-stop, then save the file to a 16-bits format, then reload that 16-bits format, raise the f-stop and then save back to exr again to get the same result. Now that you know how to cap the dynamic range, here is why you would want to do that. On highly reflective surfaces, large dynamic range will produce strong aliasing if the surface is highly specular or will tend to produce noise of bright pixels if the surface is softly reflective. So you want to drop the dynamic range as much as possible to reduce those aliasing effects. The problem is when you also have low reflective surfaces in the same scene. Painted surface such as the plane in your scene. You want to keep enough dynamic range so the reflections on the plane look right. It is a wuestion of finding how much dynamic range is enough for that plane and not too much for the gladiator armor and the plane exhaust pipes. In this scene, we have 4 different types of surfaces: 1) non-reflective surface - those we don't need to bother about. 2) the plane exhaust pipes - they are highly reflective and highly specular. 3) the gladiator armor - it is highly reflective but lowly specular and 4) the plane red paint - it is relatively highly specular but have a medium reflectivity due to the paint. The surface characteristic that will drive our decision of how much dynamic range we need is the surface with the lowest reflectivity. In this scene, that would be the plane red paint. There are some rule of thumbs to help figure the highest dynamic range that a scene would require but it might also be easier to find that by trial and error by saving several version of the EXR file with differently capped ranges and just try them all until the optimal one if decided upon. The rule of thumb is this: Take your darkest reflective surface color, here that would be the plane red paint. Check its color. This is the simplified reflectance of the surface. Say the color is RGB( 100, 30, 30). 255/100 = 2.55 meaning that you need 2.5 more light in your HDRI file so you can probably get an acceptable result with +2 f-stops or even +1.5 f-stops. But for optimal results, you need to take the lowest of the RGB component reflectance so 255/30 = 8.5 so a +3 f-stop would work. Now I did a little magic to get to 3 f-stops. Every f-stop step multiplies the amount of light by a factor of 2. +1 f-stop = 2 times more light. +2 f-stops = 4 times more light and +3 f-stops = 8 times more light which is pretty near 8.5. And, of course, +4 f-stops = 16, then 32, 64, 128, 256, 512, 1024, ... When working with HDRI files and reflections, you will most certainly need to increase the samplings in your render to get rid of aliasing artefacts that HDRI tends to produce. That is the nature of the beast. For highly specular, highly reflective surfaces you will most probably need to increase the number of passes in your render. For lowly specular (soft reflective) and highly reflective surface, you will need to increase the soft reflection's "Quality" property in the render panel. Finally, when working with HDRI files for reflections, let the surface color (reflectance) do the reflectvity work. That means set the surface reflectivity to 100%, reflection filter to 100%, reflective blend to 100% and the reflectivity falloff to 0. And use specularity size property to control the reflection softness. Quote
pdaley Posted January 11, 2008 Posted January 11, 2008 Really great improvement there, Matt.You really challenged yourself with that background. Maybe a picture of your driveway would be a little easier to start. Quote
JohnArtbox Posted January 11, 2008 Author Posted January 11, 2008 PeterS: to get the reflections I photographed the chrome sphere 3 times at 2 exposures apart. I used a Sony HDV camera so it only has exposure not fstops (which could be part of the problem). I then used the demo version of photomatix to create the HDRI and unwrap the sphere to Latitude Longitude. At the same time I took a background plate and fed it through the same process. Once the HDRI was ready I opened it in AM and assigned it to the choreography as the IBL light source with ambience and AO set to 100%. I then mapped it onto a flat shaded sphere enclosing the scene to act as a reflection source. After that I loaded a plane to act as a camera projection target, and a couple of sample objects. Then I used a Kleig spotlight to cast a shadow on the ground plane, which had been set to flat shaded to avoid modifying the colour of the BG image. A far as can tell flat shading nullifies the AO. I'm not following any tutorials, although there are bits and pieces from Yves and Mat in various HDRI threads, and I'm also learning Photomatix at the same time which does make it a little harder. Tone mapping is a process which tranlsates the HDRI images into standard 8 or 16 bit images which duplicate the tonal range of the human eye(my current understanding, I could be wrong ) Yves: Thank you very much for the information. I think I'm going to have to take it away and digest it over a few days. Then I'll have to see how Photomatix translates the photoshop instructions. PDaley:I don't have a driveway, just a wharf....I live on an island Quote
PeterS Posted January 12, 2008 Posted January 12, 2008 Thanks for the breakdown John:-) This is all new to me, but I'm trying to keep up here. Quote
JohnArtbox Posted January 23, 2008 Author Posted January 23, 2008 Switched to a Canon stills camera took new hdr lighting and bg plates. The photos seem to contain more accurate exposure information and the hdr's generated appear to be higher in quality. I didn't adjust the shadow light angle, but the rest of the image appears more cohesive both before and after tone mapping. When I open the exr image as a composite the background plate disappears, even though the scene is set to not render alphas. Is this normal? Quote
nino banano Posted January 24, 2008 Posted January 24, 2008 hey john this shot is great...nice work...wich AM version are you working on? Quote
ypoissant Posted January 24, 2008 Posted January 24, 2008 I may repeat myself but here are a few more info. If you are using a digital camera that can save in RAW file format, then you already are in business as far as getting HDRI files suitable for most renders and reflections. Canon Rebel digital cameras are very good at doing this. Of course, Pro digital cameras can do this too. RAW format can already record 1 or 2 f-stops more in the highlights. Add to that that the RAW format is stored in 12 to 14 bits deep then you already have the potential to capture from 4 to 6 f-stops more than a LDR image. So all you need to do with your digital camera, is to photograph your scene with 2 f-stops darker. With the additional 2 f-stops that the RAW format gives you, you get 4 f-stops of highlights. When you save that photograph in an EXR file, just increase the exposure by 2 f-stops and voilà. Quote
dre4mer Posted January 24, 2008 Posted January 24, 2008 Lighting looks pretty good, can the shadows be softened at all? -Ethan Quote
JohnArtbox Posted January 24, 2008 Author Posted January 24, 2008 Quickly adjusted the Shadows, and I also introduced soft reflections at various levels in the latest version, but it seems to have affected the transparency of the model in places, especially under the wing of the aircraft where you can see trhough to the camera rotoscope. It also looks like the groundplane reflects under the right foot, even though the groundplane has 0 reflectivity Nino:AM14 Yves : the camera's a canon powershot. It does raw, but I only pulled it out of the box this morning so I'm still learning. The extra tonal range of the raw format sounds interesting, I'll try it and see. Using bracketting it's not a big issue to get three shots and produce an HDRI with a 4 f-stop range. I've got a shadow only light to shade the deck(front projection target), but it also darkens the models, which is not ideal. The problem I have is that if I don't flat shade the ground plane it doesn't match the BG plate, while if I do, I lose the AO "shadows". Ideally, I'd like a way to darken the groundplane with the AO and ground the models, but not affect the illumination. Any ideas? The Shadow only option on the ground plane would normally do this I think, but doesn't render the AO(I assume because AO is a trick, not real shadows). Finally, when working with HDRI files for reflections, let the surface color (reflectance) do the reflectvity work. That means set the surface reflectivity to 100%, reflection filter to 100%, reflective blend to 100% and the reflectivity falloff to 0. And use specularity size property to control the reflection softness. Does this mean you don't set different levels of reflectivity? Or that all objects in the scene should have reflectivity of 100% with the specularity diffusing the highlights? Ethan: The shadow comes from a kleig "shadow only" light so I changed the angle, shadow softness and darkness in this image. It's controllable, but has the downsides I mentioned above Quote
ypoissant Posted January 24, 2008 Posted January 24, 2008 Yves : the camera's a canon powershot. It does raw, but I only pulled it out of the box this morning so I'm still learning. The extra tonal range of the raw format sounds interesting, I'll try it and see. Using bracketting it's not a big issue to get three shots and produce an HDRI with a 4 f-stop range. Yeah! Auto-bracketing is cool for HDRI too. It simplifies the process greatly. The only drawback of auto-bracketiung is when you want to photograph a scene with moving people or objects but if your scene is static and you use a tripod, auto-bracketing is quite good. Ideally, I'd like a way to darken the groundplane with the AO and ground the models, but not affect the illumination. Any ideas? The Shadow only option on the ground plane would normally do this I think, but doesn't render the AO(I assume because AO is a trick, not real shadows). Exact. AO is a shading trick. It does not do real shadows. This said, you will get the same diffuse (real) shadows with a skylight rig. Finally, when working with HDRI files for reflections, let the surface color (reflectance) do the reflectvity work. That means set the surface reflectivity to 100%, reflection filter to 100%, reflective blend to 100% and the reflectivity falloff to 0. And use specularity size property to control the reflection softness. Does this mean you don't set different levels of reflectivity? Or that all objects in the scene should have reflectivity of 100% with the specularity diffusing the highlights? That's a whole Pandora box. Reflectivity is a CG concept. In the real world, we talk about reflectance but reflectance is a much more complex and encompassing property than reflectivity. All surfaces have a reflectance. This is what gives the surface its color and appearance. If we wanted to be purist, we would use only reflectance in CG but that requires a lot of rendering time so we end up using all the available CG tricks to fake reflectance. So all surfaces are reflective. Diffuse surfaces are reflective too but their reflection pattern is totally random because their surface is very rough (although microscopically rough). In A:M, you can sort of make a diffuse surface by setting its color, then 100% reflective but set the specular size to some very high number such as 50000% and then wait and wait for the render. For perfectly diffuse surfaces (if such a thing really exist) you are better off not using reflectivity at all. The tradeoff point needs to be decided for surfaces that are neither purely mirrorlike not purely diffuse. The tradeoff is yours. You decide when the visual effect is convincing enough. For the type of HDRI based renders you are after, I would say the tradeoff point must be quite high. My own decision point is when the surface is to look metalic or gloss or semi-gloss painted, I use reflectivity as set above and play with specular size to get the effect I want. Bare metalic surfaces always require reflectivity and specular size adjustment to get the metalic look. For tissue, plants, skin, rough surfaces ot flat painted surfaces, I don't bother with reflectivity. Some tissues have a very characteristic reflectance pattern due to the material and the threading pattern and it is not possible to emulate that with simple reflectivity. Then there is the issue of coated surfaces such as a rough coat of paint covered with a clear coat of varnish where I set the specular color to the varnish coat color and play with the "reflection filter" to get the characteristic reflection pattern. Like I said, this is a Pandora box. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.