|
|
/*
File: candleflame1.inc by Nikodemus Siivola, 2001
Global names: Candleflame1 ( a flame - visible without light, doesn't
illumintate )
Candleflame1_L ( a pointlight. looks_like Candleflame1 )
Candleflame1_AL ( an arealight. looks_like Candleflame1 )
Origin: Bottom of the flame
Height: 4.8cm
Scale: cm = unit
*/
/*
file://For testing:
global_settings
{
assumed_gamma 1.0
max_trace_level 20
}
*/
// Materials
#local FlameRoot = material
texture {
pigment { color rgbf <1.0, 1.0, 1.0, 1.0> }
}
interior {
media {
absorption rgb <0.9, 0.9, 0.0>
emission rgb <0, 0, 0.7>
}
}
}
#local FlameBody = material {
texture {
pigment { color rgbf <1.0, 1.0, 1.0, 1.0> }
}
interior {
media {
absorption rgb <0.25, 0.65, 0.9>
emission rgb <0.65, 0.25, 0>
}
}
}
#local FlameHead = material {
texture {
pigment { color rgbf <1.0, 1.0, 1.0, 1.0> }
}
interior {
media {
absorption rgb <0.1, 0.2, 0.9>
emission rgb <0.8, 0.7, 0.0>
}
}
}
// Middle Region - "Body"
#local BodyOuter = sphere
<0,0,0>,
1.7
scale <0.33, 1, 0.33>
translate 2.0*y
no_shadow
hollow
}
#local BodyInner = object { BodyOuter
scale <0.6, 1.0, 0.6>
translate -0.2*y
no_shadow
hollow
}
#local Body = difference {
object { BodyOuter }
object { BodyInner }
material { FlameBody }
no_shadow
hollow
}
// Lower Region - "Root"
#local RootOuter = sphere
<0,0,0>,
1.6
scale <0.31, 1, 0.31>
translate 1.6*y
no_shadow
hollow
}
#local RootInner = object { RootOuter
scale <0.7, 1.0, 0.7>
no_shadow
hollow
}
#local RootTopLimiter = object { BodyOuter
scale <1.001, 1.0, 1.001>
no_shadow
hollow
}
#local Root = difference {
object { RootOuter }
object { RootTopLimiter }
object { RootInner }
material { FlameRoot }
no_shadow
hollow
}
// Upper Region - "Head"
#local HeadOuter = sphere {
<0,0,0>,
2.3
scale <0.26, 1, 0.26>
translate 2.5*y
no_shadow
hollow
}
#local HeadInnerLow = object { RootOuter
scale <1.0001, 1, 1.0001>
no_shadow
hollow
}
#local HeadInnerHigh = object { BodyOuter
scale <1.0001, 1.00001, 1.0001>
no_shadow
hollow
}
#local Head = difference {
object { HeadOuter }
object { HeadInnerLow }
object { HeadInnerHigh }
material { FlameHead }
no_shadow
hollow
}
// The Flames
#declare Candleflame1 = union {
object { Root }
object { Body }
object { Head }
}
#declare Candleflame1_AL = light_source {
<0, 2.4, 0>
color rgb <0.9, 0.9, 0.8>
area_light x, y*2.4, 1, 12
adaptive 3
jitter
fade_power 2
fade_distance 80
looks_like { Candleflame1 translate -2.4*y }
}
#declare Candleflame1_L = light_source {
<0, 2.4, 0>
color rgb <0.9, 0.9, 0.8>
fade_power 2
fade_distance 80
looks_like { Candleflame1 translate -2.4*y }
}
/*
file://For testing
object { Candleflame1_AL }
plane
{
y, 0
texture
{
pigment { checker color rgb 1 color rgb 0 }
finish { ambient 0.1 diffuse 0.6 }
}
}
camera {
location <0,7.5,-20>
look_at <0,2,0>
angle 30
}
*/
Post a reply to this message
|
|