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
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.
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.
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:
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).
Not sure why I write these blogs... I doubt anyone reads them... I hope at some point people might find this user page and read through my blog posts. Anyways... Onto dynamic interactions.
Dynamic interactions; you know, those moments where a zombie will grab Alyx, but she throws him off. Or when a Hunter pounces a poor rebel.
These are called dynamic interactions. They are defined in the QC of a model. They weren't very documented at all until now. I say "until now" because I just wrote a VDC article on how they work(Still WIP). I hope to see them used more often, as the system is pretty robust and adds a lot to character interaction. Though I believe this system has been used before in Human Error. And I've heard the BMS guys talking about it. So a few modders have known how it works. But no one ever took the time to tell others how the system works.
And because I like to post videos. Here is a video of an Antlion killing a citizen with an unused(I think) animation:
I used the forceinteraction input for this video. But I've seen it work during combat, dynamically.
So, yesterday I got bored and didn't feel like working on one of my other projects. So I started playing Halo3, which I haven't done in quite a while(I don't play on the X360 much). And while playing, it reminded me how much I love to see my NPC buddies jump in the passenger(and gunner) seat of my vehicle.
That got me thinking, I want rebels to ride in my vehicle with me in HL2. I tried this long ago, but I sucked so bad at programming that it just resulted in pages of errors. But now, I suck less.
So, I took a look at the way the fast zombie and (more so) Alyx got in the muscle car. I ended up including( #include "npc_playercompanion.h" ) in the citizen's code. Fixed up the glitches that it caused. Included Alyx's animations in a recompiled rebel model. And:
The face is like that due to an error during the recompiling process.
No intent on fixing it at the moment, as I hope to mod the citizen's
shared animation model instead of the model it's self in the future.
It uses most of the code Alyx does, but
currently requires me to tell him via input to get in the vehicle. The
basic idea works though and it can be easily expanded, so I'm happy. It would be nice to get some custom animations. So he could hold rifles properly(currently holds them like a pistol),
Currently(some after the video was created):
-npc_citizen has a new input "GetInVehicle" that tells them to get in the player's vehicle. Though he did inherent "EnterVehicle", "ExitVehicle", and "EnterVehicleImmediately" from the passenger code.
-npc_citizen runs to the vehicle and gets in once told to.
-npc_citizen can shoot any gun he could before, but holds them like a pistol(lack of proper aniamtions).
-npc_citizen will react like Alyx did when the player rams into a wall or w/e,
-npc_citizen will NOT say anything while in the vehicle, this can easily be fixed,
but I have no reason to do it as little stock HL2/EP2 dialog would fit
in this situation.
npc_citizen can be shot and killed while in the vehicle. And once killed, his ragdoll is forced server-side so he properly falls out of the vehicle instead of falling right through the floor.
npc_citizen can't get out of the vehicle(I have yet to put the necessary code in place).
So, I thought this was pretty awesome. I'm one step closer to Halo-like passengers. Sadly, the only thing really keeping me back is my lack of decent modeling and animating skills.
BUT WAIT! That's not all. I apparently did more than give the citizens the ability to ride shotgun in the vehicle. I also gave them some of Alyx's capabilities! Such as... the ability to kick ass:
That's all for now. If you have any comments or suggestions. Don't be afraid to ask via Steam or the Comments system here at Moddb.
Ugh, where to start. I find Source very... interesting to work with. It's the only engine I've messed with that your enjoy working with one second and somehow either the tool set or engine will sense your enjoyment and do something you f**k up your day. What it chooses to do seems to be based on something completely unpredictable, ranging from having to restart Hammer to having to completely redo a map.
It's also outdated completely in terms of graphics and tool set, when was the last time Valve released a real SDK("real" as in; with codebase)? No code with Portal1/2, no code with L4D1/2, it's like they just don't think modder deserve the code, or maybe there is code in there they can't release publicly(if so, I would think they would of just told us). Sure, there is the ASW codebase, but I can't even fix all the problems that comes with it by default and us modders have enough problems, last thing we need a whole list of critical bugs we must fix before we can even load a map.
Graphics... well, I don't really feel like talking about it at the moment.
Why do I stay? Who the hell knows. For some reason, I have this obsession with env_projectedtextures, so it currently it keeps me around. That and I'm lazy as hell and the SourceSDK comes with everything I need to make a map without having to use custom textures, models, sounds, NPCs and stuff like the UDK.
My future with the engine... I suppose until I learn another toolset that makes it easy enough to make my own NPCs and stuff.
Moddb's empty blog page module thing said I could use to rant about stuff. So eh.