Shadow Mapping in Source

Grab your favourite IDE and tinker with the innards of game engines

Re: Shadow Mapping in Source

Postby dark0r on Mon May 28, 2012 12:10 pm

"Don't try this"? You haven't told us to try anything :/
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Shadow Mapping in Source

Postby Ken Chan on Mon May 28, 2012 12:27 pm

It doesn't work until you port it to alien swarm engine, that's what I'm doing.
User avatar
Ken Chan
Regular
Regular
 
Joined: Mon Apr 09, 2012 7:16 pm
Location: Hong Kong

Re: Shadow Mapping in Source

Postby joe_rogers_11155 on Mon May 28, 2012 4:19 pm

@darkor: try it
"Day breaks, but decay soon follows." - Ava Winona
Currently developing in radio silence... 99 Bolts
Here's another project of mine... Assault on Overwatch
Are you new to Source SDK? VDC
joe_rogers_11155
Veteran
Veteran
 
Joined: Wed Oct 08, 2008 11:11 pm
Location: United States

Re: Shadow Mapping in Source

Postby dark0r on Mon May 28, 2012 8:25 pm

joe_rogers_11155 wrote:@darkor: try it

Try what?! The DOF? If so how? D:
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell

Re: Shadow Mapping in Source

Postby Jordash on Tue May 29, 2012 2:51 am

You can get DOF working in 2007 with biohazard's shader editor, I think it's already present in the ASW code, just unused.
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Shadow Mapping in Source

Postby Sandern on Tue May 29, 2012 10:02 am

Ken Chan wrote:Little off topic here, but I just find a way to enable dof!
It's build-in with all other effect like vignette, film grain, etc.
Here's some screen shots: ...

It might be useful to add that you must set mat_hdr_level to 3 (launch with "+mat_hdr_level 3") in Alien Swarm. For me it defaulted to "2". Then you can just use it by placing an "env_dof_controller" or use"mat_dof_override" to play with the settings.
Sandern
Regular
Regular
 
Joined: Thu Jun 30, 2005 1:08 pm
Location: Netherlands

Re: Shadow Mapping in Source

Postby Gary on Tue May 29, 2012 1:59 pm

Biohazard released it:


DOWNLOAD BUILD + SOURCE BELOW

This is a deferred lighting implementation that I've created on the Alien Swarm SDK. It's currently offering shadow mapping for directional/point/spot lights, blinn phong and volumetric scattering via light volumes.

The in-game editor allows you to load from/save to VMF files directly, however parented or named lights (with I/O) will not be editable in-game.

Hundreds of small lights can be rendered with great performance (on a GTX 260), however as soon as they cover a lot of screenspace or are even drawn fullscreen (intersecting light geometry) they become much more expensive.

The renderer firstly draws the skybox/scene to the gbuffer (normals+lighting params and depth), performs light rendering via low poly spheres/cones and does a second pass on the skybox/scene that produces the final result. Due to this, all shadows and lights from the world are directly projectable on the skybox, however geometry in the skybox does not yet cast shadows nor can you place lights in the skybox.

There's currently no hardware filtering support for AMD because I do not own any AMD cards, so I can hardly add that myself. Running this on AMD will either require you to recompile everything with a color based shadow mapping filter (as easy as changing one line of code) or adding fetch4 code - you've been warned.

Source code and demo build can be obtained here:
http://code.google.com/p/swarm-deferred/
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Shadow Mapping in Source

Postby Kosire on Tue May 29, 2012 4:17 pm

Gary wrote:Biohazard released it:


DOWNLOAD BUILD + SOURCE BELOW

This is a deferred lighting implementation that I've created on the Alien Swarm SDK. It's currently offering shadow mapping for directional/point/spot lights, blinn phong and volumetric scattering via light volumes.

The in-game editor allows you to load from/save to VMF files directly, however parented or named lights (with I/O) will not be editable in-game.

Hundreds of small lights can be rendered with great performance (on a GTX 260), however as soon as they cover a lot of screenspace or are even drawn fullscreen (intersecting light geometry) they become much more expensive.

The renderer firstly draws the skybox/scene to the gbuffer (normals+lighting params and depth), performs light rendering via low poly spheres/cones and does a second pass on the skybox/scene that produces the final result. Due to this, all shadows and lights from the world are directly projectable on the skybox, however geometry in the skybox does not yet cast shadows nor can you place lights in the skybox.

