POV-Ray : Newsgroups : povray.general : Project an image Server Time
2 Nov 2024 23:08:42 EDT (-0400)
  Project an image (Message 1 to 6 of 6)  
From: brunosan
Subject: Project an image
Date: 19 Jan 2009 15:50:00
Message: <web.4974e671a3324222445d8f230@news.povray.org>
Dear Group,

My question is quite simple.
I would like to use an image as a light source.

The idea is to create a virtual projector. I want to use an image and see how it
projects over diferent shapes.

Any idea?

Thank you very much.


Post a reply to this message

From: clipka
Subject: Re: Project an image
Date: 19 Jan 2009 16:45:00
Message: <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?


Post a reply to this message

From: Stephen
Subject: Re: Project an image
Date: 19 Jan 2009 17:00:57
Message: <rrt9n4tqfafju7kaenck9oe706cb4q4c0s@4ax.com>
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

From: Chris B
Subject: Re: Project an image
Date: 19 Jan 2009 17:07:46
Message: <4974f9b2$1@news.povray.org>
"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

From: Nicolas Alvarez
Subject: Re: Project an image
Date: 19 Jan 2009 21:40:55
Message: <497539b6@news.povray.org>
brunosan wrote:
> The idea is to create a virtual projector. I want to use an image and see
> how it projects over diferent shapes.

Rune's "illusion.inc".

Search for it yourself; I don't do this kind of favors at 1 am <.<

*goes to sleep*


Post a reply to this message

From: brunosan
Subject: Re: Project an image
Date: 20 Jan 2009 20:10:00
Message: <web.497675aa4569eb9e445d8f230@news.povray.org>
"brunosan" <bru### [at] gmailcom> wrote:
> Dear Group,
>
> My question is quite simple.
> I would like to use an image as a light source.
>
> The idea is to create a virtual projector. I want to use an image and see how it
> projects over diferent shapes.
>
> Any idea?
>
> Thank you very much.

Thank you for all the answers!!!!


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.