Shadow Mapping in Source

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

Re: Fixing env_pojectedtextue "grain"

Postby Gary on Wed Jul 28, 2010 12:32 am

I don't recall seeing anything that would appear to be a LOD system on it. I highly doubt there is one, seeing as until now Valve has only used shadowmapped lights for the player's flashlight and GMAN scenes.
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, now working on re

Postby Dr. Delta on Wed Jul 28, 2010 2:56 am

Whether you're the boss
Or someone's pet
The more you give
The more you're gonna get
User avatar
Dr. Delta
Veteran
Veteran
 
Joined: Thu Dec 27, 2007 1:18 pm
Location: People's Republic of Porygon

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Wed Jul 28, 2010 6:58 am

Well, I was able to change the cvar that controls shadowmap resolution. Though it appears to have no real affect...

Must be something I'm missing...
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, now working on re

Postby Groxkiller585 on Fri Jul 30, 2010 5:26 am

This reminds me, I still need to figure out how to port AS models to Source. I got as far as the actual model. The skin doesn't work though, as expected. Must be in the model itself.
User avatar
Groxkiller585
Sir Post-a-lot
Sir Post-a-lot
 
Joined: Fri Jul 09, 2010 3:43 pm

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Fri Jul 30, 2010 5:40 am

Well, that's cool. Not greatly surprising though, I doubt the mdl format changed very much or at all from the L4D2 version. By the way, ASW is Source, just a different codebase(like a mod).

Also, these env_projectedtexture fixes work in other 2007+ Source based games as well(Ep2 for example).
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, now working on re

Postby Jordash on Fri Jul 30, 2010 6:19 am

Groxkiller, you seem to have a lot of problems with materials :P
User avatar
Jordash
Been Here A While
Been Here A While
 
Joined: Mon Sep 21, 2009 10:36 am
Location: Perth, Australia

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Fri Jul 30, 2010 8:08 am

Apperently, if you start in tools mode, you while in the main menu, you can set the shadow map resolution through it's console(r_flashlightres). Any higher then 2048 cut my framerate down to 1fps.

Sadly, there is not much gain, because you have to disable the filter to get any kind of decent shadows and that has to be done through code. And I can't start my mod in tools mode!

So, I need to find out what all tools mode does to override the shadow map res limit.

Working on it.
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, now working on re

Postby Gary on Sun Aug 01, 2010 4:43 pm

Well, not much progress still. I appear to be able to change the res Cvar through an autoconfig, but it just causes all shadows to no longer render.

I know you can change the shadow map resolution, but so far, only in -tools mode...
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, now working on re

Postby ScarT on Tue Aug 17, 2010 6:00 pm

Are you sure the engine itself isn't changing it, if its launched with -tools on the commandline?
User avatar
ScarT
Senior Member
Senior Member
 
Joined: Sat Apr 02, 2005 7:33 pm
Location: Denmarkian Land

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Tue Aug 17, 2010 7:26 pm

Well, in HL2, it changes it from 512 to 1024 in -tools mode, but it appears I can not change the value(r_flashlightdepthres).

I could of sworn I could change the value in ASW while in tools mode, but for some reason, I can not enter -tools mode in ASW anymore.
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, now working on re

Postby Bites on Thu Aug 19, 2010 8:34 am

Near line 1380, comment out these two lines

m_nDepthTextureResolution = depthTex->GetActualWidth();
r_flashlightdepthres.SetValue( m_nDepthTextureResolution );

Now add this below it

m_nDepthTextureResolution = r_flashlightdepthres.GetFloat();

And remember to define the default values near line 96.

(I got this info from my friend 1/4 life, don't credit me!)
Bites
Dumpling
Dumpling
 
Joined: Thu Aug 19, 2010 8:32 am

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Thu Aug 19, 2010 9:19 am

That's awesome. I wondered why my values never made a difference.

I have been trying to get in contact with Gear for a while now. I am very happy you could give us this information.

I'll go ahead and try out different resolutions and post the results.

Thank you.
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, now working on re

Postby Gary on Thu Aug 19, 2010 10:18 am

Hmm, interesting, it showed the same results to that of a similar modification.

I tried forcing it while back, by setting the values directly. It caused the game to no longer render shadows and the frame rate to drop to about one. Sadly, the instructions you just gave me ended with the same result.

I'll try a fresh codebase after a nap. Maybe I messed something up.
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, now working on re

Postby pfannkuchen_gesicht on Sat Aug 21, 2010 3:28 pm

hm, works for me, but after changing the shadow resolution I need to tab out and back in otherwise the image just flickers.
pfannkuchen_gesicht
Member
Member
 
Joined: Sat May 29, 2010 11:36 pm

Re: Fixing env_pojectedtextue(Grain Fixed, now working on re

Postby Gary on Sat Aug 21, 2010 8:15 pm

Not surprised it works, I just need to create a new "mod" in case I broke something.
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