|
|
On Mon, 19 Jan 2009 15:45:37 EST, "brunosan" <bru### [at] gmailcom> wrote:
>The idea is to create a virtual projector. I want to use an image and see how it
>projects over diferent shapes.
Why not create a projector?
You can use a box with an image map texture as the film and a spotlight (or a
point light) as the source. It will project onto your object.
A simple example below. You will hve to use your own image :)
#version 3.6;
background { color rgb <0.000,0.000,0.000> }
#declare SMcA_White0 =
texture {
pigment {
color rgbft <1.000,1.000,1.000,0.000,0.000>
}
finish {
ambient rgb <0.100,0.100,0.100>
brilliance 1.000
diffuse 0.600
}
}
#declare Image_Texture =
texture {
pigment {
image_map{
jpeg "C:\Users\Stephen\Pictures\Forth Bridge\428164.jpg"
interpolate 2
map_type 0
once
filter all 1
}
scale <2.000,2.000,2.000>
translate <-1.000,-1.000,-1.000>
}
}
#declare Camera0 =
camera {
perspective
location <24.016,17.541,-43.344>
up y
right 1.333*x
angle 33.000
sky <-0.096,0.980,0.174>
look_at < 0.000, 7.500, 0.000 >
} // end Camera0
light_source { // Light_Source1
< 0.000000, 0.000000, 0.000000 >, color rgb <1.000,1.000,1.000>*5.000
spotlight
point_at < 0.000000, 0.000000, 29.623440 >
radius 9.849
falloff 16.894
tightness 0
fade_power 0.000
fade_distance 100.000
media_attenuation off
media_interaction on
translate <-0.010000,9.656610,-26.457000>
} // end Light_Source1
plane { // Plane1
y , 0
texture{ SMcA_White0 }
} // end Plane1
box { // Screen
< -0.500000, -0.500000, -0.500000 >, < 0.500000, 0.500000, 0.500000 >
texture{ SMcA_White0 }
scale <6.000000,6.000000,6.000000>
translate <0.000000,9.244562,0.000000>
} // end Screen
box { // Box1
< -0.500000, -0.500000, -0.500000 >, < 0.500000, 0.500000, 0.500000 >
texture{ Image_Texture }
scale <5.000000,5.000000,0.100000>
translate <0.000000,9.294437,-16.385000>
} // end Box1
camera{ Camera0 }
--
Regards
Stephen
Post a reply to this message
|
|
|
|
"clipka" <nomail@nomail> wrote in message
news:web.4974f4164569eb9e9b482c50@news.povray.org...
> "brunosan" <bru### [at] gmailcom> wrote:
>> The idea is to create a virtual projector. I want to use an image and see
>> how it
>> projects over diferent shapes.
>
> projected_through?
>
I didn't try 'projected_through', but going by the documentation it looks to
me as though it just defines the shape of the light.
The way I've simulated a projector in the past is to use filter all 1 on a
plane that uses an image_map as a pigment. For example:
camera {location <-0.74, 0.65, -3> look_at 0}
box {0,1 pigment {rgb 1}}
cylinder {0,y,0.4 pigment {rgb 1} translate -x}
light_source {<0,0,-400> color rgb 1}
plane {z,-300
pigment {
image_map {jpeg "your_image.jpg"
filter all 1 once}
translate <-0.5,-0.5,0>
}
}
Regards,
Chris B.
Post a reply to this message
|
|