POV-Ray : Newsgroups : povray.newusers : 'Photon object' Server Time
3 Dec 2024 12:58:00 EST (-0500)
  'Photon object' (Message 1 to 5 of 5)  
From: Albun
Subject: 'Photon object'
Date: 25 Sep 2018 09:20:01
Message: <web.5baa35afad9ac3385b58ab640@news.povray.org>
Hello,
here are real subjects or not, on the creation of a "photon object" of Povray
(not for a Jedi sword ...)



-00-
 A 'photon object' by exporting the spectral color simulation data, is possible
with Povray?
The scene :
/ light_source
/lens
/ plan with the result of the light projection, in color gradient = 'photon
object'.

Which method is really possible?

***********************************************************
1) With the trace () function the position of the color points, on the plane,
are defined in vector <x, y, z>
All positions can be connected / assembled by writing an export file.
*http://www.povray.org/documentation/view/3.6.1/125/
*pov2Mesh and meshLab

2) Another method, from hf_map, in gray scale, allows to obtain a hf_object
exportable in data.
*HF_Square(Function, UseUVheight, UseUVtexture, Res, Smooth, FileName, MnExt,
MxExt).
But with csg cut on hf_object, is hf_square cut data too?

3) About setting photon and save_file, do the data targeted on a plan object
allow to be used as an object?



May the force...

Albun


Post a reply to this message

From: clipka
Subject: Re: 'Photon object'
Date: 25 Sep 2018 10:02:14
Message: <5baa3fe6$1@news.povray.org>
Am 25.09.2018 um 15:18 schrieb Albun:
> 
> here are real subjects or not, on the creation of a "photon object" of Povray
> (not for a Jedi sword ...)

Right now, I can only wildly speculate what you are trying to achieve.

My best bet is that you are trying to place one or more shapes (e.g. a
spheres) in the scenes to illustrate the path a light ray might travel
through (or end up in) the scene, without calculating a bunch of such
paths by hand.


I think you'll have to implement your own ray tracer in POV-Ray's scene
language, using the trace() function; but different from the example
"ray tracer in a ray tracer" code in the docs, instead of classic
backward ray tracing you would have to implement photon mapping (which
is essentially forward ray tracing, starting at the light source); also,
you'd have to add support for refractions if you want to simulate a lens.

If you're only trying to compute the places where a bunch of light rays
would end up (as opposed to the paths traveled), to illustrate their
distribution and density on a target plane, it might also be possible to
export a photon map and load it back into POV-Ray, but it might be
tricky to decode the photon map file.

Instead of exporting the photon map, you could also instead use an
orthographic camera to render the light pattern created by the lens on
the target plane(?), import that back into POV-Ray scene as an image
function, and use that function as a "filter" for randomly placed objects.


Well, that's my interpretation of what you're trying to achieve, anyway,
but...


>  A 'photon object' by exporting the spectral color simulation data, is possible
> with Povray?

... I have no idea how "spectral color simulation data" (whatever you
mean by that) would fit into my current interpretation...

> 2) Another method, from hf_map, in gray scale, allows to obtain a hf_object
> exportable in data.
> *HF_Square(Function, UseUVheight, UseUVtexture, Res, Smooth, FileName, MnExt,
> MxExt).
> But with csg cut on hf_object, is hf_square cut data too?

... or how height fields might come into play.


So I have a hunch that I'm completely misunderstanding what you're
trying to achieve.


Post a reply to this message

From: Alain
Subject: Re: 'Photon object'
Date: 25 Sep 2018 11:37:24
Message: <5baa5634@news.povray.org>
Le 18-09-25 à 09:18, Albun a écrit :
> 
> Hello,
> here are real subjects or not, on the creation of a "photon object" of Povray
> (not for a Jedi sword ...)

There is no such thing as a «photon object» in POV-Ray. The only photons 
that I know of are those used for forward tracing. Those can be 
saved/exported as a photon map in a file.
The file contain a list of 3D locations and colours for individual photons.
I don't know anything about it's internal format.

