POV-Ray : Newsgroups : povray.general : Texturing the inside of a hollow hemisphere : Texturing the inside of a hollow hemisphere Server Time
29 Jul 2024 20:14:38 EDT (-0400)
  Texturing the inside of a hollow hemisphere  
From: Jonsku
Date: 10 Sep 2010 10:10:01
Message: <web.4c8a3af487a9d0ce5dbcd8250@news.povray.org>
Hello, this is my first post here!

I'm working on a project to be displayed in a full-dome planetarium. I rendered
some test animation that I haven't had the opportunity to see in the planetarium
yet. However I tought it would be nice to create a simulation with our favorite
ray tracer.

What I have done so far is to write a macro to build a dome model like so :

#macro dome(position, rayon, insideTexture, outsideTexture)
    difference{
        difference{
            sphere{position, rayon*1.11 texture{outsideTexture}}
            sphere{position, rayon texture{insideTexture}}

        }
        box{position-<rayon*1.11,0,rayon*1.11>,
position+<rayon*1.11,rayon*1.11,rayon*1.11>}
    }
#end

As you can see it is made of a sphere hollowed out by another smaller one and
then cut in two by a box.

I'm calling this macro from inside an object so I can apply rotation, scalling,
etc.. if needed from there :

object {
    dome(<0,0,0>, 1, insideT, outsideT)
    rotate x*180
}

The outside texture declaration (a simple colour pigment):
#declare outsideT = texture{
    pigment{color Green}
}

This is working well, but now I'm having troubles figuring out how to texture
the inside of the dome. At the moment my texture declaration that I pass to the
macro as "insideTexture" is as follow :

#declare insideT = texture{
    pigment{
        uv_mapping
        image_map{png "data/FisheyeTest.png"}
    }
}

where FisheyeTest.png is a square image (ratio width/height = 1/1) rendered with
POV-Ray using the fisheye camera.

The texture shows up but it is not set up properly. I tried different rotation,
map_type, but no luck so far.

I'm really stuck, could someone please help me?

Best regards,
Jonsku


Post a reply to this message

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