New HDR Pipeline, Sky/Cloud Rendering, etc.

Published May 08, 2010
Advertisement
Overview
Alrighty, where to begin...first off I removed my last two entries, I'll try to cover everything that was in those entries here. I copied those last 2 entries onto my forums if you're curious [ Click Here ].

I'm not posting these images of my technical works-in-progess for people to extrapolate my design intentions or critique my methods/design choices, etc. There are 1000 factors behind the scenes ... please understand that I can't always talk publically [ NDA for example ] about the exact reasons why I'm working TOWARDS something, or posturing my games/technology in a certain way.

Ok ... that said, I've been too busy on many things...my secondary work machine died on me yesterday. I took it to the shop to have a new HDD and Windows7 OS installed after the issues are fixed, not sure how long it will be. Luckily I have a fleet of computers here so I can continue working on stuff ;-)

HDR pipeline rewrite - I've been luggin' around 10,000s of lines of code from 2007 era of my technology. I stripped all that stuff out and rewrote my whole HDR pipeline in a matter of 3-4 days (using what I'd learned since '07). It's much faster now, and I've finally got Multisample Antialiasing (MSAA) working on everything again! This makes me very happy. My tech now uses RGBE format or full 64-bit render targets - the tonemapping and bloom have also been rewritten from ground up.

The hardware requirements for my games are still the same, I've specifically kept my main work-machine's hardware almost unchanged for 3-4 years.

Sky/Cloud Rendering System WIP - So for many years I've been trying to get an interactive / volumetric cloud system into my games. This is such an advanced field it's not exactly trivial to get some great looking clouds rendered especially (IMO) due to all the issues alpha blending presents when combined with transparency, and shadow-mapping. I spent a few days writing the whole volumetric-ish cloud approach, and but was still not satisfied, so I rolled back to a simple billboard approach I've been using for years. It can later be extended to support volumetric clouds using instancing/imposters [ as in the papers by Harris, et. al ]

So here are some screenshots of the dumbed-down cloud rendering system on the new 100km x 100km terrain ... since I removed the last two posts in my journal, I'll type up a bit on the major changes in Armored Warfare after these screenshots...







Changes to Armored Warfare
I've recently expanded the maps to be (100,000m x 100,000m) verses the old (~2,000m x 2,000m) map sizes. This has all kinds of advantages to the games in terms of ability to handle more units at better frame-rates, gameplay enhancements, etc. I'm not going to type it all up now. kthx.

The other big change I've made is the addition of a Real-time Strategy mode into the game. Any player in the multiplayer server will be able to give orders to units, or control a unit. There is a rank/hierarchy in-game to prevent griefing, and noobs from ruining the game. This gameplay is similar to Urban Empires ( my gangster game, www.urbanempires.com ). Merging RTS/Action in a large ( 32-64 players ) multiplayer setting. All the netcode, has been written since 2006, I've done-and-redone these systems more times than I care to count - making massive improvements each iteration.

Additionally, every object in the world now uses a new entity managment system I've written. This new system greatly simplifies work needed for new/ additional features...and it's never been easier for me to work w/the engine.

Small changes include things like addition of real-world units [ tanks, ships, jet fighters, etc. ], more realistic maps and scenarios, and a few other things.

Imagine this build of Armored Warfare from 4 months ago, merged with the above landscapes I've developed ^^^^ I can't wait...


Geomipmapping Wireframe
Here is a wireframe view of the GPU based terrain rendering system I've written...


Misc Screenshots
Some of the early real-world units in the game...


Some older screenshots of the cloud/sky/environment...



Alrighty...I typed that up pretty fast, sorry for any typos ... that was my first *real* journal entry in a while lol.

- Dan
0 likes 6 comments

Comments

Radan
Great work as always!

Will the players be able to quickly pull up to get an overview of the battle and then zoom back in, supreme commander style?

Could you write down a few lines about that sun reflecting of the water effect you have(both from near and far views)? I really like the way it turned out for you.


Keep it up!
May 09, 2010 03:42 AM
dgreen02
Quote:Original post by Radan
Great work as always!

