POV-Ray : Newsgroups : povray.advanced-users : Photons, in version 3.6 to 3.7 Server Time
14 Oct 2026 22:35:40 EDT (-0400)
  Photons, in version 3.6 to 3.7 (Message 1 to 18 of 18)  
From: Albun
Subject: Photons, in version 3.6 to 3.7
Date: 7 May 2019 12:30:01
Message: <web.5cd1b2029bc1f54337fe761b0@news.povray.org>
Hi,

With 3.6 version, i use a photon #macro like under this line, and the 'no_image'
for object, to see the refraction appeer on a plane and it's ok.
But with the 3.7 version, and the same file, there is nothing appeer on plane,
and no photons count on render.

#macro PhotonBlock()
 #if(Photons)
  photons {
   target
   collect off
   reflection off
   refraction on
  }
 #end
#end

Do you see a solution with 3.7 language ?


Albun


Post a reply to this message

From: Thomas de Groot
Subject: Re: Photons, in version 3.6 to 3.7
Date: 8 May 2019 02:41:28
Message: <5cd27a18$1@news.povray.org>
On 7-5-2019 18:28, Albun wrote:
> Hi,
> 
> With 3.6 version, i use a photon #macro like under this line, and the 'no_image'
> for object, to see the refraction appeer on a plane and it's ok.
> But with the 3.7 version, and the same file, there is nothing appeer on plane,
> and no photons count on render.
> 
> #macro PhotonBlock()
>   #if(Photons)
>    photons {
>     target
>     collect off
>     reflection off
>     refraction on
>    }
>   #end
> #end
> 
> Do you see a solution with 3.7 language ?
> 

You didn't tell, do you have a photons statement in the global_settings? 
That is essential.

either:
global_settings {
   photons {
     spacing 0.02
   }
}

or:
global_settings {
   photons {
     count 1000
   }
}

Also, the photons-receiving objects need a photons definition, like the 
following example:

plane {
   y, 0
   texture {
     pigment { color srgb <1.0, 0.8, 0.6> }
   }
    photons {collect on}
}

Maybe also the light source:

light_source {
   <100, 300, 500>
   color rgb 1.0
   parallel
   photons {
     refraction on
     reflection on
   }
}

See the appropriate sections in the docs.

-- 
Thomas


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 8 May 2019 09:50:00
Message: <web.5cd2dd748f793cd437fe761b0@news.povray.org>
Well Thomas,

ok for global setting with spacing
ok for color srgb
ok for light and object collect photon
ok for render photons count

but with the 'no_image' in object no ok, and no photons count in render.

May i will use only 3.6 version for this file...

Albun


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 8 May 2019 10:15:01
Message: <web.5cd2e3a88f793cd437fe761b0@news.povray.org>
Here is the file, no_image is in sphere.


#version 3.7;



#include "colors.inc"

#declare Camera_0 = camera {perspective angle 75               // front view
                            location  <0.0 , 1.0 ,-3.0>
                            right     x*image_width/image_height
                            look_at   <0.0 , 1.0 , 0.0>}

camera{Camera_0}



#declare Photons = on;

#declare Interior =
interior {
 fade_distance 2
 fade_power 3
 ior 1.45
 dispersion .05
 dispersion_samples 12
}
#macro PhotonBlock()
 #if(Photons)
  photons {
   target
   collect off
   reflection off
   refraction on
  }
 #end
#end

#declare Intensity = 12;
#declare L_Fade_Distance = 40;
#declare L_Fade_Power = 1;

#declare Area_Light=off;
#declare ALL = 1;//area light height (width?)
#declare ALW = 8;//area light width
#declare ALR = 5;//area light resolution


global_settings { ambient_light .1
 assumed_gamma 1.3
 max_trace_level 5
 #if(Photons)
  photons {spacing 0.0015}  //0.015
 #end
}


