pmapdump: -r is ignored

I am playing with a very simple room that has a light pipe in it.
I've created a global and a caustic photon map. When running them
through pmapdump, all caustic photons have a zero radius. I am
attempting to fix this with the -r option, but it gets ignored. Is
this expected?

The man page states that
"In cases where the distribution is substantially nonuniform (e.g.
highly localised caustics) the radius can be manually corrected with
this option."

Does pmapdump know whether it is dealing with a 'substantially
nonuniform distribution', and ignore -r if it is not?

Thank you

Axel

Hi Axel,

Actually, the -r option is just a scaling factor, so scaling zero doesn't change anything. The basic radius is derived from the cube root of the photon cloud's bounding box volume divided by the number of dumped spheres. In this case it would a imply a zero volume. What's the pmap's bbox reported by getinfo?

--Roland

···

On Tue, 05 Dec 2017 15:24:08 +0100, Axel Jacobs <[email protected]> wrote:

I am playing with a very simple room that has a light pipe in it.
I've created a global and a caustic photon map. When running them
through pmapdump, all caustic photons have a zero radius. I am
attempting to fix this with the -r option, but it gets ignored. Is
this expected?

The man page states that
"In cases where the distribution is substantially nonuniform (e.g.
highly localised caustics) the radius can be manually corrected with
this option."

Does pmapdump know whether it is dealing with a 'substantially
nonuniform distribution', and ignore -r if it is not?

Hi Roland,

$ getinfo tmp/lp3_g10000-c100000.cpm
tmp/lp3_g10000-c100000.cpm:
        #?RADIANCE
mkpmap -n 32 -apg tmp/lp3_g10000-c100000.gpm 10000 -apc
tmp/lp3_g10000-c100000.cpm 100000 -apo dome_mat octrees/lightpipe3.oct
        NumPhotons = 106896
        AvgFlux = [1.71e-05, 1.71e-05, 1.71e-05]
        Bbox = [14.751, 26.064, 2.950] [15.249, 26.563, 2.950]
        CoG = [15.000, 26.313, 2.950]
        MaxDist^2 = 0.029
        FORMAT=Radiance_Caustic_kdT_Photon_Map
        VERSION=3.0k

···

On 5 December 2017 at 16:19, Roland Schregle <[email protected]> wrote:

On Tue, 05 Dec 2017 15:24:08 +0100, Axel Jacobs <[email protected]> > wrote:

I am playing with a very simple room that has a light pipe in it.
I've created a global and a caustic photon map. When running them
through pmapdump, all caustic photons have a zero radius. I am
attempting to fix this with the -r option, but it gets ignored. Is
this expected?

The man page states that
"In cases where the distribution is substantially nonuniform (e.g.
highly localised caustics) the radius can be manually corrected with
this option."

Does pmapdump know whether it is dealing with a 'substantially
nonuniform distribution', and ignore -r if it is not?

Hi Axel,

Actually, the -r option is just a scaling factor, so scaling zero doesn't
change anything. The basic radius is derived from the cube root of the
photon cloud's bounding box volume divided by the number of dumped spheres.
In this case it would a imply a zero volume. What's the pmap's bbox reported
by getinfo?

--Roland

_______________________________________________
Radiance-general mailing list
[email protected]
https://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Axel,

thanks for the info, and for pointing this out; the photons are coplanar, so an area metric should actually apply.
I'll update pmapdump.c accordingly in the coming days. Will drop you a line so you can try it out.

Regards,

--Roland

···

On Tue, 05 Dec 2017 18:20:48 +0100, Axel Jacobs <[email protected]> wrote:

Hi Roland,

$ getinfo tmp/lp3_g10000-c100000.cpm
tmp/lp3_g10000-c100000.cpm:
        #?RADIANCE
mkpmap -n 32 -apg tmp/lp3_g10000-c100000.gpm 10000 -apc
tmp/lp3_g10000-c100000.cpm 100000 -apo dome_mat octrees/lightpipe3.oct
        NumPhotons = 106896
        AvgFlux = [1.71e-05, 1.71e-05, 1.71e-05]
        Bbox = [14.751, 26.064, 2.950] [15.249, 26.563, 2.950]
        CoG = [15.000, 26.313, 2.950]

Thank you, Roland,

my scene is a simple light pipe with a planar diffusor at the end. I managed to change the zero radii to something non-zero and visualise the photon map. As you say--all red (caustic) spheres are on the diffusor.

Thank you for fixing this.

Cheers

Axel

···

On 06/12/17 18:19, Roland Schregle wrote:

On Tue, 05 Dec 2017 18:20:48 +0100, Axel Jacobs <[email protected]> > wrote:

Hi Roland,

$ getinfo tmp/lp3_g10000-c100000.cpm
tmp/lp3_g10000-c100000.cpm:
#?RADIANCE
mkpmap -n 32 -apg tmp/lp3_g10000-c100000.gpm 10000 -apc
tmp/lp3_g10000-c100000.cpm 100000 -apo dome_mat octrees/lightpipe3.oct
NumPhotons = 106896
AvgFlux = [1.71e-05, 1.71e-05, 1.71e-05]
Bbox = [14.751, 26.064, 2.950] [15.249, 26.563, 2.950]
CoG = [15.000, 26.313, 2.950]

Hi Axel,

thanks for the info, and for pointing this out; the photons are coplanar, so an area metric should actually apply.
I'll update pmapdump.c accordingly in the coming days. Will drop you a line so you can try it out.

Regards,

--Roland

_______________________________________________
Radiance-general mailing list
[email protected]
https://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Axel,

thanks for bringing this to my attention, and nice workaround too. Pmapdump was originally (and still is pretty much so) a bodge for visually debugging mkmap's output when weirdness happens. But I'm glad it comes in handy to others too, and as such I'll make it a bit more robust. Hope to check in the update by the weekend.

Regards,

--Roland

···

On Wed, 06 Dec 2017 20:25:32 +0100, Axel Jacobs <[email protected]> wrote:

Thank you, Roland,

my scene is a simple light pipe with a planar diffusor at the end. I managed to change the zero radii to something non-zero and visualise the photon map. As you say--all red (caustic) spheres are on the diffusor.

Thank you for fixing this.

--
Dr-Ing. Roland Schregle
Gemeindehausplatz 6
CH-6048 Horw

Hi Axel,

No prob. I just updated pmapdump.c in the CVS. Try that with your original (coplanar) caustic pmap.

The automatic sphere radius is a pretty rudimentary guess and often needs some manual tweaking. Usually it's too small, but on the upside that reduces sphere overlap, which would otherwise slow oconv down. Pmapdump is still pretty rough around the edges, even after over a decade... ;^)

Best regards,

--Roland

···

On Wed, 06 Dec 2017 20:25:32 +0100, Axel Jacobs <[email protected]> wrote:

Thank you, Roland,

my scene is a simple light pipe with a planar diffusor at the end. I managed to change the zero radii to something non-zero and visualise the photon map. As you say--all red (caustic) spheres are on the diffusor.