Will the players be able to quickly pull up to get an overview of the battle and then zoom back in, supreme commander style?

Could you write down a few lines about that sun reflecting of the water effect you have(both from near and far views)? I really like the way it turned out for you.


Keep it up!

Thanks a lot.

Yes, not only is the player able to quickly shift from a traditional 3D RTS control to a strategic 2D RTS mode - but you can also control any unit on the battlefield from a 3rd/1st person perspective with a single click.

On the water - thanks, yea the water is the result of years of tweaking. I've probably been through 6-7 iterations of my water shader. This one has been used for a year or so, I finally put the finishing touches on it more-or-less, so I'm happy with it.

To get good water reflections you'll want to sample the normal map from at least 3 different directions to make it nice and choppy. One thing you can do is use tex2Dlod() and disable the MINFILTER on the sampler to get shimmering reflections. Another trick is to use a per-vertex angle passed from the vertex-shader for even more random rotation. In the pixel-shader transform the averaged water surface normal by a matrix like this -

        float Perturb = IN.PerturbAngle.x;
	float3x3 Matrix = float3x3(1, 0, 0,
	                           0, cos(Perturb*0.06), -sin(Perturb*0.045),
	                           0, sin(Perturb*0.03), cos(Perturb*0.07));


Also you want to combine a few different diffuse and specular calculations to give reflected light at all angles. Add their contributions at different stages in the shader, this is where it gets sort of black-magicy lol, the shader is pretty complicated I just did a lot of trial and error to get it looking good. I don't think I could give a proper explaination of exactly what I did without sitting down and studying the whole thing. But yeaaa, I'm just glad it looks decent [grin].
May 09, 2010 02:21 PM
Jason Z
Hey Danny - those screen shots look pretty good. So are the cloud billboards updated dynamically or are they more static billboards used with a particle system? I often wondered about building such a system, but always come back to making some type of a ray traced thickness calculation...

Keep up the good work!

P.S. I sent you a PM on some other matters too...
May 09, 2010 03:58 PM
dgreen02
Quote:Original post by Jason Z
Hey Danny - those screen shots look pretty good. So are the cloud billboards updated dynamically or are they more static billboards used with a particle system? I often wondered about building such a system, but always come back to making some type of a ray traced thickness calculation...

Keep up the good work!

P.S. I sent you a PM on some other matters too...


Yea, it's a pretty lame system right now - static billboards -_- it looks pretty good in most situations, odd in some. So I'm adapting some of my old GPU particle code to try and get some good looking clouds of particles - rendered to a dynamic billboard, and faded in as the camera gets near/in the cloud.
May 09, 2010 09:07 PM
Radan
Quote:Original post by dgreen02
Add their contributions at different stages in the shader, this is where it gets sort of black-magicy lol, the shader is pretty complicated I just did a lot of trial and error to get it looking good. I don't think I could give a proper explaination of exactly what I did without sitting down and studying the whole thing. But yeaaa, I'm just glad it looks decent [grin].


Thanks for the explanation, I figured it might have a bit of voodoo at some stage. :)

I trained sailing actively for a number of years so I've seen my share of water reflections and while looking at your screens, for just a moment, I had a flashback to those relaxing moments when I would just watch the reflections jumping around...

...this is probably the moment where we are supposed to spontaneously burst into song but lets just restrain ourselves.

Aaaany way, yeah, good reflections. :)
May 10, 2010 02:08 PM
Matias Goldberg
Sweet.

Probably my questions got lost in so many posts, besides the entry was a bit old already when I posted.

So, I'll just repeat the technical questions which is what I'm interested on:
* The first screenshot after "100km x 100km terrain...it's huge", does it have full shading on it? How many textures are being applied?
* How do you cope with floating point errors at 100km? Do you use doubles?
* How do you create the terrain? Is it a heightmap texture? What resolution do you use? a 4096x4096 heightmap means 25m per pixel. That's not much detail. How do you overcome that? Or it doesn't really affect the looks?

Cheers and thanks
Dark Sylinc
May 14, 2010 11:30 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement