Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Free Projective shadow/lightmapping shader #221244
08/13/08 01:52
08/13/08 01:52
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hey,
I am about half way through with a simple projective shadow mapping shader and lite-c include. I should finish this up soon but I want to add a few more features.
So far the "project" includes:
-unlimited projective shadow/lights that can be dynamically activated throughout a level.
-high-precision buffer storage for high-quality results.
-a system for creating projective sunlight w/ shadows.
-projective spotlights w/ shadows.
-uses projective images so you can use overlays (i.e. flashlight, cloud shadows, tinted glass, light covers, etc.)
-a simple light implemented with physics (you can obviously do this yourself too).
-a code for "light zones" to switch on or off proj lights.
-a skill for shadow softness.
-a skill for "smoothing" shadows around vertex edges in real-time.
-single viewpoint lighting system - only one additional view per light.

problems:
-obvious sorting errors
-shader is limited to ONE projective light source per model/mesh.

improvments:
-I am working to death trying to implement more than one light per mesh! Imagine multi-shadows in A7... smile

please help:
I need a way to get more than one matrix from my lite-c code to my shader for multi-shadows! how can I do this? The matEffect1...8 does not work. So far I can only get the matMtl matrix to work! If someone can help me solve this problem, you guys will quickly have unlimited dynamic projective shadowing lights per model/mesh in your renderings/games!!!


I will release a "test" version of this VERY soon ( likely with the 1 light per model limit frown )

-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221331
08/13/08 14:29
08/13/08 14:29
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline
Senior Expert
ello  Offline
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
i once had a dll for passing more skills to a shader. maybe that will help you? i'll search for it when i am home

Re: Free Projective shadow/lightmapping shader [Re: ello] #221349
08/13/08 16:17
08/13/08 16:17
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Thank you very much! I would greatly appreciate that.
Also, I expect to finish a version 0.5 today, but it will only have one light source per mesh.
I have also concluded that alpha rendering is impossible so don't expect to use overlays. Besides, most computers can support the required polygons for complex meshes anyway, and the alternative is doubtful to be more efficient.

I will also work on a small "manual" because some things are not self evident, like setting flag1 for transparent or non-shadow casting objects and so forth.

-Mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221355
08/13/08 17:14
08/13/08 17:14
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
check this out: http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=178202 I included a dll to pass as many matrices and variables to the shader as you want, as well as a orthogonal projection matrix of the render_view.

Re: Free Projective shadow/lightmapping shader [Re: Slin] #221370
08/13/08 17:59
08/13/08 17:59
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
If this works... I LOVE YOU!!!
let me check it out!
Also, I was just working on the include part of the project and its coming along well. There are some simple defines and such.
Also, I decided to use the ENTITY as a light reference instead of a less costly but less universal struct. Let me know if you have preferences about this.


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221379
08/13/08 18:15
08/13/08 18:15
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
hmm, I can't seem to get it to run.
Perhaps the dll isn't being initialized?
Im getting an "empty prototype declared in [] " error.

please let me know how to include the dll (which i have).
I think im just missing a line of code or something
-mike-


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221381
08/13/08 18:22
08/13/08 18:22
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
oh yeah, how in the world did you get the overlayed palms to render overlayed shadows??? I can't figure this out because the very process of retrieving the vertex coordinates is a solo operation per pass; you can't even use texture samplers during the stage.


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221383
08/13/08 18:24
08/13/08 18:24
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
put the dll in your plugin dir and deklare the functions from it like this:
dllfunction SetCustomMatrix(char *Name, float *Matrix);
dllfunction SetCustomVector(char *Name, float *Vector);
dllfunction CreateViewOrthoProjMatrix();

There is nothing else needed for me...

Re: Free Projective shadow/lightmapping shader [Re: Slin] #221388
08/13/08 19:01
08/13/08 19:01
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
ok, well I made one MAJOR improvment!!!
My project now supports alpha blended and overlay shadows!
I feel so stupid, all I forgot to add was the zWriteEnable!

I'll try adding multi-shadows next...


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Free Projective shadow/lightmapping shader [Re: Foxfire] #221394
08/13/08 19:31
08/13/08 19:31
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
hmm... still can't get your dll to work. Maybe its my OS (vista).


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1