Trying to make HDR IBL... HALP

2

Comments

  • Oso3DOso3D Posts: 14,916

    You can call me Will. ;)

    Sunlight is tricky, because you can have an environmental map OR sunlight, but not both. Which is a pain. And backdrop can be hard to line up.

    What I've been doing is creating a sphere, apply image to the sphere in diffuse and emission and shut off glossy. Then I create a spotlight, move it to where the sun should be, point it right. Then I parent everything to some centerpoint, and scale it out to an appropriate size. Adjust the disk size of the spotlight until it looks about right.

    This gives me two main light sources -- ambient sky lighting, and directional sun (or moon) light. I can then adjust the strength and color of each.

     

    The biggest gap is the lack of ground plane, but frankly if I'm doing anything big I'm probably better off making a ground plane myself, anyway.

     

  • Oso3DOso3D Posts: 14,916

    Come to think of it, I'll have to recreate that previous image to show you guys what I mean.

     

  • Just a not-so-quick note on doing "levels" adjustments in photo apps (e.g. Photoshop, Gimp, etc)

    Adjusting the "levels" is not necessarily the same as adjusting exposure.  When you adjust levels, you are basically raising or lowering the amount of black or white that is in a picture.  It's not increasing or decreasing the amount of actual light that was captured in the image.  True exposure adjustments can mimic adding or removing light by adjusting luminance, but within limits.  

    If your source image is an 8-bit JPG, and you are processing it in 8-bit, then increasing exposure is limited by the maximum luminance value (255) and will never go higher.  As you raise the exposure of an image, areas that reach that maximum begin losing details because the luminance gets "clipped" to 255.  This results in washed out areas that appear all white, but that doesn't equate to "brighter" for lighting purposes. 

    With a true 32-bit image file, the luminance is practically unlimited.  This allows you to raise exposure and not lose details.  Why is this important? Maintaining those details is what gives a true HDR/EXR image the properties to light a scene realistically because there is a broad range of "unevenness" in the lighting.

    I have not messed with picturenaut much.  However, apps that try to mimic HDR by combining multiple 8-bit images are really just merging the unclipped portions of each image together (i.e. the parts of each image where the luminance isn't maxed out, or at 0).  It's a little more complicated than that, but it's not creating an image with the full specturm of light/luminance.  Some programs will apply algorithms that can broaden the dynamic range, but it's still not going to acheive good results for our purpose because the detail we need for lighting just isn't there in 8-bit images.

    TL;DR: Making "levels" adjustments does not equate to adding light to an image.  Exposure adjustments can do this, but only within the limits of the bit-depth (8 bit vs. 16 bit vs. 32 bit) of the image.

  • You can call me Will. ;)

    Sunlight is tricky, because you can have an environmental map OR sunlight, but not both. Which is a pain. And backdrop can be hard to line up.

     

    OK Bob. Thanks for answering. I wasn't sure as I haven't used the DS renderers for a bit. 

    cool

     

  • Oso3DOso3D Posts: 14,916

    What's frustrating is that apparently Carrara deals with images in 32 bit internally but won't save with that information.

    What that theoretically means is that if I can figure out how to adjust effective exposure within Carrara, I'd actually have that information.

  • ToborTobor Posts: 2,300

    But do you need a spotlight or can you use the distant light? If you are using the Iray Environment dome with an HDRi, the sun-sky is blocked, and you can replicate the sun using a distant light. They are functionally the same thing, though in Iray aspects of the sun (e.g. color temperature) is also controlled by its position in the sky. You can use a spotlight, but to get the sharp shadows of sunlight, it needs to be the Point type, with a fairly narrow angle. 

    The other approach is to use your image with a traditional skydome, lop off the top using an Iray sectioning plane, and then light using either A) sun-sky or B) Dome but no HDRi plugged in. When you use the dome, remember that the sun's angle is also dependent on the rotation of the dome.

     

     

  • Oso3DOso3D Posts: 14,916

    Distant light will be blocked by a skydome and behaves weirdly in Iray, in my experience.

     

  • ToborTobor Posts: 2,300

    As I said, lop off the top of the skydome with the sectioning plane. Works well. See my tutorial.

    Not sure why the distant light behaves weirdly in Iray. The distant light and the sun are functionally the same thing. As I noted, use a *low* value for the lumens -- no higher than 12-15. That equates to 12-15 lumens per square centimeter of light falling on the scene, which is a lot of light.

  • FishtalesFishtales Posts: 6,071

    Last night I decided to try the Yosemite dome as I hadn't used it since I started using Iray and couldn't remember what I did to get them to work.

    Skunk Stand Off

    Click on image for full size.

  •  

     

    Skydomes are OK, but frankly I found them more cumbersome than using HDR. Skydomes block light from the outside...so a pain. But I did have some good results with 3DL and uber environment when I was a big user. But I don't miss that workflow at all.

    So you can use HDR without using the dome ? How please ?

  • larsmidnattlarsmidnatt Posts: 4,511
    edited September 2015
    mrmorph said:

     

     

    Skydomes are OK, but frankly I found them more cumbersome than using HDR. Skydomes block light from the outside...so a pain. But I did have some good results with 3DL and uber environment when I was a big user. But I don't miss that workflow at all.

    So you can use HDR without using the dome ? How please ?

    Are you trying to use it for a backdrop, or just lighting? And Iray or 3DL? For Iray i'm almost positive you can just change the environment settings without adding a physical dome to the scene.

    What I did for Iray was went to environment settings in the render settings tab. If you want it to render the backdrop, turn on "Draw Dome". It will be huge and far away from your scene, shouldn't give you any issues. If you rotate the dome, you can see the lighting change. When others were talking about a dome, i thought they meant a physical one, which blocks light and is a chore to deal with. Maybe I mis understoond. When we used Uberenvironment we used physical domes.

    Not sure how most people use HDR with DS these days. I mostly render with Octane and only tinker with Iray for learning purposes. Hope this helps.

    using this method I can add a distance light with no problems. It is not blocked by the fake dome that is infinitely far away.

     

    Post edited by larsmidnatt on
  • larsmidnattlarsmidnatt Posts: 4,511
    edited September 2015

    Here is IRAY draw dome on, one only using HDR, another using HDR plus distant light.

    Also one with the domes disabled so they don't muck up the background. If you render to PNG or something that supports transparencies you can composite in a better background.

    HDR Test.jpg
    1635 x 817 - 426K
    no dome.jpg
    1635 x 817 - 206K
    render settings.png
    689 x 400 - 45K
    Post edited by larsmidnatt on
  • Oso3DOso3D Posts: 14,916
    edited September 2015

    You know, I keep forgetting distant light actually works in Iray, it's just scaled way differently.

    Yeah, that would probably be a better idea.

    The trick is lining it up, but that might be way easier than other stuff.

    Post edited by Oso3D on
  • Oso3DOso3D Posts: 14,916

    Eeh, now I remember why I didn't like it -- there's no way to soften distant light shadows in Iray. Hrm.

     

  • larsmidnattlarsmidnatt Posts: 4,511
    edited September 2015

    Eeh, now I remember why I didn't like it -- there's no way to soften distant light shadows in Iray. Hrm.

     

    How about using a mesh light instead? By scaling the mesh light it would allow you to control the softness of the shadow. the bigger the light source the softer the shadows. I haven't used mesh lights in Iray but in Lux/Octane they are my main light source typically.

    Post edited by larsmidnatt on
  • ToborTobor Posts: 2,300
    edited September 2015

    Eeh, now I remember why I didn't like it -- there's no way to soften distant light shadows in Iray. Hrm.

    Well, there are ways, but you may not like them, as they involve tradeoffs.

    1. Insert a plane in front of the character in-line with the direction of the distant light. This plane will act as a scrim. Choose a transmissive Iray shader, like frosted glass. You can adjust for shadow softness by fiddling with the shader controls. But now, you'll have the ground shadow of the shape of your plane. You can catch it by turning off ground shadows, or softening/lightening them up using the Envioronment controls. it also adds to rendering time. (However, this method is perfect for adding gobo effects.)

    2. Switch to Interactive mode. You use the same Iray shaders and lights, and the overall look isclose to Photoreal, but now you can control shadows.

    3. Add a ground surface and apply the Iray Matte control to it. You can adjust materials and settings to achieve the ground shadowing that you want. This is the more involved method, but it can yield good results.

    If you're needing to control the sharpness of the shadows a little more, then either a spotlight with an area-shape emitter, or a point light with an IES profile attached to it, are probably your best choices.

     

    Post edited by Tobor on
  • Oso3DOso3D Posts: 14,916
    Which brings me full circle to where I started. One nice thing about the sun option is that you can control softness with haze or sun disk size. It's just frustrating that you can't have sun and environment map at the same time.
  • ToborTobor Posts: 2,300

    If you load up thePixar Campus HDRi, you'll see it has fairly distinct shadows for its sun. This is the result of an *extremely* high value for the sun light. It's likely the image was post processed to provide this bright source. It's not unusual to post-process HDRi's in this way. This shows you that an HDRi can contain a sun source that provides a very distinct shadow. Of course, you can make the shadows less robust if you like. 

    You can do much the same in your editing program. You must be in 32-bit mode. Increase the sun brightness in all your exposure layerss by physically painting in a brighter sun/sky.Save the stack under a new name, and output a new HDR/EXR.

    If you are willing to use an open-roof skydome, you can also make your own fully synthesized sun Environment with a bright sun with shadows of your chosing, then insert your Pretty Picture backscape into the skydome. Would you like me to show you how to do this? Your shadows can be as sharp and ugly, or as smooth and subtle, as you want.

  • mrmorph said:

     

     

    Skydomes are OK, but frankly I found them more cumbersome than using HDR. Skydomes block light from the outside...so a pain. But I did have some good results with 3DL and uber environment when I was a big user. But I don't miss that workflow at all.

    So you can use HDR without using the dome ? How please ?

    Are you trying to use it for a backdrop, or just lighting? And Iray or 3DL? For Iray i'm almost positive you can just change the environment settings without adding a physical dome to the scene.

    What I did for Iray was went to environment settings in the render settings tab. If you want it to render the backdrop, turn on "Draw Dome". It will be huge and far away from your scene, shouldn't give you any issues. If you rotate the dome, you can see the lighting change. When others were talking about a dome, i thought they meant a physical one, which blocks light and is a chore to deal with. Maybe I mis understoond. When we used Uberenvironment we used physical domes.

    Not sure how most people use HDR with DS these days. I mostly render with Octane and only tinker with Iray for learning purposes. Hope this helps.

    using this method I can add a distance light with no problems. It is not blocked by the fake dome that is infinitely far away.

     

    Thanks for your reply. Well I'm experimenting with both at the moment. Some backgrounds work okay for me, mostly when they are out of focus.

    I'd like to make my own HDRs from places locally, like the woods and things like that, so that's where I am coming from.

    I was a bit confused as to when the environment actually works and affects the scene - I mean whether it is on or off...

    Thanks for your tips, I'll do some more experimenting.

  • Oso3DOso3D Posts: 14,916

    I'm not really interested in the open top sky thing because I often use refraction or reflection. That and trying to keep a shadow from being thrown is tricky.

     

    One thing I'm experimenting with is doing a render through a transparency and increasing sun brightness, which should end up with a progressively sun-dominated exposures.

    Another possibility, going along Tobor's notes on Pixar and sun, is simply making a white disk 'sun' in the right spot image, and use that with Picturenaut. Might do the trick.

     

  • larsmidnattlarsmidnatt Posts: 4,511
    edited September 2015
    mrmorph said:
    mrmorph said:

     

     

    Skydomes are OK, but frankly I found them more cumbersome than using HDR. Skydomes block light from the outside...so a pain. But I did have some good results with 3DL and uber environment when I was a big user. But I don't miss that workflow at all.

    So you can use HDR without using the dome ? How please ?

    Are you trying to use it for a backdrop, or just lighting? And Iray or 3DL? For Iray i'm almost positive you can just change the environment settings without adding a physical dome to the scene.

    What I did for Iray was went to environment settings in the render settings tab. If you want it to render the backdrop, turn on "Draw Dome". It will be huge and far away from your scene, shouldn't give you any issues. If you rotate the dome, you can see the lighting change. When others were talking about a dome, i thought they meant a physical one, which blocks light and is a chore to deal with. Maybe I mis understoond. When we used Uberenvironment we used physical domes.

    Not sure how most people use HDR with DS these days. I mostly render with Octane and only tinker with Iray for learning purposes. Hope this helps.

    using this method I can add a distance light with no problems. It is not blocked by the fake dome that is infinitely far away.

     

    Thanks for your reply. Well I'm experimenting with both at the moment. Some backgrounds work okay for me, mostly when they are out of focus.

    I'd like to make my own HDRs from places locally, like the woods and things like that, so that's where I am coming from.

    I was a bit confused as to when the environment actually works and affects the scene - I mean whether it is on or off...

    Thanks for your tips, I'll do some more experimenting.

    The Skydome in HDR is just for humans to see. The computer doesn't actually need the dome in the render for it to work correctly. Once the HDR is set up it works either way. With HDR, there are two ways to make the BG out of focus.

    One is just adjusting the camera aperture. But this doesn't only impact the HDR. This is what I do most of the time. However it could not be desirable if you have a lot of area you need to keep in focus in the scene.

    The other method is actually using a blurry HDR image for the backdrop. Or making your own blurry image for the backdrop out of the HDR. Many HDR assets come with different files, and one of them is commonly a blurry version. This can also make the reflections softer, so there are more factors to consider here. Sometimes you don't want crisp mirror like reflections and this may not be an issue. 

    Post edited by larsmidnatt on
  • Thanks for that, I'll have a play.

    And sorry I hijacked your thread Timmins !

  • I know, but I don't even own a camera. The point is to see if I can take skydomes and images from Carrara and make something usably IBL from it without having to play games with spheres and spotlights.

     

     

    I would output from Carrara in a lossless format, such as .tiff, as has been mentioned above. That may help a little with the bracketing. It won't be 32 bit though. I think Carrara's output is limited to 16 bit, though I have read somewhere that for some reason, internally it uses 32 bits, but I can't recall for sure.
  • Oso3DOso3D Posts: 14,916

    Yeah, I read the same. When I feel up to it, I need to experiment with simply putting in white disks at low exposure levels and see how that works out. Heh.

     

  • Why can't they add a spherical camera to DS and one that will render HDRi? 

    I have never understood that limitation.

    i mean even before iray one could render scenes with different exposures so a high dynamic range image was feasibly possible to create.

  • Oso3DOso3D Posts: 14,916

    That's a reeeeally good question.

     

  • mjc1016mjc1016 Posts: 15,001

    Why can't they add a spherical camera to DS and one that will render HDRi? 

    I have never understood that limitation.

    i mean even before iray one could render scenes with different exposures so a high dynamic range image was feasibly possible to create.

    Because, until very recently 3Delight did NOT have a spherical camera.  Years ago, like back before version 6 of 3DL it had one (that was the version in Studio 2.3) but it was not very useful and was dropped.  Now for version 12 of 3DL, support for other cameras is back, mostly (there aren't any shaders for it, that I know of, yet).  Studio 4.8 used 3DL version 11.0.130 (before it was added).

    It got one about the same time Iray arrived on the scene...and I'm not sure if Iray has one (I think it does, but I'm not 100% sure), so it could be something that will show up in a future update.

  • ToborTobor Posts: 2,300

    According to the nVidia docs, Iray has built-in support for orthogonal and perspective cameras. Not to say something else couldn't be created using some technique, but it looks like it would need to be an inside job. There's a lens shader that can be customized, but I think it has to be done on the programming level, rather than the procedural MDL level (as Iray material shaders are done). A year ago someone asked about it on the nVidia forums, and it went unanswered. Maybe it's on nVidia's to-do list.

    I looked around to see what other Iray-based software had, and couldn't find a reference to anythinbg, though VRay in 3DS Max apparently has something.

  • mjc1016mjc1016 Posts: 15,001

    Maybe it was Vray I was thinking about...

    But not every renderer supports the cameras needed.

  • Oso3DOso3D Posts: 14,916

    It'd probably be easier to add more save options to Carrara, which DOES have 360 camera mode.

     

    Of course, Daz has given up on Carrara development, so cue the sad trombone.

     

Sign In or Register to comment.