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

It's day two of our MOTY 2011 update! Today we're talking Asset overhauls, and how we treat c17 as a total conversion.

Posted by on

City 17: Episode One

Asset Overhaul


Mod of the Year AwardsLike previously mentioned in our day 1 update we've spent a great deal of time this year going back and revamping areas thanks to some of the headroom we've managed to squeeze open.

This sort of larger goal we've had with City17 is improving the visual quality as best we can. Taking advantage of what the Orange box version of Source shipped with, and more or less exploiting that to our needs and wants. The majority of those shipped features and enhancements has mainly contributed straight to either performance, lighting and shadowing, and shaders galore. One of the more mysterious pushes we've been working on lately is a combination of not only hardware advances in the past years since Orange Box shipped in 2007, but something the OB engine version also shipped with: Slightly better model rendering performance.

That budget isn't going into new weapons, or higher poly npcs, but straight into the world where we feel it really belongs. It’s a change we've made we’re really happy with. In terms of how much it’s pushed City17 EP1 away from the flatness of the standard City17 art aesthetics, while maintaining a level of performance we’re also happy with. Performance had been a pretty big issue a lot of fans worried about. We commonly saw "How will it run" pop up in every update. Today we wanted to show fans what we're doing about that issue. We've learned some neat tricks along the road on developing City17, and as well, wanted to share some of them to other modders out there.

We’d like to think of it as a total conversion approach, without fully going total conversion. We've taken on the task of replacing a decent amount of stock content so we not only can we achieve cheaper rendering costs, but richer environments overall.


Models and Model Cost


Some of those additons are creating completely modeled out building geometry:

Making things not as flat!

One of the biggest things we’ve learned is that window models get expensive fast. For us that’s double the quick because we’re already rendering god rays. God rays redraw the world to understand whats opaque, and whats translucent. Sadly we can’t selectively draw certain parts of the world. If the sun is visible, so are our sun rays, and that means the world is being drawn a second time. You can consider it like doubling the cost of a single window model. In a type of example, its current triangle cost goes up from 20 to 40 instantly.

Thats not even the end of it yet. We also have projectedtextures, which are more commonly know as the flashlight. These entities cast real-time shadows, by (you guessed it) redrawing the scene again based on their casting distance. So this isn’t as expensive as rays, but it does double the cost of what is within it’s casting range. Generally that's around 25x25x25 feet in front the player. So now we’re drawing the world twice now and then, AND that's STILL not even it yet. The player can turn on his own flashlight at any given time, re-rendering that same scene again.

What was once 40 triangles can now be considered 120. On average there are about 30 windows visible on a building’s face. Each one is decorated with a window prop. That’s generally about 400-600 triangles just on one single building face. This is added on top of the other scenery we’re already rendering, including NPCs.

One of the greatest advantages of having windows as models is that we no longer are constrained to the repetitiveness building textures provide. We’re still limited in terms of how many variables of windows we can have visually. We’d like to keep them light on overall texture memory.

Before, we would have to place walls, and cut them up every 128 units vertically if we wanted to have a different set of windows per each story of the building. This was still fairly cheap, but the largest cost went over to brush rendering. We still use a slight variation of the previous method to change the borders and trimming now and then, but because we can place windows anywhere we no longer have to worry about using the textures we did before. Now we can use versions of the building textures that are windowless and save on texture memory. Secondly because we can now place windows anywhere we don’t have to worry about splitting up brushes. Brush cost goes down and the cost transitions over to the GPU rather than the CPU which is always going to be faster for this kind of a job. We fade out all the window models at certain distances, so that keeps rendering overall fairly cheap.

The triangle count is still fairly high per building face. City17 is all about the debris and destruction though. Where one triangle count is high; it’s likely it’s way higher somewhere else. Higher than it honestly needs to be. 600 triangles per building face seems like a lot, that's also 600 more per building than what valve maps shipped with. We’re still reaching a higher cost than general, but here's where that got better; Part of the “replacing stock content” goal came in the form of this little guy:

Old Debris model
He’s 1411 triangles. Yes. 1411. We often had at least 6-12 of these guys rendering at once, much like valve did. But we had a few problems with this model:

  • It was really expensive for it’s size. It’s a debris pile with a radius of 256x256x32.
  • Because of its height it didn’t cover a large area and often we had sections that where beyond 512 units in length that would require multiple instances of this single model, resulting in a decent triangle count in that scene.

So we didn’t remodel it, and we still use it for variety now and then, but we sure did replace it:

New Debris Models

That pile is a single model but it’s tons cheaper than the previous model. How cheap? 578 triangles, yes that's right 578. Not only do they cover a wider area, but they are less than half the cost of the previous model mentioned. We can have two of these newer models in place of the older ones; end up having way more detail and still less cost than before. These ended up being so cheap we opened up a huge headroom in the overall budget we had, allowing us to afford more detail overall while still being able to afford sun rays and flashlights in the scene.

An added plus with these new models is that we are directly baking high poly detail to the geometry, as well as computing AO onto the texture sheets. Valve debris models had no normal maps or AO sheets.


Textures


Another half of improving the overall visual quality has been mostly textures and added effects. This also includes new particle effects, and particle systems for general world atmosphere. We've also gone as far as to record entirely new sound effects.

One area we aren't hitting a budget limit is general texture memory for both world geometry and special effects (shaders excluded). We actually have a huge headroom there. During the Summer we've been art passing more of our older areas, bringing them up to a single overall consistency both visually and performance wise. Some of the areas to get a major asset overhaul has been the subway tunnels early on in the game.

