Also known as Gary from Interlopers.net. I'm a retired Halo2X Modder and Source Mapper/Coder/Overall Modder. I'm a global moderator at both Halomods.com and Interlopers.net

Image RSS Feed Latest Screens
Dynamic Sky Shadows Dynamic Sky Shadows Warehouse - Alpha Stage
Blog RSS Feed Report abuse Latest Blog: Fake CSM (Dynamic Sky Shadows)

0 comments by Gjsdeath on Aug 24th, 2012

So, you guys remember that video posted for Ivan's Secret that featured "CSM" or dynamic sun/sky shadows? Well, I ended up discovering what I believe was the same method a while later, but posted no video, only pictures. Though my friend Ken ended up posting a video using a my code in a HL2 map on the Alien Swarm engine. Here is the video he posted:
 

That video does have some errors, most of them are just due to the map though. Sadly you can't just toss it in, you have to map with the system in mind.

Fake CSM

Why do I call this fake cascaded shadow mapping? Because it's not really CSM, as CSM is supposed to have frustum view splitting and such. What I've done is hacky and inefficient. There is no way around it without coding proper CSM. Which is far beyond my abilities. 

So, because I don't like the name "fake CSM" I internally refer to it as DSS(Dynamic Sky Shadows). And for now on I will refer to my implementation as that. I say "my" despsite the likely chance that Sam Za Nemesis came up with this method or a very similar one first, because I discovered this independently.

So how does my Dynamic Sky Shadow system work?

Well, it's pretty simple actually. Basically, I took the env_global_light entity that comes with AlienSwarm and modified it to use multiple orthographic "flashlight" projection instead of one. The entity already handles the system that bounds the projections to the local player. 

Now that I have, let's say, four projections, I just make some textures. The way the flashlight textures work is; black is no light and white is full bright. So, if you take one, fully white texture for the center, and white textures with a black box in the center of them, you can make a "cascading" effect. Explained better in this image:
Old DSS System Texture and projection layout

Conclusion

So, that's how the system works. It's really very simple. There are a few other little things I ended up doing, like projection-specific depth bias, depth slopes, and shadow filters. To cut down on shadow bleeding/ghosting, and it had to be projection-specific as you can get better values depending the size of the projection. I stopped working on the system because it was slightly after I created it, that Bio released his Deferred Mod. Which has far superior and proper CSM. Why would I continue on a my system, which is ineffecint and will always be inferior? Well, I thought that, until some people still showed some interest in my system. As the the Deferred Mod's CSM needs the deferred lighting pass to work. And that is not yet ready for mods to use and not backwards compatible with the old lighting paths. So I'm planning on working on my system again, starting from scratch. As I better understand the system now.

A awful test map with the latest(as of 12/1/2012) system(full size).
 

Media RSS Feed Latest Video
Groups
Source Developers

Source Developers

Fans & Clans group with 948 members, open to all members

For people and teams developing mods and games with Valve's Source engine.

The 99 Bolts Project

The 99 Bolts Project

Developer & Publisher with 3 members, must apply to join

The 99 Bolts Project will make several mods over time. These mods will work together to portray the rise and fall of Ava Winona, and will catalog her...

Post comment Comments
zonbie
zonbie Nov 23 2011, 9:07pm says:

Gary, your work with projected textures and directional shadows has been one the best inspirations I have to continue working with Source.

+1 vote     reply to comment
Supahchikin
Supahchikin Jan 8 2010, 2:25pm says:

Hello there Gary.

0 votes     reply to comment
Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Level
68%
Gamer
7
Avatar
Avatar
Offline Since
Feb 13, 2014
Country
United States United States
Gender
Male
Member Watch
Track this member
Statistics
Activity Points
174
Rank
12,523 of 445,779
Watchers
4 members
Time Online
18 hours
Comments
46
Site Visits
2,033
Profile Visitors
12,996 (2 today)
Contact
Homepage
Youtube.com
Private Message
Send Now
Email
Members Only
Steam
gjsdeath
levan563
levan563 friends since Jul 28, 2011
jangalomph
jangalomph friends since Dec 5, 2011
zonbie
zonbie friends since Feb 27, 2012
Kremator_
Kremator_ friends since Oct 26, 2010