Normal Maps, just a basic discussion of issues

Normal Maps, just a basic discussion of issues

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Normal Maps, just a basic discussion of issues

Post by Argh »

I've been puttering about with various things lately, trying to get another build of NanoBlobs done to use the new version's features, among other things (while adding some new units), and I picked up Earth 2160 the other day, just to see it.

I am, thus far, very impressed with 2160 on a variety of levels. The biggest area where it really shines, though, is in the use of normal maps. The game uses a variety of simple shaders, but the biggest area of graphical quality improvement, over previous titles, is that every unit uses mipmapped normal maps, which create the impression of a huge amount of surface detail on objects.

Now, that said... 2160 rarely has more than 30 units on the screen at once. In point of fact, its maximum zoom-out level is so low that I find it annoying. It may simply be that using normal maps and a lot've shaders simply is too GPU-intensive to work for larger-scale games yet. In addition, the preparation required to make use of normal maps is pretty darn complicated (and I would hope that everybody agrees that I know what "pretty darn complicated" looks like, when building content).

Basically, we have to make two versions of the model- one high-poly, high detail, one low-poly, low detail. Not only that, but we have to keep in mind that this model's UVs should also be kept nearly identical in projection types. Why? Because when we're planning out our skins, we need to keep in mind where the bumps are going to be, and map in a way that complements the bumps. Earth 2160 is quite visually impressive because the texture artists really did a good job with all of this- each of the modular parts that make up a model, while low-poly and with a fairly low-resolution set of maps (they pretty clearly make use of multitexuring so that they can do tilemaps and other tricks) looks very pretty indeed when the shaders and the normal map interact.

Having looked at the workflow (difficult, without the newest high-end content creation tools), I'm not sure normal mapping would be a good choice for Spring. But I'm pretty tempted by DOT3 bumpmapping, which would be almost as good, and a whole lot easier to work with. It's just a simple alpha bumpmap, with GPU support, from what I understand.

Lastly, while I'm here ruminating about high-end content creation, let me put forth a very radical idea: instead of having each of the RGB channels in the second skin be assigned statically... it might be more useful, long-term, to have these assigned to a specific shader by the modder. So you'd have a UTF tag that reads something like:

Code: Select all

RedChannel=bumpmap.cv
GreenChannel=metallic.cv
BlueChannel=tranparency.cv
Doing it this way could give us a huge amount of flexibility. Shaders are really amazingly useful for creating a great deal of visual complexity, and giving us three different shaders we could invoke would free up modelers to create some really interesting designs... and also, I might add, free up the coders who like making shaders to give us more to play with, without adding any new alpha-maps, etc. Just a thought, feel free to disagree.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

Oh man, that would mean all mods would have to redo their textures. What about using the alpha channel for bumpmapping?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

It wouldn't mean they'd have to redo their textures. If left undefined, then R = glowmap, G = reflectivity, etc.... no biggie :-)

And right now that texture doesn't use the alpha channel. If it was used, it'd give us 4 different "locations" for shaders.

The reason I'd like to see more freedom on this is... erm... because I always am in favor of more freedom, except when it'd set everything back by months on end? And also because then maybe someone will port a fur shader, or some animated shaders, or some shaders that simulate iridescence, or... all of the other really cool stuff that is now available in the shader world, but currently not available in Spring?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Post by smoth »

yeah, I know 4 levels of shader would be sooo freakin' awesome
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Post by Comp1337 »

Now if someone wanted to code it..
User avatar
FireCrack
Posts: 676
Joined: 19 Jul 2005, 09:33

Re: Normal Maps, just a basic discussion of issues

Post by FireCrack »

Argh wrote: when we're planning out our skins, we need to keep in mind where the bumps are going to be, and map in a way that complements the bumps.
If you convert the normal map to a bumpmap and then use a filter like photoshop's "emboss" on it, you get an nice image that you can overlay over the main texture to assist in it's construction and compliment it.

Never make the texture before the normal/bump map.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Really, now that I've had time to think about it and look at it more, I think I was mistaken about Earth: 2160 (which is, in its way, a very fun game). I think they're just using DOT3 bumpmaps, not true normal maps. It's kind've hard to tell, though, because some of the geometry is getting tesselated into some really fine detail at close zoom levels.

And the maps ... I have a feeling they used that "splatter" technique that JC has been working on, off and on, for the new map format. The maps are awe-inspiringly detailed, and covered with features everywhere(which, I might add, doesn't hurt framerate like it does in Spring). However, they don't have anything like SJ's awe-inspiring dynamic water, the brilliant reflective surfaces, a super-free camera, or a lot've other things that are better (yes, better, in some cases, by a lot) in Spring than in this really polished commercial game. However, having shadows on doesn't result in poor game performance, even with quite a bit going on, and even with over a hundred units engaged in combat, I never saw the game engine bottom out like Spring does.

Oh yeah... and while they have IK'd models, which allows them a few sexy organic models... they also demonstrate, with some humor, why I like BOS/COB so much. For example, they have wheeled and tracked vehicles whose rate of roll/rotation are completely out've synch with the actual movement speeds, and other flaws that show that their content teams ran into serious time-crunch at the end of development, and couldn't find enough time to go and clean up the animations to a really perfect standard. That said, most've the time it doesn't matter that much- they used a really sneaky dust-cloud effect with vehicles that just happens to nicely conceal some of these goofs.
Post Reply

Return to “Engine”