Home Technical Talk

Concerning Normal-Maps

Hello everybody,

I m reading in this forum for quiet some time and want at first say thank you for all the information you came up with.

I am trying to create a space-game with some buddies and think about how to tackle normal-maps appropriately.

I made a low-poly space-ship and just smoothed it and made a 2K-normal-map out of it. The model has 2 uv-sets. One for the color (which has overlapping uvs as half of the model was mirrored) and one for the normal-map and a dirt-map to break the symmetry.
In the uv-set of the normal-map I reduced the uv-shell for the larger areas which wouldnt have much detail and have just to look smooth and gave the front of the wings more texture-space to paint in some details in later on.

Looking through the maya hardware-rendering it looks quiet nice and smooth but has some artifacts due to the lack of texture-space. If I reduce the other shells I will get artifacts there. Well, this is my first problem.

My second is that some of my buddies have a significant performance drop when handling 2k-textures. But handling multiple textures that accumulate to 2k do not make any problem.

So I am not that sure about how to tackle normal-maps appropriately. I think about giving the model different materials to the different uv-shells as they were already splitted and assign multiple 512x512 textures to them but do 2K-textures really make such problems? And is 2K not big enough for a decent normal-map?

Here are some pictures of the model and the uv-sets:

dds.th.jpg
jpgy.th.jpg

Color-UV
coloruv.th.jpg
Normal-UV
normaluv.th.jpg

As you can see, I am pretty lost. I have some knowledge but just theorie lacking experience :poly122:.
Suggestions are greatly appreciated.

