c--b@Posted: Tue Oct 04, 2005 12:19 am    Post subject: Projected light shadows (Minus the light).: In my search for a way to add foliage shadows overtop of another light (Such as the sun), I've created a projected light texture that makes use of the alpha maps included in the texture used for projection. I'm not really sure if this is anything new or groundbreaking, but I'm certainly exited to explore the possible uses of it.

To acheive this I used this material file:

Code:
lights/bambooshadow2
{
blendLight
   {
      forceHighQuality
      blend blend
      map lights/bambooshadow2.tga
      alphazeroclamp
         }
}


If you were to look at the texture located in my "lights" dir, you would see a completely black texture, the alpha map applied to it is what determines what shadow is projected.

The outcome is this:

In this scene there are two lights, one is the sky light eluminating the map, and the other is the one projecting the shadow.

I'd be interested in any possible usage ideas for this that any of you might have, it seems there are very few. Razz
_________________
1+1= 11



c--b@Posted: Tue Oct 04, 2005 2:11 am    Post subject: : I just did some preformance testing; once with that shadow projecting light duplicated 19 times ( A total of 20 lights in that small area), and another time with a total of 40 lights in there (The texture thats projected is 1024X1024).

At 20 it still ran at the origional 60 FPS, at 40 it slowed down to around a constant 40 FPS. It seems to preform pretty well. Shocked
_________________
1+1= 11



rich_is_bored@Posted: Tue Oct 04, 2005 4:49 am    Post subject: : Hmmm. This is interesting.

Good job. I'll keep a mental note of this for sure.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



kat@Posted: Tue Oct 04, 2005 4:57 am    Post subject: Re: Projected light shadows (Minus the light).:
c--b wrote:
If you were to look at the texture located in my "lights" dir, you would see a completely black texture, the alpha map applied to it is what determines what shadow is projected...
Oh well that makes a little bit more sense as I was wondering what you were doing to 'block' the emition of 'light' seeing as you weren't using a normal alphamask. It's not really a 'black light' as such in that case but still pretty interesting nonetheless.
_________________
Co-Admin - Modelling and modding tutorials and tips



c--b@Posted: Tue Oct 04, 2005 4:57 am    Post subject: : Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.

This is so perfect for foliage Mr. Green

Edit; Heh, sorry for that bad explaination earlier Kat Razz

Edit2: Looks like its nothing new.
_________________
1+1= 11



OrbWeaver@Posted: Tue Oct 04, 2005 8:51 am    Post subject: :
c--b wrote:
Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.


