Shadow Mapping in Source

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

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby MrTwoVideoCards on Tue May 01, 2012 5:23 pm

Friendship REINSTATED
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby stoopdapoop on Tue May 01, 2012 10:45 pm

wow, this is "pretty fucking cool" as they say in my home country.

Are you guys doing the lighting prepass, or full on deferred shading?

Also, how are you handling transparency?

and on an unrelated note, that stupid D3Derror_invalidcall shit I was getting was due to me using -dev or -novid as startup parameter, in case you were curious, Mr2.
I'm Brown
Image
User avatar
stoopdapoop
Veteran
Veteran
 
Joined: Sun Aug 21, 2005 2:14 am
Location: Ann Arbor, MI

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby Armageddon on Tue May 01, 2012 11:49 pm

Woah, that's amazing. Any idea when Bio will be releasing it?
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby cra0kalo on Wed May 02, 2012 12:44 pm

Amazing stuff hope Sam can make use of this in his Source Filmmaker suite his working on
Cra0kalo
CG Artist/3D Animator
http://cra0kalo.com

Lead of Operation Reaper
http://projectreaper.com

Lead of the "Dark Alley" Project
http://alleyproject.net
User avatar
cra0kalo
Regular
Regular
 
Joined: Thu Apr 28, 2011 2:35 am

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby MrTwoVideoCards on Wed May 02, 2012 1:31 pm

stoopdapoop wrote:wow, this is "pretty fucking cool" as they say in my home country.

Are you guys doing the lighting prepass, or full on deferred shading?

Also, how are you handling transparency?

and on an unrelated note, that stupid D3Derror_invalidcall shit I was getting was due to me using -dev or -novid as startup parameter, in case you were curious, Mr2.


Yeah sorry I hadn't tested it, like I mentioned new laptop, installing games, slow internet, etc.

cra0kalo wrote:Amazing stuff hope Sam can make use of this in his Source Filmmaker suite his working on


Yeah. More like, we should just merge the two.
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

Re: Fixing env_pojectedtextue(Src2007 Mods)

Postby -=Biohazard=- on Wed May 02, 2012 4:24 pm

stoopdapoop wrote:Are you guys doing the lighting prepass, or full on deferred shading?


I did it with light prepass this time, I've done deferred shading on 07 before and ended up with different problems like crashing due to shader size or crashing on map change because I've send too much data to the shader (either is possibly fixed in swarm however).

stoopdapoop wrote:Also, how are you handling transparency?


Alpha tested stuff is normally lit and right now alpha blended geometry can't be lit. I'm not aware of any method that doesn't have caveats so for now I probably won't do much about that I guess.

Armageddon wrote:Any idea when Bio will be releasing it?


That can still take some time, right now I've got point/spot/global light(s) with shadowmapping for each, cookies for points/spots and volumetric scattering for points. There's also no hardware ATI shadowmapping filter yet since I don't own any ATI hardware myself (but software/color filters should work there too of course).

And since I'm recreating everything from scratch I also need to add some more basic material effects to the scene shaders at least. But you should be aware that all of this won't be plug & play unless you don't intend to change the default setup.
User avatar
-=Biohazard=-
Regular
Regular
 
Joined: Mon Apr 07, 2008 11:15 am

Re: Shadow Mapping in Source

Postby Gary on Tue May 08, 2012 12:55 am

Playing with the UberLight function found in ASW's env_projectedtexture system. Which basically makes the env_projectedtexture a true light. Not a just texture projected with shadow mapping. It allows for falloff, non-square projection, and more.

No uberlight(regular env_projectedtexture):
Image
Uberlight enabled, default settings:
Image
Messing around with the roundness:
Image
Image
Messing with the high and width:
Image
Messing with the outer edge's(I suppose it's like the light_spot's inner and outer options):
Image
Messing with the falloff:
Image
Image
Image

Sadly, it doesn't use all of the standard flashlightstate options, you got to use the uberlight ones. I exposed all of them via ConVars for testing. I plan on making them keyvalues as well.
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 Jangalomph on Tue May 08, 2012 1:23 am

Could you edit them in real time?
http://www.nomoreroominhell.com
I don’t know whether I was right or wrong, I guess I’ll never know… But I made it. And I guess I should be thankful for that. - Strelok
Has anyone really been far even as decided to use even go want to do look more like?
User avatar
Jangalomph
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Wed Jun 25, 2008 3:19 pm
Location: Sumter, SC

Re: Shadow Mapping in Source

Postby Gary on Tue May 08, 2012 1:31 am

Yes.
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 Smurftyours on Tue May 08, 2012 5:05 am

Wow gary you keep finding cool shit to mess with.
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: Shadow Mapping in Source

Postby Gary on Fri May 18, 2012 7:21 am

Very interesting how coverage affects cost with env_projectedtextures(in ASW Engine). The size(FarZ/range) of the env_projectedtexture affects cost/framerate more than shadow map resolution!

I did this test with 6 env_projectedtextures in different directions forming a omnidirectional point light. With a shadow map resolution of 128x128. These are FPS averages:

FarZ: 128 units
Without shadows: 58.345524
With shadows: 52.750801

FarZ: 1024 units
Without shadows: 45.945396
With shadows: 38.756088

FarZ: 128 units
Same test as above.
ShadowMap Resolution: 1024
With shadows: 52.409641

So! 1024x1024 shadows can cost less than 128x128. If, they are much smaller in size.

Here are some pictures of the test map with 1024x1024 shadows and 128 FarZ. The lights are parented to a func_tracktrain that goes through the same pre-defined path every time. I get the average framerate via the benchmark commands. I'm also randomly changing the color every couple of seconds.
EDIT: Video:

Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
Image
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 joe_rogers_11155 on Fri May 18, 2012 9:13 pm

it is very interesting. can something like this be spawned from a weapon? for example, can the AR2 orbs (or crossbow bolts for that matter) have 6 PT's parented to them (where Farz=512 and resolution=(midrange or lower) so the FPS is not a major issue) to create their own lighting when fired down a long hallway?
"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 ScarT on Fri May 18, 2012 9:38 pm

Everything is possible with the code, so yes :)
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Shadow Mapping in Source

Postby joe_rogers_11155 on Fri May 18, 2012 9:50 pm

hm, i just figured it would be a very special case. i understand that it is possible to have up to 9 PT's running in one map due to having 9 different shadow maps. so if 6 of those were dedicated to making the cool lighting effect for AR2 orbs, I guess I would be left with 3 PT's for any level design lighting anywhere else in the map. Right?
"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 Fri May 18, 2012 10:42 pm

The number of shadow maps is essentially unlimited (i.e. not restricted in code, but restricted by VRAM).

If your limit is 9 active at once, then you can have 1000 env_projectedtextures in the map, as long as at most 3 are active at once. This leaves 6 available for the AR2 omnilight.

Hope that clears it up :)
dark0r
Been Here A While
Been Here A While
 
Joined: Sat Mar 25, 2006 10:16 am
Location: de_hell
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users