Normal Maps - Page 2

Normal Maps

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

Moderator: Moderators

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

Re: Normal Maps

Post by Argh »

Or units whenever the light angle changes, due to terrain. Or when dynamic lights come into play, because that's fairly well implicit with this, with minor changes, for those of you who don't know how this works yet.

Or for large units. Or for anything where you want to imply a lot of surface detail (hmm, plates and other greebles, fur, and of course, rounded areas, hollows, etc.).

If you played Earth:2150 or Warhammer: Mark of Chaos, you'd know what I mean here.

Normal + spec maps make a huge difference, in terms of ambiance and the way things feel, even zoomed out a lot. It's the shininess factor, due to the spec map- if the spec map allows for RGB color, it can do really interesting shit. And GLSL ones are even fairly cheap, so I am in favor of using them a lot. But I need code to test with, and get a better understanding of what I want things to do.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

I own mark of chaos it was less of a game and more of a slow engine demo. It also had dynamic lighting if I recall correctly.

In spring, where we are hurting for resources as it is you want us to use more textural information. See thing is, that spring doesn't need better polygonal handling it needs SM3. The reason is that MAPS of any reasonable size are eating up our texture memory. without a proper map format using splatting we are just adding more crap onto the pile of swap that is already spring. The SMT format and it's tiles eat a lot of memory up and THAT is where games hurt.

So, why you guys are hard up for bump mapping and not a proper map format perplexes me. You will not have enough memory to even approach glsl with any measure of a serious face. We have no fixed camera, people are not using the lod code and hand drawn normal maps are a bad idea. The normal map generation tools are also poor as they assume 1 angle on the base texture. Proper normal maps are generated via high poly models when then have that information baked onto the texture.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Re: Normal Maps

Post by rattle »

Actually we already have a specularity shader, it works in combination with reflections. I use reflections for specularity and slight glow to make up for the reflection tinting. Would be cool to have seperated specularity as I don't want my models to be reflective at all.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

yeah, separated specularity would be nice and look we have a whole free channel on texture 2!
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: Normal Maps

Post by Warlord Zsinj »

I'd probably prefer to see graded transparency then seperated specularity >_>
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

that would be nice but it would require heavier sorting from what I recall. That being said, I would love translucency.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Normal Maps

Post by FLOZi »

http://www.codesampler.com/oglsrc/oglsr ... ansparency
This sample demonstrates how to use multi-sample transparency to skip the typically necessary step of sorting all transparent geometry back to front. See the related sample "ogl_alpha_blending_texture" for the more typical setup which does require sorting.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

I will do some renders showing what I want to do with normalmaps, and what it should look like, when I get home on Sunday.

Hopefully this will move this forwards, into the realm of Action, instead of where it is right now, which is Theoretical Horsehockey, and maybe Trepan will take mercy on me after seeing that I actually do know what I want, and am more than ready to make content to use it. If not, meh, I will deal with this after I am done with this release of P.U.R.E., assuming I don't have anything more important to do.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

Okie doke, here's a short demonstration of why normal maps would be useful and cool. The videos explain a lot more than the stills. As I used the Poser 5 Firefly renderer, set up to emulate Spring's rendering system as best as I could given the time required, it will not look entirely like it would in Spring, but the obvious differences will still be readily apparent, and the technical differences are minor (with the major exception of the rounding shader, which Poser 5 has an equivalent to, but will not use properly with objects that are split this sharply).

Image
Image
Image
Here are three still shots with a normal map, glow map, reflection map and RGB specular map applied. The effect of the RGB specular map is subtle in this shot, but is more obvious in the video- basically, if we can use basic blotches of color to determine the top specular colors of a given surface, we can make areas feel a lot more natural. I'm not even going to claim this was a particularly well-executed spec map- I just took the base bitmap and lightened it up considerably, so a lot of points ended up at a whitepoint during the render. With proper control and a bit more time, I could do things like use a contrasting hue, producing iridescent effects, or use choices that resulted in much more subtle tones, for painted surfaces- I wanted nice, sharp pinpoints of light to be visible in these shots, though, so that the impact was obvious to all.

Image
Image
Image

Without the normal map, my robot looks obviously duller and less interesting, doesn't it? There is only so much information that a texture can really convey about the interaction of light and a surface.

Now, for the fun part... watch these two videos. The differences there are even more striking- I haven't even animated this robot, and yet just moving the light source around, we can see huge differences. Try shrinking the video to 50%... then to 25% of the resolution it was rendered at, and the little glints caused by the normal map are quite obvious, and add a great deal more visual information to the model.

So, there ya go, folks. All I need is the software, and voila, games for Spring start looking a lot more pro.

Doing this demo actually took a lot longer than the process of hand-painting the normal map itself, and with refined spec maps, which I should say again were exaggerated here, we could be seeing objects that were a lot more natural and interesting, as well as using variations on spec maps, and normal maps generated from high-tessellation versions of models, which is great for organic or rounded forms, although as you can quickly see, not really necessary.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

nice fake shots. It would not look like that in game.

but a nice rendered shot always looks better:
Image

The wonders of raytracing.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

They aren't fake, Smoth. The normal maps are at the resolution of the rest of the model's textures, the geometry has not been tesselated, except by the renderer, which is just using a process much like GLSL (much slower, though, Poser 5 is ancient) I'm using one lightsource, simple shadows, no light bounces...

