POV-Ray : Newsgroups : povray.newusers : 'Photon object' : Re: 'Photon object' Server Time
11 Aug 2022 09:52:11 EDT (-0400)
  Re: 'Photon object'  
From: Alain
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

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