POV-Ray : Newsgroups : povray.newusers : Rendering reflections. Server Time
26 Dec 2024 00:01:11 EST (-0500)
  Rendering reflections. (Message 1 to 3 of 3)  
From: srnewt
Subject: Rendering reflections.
Date: 15 Sep 2002 12:04:12
Message: <3D84B009.9030401@hotmail.com>
Hello,

I have a very specific question.

I  need to render a scene as follows.

A checker board floor.. some objects on it... and a parabolic reflector 
with convex side facing up... and a camera (perspective) looking down 
straight at the parabolic reflector along it's axis of symmetry.

diagram:

       [Cam1]
         %%
         ^^

        .$$.
___   ,~   \  	  [###]
|1|  /para R\  [2] [ 3 ]
======================== floor(checker board)

paraR = parabolic reflector
cam1 = perspective camera

I need the reflector to be a perfect mirror and see the scene as 
reflected in the mirror alone.

thanks,

-sr


Post a reply to this message

From: Christopher James Huff
Subject: Re: Rendering reflections.
Date: 15 Sep 2002 13:19:03
Message: <chrishuff-2BEB02.13174315092002@netplex.aussie.org>
In article <3D8### [at] hotmailcom>, srnewt <srn### [at] hotmailcom> 
wrote:

> I need the reflector to be a perfect mirror

This part is easy, just use:
finish {ambient 0 diffuse 0 reflection 1}
in the texture.


> and see the scene as reflected in the mirror alone.

This is a bit tougher...what exactly do you want? To see the reflection 
of the scene, but not the actual scene, and to have the mirror fill the 
entire image? Use no_image on the objects, they will reflect but will be 
invisible to the camera. If you use an orthographic camera, adjusting it 
to exactly contain the mirror is pretty easy, just use the right and up 
vectors to adjust the dimensions. If you want a perspective camera, some 
simple trig will give the correct angle.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: srnewt
Subject: Rendering reflections - SOLVED
Date: 19 Sep 2002 11:28:13
Message: <3D89ED9B.7050704@hotmail.com>
I solved the problem described at the root of this message tree.
heres an example of a parabolic reflector with a simple scene...
4 walls and ceiling/floor.

#include "colors.inc"
#include "textures.inc"
#include "shapes.inc"
#include "metals.inc"
#include "glass.inc"
#include "woods.inc"

global_settings {max_trace_level 5}


global_settings { ambient_light rgb<100, 100, 100> }

camera {
    perspective
    //orthographic
    location <0, 2, 0>
    //direction <0, -1, 0>
    angle 65
    focal_point <0,2,0>
    up<0,1,0>
    right<1,0,0>
    look_at <0,0,0>
}
// SR
//angle      : ~67.380 ( direction_length=0.5*
//                       right_length/tan(angle/2) )
//confidence : 0.9 (90%)
//direction  : <0,0,1>
//focal_point: <0,0,0>


// Uncomment the area lights only if you've got lots of time.
#declare Dist=80.0;

sky_sphere {
     pigment {
         gradient y
         color_map {
             [0, 1  color Gray50 color Gray80]
         }
     }
}



#declare Floor_Texture =
     texture {
        pigment {
         // solid pattern for use in texture/pigment/normal(/density)
         // cube checker pattern, alternates color1 and color2
         checker
            color rgb <1, 1, 1>,
            color rgb <0, 0, 0>}
         finish { reflection 0.0 }
         }

#declare RedWall_Texture =
     texture {
        pigment {
         // solid pattern for use in texture/pigment/normal(/density)
         // cube checker pattern, alternates color1 and color2
         checker
            color rgb <255, 0, 0>,
            color rgb <0, 0, 0>}
         finish { reflection 0.0 }
         }

#declare GreenWall_Texture =
     texture {
        pigment {
         // solid pattern for use in texture/pigment/normal(/density)
         // cube checker pattern, alternates color1 and color2
         checker
            color rgb <0, 255, 0>,
            color rgb <0, 0, 0>}
         finish { reflection 0.0 }
         }

#declare BlueWall_Texture =
     texture {
        pigment {
         // solid pattern for use in texture/pigment/normal(/density)
         // cube checker pattern, alternates color1 and color2
         checker
            color rgb <0, 0, 255>,
            color rgb <0, 0, 0>}
         finish { reflection 0.0 }
         }

#declare GBWall_Texture =
     texture {
        pigment {
         // solid pattern for use in texture/pigment/normal(/density)
         // cube checker pattern, alternates color1 and color2
         checker
            color rgb <0, 255, 0>,
            color rgb <0, 0, 255>}
         finish { reflection 0.0 }
         }

#declare Floor =
plane { y,0
     texture { Floor_Texture
         scale 0.5
         //rotate y*75
     }
}

#declare Ceiling =
plane { y, 5
     texture { Floor_Texture
         scale 0.5
         //rotate y*75
     }
}
#declare RWall =
plane { x,5
     texture { RedWall_Texture
         //scale 0.25
         //rotate y*75
     }
}

#declare GWall =
plane { -x, 5
     texture { GreenWall_Texture
         //scale 0.25
         //rotate y*75
     }
}

#declare BWall =
plane { z,5
     texture { BlueWall_Texture
         //scale 0.25
         //rotate y*75
     }
}

#declare GBWall =
plane { -z,5
     texture { GBWall_Texture
         //scale 0.25
         //rotate y*75
     }
}

#declare QuadricMir =
union{
// create a quadratic (2nd order) infinite polynomial surface
         quadric {
                  <1, 0, 1> //  A x2  + B y2  + C z2  +
                  <0, 0, 0> //  D xy   + E xz   + F yz   +
                  <0, 1, 0> //  G x    + H y    + I z    +
                  0-1         //  J
                  texture {
                         finish{reflection {1} ambient 0 diffuse 0}
                         }
                 //rotate z*0
                 //translate z*4
                 //translate y*4
                 }

}


#declare Pig_1 =
pigment {
    gradient z
    color_map {
       [1.00, rgb <0.98, 0.98, 0.87>]
    }
    frequency 4
}



union {
     object { Ceiling }
     object { Floor }
     object { RWall }
     object { GWall }
     object { BWall }
     object { GBWall }
//    object { Sphere }
     object { QuadricMir }
     rotate -y*270
     //translate z*4
     //translate y*-2
     //translate x*1
}

// ======================== END ========================




Christopher James Huff wrote:
> In article <3D8### [at] hotmailcom>, srnewt <srn### [at] hotmailcom> 
> wrote:
> 
> 
>>I need the reflector to be a perfect mirror
> 
> 
> This part is easy, just use:
> finish {ambient 0 diffuse 0 reflection 1}
> in the texture.
> 
> 
> 
>>and see the scene as reflected in the mirror alone.
> 
> 
> This is a bit tougher...what exactly do you want? To see the reflection 
> of the scene, but not the actual scene, and to have the mirror fill the 
> entire image? Use no_image on the objects, they will reflect but will be 
> invisible to the camera. If you use an orthographic camera, adjusting it 
> to exactly contain the mirror is pretty easy, just use the right and up 
> vectors to adjust the dimensions. If you want a perspective camera, some 
> simple trig will give the correct angle.
>


Post a reply to this message

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