Projection Flashlight Demo With Shadow And Normal

Posted By: Grafton

Projection Flashlight Demo With Shadow And Normal - 01/28/08 06:35

Here is a demo of a few of the shaders I have created to emulate a flashlight.
These shaders use a projected texture I made and have a few quality levels
for slower machines.

You toggle the normal mapping support on and off with key 1
You toggle the shadow mapping from the flashlight on and off with key 2
You toggle the film grain effect on/off with key 3 (off default)



I made some shaders that are identical, but use per pixel spotlight cones
instead of projection, they are faster, but not as nice as this method.

This is just a small room with a couple of normal mapped models in it.
The intention is to demonstrate the shaders, I know the environment
stinks! So you are not really missing much if you dont download the ~34 meg demo.

These shaders are still a work in progress as part of a larger work.
I never thought I would be able to do this stuff with Gamestudio, but lately
the engine is really changing!

Thanks for looking!

Rapidshare 34MB Download

File Front Download

Posted By: SlyBoots

Re: Projection Flashlight Demo With Shadow And Normal - 01/28/08 06:39

I have yet to try it, but the screenshots look promising!
Posted By: Emre

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 07:52

Perfect!

But performance is slowly.
(My pc system: 3ghz Hyper-Threading,1gb ram,radeon 9800 pro) fps is "23-24".
Posted By: Helghast

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 08:04

do you plan on sharing the code with us?
currently im downloading the package, but 34 sounds a bit large :O
is this A6 or A7 by the way? the screens look great so far ^_^ great job.




Ok, so i tested it now... WOW looking really great man!
i really hope you wanna share the shadowmap shader
looks awesome! can you tell a bit more about how you did it and all?
cuz i keep reading shadow shaders are so hard to do etc etc and ehre you go create a real nice one together with a projection shader! :O
does the porjection allow for multiple projectors per level? that'd be awesome...
anyway, keep it up!

regards,
Posted By: Grafton

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 08:22

Emre:
That concerns me some, I havent tested it on other machines. My machine is
same as yours but I have 512 more ram with a nvidia GeForce 7800 GS, and I get
~93 fps (900x600) with all effects turned on. You need vs1.1 and ps2.0 for all
shaders. I wonder what others are getting?

Dennis:
I'll make you a deal, If you give away your ragdoll system, I'll give away my
(this) flashlight system/shaders! Deal?
BTW, Its all done in A7 Lite-C.
Thanks for the comments man!
Posted By: Slin

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 11:36

The normalmapping looks great
The shadows should be a bit darker and what I miss are soft edges
Because the lightview is always near to the camera and facing away from it, you
donīt have to care about antialiasing and are using just some basic
shadowmappingcode right?
How do you handle the normalmapping together with the projectionshader? Dou you
just place a pointlight at the lightsource and multiplicate the result with the
projected texture?
And than you just combine it with the shadowmapping, donīt you?
I am just interested because I thought about something like that just a few days
ago
Posted By: Shadow969

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 13:03

the shots look great, but can someone please upload it to a different host, like file front?
Posted By: Helghast

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 13:23

Quote:


Dennis:
I'll make you a deal, If you give away your ragdoll system, I'll give away my
(this) flashlight system/shaders! Deal?
BTW, Its all done in A7 Lite-C.
Thanks for the comments man!




YOU GOT YOURSELF A SWEET FRIGGIN NICE DEAL!
gheheheheheee, honestly, i was gonna upload it anyway, just had nearly _NO_ time on other projects besides the one im currently involved with. (and killzone, lol)
i'll build in basic stuff to not update every frame, and maybe even a way to turn the whole system for each ragdoll individually off... that would be really nice i reckon :/

i guess i can have it done by the weekend i'll let ya know

and btw, does it support multiple projectors ?

regards,
Posted By: Emre

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 17:00

Quote:

the shots look great, but can someone please upload it to a different host, like file front?



http://files.filefront.com/Flashlight+Demozip/;9526656;/fileinfo.html
Posted By: jigalypuff

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 17:02

this is great, i dunno what my fps were as i have forgotten how to bring up the debug panel lol, but it seemed to be running very smoothly
Posted By: Shadow969

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 17:25

Thanks Emre!
downloading...
EDIT: no luck... my gpu doesn't support ps2
Posted By: Grafton

Re: Projection Flashlight Demo With Shadow And Normal - 01/28/08 17:43

Slin:
Yes just basic stuff. you could make the shadows a little smoother with some
blurring or simple pcf, but it would slow things down. Most of the time, the
shadows are pretty sharp because the depthmap resolution is 1024 and the
lightrange for the spotlight is short. Of course the shadows darkness can be
increased as much as you like by lowering the multiplier in the shader.
There is no actual light, just a direction and position that is sent to the
shaders.

Dennis:
You could easily create a second, third or more projection if they would never
overlap on the same object texture, otherwise you would have to expand the
shader to support more projection textures.
I will work on a getting some open examples into user contributions tonight or
tomorrow. looking forward to your ragdolls!
Posted By: lostclimate

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 18:01

Quote:



Perfect!

But performance is slowly.
(My pc system: 3ghz Hyper-Threading,1gb ram,radeon 9800 pro) fps is "23-24".





a 9800 pro is an outdated card, that fps should be expected
Posted By: frazzle

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 19:44

Those screens looks nice, especially the shadows since good shadows can make an environment look way more plausible like Ventilator and Slin already have shown Anyway, can't judge the demo yet since I'm over my bandwidth limit and it will take for ever to download 34megs if the average download rate is like 15kb ^^

Cheers

Frazzle
Posted By: Reigel_Seven

Re: Projection Flashlight Demo With Shadow And Nor - 01/28/08 22:15

THANK YOU GRAFTON!!! I'm eagerly awaiting your examples!
By the way, could I convert your codes to A6 when you post them? I'm not sure if I'm ready for A7 yet.
Thanks again!
Posted By: Grafton

Re: Projection Flashlight Demo With Shadow And Nor - 01/31/08 14:20

Examples now in User Contributions Forum.

Hope they help someone, Thanks!
© 2024 lite-C Forums