light_source{< 0,0,30> White*Intensity
 #if(Area_Light)
  area_light x*ALL, z*ALW, ALR, ALR
  adaptive 1
  jitter
 #end
 fade_distance L_Fade_Distance
 fade_power L_Fade_Power
 #if(Photons)
  photons {refraction on reflection off}
 #end
rotate<-5,0,0>
}
// sky ----------------------------------------------------------------------
sky_sphere { pigment { gradient <0,1,0>
                       color_map { [0.00 srgb <0.6,0.7,1.0>]
                                   [0.35 srgb <0.1,0.0,0.8>]
                                   [0.65 srgb <0.1,0.0,0.8>]
                                   [1.00 srgb <0.6,0.7,1.0>]
                                 }
                       scale 2
                     } // end of pigment
           } //end of skysphere
// ground -------------------------------------------------------------------
plane{ <0,1,0>, 0
       texture{ pigment{ checker color srgb<.8,.8,.8> color srgb<0.5,0.5,0.5>*1}

              } // end of texture

     photons {collect on}

     } // end of plane
//---------------------------------------------------------------------------
//---------------------------- objects in scene ----------------------------
//---------------------------------------------------------------------------

 #declare GlassTex =
texture {
 pigment {color srgbf <1, 1, 1, 1>}
 finish {
  reflection 0.05
  specular 1
  roughness 0.001
  metallic on
  irid {0.65             // contribution to overall color
   thickness 0.8    // affects frequency, or "busy-ness"
   turbulence 0.1   // Variance in film thickness
  }
 }
}


// sample sphere
sphere { <0,0,0>, 1.00
         texture { GlassTex} // end of texture
         interior {Interior}
 PhotonBlock()


        no_image   ///////////////////////

          scale<1,1,1>  rotate<0,0,0>  translate<0,1.35,0>

       }  // end of sphere -----------------------------------


Post a reply to this message

From: Alain
Subject: Re: Photons, in version 3.6 to 3.7
Date: 8 May 2019 16:01:49
Message: <5cd335ad@news.povray.org>
Le 19-05-08 à 10:11, Albun a écrit :
> 
>
> 
> 
> 
> 
Can you try using the object's photons block without the macro?
It's OK for any object to have a photons block in a non-photons scene. 
It will just have no effect.

Your sample sphere will look like :

sphere { <0,0,0>, 1.00
          texture { GlassTex} // end of texture
          interior {Interior}
//// The following is a "no op" in non-photon scene /////////
  photons {
    target
    collect off
    reflection off
    refraction on
   }
/////////////

         no_image   ///////////////////////

           scale<1,1,1>  rotate<0,0,0>  translate<0,1.35,0>

        }  // end of sphere -----------------------------------


Alain


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 8 May 2019 19:57:52
Message: <5cd36d00$1@news.povray.org>
On 5/8/19 10:11 AM, Albun wrote:
> 
> Here is the file, no_image is in sphere.
> 

Thanks. I can see that the no_image behavior is different 3.6 to 
3.7/3.8. Anyone know if such a change was intentional for some reason?

FYI. I moved the light source to a z of 300 and then rotated -55*x to 
get photons on the plane with your camera set up. Otherwise - with the 
point light at least - the photons mostly miss the plane off the bottom 
of the image. I also took your light intensity down from 12 to 1 to 
prevent white out.

Bill P.


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 9 May 2019 04:55:01
Message: <web.5cd3ea7c8f793cd437fe761b0@news.povray.org>
So, with or without macro, with no_image the render do the same result, and no
photons count in 3.7.

Who can tell better ?

Thanks all



Albun


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 9 May 2019 09:02:43
Message: <5cd424f3$1@news.povray.org>
On 5/9/19 4:53 AM, Albun wrote:
> 
> So, with or without macro, with no_image the render do the same result, and no
> photons count in 3.7.
> 
> Who can tell better ?
> 
> Thanks all
> 
> Albun
> 

It happens I've been working some in the photon code for another 
investigation so I started to dig here. I have to take a short break but 
what I've found so far is that having the no_image or not changes 
whether the following test:

if (Test_Flag(bestisect.Object, PH_TARGET_FLAG))

