POV-Ray : Newsgroups : povray.newusers : trace pixels to object they represent in scenes involving reflections : Re: trace pixels to object they represent in scenes involving reflections Server Time
11 Oct 2024 17:07:14 EDT (-0400)
  Re: trace pixels to object they represent in scenes involving reflections  
From: Alain Martel
Date: 27 Jul 2024 14:02:07
Message: <66a5361f$1@news.povray.org>
Le 2024-07-26 à 15:20, mirrorguy a écrit :
> hello all. I have an application where I would like to render scenes involving
> multiple mirrors and I would like to be able to trace which object is
> represented by a given pixel or region of pixels in a rendered image and if
> possible get some kind of backtrace of mirrored surfaces the raytracer
> encountered while rendering the pixel(s).
> 
> Is there a way to do this and if so where would I look to find out how? Thanks.
> 
> 
For the back trace, you should use photon mapping.
Place a light at the camera location.
Make the mirrors that you can see directly as target.
Making mirrors that you can't see directly as target only make the 
photons mapping take longer as photons will get shot at them but get 
intercepted on the way.
Now, move the camera up to get a plunging view.
Render.

To make an object a target, add this in it's description :
photons{target 1} //This allow photons to get shot at the object

To turn photon mapping, add this in the global_settings block :
(minimal)
photons{spacing 0.1}// set to 10 photons per linear unit
// 100 per square unit
// feel free to increase if needed.

You may use count instead of spacing, but, with multiple targets, the 
required value often get frighteningly large.

By default, ALL light will shoot photons at all target objects.
This can be turned off with this in the light's definition :
photons{reflection off refraction off}// default is both ON

You may want your light and reflections to go farther than the default 
of 5 surfaces. For that, add this to the global_settings :
max_trace_level 10 // allow a ray to interact with 10 surfaces
// may get up to 255

You may want to give the ground a finish with «brilliance 0» so that the 
light from a light set low to the ground will fully illuminate is from 
far away.

The illumination of the ground will show the path from the camera 
through the mirrors and the final destination.
The object, or parts of objects, illuminated will show you what the 
camera actually see.


Post a reply to this message

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