Yellow areas on Normal map = black areas in render

SnapperTrxSnapperTrx Posts: 22

I have some models that I pulled from a game. Each model comes with a texture map, specular map and normal map. Typically they look great once I import them into DAZstudio, but I have noticed that on some of the normal maps the yellow colored areas cause the rendered result to have black edges and kill transparency. I don't know much about normal maps, and I am hoping someone can give me some advice on how to fix the issue. Attached are a few shots of the object along with the normal map. I read something about 'World space' and 'Tangent space', but after looking around online for a few minutes, my head feels like it wants to explode.

Image 1 = Texture+Specular map
Image 2 = add Normal map
Image 3 = Normal map. Notice the yellow areas in the lower right hand side and upper left.

v01_w0101b0001_n.tex_.png
512 x 512 - 202K
test01.jpg
1020 x 889 - 118K
test00.jpg
1020 x 889 - 108K
Post edited by SnapperTrx on

Comments

  • prixatprixat Posts: 1,588
    edited April 2015

    Hi
    I made that comment about yellow being 'world space'.

    ...but looking at this example, It may the alpha map as you mention.

    What does the alpha map look like?

    Post edited by prixat on
  • SnapperTrxSnapperTrx Posts: 22
    edited December 1969

    Hrm, that's a good point. Unfortunately the software I use to pull the models/maps doesn't have any information on a transparency map. Maybe I can get a hold of the developer.

  • prixatprixat Posts: 1,588
    edited December 1969

    You could also take the normal map into an editor and make the yellow into black, and the rest white. (or it might be the other way round)
    I suspect that would work as an alpha.

  • Eustace ScrubbEustace Scrubb Posts: 2,698
    edited December 1969

    Yellow, I'd hazard to guess, is reversed normal: the map is colored based on an XYZ axis system, and if I'm right, the usual bluish color is Z-positive (depth outward from the surface), red being X-positive and green being Y-positive. In that case, yellow (as the RGB opposite of blue) becomes Z-negative and turns normals inward.

  • SnapperTrxSnapperTrx Posts: 22
    edited December 1969

    The "pull normal map into an editor and make an alpha map" thing worked well enough, but I don't feel like going through all the work for, I don't know, maybe a few hundred items. I'll likely just make all the objects into a library and let whoever wants to use them fuss with it. Thanks for the heads up, though.

  • Richard HaseltineRichard Haseltine Posts: 100,833
    edited December 1969

    If you pulled them from a game you can't share them. It's quite possible that you shouldn't be using them at all, other than in the game, but check the publisher's EULA and its stance on fan art.

  • SnapperTrxSnapperTrx Posts: 22
    edited December 1969

    Maybe it's an Nvidia thing? I imported the object into the DAZstudio beta and everything rendered fine (no black spots) with the exception of, yes, there is an alpha map, but the program developer doesn't pull that map from the game file. I'll have to see if I can get him to include it. In the meantime, yeah, I probably shouldn't share anything with anyone, but I will use them in my own renders.

  • prixatprixat Posts: 1,588
    edited December 1969

    Within the game, the alpha was probably derived procedurally from the diffuse.
    In theory you could make an equivalent shader in the shader mixer and then just swap the appropriate diffuse in as required.

  • millighostmillighost Posts: 261
    edited December 1969

    Maybe it's an Nvidia thing? I imported the object into the DAZstudio beta and everything rendered fine (no black spots) with the exception of, yes, there is an alpha map, but the program developer doesn't pull that map from the game file. I'll have to see if I can get him to include it. In the meantime, yeah, I probably shouldn't share anything with anyone, but I will use them in my own renders.

    Um, you do know that you already posted the alpha channel, yes? The normal map from the post above contains an alpha channel which looks more like number of discrete values than a continuous alpha value; that is sometimes done in games to save texture space. A pixel shader could convert that into something useful. For use in a renderer you should split that into separate color and alpha channels.
    nmap.jpg
    200 x 200 - 12K
  • throttlekittythrottlekitty Posts: 173
    edited December 1969

    I have some models that I pulled from a game. Each model comes with a texture map, specular map and normal map. Typically they look great once I import them into DAZstudio, but I have noticed that on some of the normal maps the yellow colored areas cause the rendered result to have black edges and kill transparency. I don't know much about normal maps, and I am hoping someone can give me some advice on how to fix the issue. Attached are a few shots of the object along with the normal map. I read something about 'World space' and 'Tangent space', but after looking around online for a few minutes, my head feels like it wants to explode.

    Image 1 = Texture+Specular map
    Image 2 = add Normal map
    Image 3 = Normal map. Notice the yellow areas in the lower right hand side and upper left.

    I suspect the image for the normal map you've posted got mangled but the forum posting mechanisms here... but if not, that normal map is borked badly and has the alpha applied as transparency in the png i'm seeing. (or it could just be the way Chrome is handling it for me? png is a funny format when it comes to opacity) millighost seems to be showing an intact version of what you posted.

    Your fix (should) be to just remove the alpha channel and re-save. The webbified version of the map I'm looking at in Photoshop is beyond help.

  • SnapperTrxSnapperTrx Posts: 22
    edited December 1969

    According to the software developer, the render engine of the game ignores any part of the normal map where the blue value is less than (255 * 0.5), so half the scale for the blue value. If you look at the complete normal map, the yellow portions are what is causing the problem. I don't know how to make Studio treat the normal map the same way, and I am completely unskilled in using the Shader builder in an attempt to do so (if that's even the way to go). Thanks, everyone, for the helpful info!

  • SnapperTrxSnapperTrx Posts: 22
    edited December 1969

    Does anyone know of any good resources for learning about the Shader Builder in Studio 4.8.0.9? I am bound and determined to get these textures working correctly if I can, but I know absolutely zero about how this Shader Builder works (or even if this is the resource I need to use to get things working).

    Here is the quick story: I have some models I pulled from a game I am messing with. They have three image maps (texture, specular and normal). The shader in-game sets any blue color value less than 128 in the normal map to transparent (appears as a yellow color on the normal map). I don't want to pull alpha channels from the normal maps or create any new types of files, I would like to see if I can build some kind of math in a shader to perform the same function. If you can point me in any direction I would appreciate it. Thanks.

    In case anyone wants to view the other thread with some other details:
    Other Thread

  • Richard HaseltineRichard Haseltine Posts: 100,833
    edited December 1969

    Duplicate threads merged.

Sign In or Register to comment.