POV-Ray : Newsgroups : povray.general : simulating lens distortion Server Time
19 Nov 2024 15:51:34 EST (-0500)
  simulating lens distortion (Message 1 to 5 of 5)  
From: Bill Brehm
Subject: simulating lens distortion
Date: 29 Jan 2002 00:04:40
Message: <3c562d68@news.povray.org>
Hi,

I hope I'm not doing something wrong with this post. I tried responding to a
branch of messages that I started, but it was after several days. It didn't
get any answers and I'm afraid it might have been lost with older messages
off the bottom of everyone's screen.

I had asked about a way to simulate lens distortion, particularly pincushion
and barrel distortions that are common in inexpensive camera lenses.

Someone mentioned using normal_map, slope_map, etc. Someone else mentioned a
link  http://www.irtc.org/ftp/pub/stills/1999-12-31/dmmonet.jpg that
demonstrated this. (Sorry, I don't have a record of whom to give credit.)
The Monet picture uses color_maps, but not normal_maps or slope_maps. I
rendered the image both with and without the color_maps. I can certainly see
a difference, but obviously only in the colors and not in the positions of
the objects.

I've played with normal_maps and slope_maps that I've found in other
examples, but can't seem to get them to make any change in the image.

Does anyone know of any examples that I can download to experiment with
images that are distorted by normal_maps and slope_maps?

Can anyone provide a simple example, say a cube that is distorted with
pincushion or barrel distortion?

To reiterate my purpose from my earlier post, I need a scene of known
objects that are distorted. That will be fed into some software to determine
the characteristics of the distortion. That information will later be
applied to images that are distorted the same amount, to determine the true
location and size of unknown objects.

I appreciate any help.

Thanks,

Bill


Post a reply to this message

From: Tom Melly
Subject: Re: simulating lens distortion
Date: 29 Jan 2002 04:49:07
Message: <3c567013@news.povray.org>
"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3c562d68@news.povray.org...
> Hi,

Hi!

> link  http://www.irtc.org/ftp/pub/stills/1999-12-31/dmmonet.jpg that

I posted that one - iirc it was to demonstrate the effect of applying a normal
to the camera statement.


Post a reply to this message

From: Bill Brehm
Subject: Re: simulating lens distortion
Date: 29 Jan 2002 08:43:33
Message: <3c56a705@news.povray.org>
I see. I was searching for "_map" instead of "normal", since I thought I was
looking for normal_map, slope_map, etc.

Now I see a big difference between having the normal enabled and disabled in
your example.

I've looked through all the patterns available in POVRay. None fit my needs.

Can I create my own patterns or are patterns something that are hardcoded
into POVRay?

I'd like to create a pattern where the further a point is from the center of
the pattern (input side of function), the more its distance from the center
is amplified (output side of function). For example, if the distance from
the center of the pattern was the square of the distance of its original
distance from the center.

Thanks,

Bill


"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3c567013@news.povray.org...
> "Bill Brehm" <bbr### [at] netzeronet> wrote in message
> news:3c562d68@news.povray.org...
> > Hi,
>
> Hi!
>
> > link  http://www.irtc.org/ftp/pub/stills/1999-12-31/dmmonet.jpg that
>
> I posted that one - iirc it was to demonstrate the effect of applying a
normal
> to the camera statement.
>
>
>


Post a reply to this message

From: bob h
Subject: Re: simulating lens distortion
Date: 29 Jan 2002 09:28:01
Message: <3c56b171@news.povray.org>
"Bill Brehm" <bbr### [at] netzeronet> wrote in message
news:3c56a705@news.povray.org...
> I see. I was searching for "_map" instead of "normal", since I thought I
was
> looking for normal_map, slope_map, etc.
>
> Can I create my own patterns or are patterns something that are hardcoded
> into POVRay?
>
> I'd like to create a pattern where the further a point is from the center
of
> the pattern (input side of function), the more its distance from the
center
> is amplified (output side of function). For example, if the distance from
> the center of the pattern was the square of the distance of its original
> distance from the center.

You have to build patterns from what's already there; or using version 3.5
(beta) make functions into patterns, but I'm not able to help with that
really.

Far as camera normal goes you can still try something like:

camera
{
  location <0,0,-5>
  look_at <0,0,0>
normal
{
    spherical
    slope_map
    {
        [0 <1,0>] // outermost
        [.5 <.25,.25>] // 'tween (idea is: position, amount)
        [1 <0,1>] // innermost
    }
    frequency -1 // invert
    bump_size 1
    scale 1
}
}


plane {z,0 pigment {checker color rgb 0 color rgb 1}}

light_source {-10*z, 1}


I can't tell you how to go about doing the kind of control you're wanting
except to say the indices of the slope_map can be #while looped and values
applied within that.  Maybe that helps you some anyway.  Someone else would
be better at figuring that out, not me though... and hopefully I described
the example right too.  ;-)

bob h


Post a reply to this message

From: Grey Knight
Subject: Re: simulating lens distortion
Date: 29 Jan 2002 09:29:38
Message: <3C56B1CB.A6480357@namtar.qub.ac.uk>
An isofunction can do this, but I don't know how to implement one in a
slope_map. Too tired...

-- 
signature{
  "Grey Knight" contact{ email "gre### [at] yahoocom" }
  site_of_week{ url "http://digilander.iol.it/jrgpov" }
}


Post a reply to this message

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