POV-Ray : Newsgroups : povray.advanced-users : trace + color? Server Time
5 Jul 2024 16:08:48 EDT (-0400)
  trace + color? (Message 1 to 5 of 5)  
From: Simon
Subject: trace + color?
Date: 28 Jun 2007 11:05:57
Message: <4683ce55$1@news.povray.org>
Hi,
   just a quick question... i haven't povrayed in a Very long while!

I'm still thinking about my project and I would need to use povray to extract 
shape information from an object (easy with trace, get the position of a surface 
and its normal), but I'm wondering about the color at that point.

Right now, i was thinking on having an orthogonal camera make a zoomed-in render 
of that point, while the camera would be sitting along the normal axis.

But, is there a better way to get the color, to finally right it to stdout like 
i do with trace?

Thanks,
   Simon


Post a reply to this message

From: Mike Williams
Subject: Re: trace + color?
Date: 28 Jun 2007 11:35:38
Message: <TaEHZEAuT9gGFwRE@econym.demon.co.uk>
Wasn't it Simon who wrote:
>Hi,
>   just a quick question... i haven't povrayed in a Very long while!
>
>I'm still thinking about my project and I would need to use povray to extract 
>shape information from an object (easy with trace, get the position of a surface 
>and its normal), but I'm wondering about the color at that point.
>
>Right now, i was thinking on having an orthogonal camera make a zoomed-in render 
>of that point, while the camera would be sitting along the normal axis.
>
>But, is there a better way to get the color, to finally right it to stdout like 
>i do with trace?

Once you've got the point you can get the pigment with eval_pigment
(except for things like slope pattern pigments). I don't think that
there's anything that will return you the final pixel colour after
things like lighting, shadows, reflection, refraction and radiosity have
been applied.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Simon
Subject: Re: trace + color?
Date: 28 Jun 2007 12:13:53
Message: <4683de41$1@news.povray.org>
> Once you've got the point you can get the pigment with eval_pigment
> (except for things like slope pattern pigments). I don't think that
> there's anything that will return you the final pixel colour after
> things like lighting, shadows, reflection, refraction and radiosity have
> been applied.

Excellent, that is exactly what i need... to get the raw color of the point, 
independent from scene.

Many thanks for quick reply!
   Simon


Post a reply to this message

From: Charles C
Subject: Re: trace + color?
Date: 28 Jun 2007 13:40:01
Message: <web.4683f14a7de6b226e94cc5130@news.povray.org>
Mike Williams <nos### [at] econymdemoncouk> wrote:
> Wasn't it Simon who wrote:
> >Hi,
> >   just a quick question... i haven't povrayed in a Very long while!
> >
> >I'm still thinking about my project and I would need to use povray to extract
> >shape information from an object (easy with trace, get the position of a surface
> >and its normal), but I'm wondering about the color at that point.
> >
> >Right now, i was thinking on having an orthogonal camera make a zoomed-in render
> >of that point, while the camera would be sitting along the normal axis.
> >
> >But, is there a better way to get the color, to finally right it to stdout like
> >i do with trace?
>
> Once you've got the point you can get the pigment with eval_pigment
> (except for things like slope pattern pigments). I don't think that
> there's anything that will return you the final pixel colour after
> things like lighting, shadows, reflection, refraction and radiosity have
> been applied.
>
> --
> Mike Williams
> Gentleman of Leisure

Hmm, this has me thinking, based on something I'm working on... I wonder
what the best way to do it would be if you are sampling arbitrary points in
a union of many objects with various pigments where knowing the pigment used
and the orientation of each object within the union might not be straight
forward....  I can think of a couple of ways but they aren't very
efficient.  E.g. creating slices like LikeNoOther is doing, using an ortho
camera and then sampling the resulting image.
Charles


Post a reply to this message

From: Simon
Subject: Re: trace + color?
Date: 2 Jul 2007 16:46:23
Message: <4689641f$1@news.povray.org>
> Hmm, this has me thinking, based on something I'm working on... I wonder
> what the best way to do it would be if you are sampling arbitrary points in
> a union of many objects with various pigments where knowing the pigment used
> and the orientation of each object within the union might not be straight
> forward....  I can think of a couple of ways but they aren't very
> efficient.  E.g. creating slices like LikeNoOther is doing, using an ortho
> camera and then sampling the resulting image.
> Charles

Hi Charles,
   I'll tell you a bit about my own project...

There is an object which is very complex, say, a space ship!  I will place the 
ship inside a box {-1,1}, by scaling it and moving it in the cube.  Optionnally 
I may have to scale it further to have the center of the ship lie on the origin 
<0,0,0> to help the next stage of my project.

Then I will trace from the 3 axis at a specified interval. Probably missing 
important data.  And then, I will compare two readings that are side-by-side, 
and check the difference.  If the difference is higher than a specified 
threshold, then I have to "sub-divide" and resample that region at a smaller 
interval.  And this infinitly until the differences are under the threshold 
values or until subdivision has reached a certain level (ie, a checker would be 
sub-divided infinitly to have a sharp black to white line, instead of a small 
gradient between the two).

The specified values will definately depend on the complexity of the object 
(like if the space ship has tiny antenas...).

This results in a massive amount of information which is then compiled and 
optimized into another format for use in later stages of the project.  The 
process is pretty much brute, but it should do what I need and I prefer to 
concentrate my efforts on the rest of the project.

Oh, one more thing, i only scan one object at a time, ie: The car body, a tire, 
every moving parts separately, to assemble them in the later stages of my project.

HTH,
   Simon


Post a reply to this message

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