There's currently no hardware filtering support for AMD because I do not own any AMD cards, so I can hardly add that myself. Running this on AMD will either require you to recompile everything with a color based shadow mapping filter (as easy as changing one line of code) or adding fetch4 code - you've been warned.

Source code and demo build can be obtained here:
http://code.google.com/p/swarm-deferred/


Yup, saw it eariler today.. It's sick. The best part? Public source code! Now I REALLY expect all high-end mods like Black Mesa to USE this.

The performance? I'm getting easy 70fps on 1920x1200 with everything maxed (No AA) on a freakin 4-5 year old GPU 9800GTX+.

This is the best thing that have happened to Source Engine modding. :[]:
Old engine you say sceptics? Not anymore..
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Shadow Mapping in Source

Postby SotaPoika on Tue May 29, 2012 4:47 pm

@Kosire

Indeed it is great news. We just have to remember, that it is for Alien Swarm SDK, not Src2007 which majority of the mods use. If I recall, this lighting thing didn't work really well on Src2007. Wasn't Black Mesa on Src2007?
Last edited by SotaPoika on Tue May 29, 2012 5:02 pm, edited 1 time in total.
* Portfolio: http://sp0n3.carbonmade.com/
* No More Room In Hell - Level Designer
* Zombie Panic! Source - Level Designer
User avatar
SotaPoika
Pheropod
Pheropod
 
Joined: Thu Nov 16, 2006 6:07 pm
Location: Finland

Re: Shadow Mapping in Source

Postby Chrille on Tue May 29, 2012 4:57 pm

Yes, Black Mesa is 2007
Chrille
Been Here A While
Been Here A While
 
Joined: Sun Feb 25, 2007 4:38 pm

Re: Shadow Mapping in Source

Postby Gary on Tue May 29, 2012 5:44 pm

Actually, that mod will be one of the few that would have less trouble going over to ASW.

Edit(fixed):

Also, Bio is so awesome! He added proper CSM(not texture hacks) and the shadow casting point lights(dual paraboloid).


From the google code page:

Features

The deferred rendering pipeline currently implements the following:

cascaded shadow mapping with an atlas
dual paraboloid shadow mapping
perspective shadow maps
different kinds of PCF (color, depth-stencil)
cookies per texture
cookies per VGUI panel
light scattering via light volumes

Lights can be directly loaded from and written to VMF files opposed to placing them in Hammer only.
Last edited by Gary on Tue May 29, 2012 6:16 pm, edited 1 time in total.
Reason: Was on phone when posted. Fixed errors and added information.
Have a question related to modding or something I posted? Something that needs staff attention? I haven't been active lately, but feel free to PM me or message me on Steam(link below)

User avatar
Gary
Interlopers Staff
Interlopers Staff
 
Joined: Wed Dec 16, 2009 12:40 am
Location: USA, FL

Re: Shadow Mapping in Source

Postby MaK on Tue May 29, 2012 7:10 pm

This is awesome. I really hope Valve sees this.
User avatar
MaK
Senior Member
Senior Member
 
Joined: Thu May 18, 2006 12:08 am
Location: USA

Re: Shadow Mapping in Source

Postby joe_rogers_11155 on Tue May 29, 2012 7:11 pm

doesn't biohazard work at valve?
"Day breaks, but decay soon follows." - Ava Winona
Currently developing in radio silence... 99 Bolts
Here's another project of mine... Assault on Overwatch
Are you new to Source SDK? VDC
joe_rogers_11155
Veteran
Veteran
 
Joined: Wed Oct 08, 2008 11:11 pm
Location: United States

Re: Shadow Mapping in Source

Postby TheDanishMaster on Tue May 29, 2012 7:29 pm

Image

Whoops..

Also I managed to die while messing with the light D:
Specs:
MSI P67A-GD55, Intel Core i7 Sandy Bridge 2600k @ 3,4GHz, Corsair 8GB DDR3 1333MHz, 1TB HDD, NVidia GTX580 1,5GB GDDR5, Blu-Ray drive
Image
User avatar
TheDanishMaster
Been Here A While
Been Here A While
 
Joined: Sun Jul 26, 2009 7:02 pm

Re: Shadow Mapping in Source

Postby Shirik on Tue May 29, 2012 8:33 pm

excuse me me but i ehhh - how can i download that?
User avatar
Shirik
Regular
Regular
 
Joined: Mon Oct 20, 2008 4:10 pm
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users

cron