Announcement

Collapse
No announcement yet.

opacity mapping

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

  • opacity mapping

    Just a simple question, and I think this should go under the theory section, because I'm interested in the in-depth whys as well. So, why does a scene with opacity mapped surfaces (in my case, leaves) tends to render almost forever compared to a non opacity mapped one.

    In my case, to give some exact numbers, I'm trying to render a huge wall surface with lots of ivy leaves all over the wall. The scene setup is pretty simple, approx. 7million polygons for the ivy objects, few thousand for the wall structure, lit with a dome light projecting the VRaySky shader, and with irradiance map for the further bounces, and, of course, a VRaySun light object. I'm rendering all this into a vrayimage file in 3000x2200px resolution.
    Without the leaves opacity mapped, the scene takes 2,5hours to render, and almost noiseless.
    With the leaves opacity mapped, the scene renders in more than 30 hours (I've waited it out,...) and there is visible noise among the leaves.
    I just can't understand, where that tremendous amount of computation time goes. All because of the opacity maps? Is this related to filtering? Is opacity mapping really the nightmare of this type of raytracing?

    (Right now, I'm experimenting with clipping with displacement...I'll see how far that goes.)

    regards,

  • #2
    Yup, it happens to any raytracer. Stuff like the filtering of the leaf opacity maps means theres subtle different levels of transparency which makes it have a fit. I wrote a script to convert opacity mapped faces into a selected piece of geometry which sped things up a huge amount on scenes with around 70 million polys, other alternatives would be to turn off filtering on the opacity maps on the leaves.

    Comment


    • #3
      Hmm, I see. Still, it's a mystery to me, why opacity mapping has to be *this* slow. Seems like opacity mapping is harder to compute, than a spinning frosted glass frog with motion blur viewed trough a glossy mirror, and out of focus. ... Oh, and illuminated with distant point like overbright objects.

      Comment


      • #4
        Just a side note, turning the bitmap blur to 0.01 (just put in 0 it will go as low as it can) and turning the filtering off.. will make a significant difference to the rendertimes.. you will be quite amazed.

        <edit> fixed type to avoid confusion

        Comment


        • #5
          It is slow for the following reason. Imagine a ray from the camera hitting the opacity-mapped object. If the object is fully transparent, the ray continues forward, if it is fully opaque, bounced rays are traced for GI, shadows etc. However, if the surface is semi-transparent, the raytracer must still compute the bounced GI, shadows etc, AND then trace the ray onward. Now, some of the spawned rays for GI will also hit a semi-transparent part of the object. Again, this will generate more GI rays, and also further transparent rays and it goes on... each time a GI ray hits a semi-transparent surface, it must be split in two rays. This causes a tremendous amount of rays in the end.

          Further on, the situation is made worse by the fact that V-Ray can find out what is the transparency at a surface point only after the material has been evaluated at that point. This means that even on perfectly transparent portions of the surface, which do not contribute in any way to the final result, V-Ray must still collect a lot of information (normals, texture mapping coordinates etc) and pass it to the material only to find out that there is nothing to do for this point.

          Of course, this is a naive description and V-Ray tries to reduce the amount of unnecessary calculations, but still there is a lot more work to do compared to tracing actual geometry.

          Best regards,
          Vlado
          I only act like I know everything, Rogers.

          Comment


          • #6
            Thank you DaForce for the hint, and Vlado for the answers.

            Well, trying to imagine the situation that way does explain a lot, and if I got this right, there isn't much the whole adaptivity in the renderer could do to speed this up at this point.

            Would it be hard to implement something like a 2 bit clipmapping, because in many cases you only use opacity maps for that purpose. Even bypass the whole shading process of a surface, create a phantom shader to quickly decide the fate of the incoming ray, and than moving on to actual evaluation of the seen surface shader there?

            Comment


            • #7
              I have a question about opacity vs refraction in a glass material. Every once in a while I run into glass that has been created with Falloff maps in the Reflection and Opacity channels instead of in the Reflection and Refraction channels.

              Without getting into too much of a discussion about which creates a "better" result, I am curious if the falloff in the Opacity slot (or an Output or VRayColor map for that matter) would produce the same multiplying of rays that Vlado explains above. It seems like the same thing would happen.

              If I do a test, between the two glass methods, should I expect to see a larger number of rays reported in the Vray log window?

              Comment


              • #8
                Dudes

                I can change every numeric input to 0.001 however I cant the bitmap blur to this value, it always reverts to 0.01.

                Any ideas?

                Comment


                • #9
                  change the preferences for max.
                  The spinner decimals can be set to any number, but i think they default to 3 places.

                  Lele

                  Comment


                  • #10
                    Hey Lele

                    It was already set to precision 5, cos i like lots of zeroes still does not work.

                    Just to clarify Bitmap blur is in the "coordinates" section of the bitmap interface i.e the same section where you can set map type to texture or environ? right next to blur offset?

                    seems strange cos I can get losts of decimal points on other spinners but not that one.

                    Comment


                    • #11
                      Originally posted by GALACTUS
                      Dudes

                      I can change every numeric input to 0.001 however I cant the bitmap blur to this value, it always reverts to 0.01.

                      Any ideas?
                      Sometimes, when you put a value like 1 (or 10), then 0.001, it works. I think that's because the difference between 0.001 and 0.01 isn't big enough to make the change (a "bug" of max?)

                      It may not work in this particular case, I haven't tried yet...

                      EDIT: just tried and for this case the limit seems to be 0,01
                      Philippe Steels
                      Pixelab - Blog - Flickr

                      Comment


                      • #12
                        Thats what i was beginning to think so too Philippe...

                        That being the case though how did DaForce manage to input that figure, cos I would like to try out his tip on a scene am working on.

                        Comment


                        • #13
                          Sorry about that, had 1 too many zeros. Sorted now and edited the post for clarity.

                          Its easiest to just put in 0 and it will go to the lowest possible number anyway and then your set

                          Comment


                          • #14
                            Cheers Daforce, for clearing that up

                            Now on to the opacity speed tests...........once I increase my score in that damned paper airplane game to 100!

                            Colin

                            Comment


                            • #15
                              hahah that game is damn annoying.. hahaha

                              Be sure to post your before and after tests so others can see the significant improvement

                              Comment

                              Working...
                              X