POV-Ray : Newsgroups : povray.general : Texturing the inside of a hollow hemisphere : Re: Texturing the inside of a hollow hemisphere Server Time
29 Jul 2024 20:21:32 EDT (-0400)
  Re: Texturing the inside of a hollow hemisphere  
From: Jonsku
Date: 11 Sep 2010 07:35:01
Message: <web.4c8b683ee8b7098e7600f1860@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:
> Your 'once' example above leads me to think that the image_map may have been
> translated *somewhere else* in space, no longer lining up with the dome. OR that
> the dome was created in some location that doesn't match up with its applied
> image_map. Looking at your macro in a more detailed way, I see a possible
> problem (which may or may not be the cause of your troubles):
>
> #macro dome(position, rayon, insideTexture, outsideTexture)
>     difference{
>         difference{
>             sphere{position, rayon*1.11 texture{outsideTexture}}
>             sphere{position, rayon texture{insideTexture}}
> ....etc.
>
> Depending on what values you use for *position* and *rayon*, you could be
> creating a dome that, right from the start, doesn't line up with your image_map
> texture.  For example, let's say *position* is chosen to be <3,5,8> and *rayon*
> is 2.3--in such a case, /neither/ of the two textures is going to line up with
> the dome. That's because the dome has already been translated (and scaled),
> whereas the textures are being applied at their 'default'
> positions/projections/scalings. (Textures don't automatically follow an object
> that's been *created* somewhere other than at the origin.) So you would likewise
> need to translate and scale the textures as well, if they are to 'follow' the
> dome.

This is a good point, but as a matter of fact I was calling the macro like this
dome(<0,0,0>, 1, insideT, outsideT)

So the dome would have its center at the origin and an inner hemisphere of
radius 1.

I anyway tried your suggestion and I get the same results as before. But thanks
for raising this issue since it could have lead to other problems. I'll use the
modified macro now.

I still think that the culprit here is the texture projection onto the
hemisphere.

It is very possible that I have a too simple understanding on how fisheye
projection works, thus it might be useful if I list some of my assumptions:

1)The planetarium dome is a full-dome, which I suppose is equivalent to a
perfect hemisphere.

2)The dome projection system takes square frames as input


the inner surface of the dome.
NOTE:
At the planetarium they have a small dome in their production studio which use

the shows are presented - uses a more complicated system of 2 projectors with 3
channels each but I don't think this is relevant to the discussion.

4)To create images that won't be deformed by the projection system, one should
either shoot pictures/video/film with a camera equipped with a fisheye lens (it
is also possible to 'stitch' images together using software to get the same
effect)
OR
If the images are computer generated, use a virtual camera that mimick the
fisheye lens.
In this particular case, I'm using the 2nd option. The polar grid in the
previous example has no fisheye projection applied to it. Its purpose is to make
the problem more obvious.
In any case, here is an image file rendered with POV-Ray
fisheye camera: http://imgur.com/ubuxW.png

5)Simulating projection in the planetarium with POV-Ray, or another 3D renderer
or
ray tracer can be done by applying a texture to the inside of an hemisphere
which will cause the source image to be distorted like it was projected through
a fisheye lens.

Maybe I should try this with Blender and see how it goes. However I like the
control that comes with writing POV-Ray scenes so it would be great if I can get
it working there also.

Thanks again for your time. I'll keep you posted on my findings.

Regards,

Jonsku


Post a reply to this message

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