|
|
Hello, I have this scene:
#include "colors.inc"
camera { spherical location .5 up <0,1,0> right<1,0,0> look_at <0,-1,0>}
#declare Sculptcolors = texture {
pigment {
average
pigment_map { //[1 gradient x color_map {[0 rgb 0][1
rgb <1,0,0>]}]
[1 gradient y color_map {[0 rgb
<0,0,0>][1 rgb <0,0,1>]}]
//[1 gradient z color_map {[0 rgb 0][1
rgb <0,1,0>]}]
}
}
finish { ambient 1 diffuse 0 }
}
sphere { .5 .5 no_image texture{Sculptcolors}}
sphere { .5, 1.001 inverse finish { ambient 0 diffuse 0 reflection 1 }}
basicalle it creates a sphere with a black to blue gradient on the y axis. This
sphere is hidden but it's image is reflected onto another one. Then I use a
spherical camera in the center, looking down and render it at a res of 128x128
pixels. The rendered image should be a small square looking black in the center
and blue near the edges... but that's not what happens. I think I'm not setting
my camera correctly. Anybody knows where is my mystake? Thanks!
Post a reply to this message
|
|
|
|
Am 17.09.2010 19:57, schrieb MadKairon:
> Hello, I have this scene:
>
> #include "colors.inc"
>
> camera { spherical location .5 up<0,1,0> right<1,0,0> look_at<0,-1,0>}
>
> #declare Sculptcolors = texture {
> pigment {
> average
> pigment_map { //[1 gradient x color_map {[0 rgb 0][1
> rgb<1,0,0>]}]
> [1 gradient y color_map {[0 rgb
> <0,0,0>][1 rgb<0,0,1>]}]
> //[1 gradient z color_map {[0 rgb 0][1
> rgb<0,1,0>]}]
> }
> }
> finish { ambient 1 diffuse 0 }
> }
>
> sphere { .5 .5 no_image texture{Sculptcolors}}
>
> sphere { .5, 1.001 inverse finish { ambient 0 diffuse 0 reflection 1 }}
>
> basicalle it creates a sphere with a black to blue gradient on the y axis. This
> sphere is hidden but it's image is reflected onto another one. Then I use a
> spherical camera in the center, looking down and render it at a res of 128x128
> pixels. The rendered image should be a small square looking black in the center
> and blue near the edges... but that's not what happens. I think I'm not setting
> my camera correctly. Anybody knows where is my mystake? Thanks!
There are various things you should be aware of:
(1) The camera, as defined in your scene, does /not/ look directly down:
You place it at location .5 = <.5,.5,.5>, looking at <0,-1,0>, so it is
tilted slightly slightly sideways and towards the back (the direction
vector is <-.5,-1.5,-.5>). That's why the darkest spot isn't at the center.
(2) The "spherical" camera is typically rendered at a 2:1 aspect ratio
(e.g. 256x128 pixels), as it maps the scene to a "latitude/logitude"
grid, ranging from -180 to +180 degrees and -90 to +90 degrees,
respectively. You may of course have your reasons for using this camera
type at a 1:1 aspect ratio, but it might just as well be an indicator
that you haven't fully understood how the camera type works.
(3) As it is now, the scene could easily do without the reflective
sphere: You could just as well make the main sphere visible and inverse
itself (the latter is actually not even needed: With objects that have
no IOR nor media, and ar neither CSG members nor unions, the "inverse"
keyword doesn't make any difference whatsoever (unless you use an
interior_texture, that is).
Post a reply to this message
|
|