POV-Ray : Newsgroups : povray.general : Generating a lookup table from a scene Server Time
27 Dec 2024 14:18:40 EST (-0500)
  Generating a lookup table from a scene (Message 1 to 4 of 4)  
From: Eric Kulcyk
Subject: Generating a lookup table from a scene
Date: 11 Nov 2012 04:25:00
Message: <web.509f6eb95052231f1ede93080@news.povray.org>
Hello,

I have a scene with a ground plane and a cone hanging in mid-air, which is a
perfect mirror.  My camera is pointed up at the mirror.  I would like to
determine, for a given pixel on the ground plane, which pixel (if any) it
corresponds to in the image, forming a lookup table.  Is there any way to do
this?

Thanks,
Eric

camera {
  location <0,1.280,0>
  look_at <0,20,0>
  angle 67
 }

light_source { <100,200,-200> color 1 }


// The floor
plane { <0,1,0>,0 pigment { checker rgb <0,1,0>, rgb <1,1,1> }}

//A mirror cone
cone {
    <0, 1.340, 0>, 0    // Center and radius of one end
    <0, 1.366, 0>, .063    // Center and radius of other end
    pigment { rgb <0,0,0> } // A perfect mirror with no color
  finish { reflection 1 } // It reflects all
  }
  box{<-.52,0,-.4>,<.52,.89,.4>}


Post a reply to this message

From: Le Forgeron
Subject: Re: Generating a lookup table from a scene
Date: 11 Nov 2012 05:05:52
Message: <509f7880$1@news.povray.org>
Le 11/11/2012 10:24, Eric Kulcyk nous fit lire :
> Hello,
> 
> I have a scene with a ground plane and a cone hanging in mid-air, which is a
> perfect mirror.  My camera is pointed up at the mirror.  I would like to
> determine, for a given pixel on the ground plane, which pixel (if any) it
> corresponds to in the image, forming a lookup table.  Is there any way to do
> this?

Greetings,

There is no pixel on the plane.
There is "spot" on the plane, which would provide pixels on the image.

One possible, brute force, solution would be to use a non-repeating
pattern (like spherical, or boxed), that you would move around on the
plane on different renders.

Now, if you only have these 2 objects and that camera (fixed), it might
just be simpler to *just do the maths*. Linear optics is not that hard
with ruled surfaces. Once you get the equation/formula, either code them
for usage, or have them generate your lookup table.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Generating a lookup table from a scene
Date: 11 Nov 2012 17:22:03
Message: <50a0250b$1@news.povray.org>
Eric Kulcyk wrote:

> I have a scene with a ground plane and a cone hanging in mid-air, which is a
> perfect mirror.  My camera is pointed up at the mirror.  I would like to
> determine, for a given pixel on the ground plane, which pixel (if any) it
> corresponds to in the image, forming a lookup table.  Is there any way to do
> this?

if the setup is such that you can restrict yourself to a finite
rectangle in the plane, choose that rectangle and apply two color
gradients to it, such that red goes from 0 to 1 in x direction,
and blue goes from 0 to 1 in z direction (so your corners are
black, red, blue, magenta).

In the rendered image, the red and blue channels will contain the
originating coordinates after appropriate scaling. you need to use
a 16 bit output format to represnt more than 256 coordinate steps.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: Generating a lookup table from a scene
Date: 11 Nov 2012 17:28:19
Message: <50a02683@news.povray.org>
Christian Froeschlin wrote:

> if the setup is such that you can restrict yourself to a finite
> rectangle in the plane

oh and if not, and the reflecting surface is always reasonably smooth,
you can probably repeat warp the gradient pattern and fix the wrapped
coordinates using some floodfill like postprocessing, start with a
reasonable pixel where the information is certain to be from the
"master" rectangle, then move up and down, adding an offset of
256 or 65536 where an obvious wrap occurs. Once the center column
is processed do the same thing horizontally for each line.


Post a reply to this message

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