in PhotonTrace::TraceRay in photons.cpp is true.

I thought, OK, it must be a parser issue and started to look at things 
from that end. But, the sphere's PH_TARGET_FLAG is true with and without 
the no_image flag checking just after the

Parse_Object_Mods(reinterpret_cast<ObjectPtr>(Object));

call in ObjectPtr Parser::Parse_Sphere() in parser.cpp.

So... I still don't know what's going on, but looking like the sphere's 
photon target flag is changing state sometime after being set correctly 
in the parser and before the photon TraceRay call due the no_image modifier.

More when I get back to it - unless someone beats me to it.

Bill P.


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 9 May 2019 10:40:00
Message: <web.5cd43aa58f793cd437fe761b0@news.povray.org>
For the moved light, and any other set up, it's another beautyful aspect.
But i stay right in my boots for that ....;-)))

For the code, i havent an idea about what happen with the source.
But i understand that is not easy to really know all
thing happen in the 'troubling unknowquantic rendering',
if i can naming it like that.

Albun


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 9 May 2019 14:51:12
Message: <5cd476a0$1@news.povray.org>
On 5/9/19 10:36 AM, Albun wrote:
> 
> 
> For the moved light, and any other set up, it's another beautyful aspect.
> But i stay right in my boots for that ....;-)))
> 
> For the code, i havent an idea about what happen with the source.
> But i understand that is not easy to really know all
> thing happen in the 'troubling unknowquantic rendering',
> if i can naming it like that.
> 
> Albun
> 

