|
![](/i/fill.gif) |
Here's my idea on it again. Squeezed in a place for the meteor/asteroid trail. And I
noticed a small mistake before anyhow.
/* example of creating shockwave in air (faked refractive type thing only).
Just a simple way, nothing much mathematical here ;-) */
global_settings {
number_of_waves 0
}
#declare Amplitude=0.1; // amount of shockwave effect
#declare Frequency=6; // number of peaks and troughs
#declare xSize=0.5; // lengthwise curvature (or size)
#declare zSize=0.25; // crosswise curvature (more curve when less than xSize)
#declare xPos=-2; // move ripples off-center
#declare Width=0.333; // pie-slice region of air displacement (<0.475 and >=0)
#declare EntryAngle=-30; // angle of attack
#declare Placement=<0.25,0.025,0>; // offset from center, small values of x and y (no
z)
#declare N0=normal {ripples 0} // dummy normal
#declare N1=normal {ripples Amplitude frequency Frequency scale <xSize,1,zSize>
translate xPos*x}
camera {
location -z
look_at +z
normal {radial normal_map {
[Width N0][0.45 N1][0.495 N0][0.505 N0][0.55 N1][1-Width N0]
} ramp_wave rotate 90*x
rotate EntryAngle*z translate Placement}
}
// test for center of normal in camera
// sphere {<0.25,-0.075,0>,.05 pigment {color green 1} finish {ambient 1}}
light_source {<-9,90,-900>, <.5,.4,.3>}
// sky
sphere {0,1
pigment {gradient y color_map {
[0 color rgb <.9,.6,.3>]
[.1 color rgb <.7,.3,.4>]
[.3 color rgb <.3,.6,.8>]
[.6 color rgb <.2,.4,.6>]
}}
finish {ambient .5}
scale 1000
}
// ground
plane {y,-5
pigment {spotted color_map {
[0 color rgb <.5,.9,.6>]
[1 color rgb <.6,.7,.3>]
} scale 5}
finish {ambient .25 diffuse .7 phong .2 phong_size 20}
}
// meteor (test object: note that this really messes up if shockwave is intense)
union {
light_source {.1*x, <.99,.67,.33>*1.5}
sphere {0,.4 scale <15,10,10>}
cone {-x,1.1,0,.1 scale <111,10,10>}
pigment {granite color_map {
[0 color rgb <1.2,.9,.5>*1.5]
[1 color rgb <.9,.4,.1>]
} scale 15}
finish {ambient .85 metallic brilliance 3}
rotate EntryAngle*z
rotate 5*z translate <25,2.5,100> // only a guess here
no_shadow
}
Post a reply to this message
|
![](/i/fill.gif) |