|
![](/i/fill.gif) |
Hi all,
I'm trying to create an animation where an aircraft flies past a building
with a rainbow in the background. The aircraft is a png file with a
transparent background that I am using as an image map in a box object. It
flies in front of the building without blocking outside of the aircraft's
silhouette. However, when it passes in front of the rainbow, something is
causing a box-shaped area to be blocked on the rainbow. I've tried a number
of things but since I've only been at this a week, there's a lot that I
don't know yet. I'm supplying the code that I'm using below. Thanks in
advance for any help.
Hugh
#include "colors.inc"
#include "stones.inc"
#declare r_violet1 = color rgbf<1.0, 0.5, 1.0, 1.0>;
#declare r_violet2 = color rgbf<1.0, 0.5, 1.0, 0.8>;
#declare r_indigo = color rgbf<0.5, 0.5, 1.0, 0.8>;
#declare r_blue = color rgbf<0.2, 0.2, 1.0, 0.8>;
#declare r_cyan = color rgbf<0.2, 1.0, 1.0, 0.8>;
#declare r_green = color rgbf<0.2, 1.0, 0.2, 0.8>;
#declare r_yellow = color rgbf<1.0, 1.0, 0.2, 0.8>;
#declare r_orange = color rgbf<1.0, 0.5, 0.2, 0.8>;
#declare r_red1 = color rgbf<1.0, 0.2, 0.2, 0.8>;
#declare r_red2 = color rgbf<1.0, 0.2, 0.2, 1.0>;
camera {
location <10, 30, -20>
look_at <10, 40, 0>
// Animation setting
// location <-10, 30, -50>
// look_at <0, 25, 0>
}
light_source { <-20, 120, -20> color White }
background { rgb <.7, .7, 1> }
plane {
y, 0
pigment { color Green }
finish { ambient .3 diffuse .7 }
}
// -------- Sky -------------
sky_sphere {
pigment {
bozo
turbulence 0.65
octaves 6
omega 0.7
lambda 2
color_map {
[0.0 0.1 color rgb <0.85, 0.85, 0.85>
color rgb <0.75, 0.75, 0.75>]
[0.1 0.5 color rgb <0.75, 0.75, 0.75>
color rgbt <1, 1, 1, 1>]
[0.5 1.0 color rgbt <1, 1, 1, 1>
color rgbt <1, 1, 1, 1>]
}
scale <0.2, 0.5, 0.2>
}
rotate -150*x
rotate -150*z
}
// Gently disappearing rainbow in the sky
rainbow {
angle 42.5
width 5
arc_angle 170
falloff_angle 30
distance 1.0e5
direction <-0.2, -0.2, 1>
jitter 0.01
color_map {
[0.000 color r_violet1 transmit 0.25]
[0.100 color r_violet2 transmit 0.25]
[0.214 color r_indigo transmit 0.25]
[0.328 color r_blue transmit 0.3]
[0.442 color r_cyan transmit 0.25]
[0.556 color r_green transmit 0.25]
[0.670 color r_yellow transmit 0.25]
[0.784 color r_orange transmit 0.2]
[0.900 color r_red1 transmit 0.45]
}
}
// Temporary stone box representing the building
box {
<-8, 0, 0>, // Near lower left corner
< 8, 40, 10> // Far upper right corner
texture {
T_Stone25 // Pre-defined from stones.inc
scale 4 // Scale by the same amount in all
// directions
}
rotate y*20 // Equivalent to "rotate <0,20,0>"
translate <0, 0, 20>
}
// Aircraft containment box
box {
<-9, -3, 0>, // Near lower left corner
< 8, 2, 0> // Far upper right corner
pigment {
image_map{
png "B2FrontClean.png"
once
}
scale <16, 4, 0>
translate <-8.35, -2.65, 0>
}
rotate <0, -30, 90>
// This translation is for static viewing
translate <10, 40, 0>
// These are for the animation
// translate <-20, 40, 0>
// translate <10*clock, 0, 0>
}
Post a reply to this message
|
![](/i/fill.gif) |