Before

City 17: Episode One - New Years Update | Part 1

After

Before

After

MOTY 2011 | Map Media Day Two


The majority of our geometry in most maps are made via displacements. We've started doing this because not only are displacement faces cheaper to render, but also allow us to paint directly onto them, versus using decals and overlays like we had in the past. While we won't get as much variation as decals and overlays gave us (of course we still use them) we save pretty big here because we suddenly aren't rendering a ton of overlays per frame just to have some dirt stains on the ground.


Particles and Particle Systems

New textures and effects also include revamped particle sheets, such as better fire systems (fans hated it before, we listened):



Smoke Shader

Other fog and smoke effects consist of new shaders or particle systems. Previously we created entire particle systems simulating atmospheric smoke effects, or for "fake fog". That method got expensive pretty quick, because not only were we doing extra particle rendering for some basic systems, but we also made overdraw an issue to concern about.

Instead, we created a shader that procedurally simulates smoke movement handled and instanced entirely by the GPU. The shader works by taking two textures, reading the green channel of those textures, and using them to offset and warp the uv of a diffuse. We apply this effect onto two diffuse textures, scroll the two, then apply a mask for transluceney over the entire effect. Because of 4 effects scrolling and being affected by alpha, the effect is always unique.


The effect became so useful we ended up using this shader for a ton of effects. The warping section of the shader is currently used in a few shaders we'll show off tomorrow, but a few for instance are ffects such as:

  • Simulating water pushing around objects resting on the waters surface, such as leaves
  • Dripping or leaking water along a surface
  • Liquids in general
  • Smoke plumes
  • Combine Field effects
  • And a ton more

The warp aspect completely replaces most of Valves stock scrolling effects. The cool thing about this shader is it's really really cheap. We're doing all the heavy computing on the GPU, and only using the CPU to render whatever surface the shader is applied onto (in this case the objects Polygon's. We also stay relatively cheap on texture memory because we are only using the green channel of the warp textures to effect the uv of the Diffuse. Overall this effect costs as little as rendering a scrolling texture.



Thats all for today! Stay tuned for another update tomorrow! 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, be sure to email us at mrtwovideocards@gmail.com.


City 17: Episode One
Post comment Comments
EricFong
EricFong - - 1,585 comments

No matter what, I still can't wait for the release :DDDD

Reply Good karma Bad karma+6 votes
Ziggylata
Ziggylata - - 44 comments

Tell me this wont die, please.

Reply Good karma Bad karma+1 vote
MrtwovideoCards Author
MrtwovideoCards - - 660 comments

It won't, we promise.

Reply Good karma+1 vote
FlippedOutKyrii
FlippedOutKyrii - - 3,496 comments

The wait was absolutely worth it :D

Reply Good karma Bad karma+1 vote
Singaporean
Singaporean - - 697 comments

I am not surprised this will be next year release because 4 years of developing is still not enough yet and especially last year those pointless that almost causing the project to left abandon and SHOULD have releasing that year. Anyway, good luck for the project and I hope the structure could be done soon. =)

Stoudemire

Reply Good karma Bad karma-4 votes
[Night_Stalker]
[Night_Stalker] - - 1,602 comments

This gave me goose bumps.

Reply Good karma Bad karma+2 votes
MaxG3D
MaxG3D - - 209 comments

Lovely! + I noticed lens orbs effect (similar to the BF3) :)

Reply Good karma Bad karma+1 vote
xalener
xalener - - 1,605 comments

vvvvoted

Reply Good karma Bad karma+1 vote
WS-GS8
WS-GS8 - - 154 comments

Upgrading the Source Engine... one bit at a time.

Reply Good karma Bad karma-1 votes
MrtwovideoCards Author
MrtwovideoCards - - 660 comments

We are pretty much done at this point. At least, with what we've planned, and wanted to obtain. Lately it's just been getting what we've made to run real nice.

Reply Good karma+1 vote
AndreaZzZ
AndreaZzZ - - 39 comments

This mod is more like a big benchmark. Day 3 slowly scatters these doubts.

Reply Good karma Bad karma0 votes
MrtwovideoCards Author
MrtwovideoCards - - 660 comments

We'll ship you an Ugly-as-**** version, specially made for you.

Reply Good karma+1 vote
95Navigator
95Navigator - - 211 comments

Are you sure this will run on my Intel GMA? (I can run almost all Valve games in DX9). Youve put so much work on the GPU that im getting a litle worried. My CPU is what saves me, really...

Reply Good karma Bad karma+1 vote
MrtwovideoCards Author
MrtwovideoCards - - 660 comments

The Post Process shaders really stack up. But on-board video definitely can't run any of these shaders.

Reply Good karma+1 vote
William
William - - 434 comments

I hated that stupid stock HL2 debris model, you saw it EVERYWHERE -- in HL2 and mods. I'm tired of it. Glad you guys are doing your own thing and with positives to boot.

I'm not sold on the water effects yet. They seem too large, too blurry and too active. It seems like the dynamicness of your water is battling the staticness of the map around it. Where the water starts and the world begins has too much contrast. Perhaps it looks better in game, but the blurry effect doesn't match the sharp textures. I have always been amazed by Dear Esthers water effects, I think it's the best the industry has seen. It's amazing how well they blend the water and the world around it, the two seem.... seamless. If you could work on anything from this post it's definitely the water -- still though it's an improvement from source, then again that's not very hard to do.

Reply Good karma Bad karma+4 votes
Post a comment

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