Shadow Mapping in Source

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

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Gary on Fri May 27, 2011 9:45 am

Cool, I once parented a pt to a Hunter Copper's spotlight attachment , everytime it aimed at a target they would be lit by it's pt. Also, while this is all and cool sadly, it seems HDR doesn't effect shadow mapping though...
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: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby CB1993 on Wed Jun 01, 2011 2:38 am

Have you guys tried combining this info with these tutorials? I bet it would improve the shadows by a lot more.

You can improve the fence shadows from this:

Image

Into this:

Image

Also, you can improve it further by adding a few commands into the compile options:

Image
Image

Here are the links to these tutorials:

Transparent Texture Shadows- viewtopic.php?f=11&t=27738

Lighting Compile Options- http://www.nodraw.net/2010/12/lighting-compile-options/ (There's more info about lighting on this site)
User avatar
CB1993
Member
Member
 
Joined: Tue May 03, 2011 3:42 am

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Gary on Wed Jun 01, 2011 3:01 am

Yeah, though the point of all this is to use the dynamic shadowing created from env_projectedtextures. I don't expect people to replace all other light sources with them, I would think people would mix it with other lighting methods, like lightmapping.

Also, that map is a really old proof of concept, it isn't properly utilizing shadow mapping; too high of FOVs, in places that lightmapping would be more practical and way too many of them. It was also before the time of the depth buffer fix.
Last edited by Gary on Wed Jun 01, 2011 4:34 am, edited 1 time in total.
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: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby CB1993 on Wed Jun 01, 2011 3:08 am

I just thought it would be neat to mix those shadowing tricks along with yours, especially the fence/transparent texture shadows.
User avatar
CB1993
Member
Member
 
Joined: Tue May 03, 2011 3:42 am

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Gary on Wed Jun 01, 2011 4:36 am

Yeah, but they would be static, in a lot of cases that would be fine, but if it was a dynamic scene then lightmapped shadows wouldn't look very good.
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: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Botolf on Sun Jun 19, 2011 11:59 pm

So I've run into an issue with env_projectedtexture whilst applying some of the VDC codefixes (link), where said light will light the far side of a model, and not just the facing side. Problem is seen here:

Image
Door: Appid 420 (Episode Two), no light bleeding through model

Image
Door: Appid 218 (Source 2007 Base), light bleeding through model

The problem remains the same with all of the fixes enabled, some, and none, so I'm inclined to believe that this is an issue that lies with the SDK Base 2007 itself, something that changed between it and Half-Life 2: Episode Two. Has anyone here encountered this issue, and do they know of a fix?

