|
|
There might be a way to do this with functions, aoi, slope, or some other
method...
But a quick and dirty cheat like this works:
Take your object(s) and put all of the parts in a merge.
Define a vector location LS for your light source.
Define a second vector location LS2 that is -vnormalize(LS) so that it is
mirrored across the origin.
Define a matrix transform with LS2 as your new y basis vector.
Put your object in the scene with the no_shadow keyword.
Put your object in the scene again, apply the matrix transform, and scale it
really small in the y direction, and apply your semi-transparent texture to it.
#version 3.8;
global_settings {assumed_gamma 1}
camera {
location <0, 5, -9>
look_at 0
right x*image_width/image_height
}
sky_sphere {pigment {rgb 1}}
#declare LS = <5, 15, -10>;
light_source {LS color rgb 1}
#declare E = 0.000001;
#declare LS2 = -vnormalize (LS);
#declare ShadowTrans = transform {
matrix < 1, 0, 0,
LS2.x, LS2.y, LS2.z
0, 0, 1,
0, 0, 0
>
}
#declare Object =
merge {
cylinder {0, y, 0.05}
sphere {y, 0.25}
}
object {Object pigment {rgb z} no_shadow}
object {Object
transform {ShadowTrans}
scale <1, 0.001, 1>
pigment {rgbt <0, 0, 0, 0.5>}
}
Post a reply to this message
|
|