Announcement

Collapse
No announcement yet.

HDR maps and mipmaps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HDR maps and mipmaps

    For our IBL setup, we have HDR maps (as EXR images) mapped to simplified geometry in a scene using a VrayLightMtl. This approach is more accurate than the more traditional approach of mapping the HDR to a sphere or dome. This brings up two questions:

    1. The Vray domeLight has some special mojo to make it calculate IBL (in particular the GI part) more efficiently. For example it has the resolution size which it uses for importance sampling, and it has the Tex Adaptive option. Are there ways to get similar things when mapping the HDR to geo, as described above? Would it help to convert the maps to tiled EXRs?

    2. Speaking of tiledEXRs we found that fur maps (length, density, direction, etc) did not work when converted to tiledEXRs (neither did converting them to mipmaps with maketx). Is this a known bug?

  • #2
    About 1), using direct illumination should help, but using it only as a material - I don't think it's possible.
    About the fur, I don't think there is an issue for this, will file a bug.
    V-Ray/PhoenixFD for Maya developer

    Comment


    • #3
      The main idea here is to get indirect stuff for the environment (GI and reflection). For direct light, what works better than enabling direct illum on the whole geo, I think, is to take a rec light with sky portal enabled, and position it by the geo representing the light bulb. That way it will take the HDR info for the light (geo) and port it thru the rec light. Here's a video: https://www.youtube.com/watch?v=K3nPBrESJeE

      The results are great. I'm just trying to speed it up, and was wanting to get the importance sampling magic from the dome light working with the lightMtl on geo.

      From the tests I did, I could not see any speed increase from using tiled EXRs for the HDR maps. If anything it was a little slower (I'm guessing because of the load times for the larger files). So I'm thinking that using mipmaps (i.e. tiled EXR) does not work for the purpose of getting global GI and reflection info from an HDR geo, like it does when using a simple texture on a geo where it uses a smaller part of the mipmap depending on screen space.
      Last edited by sharktacos; 14-03-2016, 09:04 AM.

      Comment


      • #4
        Hi, for the issue with tiled EXRs, there is a bug in V-Ray where if your density map is in a tiled EXR that has 3 or 4 channels rather than 1, it takes the Alpha channel to be the density information. I suspect your EXRs are RGB, which leads to them having a constant 1 alpha.

        As a workaround for now, you can convert your EXRs to single-channel tiled EXRs using the following maketx command:
        maketx input.exr --nchannels 1 --chnames A --tile 64 64 -o output.exr
        V-Ray for Maya developer

        Comment


        • #5
          Originally posted by moshev View Post
          Hi, for the issue with tiled EXRs, there is a bug in V-Ray where if your density map is in a tiled EXR that has 3 or 4 channels rather than 1, it takes the Alpha channel to be the density information. I suspect your EXRs are RGB, which leads to them having a constant 1 alpha.

          As a workaround for now, you can convert your EXRs to single-channel tiled EXRs using the following maketx command:
          I'll give that a try, thanks.

          We also had an issue with texture maps used as masks in a ExtraTex render element when they were converted to mipmaps. Is it possible that it was also reading the (non-existant) alpha for those?

          Comment


          • #6
            p.s. would it also work to do
            Code:
             maketx input.exr --monochrome-detect --tile 64 64 -o output.tx
            (note both the changed options and output format).

            Comment


            • #7
              Originally posted by sharktacos View Post
              p.s. would it also work to do
              Code:
               maketx input.exr --monochrome-detect --tile 64 64 -o output.tx
              (note both the changed options and output format).
              It should, if input.exr is monochrome.

              Another thing, Maya by default connects the alpha channel to the density property. If your texture doesn't have density information in the alpha channel, you should check "Alpha is Luminance" in the texture's attributes under "Color Balance". It seems we try to autodetect if we should put luminance in the alpha channel and that fails for tiled EXRs. If you enable "Alpha is Luminance" in Maya, it works without problems.

              Alternatively, you could connect the red (or green, or blue) channel of the texture to the density property of VRayFur.
              V-Ray for Maya developer

              Comment


              • #8
                So I did a test on fur density: Maketx did not seem to fix it, but setting the "Alpha is Luminance" did.

                Comment

                Working...
                X