The alternative would be to mount Ep2 or the SDK Base 2009 (which still doesn't exist, afaik), but for the former I'd have to know of a way to use the custom DLLs and the accompanying code without running into a wall of startup crashes.
User avatar
Botolf
Regular
Regular
 
Joined: Sat Jan 16, 2010 7:38 am

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Kosire on Mon Jun 20, 2011 12:51 am

Botolf wrote:So I've run into an issue with env_projectedtexture whilst applying some of the VDC codefixes (link), where said light will light the far side of a model, and not just the facing side. Problem is seen here:


Door: Appid 420 (Episode Two), no light bleeding through model


Door: Appid 218 (Source 2007 Base), light bleeding through model

The problem remains the same with all of the fixes enabled, some, and none, so I'm inclined to believe that this is an issue that lies with the SDK Base 2007 itself, something that changed between it and Half-Life 2: Episode Two. Has anyone here encountered this issue, and do they know of a fix?

The alternative would be to mount Ep2 or the SDK Base 2009 (which still doesn't exist, afaik), but for the former I'd have to know of a way to use the custom DLLs and the accompanying code without running into a wall of startup crashes.


Did you use the same BSP for both mods? If not, what did you compile them with?
Try this with vrad:
-staticproppolys -staticproplighting -textureshadows -both -final -game $gamedir $path\$file
User avatar
Kosire
1337 p0st3r
1337 p0st3r
 
Joined: Sat Mar 07, 2009 7:25 pm
Location: Denmark

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Botolf on Mon Jun 20, 2011 1:05 am

Ah, I haven't recompiled the map since switching the primary engine version. Will recompile it under the 2007 version of Hammer and see if that does anything. And your suggestion as well, though I don't quite see how it would help (as the issue is to do with the projected texture, and not an issue with baked lights).
User avatar
Botolf
Regular
Regular
 
Joined: Sat Jan 16, 2010 7:38 am

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Botolf on Mon Jun 20, 2011 1:49 am

Recompiled under the 2007 section of Hammer (but with Ep2 mounted, so that there weren't missing entities and the like, all that was amiss were the grids being completely messed up). Standard full compile with Full VVIS, both LDR and HDR on full, problem recurred.

Recompiled with the settings you supplied and the problem was still present (though I did notice some subtle differences to do with prop models elsewhere, better shadowing).

Next thing to try would be mounting the 2007 SDK Base AND compiling under 2007 mode, but suffice to say I'd find it really hard to manipulate anything in the map proper.

Edit: That also failed to solve the problem, and it made the map ugly as sin both in-editor and in-game with broken lighting and reflections galore.

Oh, and it hollered this at me:

"MountAppFilesystem() failed: SteamMountAppFilesystem(218,45,0x1734fd54) failed with error 21: A different version of this FS is already in use"

Solved. Someone suggesting adding a bump map to the door's material, that did the trick.
User avatar
Botolf
Regular
Regular
 
Joined: Sat Jan 16, 2010 7:38 am

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Gary on Fri Jul 01, 2011 4:24 am

Image

I got grain/filter to work per-projectedtexture, it's a new keyvalue(I named it shadowfilter). Though, really, this is not even half as good as what I was going for- per-projectedtexture depth resolution, which I assume I can't get to work due to it being set in the shadow manager. Being able to set the depth res per pt would be great, we could have more in a scene, as small lights could use 512 or lower while big lights could use a higher res... Where is Saul when you need him?


Edit; Interesting, if I wanted to, I could separate the FOV into a horizontal and vertical, I could see some uses...
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: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby TicTac on Sat Jul 02, 2011 4:14 am

Gary wrote:That is a good question, now that Source shadow mapping has seen improvement in Portal 2, I expect to see more of it in their future games. It's just sad how shadow mapping has been in use for years(even all the way back to Halo2 on the original xbox), yet Valve doesn't appear to be invited to the party(till now with Portal2).

Even with Portal2 they kept the cap of 1 projectedtexture at a time. That's really what I don't understand, since they don't seem to be to demanding
Competent Level Designer, 3D Artist.
I don't really look like my avatar
User avatar
TicTac
Veteran
Veteran
 
Joined: Sat Aug 02, 2008 1:30 am
Location: Philadelphia

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Dives on Sat Jul 02, 2011 4:56 am

TicTac wrote:
Gary wrote:That is a good question, now that Source shadow mapping has seen improvement in Portal 2, I expect to see more of it in their future games. It's just sad how shadow mapping has been in use for years(even all the way back to Halo2 on the original xbox), yet Valve doesn't appear to be invited to the party(till now with Portal2).

Even with Portal2 they kept the cap of 1 projectedtexture at a time. That's really what I don't understand, since they don't seem to be to demanding


Probably required significant code rewrite to implement. You know how Valve is with prioritizing. I'm sure we'll be seeing it with the next release after DOTA 2.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby TicTac on Sat Jul 02, 2011 5:27 am

Garrysmod supports multiple projectedtextures, so assuming you weren't being sarcastic, and I honestly can't tell, it shouldn't be that hard to do.
Competent Level Designer, 3D Artist.
I don't really look like my avatar
User avatar
TicTac
Veteran
Veteran
 
Joined: Sat Aug 02, 2008 1:30 am
Location: Philadelphia

Re: Fixing env_pojectedtextue(Grain Fixed,Res is now changea

Postby Gary on Sat Jul 02, 2011 5:13 pm

Dives wrote:Probably required significant code rewrite to implement. You know how Valve is with prioritizing.

Unlikely unless they rewrote the way it sets render targets.

Dives wrote: I'm sure we'll be seeing it with the next release after DOTA 2.


Doubtful, I doubt we will even get a dynamic sun shadows. The least they could do is improve the RTT shadows to Unreal or Halo3/Reach standards.
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: Fixing env_pojectedtextue(Src2007 Mods)

Postby Gary on Mon Jul 25, 2011 10:39 pm

Updated the original page a bit.
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
PreviousNext

Return to Programming

Who is online

Users browsing this forum: No registered users