Changes in occlusion() from 1.3.20 to 1.3.21

Help
2004-10-16
2013-04-25
  • Aron Gombas

    Aron Gombas - 2004-10-16

    It seems something significantly changed: occlusion became very fast, but there is a lot of low-freq noise in the images (if I render the same RIB).
    So I think that while 1.3.20 used raytracing to calculate the occluded part, 1.3.21 uses something else???
    Was this intentional?
    (Using the C-binding) is there any possibility to choose between these two approaches?

     
    • Okan Arikan

      Okan Arikan - 2004-10-16

         Hi Aron,

         Can you send me an example image ? I would like to fix this if it is a bug.

         The irradiance and occlusion calls use Greg Ward's irradiance caching method. So the occlusion and irradiance is computed at sparse set of points and interpolated.  Setting "maxError" to zero will enforce computation of these quantities everywhere without caching.

         Okan

       
    • Aron Gombas

      Aron Gombas - 2004-10-17

      Hi!

      That was quick response, wow. :)
      So here are the images:
      www.demoscene.hu/~aron/1320.png
      www.demoscene.hu/~aron/1321.png

      Let me know if you need the RIB and the shader.
      Thanks.

      Aron

       
    • Aron Gombas

      Aron Gombas - 2004-10-18

      Hi Okan!

      I've tried 1.3.21 and played with the "maxerror" attribute to control the occlusion quality. It worked perfectly, so plz ignore the report (the problem is definitely still there in 1.3.20, but I guess that doesn't matter anymore).
      Thanks,

      Aron

       
    • Aron Gombas

      Aron Gombas - 2004-10-19

      Hi Okan!

      Rendering more and more images after getting your help, I noticed that however I can control the occlusion quality with maxerr, I get big dark homogenous triangles in some area even if other parts are smooth.
      It happens quite often, but couldn't really tell between what circumstances:
      www.demoscene.hu/~aron/occtri.png
      www.demoscene.hu/~aron/occtri2.png

      If I render with maxerror=0, then I get perfect result (after a couple of hours ;)):
      www.demoscene.hu/~aron/occ-ext.PNG
      www.demoscene.hu/~aron/occ-int.PNG

      Is this normal? (I guess not.)

      Aron

       
      • Okan Arikan

        Okan Arikan - 2004-10-19

          Hi Aron,

           This is weird. If you send me a rib file that shows the problem, I can debug it.

           Thanks

           Okan

         
    • Aron Gombas

      Aron Gombas - 2004-10-20

      Hi Okan!

      I create a very simple scene to reproduce it:
      http://www.demoscene.hu/~aron/1%20room%20with%201%20light_2.png
      (You can clearly see the problem at the bottom side of the walls.)

      Here is the RIB and the shader:
      http://www.demoscene.hu/~aron/occtri.zip

      My experience shows that the rendering inside these homogenous area is very fast and its border is always "triangular", so maybe it's related to irradiance-caching per micro-polygon...
      Thanks,

      Aron

       
      • Okan Arikan

        Okan Arikan - 2004-10-20

            Hi Aron,

            I fixed the bug, I will upload the fixed version tomorrow.

           Thanks

           Okan

         
    • Aron Gombas

      Aron Gombas - 2004-10-20

      Forgot to say: apart from the problems coming up, when I can make it working, I get some nice images only with ambient occlusion and texturing.
      Pixie is really amazing, thanks for your work, Okan.

      Aron

       
      • Okan Arikan

        Okan Arikan - 2004-10-20

           Hi Aron,

           Your bug reports are greatly appreciated. Every bug you find makes Pixie stronger and more robust.

           Please share some of the images you rendered with Pixie community. I'm always looking for new contributions to Pixie gallery.

          Thanks

           Okan

         
    • Aron Gombas

      Aron Gombas - 2004-10-20

      Hi Okan!

      Here is another test.
      AFAIK the following 5 code-snippets should produce the same result, yet I get 5 different image:

      www.demoscene.hu/~aron/house_section1.png
      www.demoscene.hu/~aron/house_section2.png
      www.demoscene.hu/~aron/house_section3.png
      www.demoscene.hu/~aron/house_section4.png
      www.demoscene.hu/~aron/house_section5.png

      Here is the shader, where I comment out the other 4 "sections":

      surface air_prepare ()
      {
          N = normalize(N);
          I = normalize(I);
          normal Nf = faceforward(N, I);

          // section1
          //float occlusion = occlusion(P, Nf, 8, "maxdist", 2000.0);

          // section2
          //float occlusion = occlusion(P, Nf, 8, "maxdist", 2000.0);
          //color indirect = indirectdiffuse(P, Nf, 8);

          // section3
          //color indirect = indirectdiffuse(P, Nf, 8);
          //float occlusion = occlusion(P, Nf, 8, "maxdist", 2000.0);

          // section4
          //color indirect;
          //float occlusion = occlusion(P, Nf, 8, "maxdist", 2000.0, "irradiance", indirect);

          // section5
          float occlusion;
          color indirect = indirectdiffuse(P, Nf, 8, "occlusion", occlusion);

          // calculate final pixel (dummy)
          Ci = Cs*(1.0 - occlusion);
          Ci *= Os;
          Oi = Os; 
      }

      So I get 5 different images, mostly no occlusion at all... I guess it might be (slightly) related to this whole irradiance caching problem.

      Aron

       
    • Aron Gombas

      Aron Gombas - 2004-10-20

      Oops, the RIB and the SL if you want to play with these:

      http://www.demoscene.hu/~aron/house5.zip

      Aron

       
    • Aron Gombas

      Aron Gombas - 2004-10-20

      > Please share some of the images you rendered with Pixie community.
      > I'm always looking for new contributions to Pixie gallery.
      Yea, I definitely want to!
      But now Pixie+my shaders (see the problems above plus stability problems on hi-res images) and my exporter are only more-or-less working, so I think I can give you more interesting stuffs in a couple of weeks!

      Aron

       
    • Guy Robinson

      Guy Robinson - 2004-10-23

      Aron,

      Can I ask what modeilling application you are using? Are you developing an exporter as well?

      If so I'd be interested in talking more. I'm trying to write an exporter from dxf2rib.

      Guy

       
    • Aron Gombas

      Aron Gombas - 2004-10-23

      Hi Guy!

      Basically, we're working on a architectural CAD/CG app where the non-realtime rendering is done through the RI. So I "export" our internal scene-graph through RI calls and normally I redirect it to a RIB-file for convenient debugging/testing.

      Had you further questions, maybe it's better to discuss in a private email (aron.gombas@3nf.com) or open a new topic for that, if you think that that can be interesting for the public, too.

      Aron

       
    • Aron Gombas

      Aron Gombas - 2004-10-28

      Confirmed: this bug was fixed in 1.3.22.

      Aron

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks