Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Can somebody explain new user ibl shaders?

  1. #1
    Join Date
    Apr 2010
    Posts
    4

    Question Can somebody explain new user ibl shaders?

    Unsuccessfully I was looking for more information on user_ibl_env and user_ibl_rect.

    So far:

    User_ibl_env provides the same functionality of native IBL of mental ray, but with better importance sampling.... I can make it work, but the result is not visually the same as using the native ibl string. The light is coming from area light (not all around as in typical ibl), but materials are reflecting the hdri 360 degree. What is the idea behind this? Should we place light in bright parts of the hdri and mimic the full native ibl? Final gather is not working with env that way, it's just bouncing of the materials (I find this quite all right...)

    As for the user_ibl_rect, I can't get it to work and can't understand what is it for at all.

    The info on these is a bit slim, help is slim to. So if you can help - Thank you.

  2. #2
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,070

    Default

    Will make a tips page for this. In the meantime ...

    The user ibl shaders are attached to area lights as "user" type. (In Maya UI, this is labeled as Custom shape type.) This means that the shader controls the sampling rather than any specific shape. [Note that user (Custom) type of area light is required for user_ibl_env, but for user_ibl_rect, please use rectangle type.]

    The user ibl env shader attaches to both the environment and to an area light placed anywhere in the scene. It doesn't matter, because its just going to use the texture as a spherical environment texture. Its a lat-long, typically people use a texture that is 2:1 resolution width to height. Width represents 360 degrees, height, 180.

    The as_reflection input specifies whether the IBL image was shot as a reflection like a camera shooting a mirror ball, or if not, straight out into the environment, like a camera swiveling about the origin capturing the data. [Drawing a diagram, which I will do soon, should help. A ray that goes from your eye/camera straight out to the environment, is different than a ray that hits a mirror and reflects backwards. Often people take a shot of a mirror ball and convert it to a 2:1 lat-long, and this would need the as_reflection on.]

    The samples setting controls the maximum number of samples used from the light. This is affected by an importance mechanism in two ways. One is that more important parts of the texture are used more often in the sampling. And the number of samples may be decreased, if the light path goes down in depth, for example, we are processing a material shader for a material hit after several reflections and refractions.

    These are direct area lights, so typically you should specify as visible, if you want to see them. The visible user ibl env, creates your environment, and therefore is not used for FG (indirect) because it is now a direct light representing the environment. Ie, the number of samples it uses is called for every material in the scene. For high res, high dynamic range env images, this should perform much better for lighting than straight up FG. To get the same with basic FG would take thousands of FG rays.

    For user ibl rect, just attach to an area light again, [edited later], but not as user, rather as rectangle type. In Maya for example, the UI for the area light should match the rectangle region that will display. This is typically used for large textured light cards, that may be taking the place of lots of rendered objects. For example rendering these objects into the texture you will use.
    Last edited by bart; May 9th, 2012 at 19:02.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  3. #3
    Join Date
    Dec 2004
    Location
    Marina Del Rey, California
    Posts
    3,070

    Default

    Check list for usage.

    1. Samples. Ensure that the number of light samples on the actual light is greater than or equal to the number of samples in the user ibl shader.

    2. Area Light Type Setting
    a) User type area light shape. For user_ibl_env, ensure that the type of area light shape is user. In Maya UI, the dropdown under Use Light Shape says Custom which translates to User type. Also in Maya UI, make sure to turn on light visibility, before choosing Custom(user) type, as it is greying that choice out.
    b) Rectangle type area light shape. For user_ibl_rect, ensure that the type of area light shape is rectangle.

    3. Camera Environment. The same user_ibl_env used for the area light should be attached to the camera. It should be attached to the camera environment shader slot. In Maya UI, this is in the mental ray tab part of the camera AE UI.

    4. Check your texture is attached and a file is specified.

    5. Light scaling. If using traditional materials, rather than bsdfs, etc., use the string option "light relative scale" with a scalar value of 0.318, which is roughly 1/pi
    Last edited by bart; May 9th, 2012 at 19:08.
    Barton Gawboy
    Training and Special Projects, NVIDIA ARC
    LAmrUG Forum Originator

  4. #4
    Join Date
    Jun 2009
    Location
    North Carolina
    Posts
    161

    Default

    Thanks for the detailed explanation. Much appreciated!

    So does the user_ibl_rect use multiple importance sampling or some other mechanism that allows it to use a textured light more accurately? If I'm not mistaken the old area light shader would just do some sort of an average of the texture and end up generating only one value for the light. Will this shader allow the light to actually emit brighter values of one color temp in the middle and falloff to darker values and a different color temp on the edges?

    So basically what I'm trying to ask is can I take a photo of a light source, map it to the area light, and have the area light mimic the properties of the actual light in the photo more accurately than the old area light shader? And if so, how is it achieving this?

    -Justin
    Last edited by JJJenkins; May 1st, 2012 at 05:14.

  5. #5

    Default

    Thank you Bart.

    Just a quick question. Should I use "light relative scale" string option if I use mia_materials?

  6. #6
    Join Date
    Jul 2005
    Posts
    90

    Default

    yes. And make sure disable the spec from the mia

  7. #7
    Join Date
    Dec 2005
    Location
    Chicago
    Posts
    2,545

    Default

    yes. And make sure disable the spec from the mia
    In Maya by default the mia is set to "no highlight from visible area lights", so don't defeat that by turning it off. Direct reflection of these lights is noisy and slow (and unnecessary) but it should still generate spec from point light and spot sources (lights without area).

    However, my user_ibl_rect is acting wonky, appears to be reversed (lighting from the wrong side), is that just me?
    Last edited by Remydrh; May 1st, 2012 at 16:57.
    "Don't let anyone drive you crazy when you know it's in walking distance."

    "Don't argue with an idiot, they will drag you down to their level and beat you over the head with experience."

    http://elementalray.wordpress.com/

  8. #8
    Join Date
    Oct 2007
    Location
    New York
    Posts
    394

    Default

    Quote Originally Posted by Remydrh View Post
    However, my user_ibl_rect is acting wonky, appears to be reversed (lighting from the wrong side), is that just me?
    When you say reversed, do you mean the light lights the oposite side that the normal of the light is facing?

    I had that problem in beta and they fixed it. It must have made it into the main release. (I do not know as have not installed it yet)

    Best,

    Rich

  9. #9
    Join Date
    Dec 2011
    Posts
    2

    Default User IBL Rotation

    Is it possible to orient the new User IBL node correctly into a Z-Up scene?
    There seems to be no parameter to rotate the hdri to display upright?
    Any suggestions appreciated...
    Regards,
    Rich

  10. #10
    Join Date
    Apr 2010
    Posts
    4

    Default

    Thank you for answering, you are very kind. It makes much more sense now. Also, I would like to contribute:
    Here is a user_ibl_env shader attacked as explained in the post. The difference between these two images is that the area light holding the shader is moved from camera right on the first one, to camera left on the second. It seams that the position of the area light has an influence. Is that as it should be or....?
    car1.jpgcar2.jpg

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •