Home Technical Talk

normal map help hardsurface modeling.

passerby
polycounter lvl 12
Offline / Send Message
passerby polycounter lvl 12
been haveing a few problems with the normal maps from a prop im working on.

getting some pretty extream gradients on my normal map, which are causing a lot of artifacts when UDK compresses my normal maps.

here is a shot of my model with wires.

screens_20110909101325.png

and here are my UV's with the normal map.
screens_20110909101346.png

i have assigned hard edges to all my UV seams and have a slight bevel on all of the edges that would be 90deg expect for the bottom which would be hidden anyways so i dont care about that part.

and here is a shot in UDK of the effect the dxt compression is having on my gradients in my normal map.

screens_20110909101811.png

all of my baking was done in xnormal and i tried using the ray distance calculator and just using xnormals ray distance settings to do the bake and i tried making a cage and got the same results.


edit: been exporting to xnormal using xnormals sbm exporter with "export tangent basis" checked off to make xnormal use the same tangent basis as the maya viewport, then im doing the same with UDK by using the "export binormals and tangents" option of the FBX export. but i have noticed that if i tick off export tangent basis for the export to xnormal i get a less gradients in my normalmap but my seams stand out more and the shading doesn't look as accurate when compared to my high poly.

Replies

  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Try Uncompressed when importing your normal map.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    Ace-Angel wrote: »
    Try Uncompressed when importing your normal map.

    ya i know that i just want to find a way top adjust my LP or cage to not get the gradients in the normal map in the first place, since i dont want to waste memory on uncompressed textures.

    and i see lots of other people who are able to get flat surfaces with flat normal colour on them in there bakes.
  • Sandro
    Options
    Offline / Send Message
    Are you sure those are normalmap and not lightmap artifacts?
  • Rick_D
    Options
    Offline / Send Message
    Rick_D polycounter lvl 12
    put edge loops into the low poly model you use to bake:
    white is original LP, green is support edges, red is what the cage deformation will look like and where the gradients will be kept, the rest of the flat surfaces will be flat.

    vwysQ.jpg
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    Rick_D wrote: »
    put edge loops into the low poly model you use to bake:
    white is original LP, green is support edges, red is what the cage deformation will look like and where the gradients will be kept, the rest of the flat surfaces will be flat.

    vwysQ.jpg

    can i remove theses for the game model, and postion is pretty much exactly like supprot edges for subd stuff.
  • EarthQuake
    Options
    Offline / Send Message
    passerby wrote: »
    can i remove theses for the game model, and postion is pretty much exactly like supprot edges for subd stuff.

    No. Editing geometry after the fact changes your mesh normals, you need to rebake every time you edit your mesh normals, or you'll get massive smoothing errors.

    You can however apply hard edges wherever you have UV seams, this should cut down on graduations in your normal map and wont increase your geometry count at all. Just make sure you bake with a welded(averaged) cage in xnormal, not the ray distance. Or simply bake directly in maya.

    There is a uv seam -> hard edge script floating around in maya that saves a lot of time.

    What Rick suggests will work, but its a massive waste of geometry.
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    There is a way to 'cheat' said issue, and I did it some time ago, but not sure how well it will translate to UDK or any real-time asset at all.

    I basically chamfered my edges, but very slightly (on a copy model of my LP) and used that in xNormal to bake out my stuff. This meant the new chamfered edges had not UV, and I didn't know any better.

    After that, applied to my model (the one non chamfered) and got perfect result, the only problem was any edge detail I may have wanted was gone or warped slightly, and pending on how much chamfer you used on your edges, if you have lets say nuts and bolts on your model, it ended up compressing slightly, so some correction was needed.

    I'm not sure what issues this will cause down the pipeline, nor how much chamfering was needed or required, and I tried the 'same-esque' method in Maya and Max, and they broke when I used this method.

    EDIT: Forgot to mention I always keep a Edit Normals modifier in 3DS Max on my stacks and use that almost always to manually sort my vertices.
  • EarthQuake
    Options
    Offline / Send Message
    Ace-Angel wrote: »
    There is a way to 'cheat' said issue, and I did it some time ago, but not sure how well it will translate to UDK or any real-time asset at all.

    I basically chamfered my edges, but very slightly (on a copy model of my LP) and used that in xNormal to bake out my stuff. This meant the new chamfered edges had not UV, and I didn't know any better.

    After that, applied to my model (the one non chamfered) and got perfect result, the only problem was any edge detail I may have wanted was gone or warped slightly, and pending on how much chamfer you used on your edges, if you have lets say nuts and bolts on your model, it ended up compressing slightly, so some correction was needed.

    I'm not sure what issues this will cause down the pipeline, nor how much chamfering was needed or required, and I tried the 'same-esque' method in Maya and Max, and they broke when I used this method.

    Terrible advice. Please do some more research on base concepts of normal mapping.

    EarthQuake wrote: »
    No. Editing geometry after the fact changes your mesh normals, you need to rebake every time you edit your mesh normals, or you'll get massive smoothing errors.

    Its funny, no matter how many times I say this, we still see over and over "Oh just add some geometry, and remove it after you bake". Does. Not. Work. Like. That.

    The only exception is if you can keep your mesh normals EXACTLY the same, at which point, there would be no difference to the end result in this situation. Which is compression artifacts from too much gradiation in the normal map image itself.
  • Pedro Amorim
    Options
    Offline / Send Message
    EarthQuake wrote: »
    Terrible advice. Please do some more research on base concepts of normal mapping.




    Its funny, no matter how many times I say this, we still see over and over "Oh just add some geometry, and remove it after you bake". Does. Not. Work. Like. That.

    The only exception is if you can keep your mesh normals EXACTLY the same, at which point, there would be no difference to the end result in this situation. Which is compression artifacts from too much gradiation in the normal map image itself.

    LISTEN TO THE MAN! GOD DAMNIT!
  • Ouija
    Options
    Offline / Send Message
    Below is a clean and simple 128x128 map imported into UDK with default normal map texture settings. Artifacts appear only on slopes, the two flat patches are untouched by compression.
    surface.jpg
    Conclusion? Your detail mesh and render mesh aren't parallel to each other. Most likely your detail mesh contains bevels but no solid chamfers around edges, leading to the flat surfaces having some nearly unnoticeable curvature that creates small but significant differences in the normal map - leading to compression making things look ugly. I suppose solid chamfering the flat faces might help keep the normals perfectly flat on them, though if it's a problem with mesh alignment - you're out of luck here, your best bet would be to paint the flat surfaces in photoshop with (128,128,255).
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    thanks EQ will try out some things you said when i get some time, i already was using hard edges on my UV spilts but i will add some support loops around the worse parts use a cage in xnormal.

    Ouija it isnt that the faces on the detail model and the lp are angled it is the vertex normals in the corners of the face point in the wrong direction.

    i think im good to add a little more geo since it is still under 1000 tris and once i make hte hologram shader for inbetween 2 pillars it will be kinda a hero prop, so it can afford more than most things in the scene.

    since this scene is only for a portfolio i might just use uncompressed normals in the end anyways, but it still is good to learn the best way to go about it and keep it under budget in a production environment.
Sign In or Register to comment.