Post news Report RSS City 17: Episode One MOTY Update | Day Six

If you thought day 5 had a lot of shaders, then get ready to hold onto your butt. Because it is going to fly right off.

Posted by on

City 17: Episode One



Even More Shaders

Mod of the Year Awards

Foliage and Cloth Shader

Static. That's a word we've used a lot throught the past days. Source in general has been pretty static. After working with the skydome shader, we decided to see what else really could use some shader facelifts in terms of adding life into the environment. Our general rule of thumb has been to make shaders that have a purpose, at least more so than ones that just generally make the game pretty, or suck up frames they don't need. The foliage shader is actually an opposite to that. Again the GPU has a ton of room to do things. Generally GPUS every generation have been getting both faster, and effcient at handling certain operations. For instance general post processing effects cost close to nothing on newer Nvidia 4xx and 5xx families, as well as ATI's 5xxx and 6xxx series.

The foliage shader takes complete advantage of ultilizing the GPU for vertex manipulation per frame. With the foliage shader we can give any static object movement (even create water ripples in 3D), specifically because it can be applied to pretty much any kind of model. The foliage shader deforms verts of a model's triangle real time based on a couple of factors such as:

  • Values per texture
  • Wind speed
  • Wind direction
  • Random Wind gusts.

City17 in general uses a larger amount of foliage than what Half Life 2 commonly consisted of. You'll be seeing a lot of trees. Even an entire park. Lastly, the foliage shader can also be used to simulate effects such as cloth,flags in the wind, thin wind affected materials in general.


Parallax and Relief Mapping

Parallax and Relief mapping are two seperate shaders though they, however peform the same common task: Make a solid 2D surface appear 3D, without actually changing the geometry, or adding more polygons to the overall face. Relief mapping is capable of a higher accuracy with the trade off of slower performance. City17 currently supports both methods, as we use both here and there based on the ind of surface type we apply the shader to.

Parallax Mapping

Parallax Mapping

Parallax Mapping

Parallax mapping and relief mapping in general however are still fairly expensive nowadays, even on todays hardware. We only use these shaders on surfaces where the effect is pretty noticable. On both of the shaders we currently support self shadowing by both the heightmap, occlsuion map, and players flashlight. This is also added ontop of the normalmap.


Anamorphic Lens Flares

More lens flares than J.J Abrams can handle

Lens flares are another part of adding visual fidelity to the world while making it super cheap. The Anamorphic Lens Flare shader is an additon to what effects like HDR provide. This shader takes the subtle glow of bloom and HDR, multiplys it, then extends it over a radius and blurs that effect, creating a very nice, yet subtle glow that shapes itself to the light source providing it. It's like having automatic sprites on light sources without the need to place any in editor (though of course we still do for added effect!)

Like previously mentioned, flares apply themselves onto any bloom or HDR affected pixels currently visible. We measure the brightness of pixels on screen, and use that data to define whether or not it's bright enough to create any kind of flare. This automatically helps adjust flares to appear stronger on lights they should be, as well as creating subtle glows on areas bathed in light. An added effect thats seperate from lens flares, but directly affected by the process is a simple screen effect that simulates natrual lens artifacts and glares. This effect has been seen in games like BF3, though we're still heavily working on the effect itself.

This effect works the same as anamorphic flares. Take bloom amount, but this time invert the angles so light sources only light flares on your screen based on their casting angle.



Per-Object Motion Blur

Deal with it Jason M

Instead of improving Valve's stock motion blur, we completely threw it out and made our own. Motion blur has been revamped to now not only be half the cost as valves motion blur, but also provide per object motion blur. To be honest nothing was really wrong with Valves motion blur, we just found a method that creates a much more realistic motion blur effect, while making it cheaper. Oh and per object of course. Valve titles beyond Alien swarm currently support per object motion blur, though it's not on by default.

IMAGE IS BROKEN FOR SOME REASON. WHY U DO DIS MODDB.
<img src="https://media.moddb.com/cache/images/mods/1/10/9576/thumb_620x2000/motionblur_01.jpg" alt="Per-Object Motion Blur" width="560" class="imgborder" />


Subsurface Scattering and Cloth Shader

It's a pretty big deal

Subsurface scattering (or SSS) is a mechanism of light transport in which light penetrates the surface of a translucent object, is scattered by interacting with the material, and exits the surface at a different point. The light will generally penetrate the surface and be reflected a number of times at irregular angles inside the material, before passing back out of the material at an angle other than the angle it would have if it had been reflected directly off the surface. Subsurface scattering is important in 3D computer graphics, being necessary for the realistic rendering of materials such as marble, skin, and milk. -From Wikipedia

Along with that, we've also created a cloth shader, specifically for clothing and fabrics in general. It currently is based on the Minnaert shading model. We've slapped both of these shaders on the fisherman from Lostcoast, as he best represents pretty much the only highest quality NPC model Valve has made for the HL2 series. (Sorry Alyx).

Subsurface scattering (skin) and Cloth shader

Subsurface scattering (skin) and Cloth shader



Wizard Mode

Yes. We're serious.

Most people complain there aren't enough Wizards. Especially in Half-Life 2. We'll, we're fixing that. After beating City17 you'll get to play as a Wizard. He uses magic to fire guns, because real Wizards fire guns. You'll also turn purple and pink, just for added Wizard on your Wizard.

Wizard magic

That's it for today. Stay tuned as our ten day MOTY update continues! Follow us on Twitter for updates on what's going on in development, as well as our blog for City 17 and other development news from us. If you'd like to get in contact with us or leave us suggestions, be sure to email us at: mrtwovideocards@gmail.com.

City 17: Episode One
Post comment Comments
RocketSurgery
RocketSurgery

but does it have dinosaurs

Reply Good karma Bad karma+10 votes
Alex2the3gr8
Alex2the3gr8

Let's hope, otherwise there's no point in this mod existing!

Reply Good karma Bad karma+3 votes
awesomepossum
awesomepossum

Lol, wizard mode

Reply Good karma Bad karma+4 votes
Frogumm
Frogumm

valve, hire these folks

Reply Good karma Bad karma+5 votes
BakonGuy
BakonGuy

What he said.

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: