Photo-mapping crashes

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

    Aron Gombas - 2004-10-10

    Hi Okan!

    I made some experiments with photon-mapping. For this I created a simple shader to directly visualize the photon-map:
    surface photon ()
    {
        N = normalize(N);
        I = normalize(I);
        normal Nf = faceforward(N, I);

        //Ci = photonmap("\\temp\\Air-causticmap.gcm", P, Nf);
        Ci = photonmap("\\temp\\Air-photonmap.gpm", P, Nf);
        Ci *= Os;
        Oi = Os; 
    }

    My experience shows that Pixie crashes:
    1 - if the no of photons to emit is "too high":
    1a - CarPhotonTester.rib crashes with 50000000 (50Mio) photons, but can be rendered with 5000000 (5Mio). (I guess that 50M should not be an extreme count, if I want to visualize noiseless caustics later...)
    http://www.demoscene.hu/~aron/CarPhotonTester.png
    1b - TransparentPhotonTester.rib crashes with 5Mio, but can be rendered with 500000
    http://www.demoscene.hu/~aron/TransparentPhotonTester.png

    2 - or if the no of photons is low (500), but the geometry is "too complex": ComplexPhotonTester.rib (the strange thing that it crashes not in the "emit" pass, but when it visualizes the result?!)

    See the package with all the files mentioned:
    http://www.demoscene.hu/~aron/glob.zip

    I had problems also when I put lightsources "inside" closed geometries (a room inside a house): it was all black. I keep playing with this.
    Thanks,

    Aron

     
    • Aron Gombas

      Aron Gombas - 2004-10-10

      Sorry, the URL I pasted was incorrect.
      The correct one is:

      See the package with all the files mentioned:
      http://www.demoscene.hu/~aron/phot.zip

       
    • Okan Arikan

      Okan Arikan - 2004-10-13

         Hi Aron,

         I checked the scenes. The problem seems to the be Pixie running out of memory. 50M is quite high. I also check the same scene with PrMan and it crashes as well. Notice that photons can bounce

         Attribute "trace" "maxdiffusedepth" [1] (default)

         So by default, photons will bounce only once. Increasing this number gets more indirect illumination.

         You can see the photon locations using the "show" command on windows systems:

         EG: show global.gpm

         I will look into the photon hider crashing with too few photons.

         Thanks

         Okan

       
    • Aron Gombas

      Aron Gombas - 2004-10-16

      > The problem seems to the be Pixie running out of memory.
      I see.
      In this case, what can users do if they're trying to render caustics in production (which can be insanely complex geometries) and they need a huge no of photons?

      Aron

       
    • Okan Arikan

      Okan Arikan - 2004-10-18

         Hi Aron,

         I've been thinking about your question about what to do if that many photons are required, unfortunately, this doesn't have an easy solution. Pixie has to allocate about 44 bytes for each photon. If you are shooting 50M, you'll need at least 2GB of memory.

          One possibility is creating separate photon maps in separate passes for different caustics, rather than having one giant photonmap for the entire scene. A better way of estimating photonmap power is also possible through filtering (the current implementation does not filter). However, due to some time limitations, I won't get around to implementing this about a month (as usual, Pixie users are most welcome to contribute code or ideas).

          Okan

       

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