POV-Ray : Newsgroups : povray.advanced-users : How to trace() and evaluate colour of CSG object? : Re: How to trace() and evaluate colour of CSG object? Server Time
27 Jun 2024 14:27:16 EDT (-0400)
  Re: How to trace() and evaluate colour of CSG object?  
From: Le Forgeron
Date: 2 Nov 2010 05:15:27
Message: <4ccfd6af$1@news.povray.org>
Le 02/11/2010 09:05, none a écrit :
> I want to simulate a 3D laser scanner using a POV-ray scene. To to this,
> I declare the scene as a union and use trace() from the scanner's
> position to generate points on the scene's surfaces.
> 
> Now I also want to evaluate the pigment of each point, but I can't find
> a good way to do it. trace() itself doesn't return any colour information.
> 
> I tried to declare the scene as an array of objects instead of a union,
> and then call trace() and eval_pigment() on each object separately.
> However, then the trace function "sees through" objects since they are
> tested separately. For example, I get points both on a foreground object
> and the background behind it, which should be occluded.
> 
> Is there another way?

What about simply render your scene with the camera at the scanner spot
(and using the right camera type according to your scanner).

But notice that the "colour" that a laser-scanner would get would in
fact be the level of reflected laser-beam in the ray direction.
A laser-beam being a single ray of the spectrum, at best it would be a
grey level (of the colour of the laser). In fact, any real material is
going to defeat the modeling unless you change its natural pigment(s)'s
colour(s) to the value relevant for the laser light's colour. A Red ball
in a blue laser is just black. (unless a small part of blue (the one
which match the wavelength of the laser) is also reflected by the Red of
the ball)

You might want to reduce the quality (+Q) parameter of povray to ignore
lights & shadows (and might be other things) (unless the only light spot
is also at the scanner location, assuming a fixed-point beam moved with
a moving mirror/prism to perform the scanning)



-- 
A good Manager will take you
through the forest, no mater what.
A Leader will take time to climb on a
Tree and say 'This is the wrong forest'.


Post a reply to this message

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