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 Dabu on Tue Aug 31, 2010 1:23 am

Thanks for sharing this but to be honest - it still look awful. :P Especially on models without normal map.
Image
User avatar
Dabu
Dumpling
Dumpling
 
Joined: Sun Feb 08, 2009 9:01 pm

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

Postby Gradius on Tue Aug 31, 2010 1:24 am

If you're gonna go dynamic crazy you might want to fix the decal lighting, projected textures tend to break them.
User avatar
Gradius
1337 p0st3r
1337 p0st3r
 
Joined: Thu Aug 27, 2009 2:52 pm

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

Postby Bites on Tue Aug 31, 2010 1:28 am

Wait, I thought you said that my fix couldn't set the res above 1024? There's no point in putting res is now changeable in the thread title linking to my post if it doesn't even let us do what we want to do. Unless we're like, getting 32x32 shadowmaps but that's absolutely pointless too.

Also, mat_depthbias_shadowmap 0.00001 and mat_slopescaledepthbias_shadowmap 2 to make the distance from object to shadow much less, even when the object is distant from the light. It causes a very small amount of artifacting but not substantially enough for anybody to care.
Bites
Dumpling
Dumpling
 
Joined: Thu Aug 19, 2010 8:32 am

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

Postby Gary on Tue Aug 31, 2010 1:39 am

Well, it is changeable now, but you are right, it's pointless without going over 1024.


I'll try those values and see how they affect the shadows.
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 Gary on Tue Aug 31, 2010 1:46 am

The mat_depthbias_shadowmap set to 0.00001 and mat_slopescaledepthbias_shadowmap at 2 makes quite a difference, I'll make sure to hard code them. Thanks.
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 Dabu on Tue Aug 31, 2010 5:42 pm

Quite a difference? Now it looks hundred times better. :D
Image
User avatar
Dabu
Dumpling
Dumpling
 
Joined: Sun Feb 08, 2009 9:01 pm

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

Postby Assigir on Tue Aug 31, 2010 6:30 pm

all of deserves a medal
-science: nothing can be destroyed only transformed into new forms.
-me: true death is a lie there is only transformation, unless sciences very core is wrong.


http://oscarkujanen.weebly.com/
User avatar
Assigir
Been Here A While
Been Here A While
 
Joined: Thu May 03, 2007 2:10 pm
Location: Sweden....near my computer

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

Postby MrTwoVideoCards on Tue Aug 31, 2010 11:16 pm

mat_slopescaledepthbias_shadowmap 3-4 is as low as you should go, otherwise certain angled lights are going to create bias on parallel faces:

Image

Check out the shadow edges on the top right of the image!
User avatar
MrTwoVideoCards
Monothetic
 
Joined: Thu Aug 02, 2007 11:18 am
Location: IN YOUR SOUL

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

Postby Gary on Wed Sep 01, 2010 10:41 am

An update to the one map from the first part of the first level of HL2. Credit to Valve for the brushwork.


Image
Image
Image
Image
Image
Image

Sadly, this has major optimization problems...
First of all, all 10 or so projectedtextures are running constantly... I tried level-based optimization by disabling the lights as the player leaves the area, but for some reason, the game crashes trying to turn projectedtextures back on.

I can't use the code-based optimization fix from the VDC, cause that causes other visibility bugs when you look away from the light. So you better have a good computer when running this level.

Download will be up soon, as you can't do shadows justice in still images.
Last edited by Gary on Wed Sep 01, 2010 8:21 pm, 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 Gary on Wed Sep 01, 2010 11:22 am

Thanks to my friend Worfox over at the OC forums telling me that entities with translucent textures cause them to stop casting shadows all together, I ended up cutting the windows and the train into two separate entities, now it looks awesome.
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 Gary on Wed Sep 01, 2010 1:20 pm

Here is the map posted above, in-case anyone wants to try it out. Sorry, but it's pretty broken, no one talks and a lot of scripted scenes are broken.

Download - 2MB - Requires mod
Included in the download is the one map and a updated client dll. Really, I went kinda crazy with this one...
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 kkirspel on Fri Oct 29, 2010 6:44 am

OMG, you sick bastard! You had them shot by a firing squad! :cry:

On topic, your first post says the code needs to be fixed, but also says it is now automatically fixed... which is most recent?
The inspiration as to why I'm here: Adam Foster; Minerva. Great job man.
User avatar
kkirspel
Pheropod
Pheropod
 
Joined: Wed Dec 03, 2008 6:34 pm
Location: Columbus, GA, USA

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

Postby Gary on Fri Oct 29, 2010 6:49 am

I'll make sure, but the orginal post should be the most up to date.
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 kkirspel on Fri Oct 29, 2010 7:05 pm

Well, its just that they're both in the first post and contradict each other.

Gary wrote:Update: These fixes have been added to the VDC!

Make sure to apply the fixes from the VDC!


EDIT: wait... maybe I'm reading it wrong; is the "Update:" saying the fixes have been made in the code by a patch or not?
The inspiration as to why I'm here: Adam Foster; Minerva. Great job man.
User avatar
kkirspel
Pheropod
Pheropod
 
Joined: Wed Dec 03, 2008 6:34 pm
Location: Columbus, GA, USA

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

Postby Gary on Fri Oct 29, 2010 7:41 pm

I am currently updating the original post.


Also, you have to make these changes your self, all the information needed on how to do them are on the VDC.
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

cron