Are you splitting up your brushes? I get a framerate of about 20 fps if I have just 9 lights hitting the same large surface, but then the Radeon 9800 XT is not exactly a top-of-the-range graphics card (although it's perfectly decent even for todays games).



c--b@Posted: Tue Oct 04, 2005 6:32 pm    Post subject: :
OrbWeaver wrote:
c--b wrote:
Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.


Are you splitting up your brushes? I get a framerate of about 20 fps if I have just 9 lights hitting the same large surface, but then the Radeon 9800 XT is not exactly a top-of-the-range graphics card (although it's perfectly decent even for todays games).


Its better to think of them as texture projectors rather than lights (They do however get projected from lights), so they don't have the same slowdowns that normal lighting does (IE- They don't cast any light, stencil shadows, or specular highlights. They only cast a texture). To clarify I tested the 80 "Projector" map on two large connected surfaces with no splitting (Aside from the split that was due to me being to lazy to connect the two large surfaces). I'm also running on a Radeon 9800 (Pro), so its not like I have some super-computer. Razz
_________________
1+1= 11



kat@Posted: Tue Sep 26, 2006 6:56 am    Post subject: : Dead thread rising!

I was just trying to get this to work and copied the material file above except for changing the file path to my texture which is completely black with a masked shape as an alpha (also as above) but for the life of me it doesn't seem to want to work and I'm noneplussed about why becasue I'm sure I'm doing the same thing - projected light with a material applied to it that contains the material file.

*scratches head somewhat*
_________________
Co-Admin - Modelling and modding tutorials and tips



rich_is_bored@Posted: Tue Sep 26, 2006 9:30 am    Post subject: : I'm not 100% sure about this but it seems that whether or not it works is dependant on your video hardware and software.

There was a thread a year or two ago where some guy was using blendlights to project images and it only worked for select people dispite they were all looking at the same assets.

I tried this awhile back here...

http://www.doom3world.org/phpbb2/viewtopic.php?p=144512#144512

And I couldn't get it to work.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



The Happy Friar@Posted: Tue Sep 26, 2006 12:34 pm    Post subject: : strange... remove the "blendlight" & it seems to work fine. Confused
_________________
Things I've Learned



kat@Posted: Tue Sep 26, 2006 4:51 pm    Post subject: :
rich_is_bored wrote:
I'm not 100% sure about this but it seems that whether or not it works is dependant on your video hardware and software.

There was a thread a year or two ago where some guy was using blendlights to project images and it only worked for select people dispite they were all looking at the same assets.

I tried this awhile back here...

http://www.doom3world.org/phpbb2/viewtopic.php?p=144512#144512

And I couldn't get it to work.
Yeah I looked at that thread and for the life of me too I can't get it to work. It works as a 'normal' projected light but nothing else does anything.

I'm using an ATI 9600XT, which is an 'old' card now I guess.
_________________
Co-Admin - Modelling and modding tutorials and tips



c--b@Posted: Tue Oct 04, 2005 12:19 am    Post subject: Projected light shadows (Minus the light).: In my search for a way to add foliage shadows overtop of another light (Such as the sun), I've created a projected light texture that makes use of the alpha maps included in the texture used for projection. I'm not really sure if this is anything new or groundbreaking, but I'm certainly exited to explore the possible uses of it.

To acheive this I used this material file:

Code:
lights/bambooshadow2
{
blendLight
   {
      forceHighQuality
      blend blend
      map lights/bambooshadow2.tga
      alphazeroclamp
         }
}


If you were to look at the texture located in my "lights" dir, you would see a completely black texture, the alpha map applied to it is what determines what shadow is projected.

The outcome is this:

In this scene there are two lights, one is the sky light eluminating the map, and the other is the one projecting the shadow.

I'd be interested in any possible usage ideas for this that any of you might have, it seems there are very few. Razz
_________________
1+1= 11



c--b@Posted: Tue Oct 04, 2005 2:11 am    Post subject: : I just did some preformance testing; once with that shadow projecting light duplicated 19 times ( A total of 20 lights in that small area), and another time with a total of 40 lights in there (The texture thats projected is 1024X1024).

At 20 it still ran at the origional 60 FPS, at 40 it slowed down to around a constant 40 FPS. It seems to preform pretty well. Shocked
_________________
1+1= 11



rich_is_bored@Posted: Tue Oct 04, 2005 4:49 am    Post subject: : Hmmm. This is interesting.

Good job. I'll keep a mental note of this for sure.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



kat@Posted: Tue Oct 04, 2005 4:57 am    Post subject: Re: Projected light shadows (Minus the light).:
c--b wrote:
If you were to look at the texture located in my "lights" dir, you would see a completely black texture, the alpha map applied to it is what determines what shadow is projected...
Oh well that makes a little bit more sense as I was wondering what you were doing to 'block' the emition of 'light' seeing as you weren't using a normal alphamask. It's not really a 'black light' as such in that case but still pretty interesting nonetheless.
_________________
Co-Admin - Modelling and modding tutorials and tips



c--b@Posted: Tue Oct 04, 2005 4:57 am    Post subject: : Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.

This is so perfect for foliage Mr. Green

Edit; Heh, sorry for that bad explaination earlier Kat Razz

Edit2: Looks like its nothing new.
_________________
1+1= 11



OrbWeaver@Posted: Tue Oct 04, 2005 8:51 am    Post subject: :
c--b wrote:
Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.


Are you splitting up your brushes? I get a framerate of about 20 fps if I have just 9 lights hitting the same large surface, but then the Radeon 9800 XT is not exactly a top-of-the-range graphics card (although it's perfectly decent even for todays games).



c--b@Posted: Tue Oct 04, 2005 6:32 pm    Post subject: :
OrbWeaver wrote:
c--b wrote:
Turns out that the slowdown was only due to the overlapping; I increased the number to 80 exept in a large spread out area and it remained at a constant 60 fps. It doesn't seem to effect framerate in the slightest. Only overlapping effects it, and only minimally.


Are you splitting up your brushes? I get a framerate of about 20 fps if I have just 9 lights hitting the same large surface, but then the Radeon 9800 XT is not exactly a top-of-the-range graphics card (although it's perfectly decent even for todays games).


Its better to think of them as texture projectors rather than lights (They do however get projected from lights), so they don't have the same slowdowns that normal lighting does (IE- They don't cast any light, stencil shadows, or specular highlights. They only cast a texture). To clarify I tested the 80 "Projector" map on two large connected surfaces with no splitting (Aside from the split that was due to me being to lazy to connect the two large surfaces). I'm also running on a Radeon 9800 (Pro), so its not like I have some super-computer. Razz
_________________
1+1= 11



kat@Posted: Tue Sep 26, 2006 6:56 am    Post subject: : Dead thread rising!

I was just trying to get this to work and copied the material file above except for changing the file path to my texture which is completely black with a masked shape as an alpha (also as above) but for the life of me it doesn't seem to want to work and I'm noneplussed about why becasue I'm sure I'm doing the same thing - projected light with a material applied to it that contains the material file.

*scratches head somewhat*
_________________
Co-Admin - Modelling and modding tutorials and tips



rich_is_bored@Posted: Tue Sep 26, 2006 9:30 am    Post subject: : I'm not 100% sure about this but it seems that whether or not it works is dependant on your video hardware and software.

There was a thread a year or two ago where some guy was using blendlights to project images and it only worked for select people dispite they were all looking at the same assets.

I tried this awhile back here...

http://www.doom3world.org/phpbb2/viewtopic.php?p=144512#144512

And I couldn't get it to work.
_________________
Staff
Learn something today? Why not write an article about it on modwiki.net?



The Happy Friar@Posted: Tue Sep 26, 2006 12:34 pm    Post subject: : strange... remove the "blendlight" & it seems to work fine. Confused
_________________
Things I've Learned



kat@Posted: Tue Sep 26, 2006 4:51 pm    Post subject: :
rich_is_bored wrote:
I'm not 100% sure about this but it seems that whether or not it works is dependant on your video hardware and software.

There was a thread a year or two ago where some guy was using blendlights to project images and it only worked for select people dispite they were all looking at the same assets.

I tried this awhile back here...

http://www.doom3world.org/phpbb2/viewtopic.php?p=144512#144512

And I couldn't get it to work.
Yeah I looked at that thread and for the life of me too I can't get it to work. It works as a 'normal' projected light but nothing else does anything.

I'm using an ATI 9600XT, which is an 'old' card now I guess.
_________________
Co-Admin - Modelling and modding tutorials and tips