...wait, I'm arguing with an idiot again. Nevermind. If you're too stupid to know that I deliberately used a primitive process to emulate Spring, then meh, that's fine. It's all "fake", folks. Smoth's right about everything :roll:

And to retort, I will go grab some normalmapped stuff from recent games, which look just like this...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

Image
Oblivion.
Shots from Frontlines: Fuel of War.

Wait... more coming. The Oblivion shot is a great example of how a subtle spec map makes a huge difference in terms of tone and feel, btw. The Frontlines spec maps are obviously more glossy, making those metal panels and other details really pop out.
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Re: Normal Maps

Post by Snipawolf »

Holy crap look at the seams on that wheel!
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

Image

X3: Reunion. First major game that I paid much attention to besides HL2 that used them... see the lovely, shineh details...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

no, I am saying that a render will not look the same as it would in spring. Any non spring shot is fake, we had this discussion a while back about posting model bullshots. If you recall we both agreed that a render is not a good representation of what the engine will produce with the same model.

your examples are FPS games, where you are very close to the objects. Being that I LOEV oblivion I am not unaware of what a normal map is. Again, I have used them.

my point was that on units I do not think they will look right and at best having some unts bumped and others not will look most inconsistent. So why would we want to see bump mapped units in spring.

Don't get me wrong I love the stuff but I still fail to see why it is so important.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

Holy crap look at the seams on that wheel!
Lol, yeah, that was funny.
I am saying that a render will not look the same as it would in spring
No, if anything, Spring would look better. Rounding shader, different implementation of glow, various things I didn't have time or the inclination to tweak in Poser...
having some unts bumped and others not will look most inconsistent
Dude, if I had normalmap / specmap code, I would take the 2 nights it would take to get everything in P.U.R.E. painted up for them, starting now. It's not that hard.
Don't get me wrong I love the stuff but I still fail to see why it is so important.
That's a giant surprise. Look, it's important because I'll use it, and then everybody else will want to use it. Except, apparently, for you, because you're stuck in a Dark Ages mentality and don't care about realism.
your examples are FPS games, where you are very close to the objects
I beg your pardon? In FPS games, you're all sorts of sight distances. in X3, which I specifically included so that nobody would be stupid enough to say what you just said... they used it to give very large, relatively low-poly surfaces a lot of "detail" at a long range.

Smoth... look man... if you're not interested in this, fine, nobody is going to force you to use it. Really. By all means, skip out on using a method that makes things look a lot cooler...
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

Argh wrote: That's a giant surprise. Look, it's important because I'll use it, and then everybody else will want to use it. Except, apparently, for you, because you're stuck in a Dark Ages mentality and don't care about realism.
You got upset last time I called you names, lets keep this at a professional level. If you cannot handle insults, do not use them. I am just curious why is it that you feel that normal mapping is so important. It can add more detail and I am familiar with it but I am not sure where it will be of importance. We are talking about a game where people often times are any where between 50-100 stories above thier units. Just a discussion to provoke thought or interest, you do not have to take it so personal.
Argh wrote:I beg your pardon? In FPS games, you're all sorts of sight distances. in X3, which I specifically included so that nobody would be stupid enough to say what you just said... they used it to give very large, relatively low-poly surfaces a lot of "detail" at a long range.
Again, with the insults, glass house people like yourself should avoid such things. Actually they use it to make highly detailed models look as though they are composed of millions of triangles by modeling the unit in very high poly count then baking. Again, no insult is necessary, I have played fps games but this isn't an fps.
Argh wrote:Smoth... look man... if you're not interested in this, fine, nobody is going to force you to use it. Really. By all means, skip out on using a method that makes things look a lot cooler...
Hey, I can discuss this all I want, I am curious as to what precisely this would be good for to me. It is not a matter of unfamiliarity it is more of a, what is it that I would want to use this for.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Normal Maps

Post by Argh »

Ah, we're keeping this professional now. That's fine with me.
Actually they use it to make highly detailed models look as though they are composed of millions of triangles by modeling the unit in very high poly count then baking. Again, no insult is necessary, I have played fps games but this isn't an fps.
No. Normal mapping can be used as simple bumpmaps, just as easily as it can be used for baking, which is precisely what I just demonstrated, and what the X3 shots show.
I am curious as to what precisely this would be good for to me
Well, I would think that, given your style, you could mainly use it to emphasize the really strong panel lines you prefer, and add depth to the areas of your models that are currently just using fake shadows, like I was demonstrating in the shots I made.

Basically, normalmapping is cheap and very effective, if done in GLSL. The costs are minor, per polygon, and Spring's been using non-GLSL implementations of fragment shaders (reflectivity, the roundness shader) without it being a severe performance drain. While I think that the main question that I have for Trepan would be, "how do you do normal maps on S3Os, without having to basically rewrite or redraw the S3Os using a new rendering path"... I would think that most people would want to take full advantage of this technology to make their models appear far more lifelike, even at long distances. Again, I urge you shrink the videos down, and watch them- even when the texels are small, it is a big difference, and I think players will greatly appreciate it.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

I am curious how it is that you generate a normal map quickly. All things that I have seen online required higher poly versions of a model for the baking of normals. Is there something I missed?
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Normal Maps

Post by smoth »

hmm, watching the videos zoomed out makes me more desiring that specular and reflective are separated. That would produce a pretty nice effect as well.

Now if you are just wanting bumpmaps could that not be added for channel blue? Hell, if they are not willing to separate specular and reflective. Or even better if the 3do could specify a bumpmap texture.
Post Reply

Return to “Engine”