Home Technical Talk

Normal mapping polycounts and texture res

polycounter lvl 18
Offline / Send Message
Rick Stirling polycounter lvl 18
I was thinking about normal mapping models, and how normal mapped models look nicer, and I was thinking of a little fun project. Anyway, since there are a few on here that have built several NM'd models (and some that have worked with them in games), I was wondering...

What is the performance hit like? If I had a 2k low poly model, would it be better performance/visual wise to normal map it, or should I forget about that and just chuck an extra 1-2 thousand polies at my low poly mesh.

Also, realistically what is the smallest texture resolution I can get away with for a normal map? Would a 256x256 NM give enough definition? And would it give enough defintion to make it worth having the overhead from the normal mapping?

I'm just trying to come up with the best way to approach this techwise.

The reason I wanted the normal mapping is that I wanted to set the entire game at night, on moonlit and gaslamp lit streets. My first tests had some nasty lighting on curved surfaces due to the standard vertex lighting. I was hoping that normal mapping would 'soften' things a lot.

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    IMHO, performance impact depends totally on the hardware. AFAIK it's really a shader hit, different from a vertex hit. If your game is fill-bound, then replacing the normal maps with more vertices will probably improve your performance. But if its transform-bound, then vice-versa.

    But ultimately I think you'd have to toss more than just a couple thousand triangles at the model to duplicate what normal maps would otherwise do.

    Might be worth some time roaming around Doom III some more... their harsh lighting is a lot like nighttime lighting, and I could see some lower-res normal maps on their props and such.

    As for the smallest res, that depends on how small the surface is in-game, and what details you want in it. Like if it's just a smooth tube, you could get away with an 8x8 or so... that would give you 8 normals around the curve rather than the 4 you might have if it's a four-sided cylinder.

    Does that make sense? I think ultimately each situation is different, so in-game stats become essential, if you want to squeeze the best performance/best look ratio.
  • FatAssasin
    Options
    Offline / Send Message
    FatAssasin polycounter lvl 18
    I never thought of using normal maps for something as basic as making a tube look more round, but it makes perfect sense. Any more handy tips like that up your sleeve? smile.gif
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    The main question is, what is it for. If you want to have fun with latest tech and cool fx, you'd go for normal maps. As your main clients will be those with fat graphic cards anyway. If you rather want to get the "game" or whatever done, and be playable for many, you would step back a bit. Non normal map graphics can be very efficient as well and looking at unreal2 engine games or quake3 stuff like Call Of Duty, you can get very far with the old tech.
    Also I think time is a big issue, cause normal maps and so on require a lot more detail then the regular models.
    While no pro on this stuff, I implemented it into an engine project, and I think that "non normal maps" is still decent enough and easier to pull of then the benefits of bump mapping.
    However the fx with dynamic lights and normal maps are unmatched as well as the detail possiblities as eric said.
    really depends on the engine and hardware, ie people you want to address.
  • Eric Chadwick
    Options
    Offline / Send Message
    Yeah, good advice CrazyButcher.

    FatAssasin, one easy trick I saw recently was in Doom III where they had some demonic-looking tentacles snaking across a wall. They used UV-sliding on the normal map to get the tentacles to look like they were moving across the wall, very effective. The mesh itself never moved, just the UVs.

    I've tried some other less obvious tricks, like inverting the normal map so it pushes the normals out the other side of the mesh, lighting the surface from behind. If combined with a forward-facing map, you can do light-transmission kind of effects, like the underside of a leaf on a sunny day.

    Here's another one, that actually failed, but I documented it at the time so I wouldn't forget what I did.
    What it looks like in-game, and how it's made.
    The idea was to get some 3D foliage that could be dynamically-lit, but wouldn't have to be sprites. Not really all that effective though because of the seams, and also it required the leaf-planes to be at right angles to one another... not very naturalistic.

    Anyhow, there's a couple tricks.
  • Illusions
    Options
    Offline / Send Message
    Illusions polycounter lvl 18
    As for a couple of tricks there is also the pseudo radial aniosotropic effect I was able to come up with using normal maps (think the power button on a Mac, or a CD, or metal knobs on a stereo)

    radialani_v1.gif

    a real pain in the ass, not really worth it to make thing I found out...
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    using normal maps on particles also makes them much more volumetric, then again kills fillrate wink.gif
  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    "The main question is, what is it for. If you want to have fun with latest tech and cool fx, you'd go for normal maps. As your main clients will be those with fat graphic cards anyway."

    I'm just playing with the tech, and it would be more likely I'd be aiming at consoles (PS3/XBOX2). I'm working on the assumption at the minute that the next gen consoles will be roughly the same as a high end PC that plays Doom3 on full detail with no chugging.

    What its for is basically just to round out the lighting to prevent hash edges. But it would be nice to have painted collars and buttons and warts and eyelashes that looked 3d. Mind you, eyelashes are more likely to be done in the bump map.

    "But ultimately I think you'd have to toss more than just a couple thousand triangles at the model to duplicate what normal maps would otherwise do."

    Yes, you are totally correct smile.gif

    The UV-sliding thing sounds great, I was thinking of having some cthulhu based horror creatures in the game - or more like around the edges to be less blatent. A 3d rippling effect would look great.


    A big factor for me to consider is that I'm doing this on my own for fun, so I'll have to divide my time up. Would it be worth it for me to spend my time making a hig res model and a low res one to make normal maps, when I could use that time to build another character. I'll have to do some time and motion studies I guess smile.gif


    Right, another question:

    I've seen how in max7 I can great a highpoly mesh, and a low poly mesh and render the normal from the high to the low. Does the low shape need to be the same shape as the high poly? For example, could I make a bunch of big square template shapes in high res, like a brick wall or gravel, then render then onto a long thin low poly object? In this case its sqaure to rectangle, but it could be sqaure to round circular or whatever.
  • Eric Chadwick
    Options
    Offline / Send Message
    [ QUOTE ]
    For example, could I make a bunch of big square template shapes in high res, like a brick wall or gravel, then render then onto a long thin low poly object? In this case its sqaure to rectangle, but it could be sqaure to round circular or whatever.

    [/ QUOTE ]

    The normal map extracting tools all work basically the same. They start at the low-poly surface, and fire a series of rays outwards from it, in the directions of the normals on this mesh. Some tools let you adjust the angle the rays are fired out at, by using a second inflated mesh. Sometimes you can also choose the distance they fire out to. Then once the rays reach that distance, other rays are fired back inwards. Whenever these rays intersect with a surface on their way back in, the normal from that surface is recorded into the normal map. Sometimes the tools stops the rays when they reach the center of the original object, sometimes you can choose how far the rays should go before stopping.

    So to project rays from one model to another, they should be roughly a similar size and layout, otherwise the rays won't hit the surfaces you want.

    For walls and other tiled surfaces, I just create a tilable normal map. I model a square section of the wall, then a square low-res model. After capturing the normal map, I toss out the temporary square low-res model, and tile the map across the in-game long/tall wall.

    Then I check the normal map in Photoshop, fixing tile seams, then renormalize it with Nvidia's normal map filter.
  • Rick Stirling
    Options
    Offline / Send Message
    Rick Stirling polycounter lvl 18
    So, since its a tangent space map that has been generated, I could just slap it on anything that I have mapped and check for seams?
  • Eric Chadwick
Sign In or Register to comment.