Replies

  • Muzzoid
    Options
    Offline / Send Message
    Muzzoid polycounter lvl 10
    It probably has to do with saving your textures as jpegs. NEVER DO THIS. Jpegs are a lossy format causing you to loose data when you save. Use tga or png. (just noticed that only one image you said jpeg textures though...)

    Also 2 k is way too huge. It is impractical for most games. Remember that a single 2048 map is 4 1024 maps.

    I think that your main problem is that you arent testing with a model with significant details to actually benefit from the map, go back and model a proper high poly to test with. There is little point just turbo smoothing a model and baking a normal map from that....
  • Mark Dygert
    Options
    Offline / Send Message
    Mr.Mint wrote: »
    I made a low-poly space-ship and just smoothed it and made a 2K-normal-map out of it.
    More polys doesn't mean more detail, simply smoothing something isn't going to pack any more detail into the mesh in fact if it relaxes as it smooths its going to destroy it.

    - You need to work on controlling hard edges by adding more edges on either side, the closer they are, the harder the edge. Making it easier for the baking process to read the high poly hard edges. Typically there is some detail lost when you bake a mesh so sometimes you need to overstate some of the high poly details a hair to get a good bake.

    - You need to create a high poly model, not a sub-divided low poly. Focus on some high poly modeling techniques there are a lot of tutorials out there for 3dsmax I'm sure with some digging (possibly on highend3d.com?) you can find some if not more for Maya. Check out this thread and some other high poly work in progress threads and you'll start to get some ideas of how to build in that luscious high poly detail.

    - I'm not sure what kind of artifacts you're getting but it could be a padding issue? your UV shells are really close to each other and if the bake is set up to add a few pixels of padding around the shells it's probably spilling over into the surrounding shells. Padding is important so the void doesn't bleed into your shells especially when your maps get downsized (search for Mipmap they're used extensively in games). It's hard to tell without seeing the normal map and its artifacts. They could also be missed rays if you're rendering with a cage, but seeing the artifacts would help diagnose the problem.
    Mr.Mint wrote: »
    So I am not that sure about how to tackle normal-maps appropriately. I think about giving the model different materials to the different uv-shells as they were already splitted and assign multiple 512x512 textures to them but do 2K-textures really make such problems? And is 2K not big enough for a decent normal-map?
    There isn't a standard method for normal maps so it starts to become an engine specific question. I would suggest picking an engine and designing your asset around that workflow.

    You've downsized all your normal map pieces trying to squeeze them onto one sheet (which is giant by the way). Typically (but not always) you want your diffuse, normal and spec maps to share the same UV channel. This makes painting the details much much easier. The second UV channel is for a shadow map/light map which does require 100% unique UV's and typically is a really small map.

    As a general rule of thumb you can mirror normal map UV's you just need to be smart about the seems when you're baking. Normally you want to move the mirrored half of the shell outside the 0-1 range so it won't render but the original half won't be rendering the cut off seam. If you move it exactly one "tile" over it will still read as if it was sitting in the 0-1 range but it won't bother the rendering.
  • Mr.Mint
    Options
    Offline / Send Message
    Thank you very much Vig and Muzz for your Input.
    More polys doesn't mean more detail, simply smoothing something isn't going to pack any more detail into the mesh in fact if it relaxes as it smooths its going to destroy it.
    My attempt was to make that ship more roundish (?) as it should. Just unifying the vertex-normals (or soften-edges or smoothing group) for a smooth look didnt give me such a nice result.

    smoothededges.th.jpg

    I tried to check out if it will speed up my workflow if I just bake out the basic normals and overlay details by converting heightmaps and put it together in photoshop.
    like here

    I did some beveling and implying some supporting-edges before smoothing to keep a pretty hard-edge-look where it should be.

    supportingedges.th.jpg

    But I left them out for this test as I got artifacts when calculating the normal-map with the envelope (when adding edge-loops the uvs became disconnected) and calculated the normals by uv-layout which gave me better results.

    artifactsobjectspace.th.jpg

    beveledcuts.th.jpg

    You've downsized all your normal map pieces trying to squeeze them onto one sheet (which is giant by the way).
    So applying multiple materials and maps should be the way to go?
    As I said, I just tried to give the regions more texture space where the details should occure and scaled down the larger areas where it just had to look smooth.

    you want your diffuse, normal and spec maps to share the same UV channel
    I just thought by myself how to get the most out of it
    The second UV channel is for a shadow map/light map which does require 100% unique UV's
    I searched a lot as I always thought it should be possible but found nothing mentioning that. So I thought normal-maps need also unique UVs. Thats great news. Thank you very much.
    It probably has to do with saving your textures as jpegs. NEVER DO THIS. Jpegs are a lossy format causing you to loose data when you save. Use tga or png. (just noticed that only one image you said jpeg textures though...)
    Yes, it was just a subtle way from me to ask which file-format gives me the best result with less hard-disk-use and about texture size as I also thought that 2K might be a little bit too big.
  • Mark Dygert
    Options
    Offline / Send Message
    Mr.Mint wrote: »
    My attempt was to make that ship more roundish (?) as it should. Just unifying the vertex-normals (or soften-edges or smoothing group) for a smooth look didnt give me such a nice result.
    Ahh that makes sense. You should run a few loops horiz across the windows it will subdivide the large polys and you'll get smoother results.

    The big valley by the window could cause problems. When it bakes it backs a specified distance away from your mesh and projects down to it. With geometry like that its going to back up into another poly and cause wierd artifacts. You can also render with a control cage (I think you can tweak it too, I know you can in 3ds). you can also turn on display normals (forget the maya term) which will show you the angle the normals are facing which will be the angle high poly is captured at. If you have a bunch of interseting normals it could be a problem area. Like the trench by the windows.
    Mr.Mint wrote: »
    I tried to check out if it will speed up my workflow if I just bake out the basic normals and overlay details by converting heightmaps and put it together in photoshop.
    like here
    CrazyBump is great for this kind of stuff. I LOVE it.
    Mr.Mint wrote: »
    But I left them out for this test as I got artifacts when calculating the normal-map with the envelope (when adding edge-loops the uvs became disconnected) and calculated the normals by uv-layout which gave me better results.[/url]You added extra edges to the low correct? Was that after you UV'd it? Might need to relax the shells or re-uv them? Not really sure how to fix that in Maya...
    Mr.Mint wrote: »
    So applying multiple materials and maps should be the way to go?
    As I said, I just tried to give the regions more texture space where the details should occure and scaled down the larger areas where it just had to look smooth.
  • Mr.Mint
    Options
    Offline / Send Message
    Ah, thank you again Vig for your input, greatly aprpeciated really.

    Good to know about the intersecting normals. Next time I will modify the envelope (or control-cage) more subtle.
    CrazyBump is great for this kind of stuff. I LOVE it.
    Yes, at the moment I have the trial running but cant afford a licence so I switched to xNormals. I ve heard xNormals gives better results and calculates faster but lacks shape-recognition so that you cant just simply put any image inside.
    You added extra edges to the low correct?
    Yes I duplicated the low, applied the edge-loops and smoothed it.

    I am thinking about rebuilding that model and make it more efficient. Adding additional edge-loops as it is already at 6.400 triangles might boost the polycount a little bit too high. But I am pretty new at game-modeling as my buddies are. So I am in the dark if I am still what you can call efficient or not. And because of that I am eagerly missing the answer of the quote you wanted to reply (I guess).

    This should be a pretty small space-ship but I thougt it might be nice to do add some normal-mapped technical details in the front and back-holes of the wings. But I am not sure if I could get it right if all maps are connected to one uv-set.
    I am facing the tradeoff that I want crispy technical details in the holes of the wings and nice warning-stripes and letters on the wings and under the cockpit.

    So I guess I have to decide or can I get it all done without letting of on one of these goals? (I have the feeling that my normal-map, allthough 2x size is pretty pixelated and as I said, if I give the shell more texture-space and downsize the others then artifacts will come up there).

    As I said, pretty lost. Thank you for taking your time.
  • Mark Dygert
    Options
    Offline / Send Message
    Opps looks like I wasn't quite done with the post. heh.
    Mr.Mint wrote: »
    So applying multiple materials and maps should be the way to go?
    As few and as small maps as possible is normally a good direction. More maps means more draw calls (I think that's the right term?) but it depends on the engine again, some handle a bunch of smaller maps really well, but in general when you're dealing with 1 model, 1 map is normally optimal, unless pieces can be switched out (like heads or weapons) then unique maps for those pieces are sometimes more preferable.

    Mirroring the Normal map (Using the same UV's as the diffuse) would double the res on the pieces but of course they wouldn't be unique, which will probably be fine, the design looks pretty symmetrical.
    Mr.Mint wrote: »
    I am facing the tradeoff that I want crispy technical details in the holes of the wings and nice warning-stripes and letters on the wings and under the cockpit.

    You can sometimes get sharp crisp lines by straightening your UV's, a straight line will look more crisp than a diagonal or arch that's aliased. But that can be tricky to pull off as it can cause distortion. But for example the piece in the lower right corner of your normal layout is rotated almost at a 45 degree angle. If there was a normal map detail running down the center it would probably artifact because its having to draw a diagonal aliased line. Straighten it and it draws straight pixels, giving sharper detail.

    Text and lettering is always a killer it requires a lot of space to be crisp, it normally doesn't mipmap that well either. You also have to think about localizations. Its for those two reasons people often stick to symbols. Instead of typing "hatch" people will put a arrow and define the hatch. You can also imply text without actually typing it. For example if you put a series of dashes under the arrow people might see small text as they run by not stop long enough to take notice its just dashes or a solid line.
    Mr.Mint wrote: »
    Yes I duplicated the low, applied the edge-loops and smoothed it.
    I am thinking about rebuilding that model and make it more efficient. Adding additional edge-loops as it is already at 6.400 triangles might boost the polycount a little bit too high.

    This is a pretty good thread about adding extra loops to the low poly to help ease the transition from high to sharp-ish low poly. http://boards.polycount.net/showthread.php?t=50588
    Pretty much a few more polys won't kill things if it's going to have a meaningful impact on the look of the model. For example the vent with the artifact below it, could really benefit from a few more polys to smooth it out. The artifact looks like some UV stretching btw?
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    btw one can get smoother results from changing from per-vertex lighting to per-pixel. By normalizing the vertex normals on per pixel level you get better quality out of the mesh. That doesnt require a normalmap and still looks much better than classic goraud shading
Sign In or Register to comment.