> 
> 
> 
> -00-
>   A 'photon object' by exporting the spectral color simulation data, is possible
> with Povray?

POV-Ray use RGB definitions for the colours, not spectral data.

> The scene :
> / light_source
> /lens
> / plan with the result of the light projection, in color gradient = 'photon
> object'.
> 
> Which method is really possible?
> 
> ***********************************************************
> 1) With the trace () function the position of the color points, on the plane,
> are defined in vector <x, y, z>
> All positions can be connected / assembled by writing an export file.
> *http://www.povray.org/documentation/view/3.6.1/125/
> *pov2Mesh and meshLab
> 
> 2) Another method, from hf_map, in gray scale, allows to obtain a hf_object
> exportable in data.
> *HF_Square(Function, UseUVheight, UseUVtexture, Res, Smooth, FileName, MnExt,
> MxExt).
> But with csg cut on hf_object, is hf_square cut data too?
> 
> 3) About setting photon and save_file, do the data targeted on a plan object
> allow to be used as an object?
> 
> 
> 
> May the force...
> 
> Albun
> 
> 

Enable photon mapping in the glabal_settings block :
photons{ spacing AverageSpaceBetweenPhotons // or count PhotonsToShoot
  }

For your lens :
Make it transparent : pigment{rgbt 1}

Give it an IOR and enable spectral dispersion :
interior{ ior Material_IOR dispersion Material_Dispersion 
dispersion_samples Sample_Count}

Make that object a target for the photons :
photons{ target }

You don't need to add anything to the light_source used.

Finally, place a white plane to receive the photons and make them visible.

This will get you the end location of the photons.

If you want to see the 3D path, you need to use some media to make the 
paths visible.


Post a reply to this message

From: Bald Eagle
Subject: Re: 'Photon object'
Date: 25 Sep 2018 12:20:01
Message: <web.5baa5f52956f7e77c437ac910@news.povray.org>
Hi Albun,

I'm not quite sure what you want to do, but take a look at these and see if
they're related.


http://wiki.povray.org/content/Reference:Photons

http://portal.groupkos.com/index.php?title=POVRay_scene_Optics.pov

http://cronodon.com/PovRay/Lasers.html

http://www.f-lohmueller.de/pov_tut/interior/interior_40e.htm



"Albun" <nomail@nomail> wrote:

> The scene :
> / light_source
> /lens
> / plan with the result of the light projection, in color gradient = 'photon
> object'.


So, I'm guessing that what you want to do is create a spectrum of colored light
coming out of a lens, and somehow use the intensities of the various wavelengths
to create a 3D "graph" of how much light falls on the target.

Thus, the heightfield.

IIRC, this sort of thing has been discussed before, and you may want to simply
write a function that will simulate the diffraction of white light into the
visible spectrum, and go from there.

Maybe if you clarify your goal, some folks here can suggest a good method to get
there.



> Which method is really possible?
>
> ***********************************************************
> 1) With the trace () function the position of the color points, on the plane,
> are defined in vector <x, y, z>
> All positions can be connected / assembled by writing an export file.
> *http://www.povray.org/documentation/view/3.6.1/125/
> *pov2Mesh and meshLab
>
> 2) Another method, from hf_map, in gray scale, allows to obtain a hf_object
> exportable in data.
> *HF_Square(Function, UseUVheight, UseUVtexture, Res, Smooth, FileName, MnExt,
> MxExt).
> But with csg cut on hf_object, is hf_square cut data too?
>
> 3) About setting photon and save_file, do the data targeted on a plan object
> allow to be used as an object?


Post a reply to this message

From: Albun
Subject: Re: 'Photon object'
Date: 26 Sep 2018 05:05:00
Message: <web.5bab4a94956f7e775b58ab640@news.povray.org>
Hi all,

Thank you for your information and point of view, I am not Albun Einstein; I
will move forward on the subject that I currently hold.

Albun


Post a reply to this message

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