Hi, I'm just wondering if anyone has tried or has any information about light projection using a texture image.
What I'd like to do is project the filtered light of the stained glass onto the floor.
I think it also works like shadows, except no shadows are calculated, instead the texture image is spread around as seen by the stained glass window, then each pixel is written onto the destination point.
Just so you know, I used this Flickr image as my reference.
http://flickr.com/photos/kros/2621117267/sizes/m/
Texture images as light
yup, looks like that's the code i should looking into. tho i have this feeling it has something to do with deferred shading as well. i'm still not sure about the algorithm, i mean how it will get coded.
while i was looking for more clues, i decided to play around with textures more and did a fake version of it.
thanks for the input, that really helped me a lot to where my next steps will be going.
while i was looking for more clues, i decided to play around with textures more and did a fake version of it.
thanks for the input, that really helped me a lot to where my next steps will be going.
Yeah just wait till projective texturing is implemented (Almost done.). Heres something I did for an office project:
(Old screenshot does not reflect current state of the project.)
(Old screenshot does not reflect current state of the project.)
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi, dlangdev
On your scene, to be more accurate, flip your texture horizontaly (check the green part on the ground, it look flipped) (Checked again, not really sure now).
Since your trying to mimic that type of glass, I think the texture projected on the ground would look more blurry, it look too sharp on the ground.
What kind of light have you used? I don't see the window framing shadowing on the ground...
That scene was rendered in IRRlicht or in a 3D package?
If that can be baked as it look now, it should make a pretty nice room for a level!
On your scene, to be more accurate, flip your texture horizontaly (check the green part on the ground, it look flipped) (Checked again, not really sure now).
Since your trying to mimic that type of glass, I think the texture projected on the ground would look more blurry, it look too sharp on the ground.
What kind of light have you used? I don't see the window framing shadowing on the ground...
That scene was rendered in IRRlicht or in a 3D package?
If that can be baked as it look now, it should make a pretty nice room for a level!
i'll explain later, i'm stuck right now trying to even understand the projection. the stained glass is actually a quad covering the window, i simply modulate the rgb to simulate emmision. that quad needs to go away so that the projection can pass through the window.
the problem is i'm still studying the projection from the light source passing through the window, hitting the floor. it's like a shadow except it's not a black or gray ramp color, the shadow is a texture color map that's blended again with an alpha ramp or gradient.
with this, i think i'm getting a good idea how material managers are supposed to be written. ah, but that will coded much later, though.
well, the reason the shape of the window not projected is simply because the light is not projected outside the window. it's coming from the inside.
in short, the scene is a quick-n-dirty hack. i need to write the math behind that scene which i find complicated. but i've convinced a lot of people already, they like what they saw, though.
btw, the image was baked, it's a dirty hack.
the problem is i'm still studying the projection from the light source passing through the window, hitting the floor. it's like a shadow except it's not a black or gray ramp color, the shadow is a texture color map that's blended again with an alpha ramp or gradient.
with this, i think i'm getting a good idea how material managers are supposed to be written. ah, but that will coded much later, though.
well, the reason the shape of the window not projected is simply because the light is not projected outside the window. it's coming from the inside.
in short, the scene is a quick-n-dirty hack. i need to write the math behind that scene which i find complicated. but i've convinced a lot of people already, they like what they saw, though.
btw, the image was baked, it's a dirty hack.