OK. The actual issue is in the PhotonTrace::TraceRay code in photons.cpp 
where we have:

     found = FindIntersection(bestisect, ray, precond, postcond);
     if(found)
     {...

this borrows 'NoSomethingFlagRayObjectCondition precond' from trace.cpp 
which starts off with:

bool NoSomethingFlagRayObjectCondition::operator()(const Ray& ray, 
ConstObjectPtr object, double) const
{
     if(ray.IsImageRay() && Test_Flag(object, NO_IMAGE_FLAG))
         return false;

which returns false because of how ray.IsImageRay() is set up. We can 
hard code around the issue by changing:

     found = FindIntersection(bestisect, ray, precond, postcond);

to

     found = FindIntersection(bestisect, ray);

but I think the right thing to do is probably to change the 
ray.IsImageRay() definition in ray.h from:

  bool IsImageRay() const { return primaryRay || (refractionRay && 
!reflectionRay && !radiosityRay); }

to:

bool IsImageRay() const { return (primaryRay && !photonRay) || 
(refractionRay && !reflectionRay && !photonRay && !radiosityRay); }

or suppose some photon code specific precond a possibility too. My guess 
at the moment is that this 3.6 to 3.7 change was not intentional.

Christoph?

Bill P.


Post a reply to this message

From: clipka
Subject: Re: Photons, in version 3.6 to 3.7
Date: 10 May 2019 08:36:12
Message: <5cd5703c$1@news.povray.org>
Am 09.05.2019 um 20:51 schrieb William F Pokorny:

> but I think the right thing to do is probably to change the 
> ray.IsImageRay() definition in ray.h from:
> 
>   bool IsImageRay() const { return primaryRay || (refractionRay && 
> !reflectionRay && !radiosityRay); }
> 
> to:
> 
> bool IsImageRay() const { return (primaryRay && !photonRay) || 
> (refractionRay && !reflectionRay && !photonRay && !radiosityRay); }
> 
> or suppose some photon code specific precond a possibility too. My guess 
> at the moment is that this 3.6 to 3.7 change was not intentional.
> 
> Christoph?

I need to examine this closer. The ray conditions have proven to be a 
tricky business before (which is probably also why this change slipped 
in there in the first place; I'm pretty sure it is unintentional indeed).

Can someone submit a GitHub issue for this?


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 10 May 2019 09:38:11
Message: <5cd57ec3$1@news.povray.org>
On 5/10/19 8:36 AM, clipka wrote:
> Am 09.05.2019 um 20:51 schrieb William F Pokorny:
> 
...
> 
> I need to examine this closer. The ray conditions have proven to be a 
> tricky business before (which is probably also why this change slipped 
> in there in the first place; I'm pretty sure it is unintentional indeed).
> 
> Can someone submit a GitHub issue for this?

I'll do it in bit and post a pointer when done.

For those compiling at home, see the branch (off master) at:

https://github.com/wfpokorny/povray/tree/fix/photonNoImageIssue

if you too want to set up a regular pull of the proposed ray.h change 
into your version of POV-Ray for testing/immediate work.

Bill P.


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 10 May 2019 09:55:01
Message: <web.5cd582628f793cd437fe761b0@news.povray.org>
I never built a source on Windows; and at the beginning of 'my problem
no_image', i don't really know that the change can be, or may be, in the code.

I only 'flying' in SDL.


Best regards


Albun


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 10 May 2019 10:24:03
Message: <5cd58983$1@news.povray.org>
On 5/10/19 9:38 AM, William F Pokorny wrote:
> On 5/10/19 8:36 AM, clipka wrote:
...
>>
>> Can someone submit a GitHub issue for this?
> 
> I'll do it in bit and post a pointer when done.
> 

See:

https://github.com/POV-Ray/povray/issues/373

Bill P.


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 13 May 2019 02:50:00
Message: <web.5cd913578f793cd437fe761b0@news.povray.org>
Hello,

I followed your link to the source 'povray-fix-photonNoImageIssue'
I would like to know it was possible to receive a built of this version from
you.

I was interested in the vs2019, the 'builting' seems to me a test too
consequent.

Thanks

Albun


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 13 May 2019 05:05:00
Message: <web.5cd933368f793cd437fe761b0@news.povray.org>
Sorry i forget, for the os it's windows.

Albun


Post a reply to this message

From: Albun
Subject: Re: Photons, in version 3.6 to 3.7
Date: 14 May 2019 09:05:01
Message: <web.5cdabc008f793cd437fe761b0@news.povray.org>
Hello,


I would like to know it was possible to have a built of this version for
Windows10, from you.
https://github.com/wfpokorny/povray/tree/fix/photonNoImageIssue



Albun


Post a reply to this message

From: William F Pokorny
Subject: Re: Photons, in version 3.6 to 3.7
Date: 15 May 2019 09:45:37
Message: <5cdc1801@news.povray.org>
On 5/14/19 9:01 AM, Albun wrote:
> 
> Hello,
> 
> I would like to know it was possible to have a built of this version for
> Windows10, from you.
> https://github.com/wfpokorny/povray/tree/fix/photonNoImageIssue
> 
> Albun
> 

In a hurry to get the new stuff I see! :-) I was busy with real/other 
life than POV-Ray for a couple days. In any case I don't read the news 
groups every day. Sometimes, I intentionally avoid it for a time so I 
stay focused on my current task...

Offering a general response to your posts of the last few days, POV-Ray 
development doesn't have a somehow paid - or equivalently motivated(1) - 
core of developers unlike some other open source projects. Everyone's 
doing it primarily as a hobby. This means both that there is a lack of 
folks wanting - and able - to do the uninteresting grind of release/test 
work and often that those few are otherwise busy. I'd say today there 
are only two active such developers - and I'm not one of those.

(1) Master/PHD thesis work, new widget / world change believers. A few 
crazy folk perhaps... :-) Once in a blue mood someone will fund specific 
work in POV-Ray, but this tends from what I've seen to be funding for 
specific features and not the day to day review/test/release work.

To your specific question, no, it's not today possible for me to provide 
a release for Windows10. I'm a linux user for starters.

That said Christoph has created some github windows release build 
mechanisms I don't understand, but see. Especially if something 
something similar exists/can be created for (ppa-ish) for Debian/Ubuntu 
builds, I might - someday - dig into doing personal releases from my 
playpen of code branches and ideas.

Bill P.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.