Jump to content

Mantra Swizzle Coordinates (Direct X/Open GL Normal)


Recommended Posts

Hi all,

 

Not quite sure which coordinates by default Houdini Mantra uses for normal map, is it +X +Y -Z? I'm exporting Open GL normal maps from Substance Painter which were working like a charm in Maya, but seem not to be working correctly in Houdini?

Here's the comparison for other softwares.

Thanks!

Software Red Green Blue
3ds Max X+ Y- Z+
Blender X+ Y+ Z+
CryENGINE X+ Y- Z+
Maya X+ Y+ Z+
Modo X+ Y+ Z+
Source X+ Y- Z+
Toolbag X+ Y+ Z+
Unity X+ Y+ Z+
Unreal Engine X+ Y- Z+
Link to comment
Share on other sites

The first thing to do is make sure that the Texture Color Space is set to Linear, for images where "flat" or unperturbed is defined as 0.5 float (or 127/128 in 8-bit channels).  I've had PNG's bite me that way before, where the file had a nonlinear gamma or something, and you just get "wrongness".

I'm fairly certain that Houdini uses +X +Y (on my Displacement Texture VOP node, both "Flip" checkboxes are off.)  This is, in terms of the appearance of the channels in Photoshop, "lit from the right" in X (red) and "lit from the top" in Y (green).  I can't speak to the Z blue channel, as its effects are really subtle, so if the blue channel were "wrong" in the textures I've been using, I wouldn't necessarily know by looking.  My current normal maps use 1.0 (255) for unperturbed, and range down to 128 for maximum perturbation, though mine are derived mine from the X and Y channel.  I would expect it to be +Z if for no other reason that it would be arbitrary to make that one -Z just to be contrary :)

I'm also assuming tangent space normals here.

 

Edited by jimmay
Link to comment
Share on other sites

  • 2 weeks later...
On 6/16/2017 at 0:48 AM, jimmay said:

The first thing to do is make sure that the Texture Color Space is set to Linear, for images where "flat" or unperturbed is defined as 0.5 float (or 127/128 in 8-bit channels).  I've had PNG's bite me that way before, where the file had a nonlinear gamma or something, and you just get "wrongness".

I'm fairly certain that Houdini uses +X +Y (on my Displacement Texture VOP node, both "Flip" checkboxes are off.)  This is, in terms of the appearance of the channels in Photoshop, "lit from the right" in X (red) and "lit from the top" in Y (green).  I can't speak to the Z blue channel, as its effects are really subtle, so if the blue channel were "wrong" in the textures I've been using, I wouldn't necessarily know by looking.  My current normal maps use 1.0 (255) for unperturbed, and range down to 128 for maximum perturbation, though mine are derived mine from the X and Y channel.  I would expect it to be +Z if for no other reason that it would be arbitrary to make that one -Z just to be contrary :)

I'm also assuming tangent space normals here.

 

yep, tangent space normals, should've mentioned that, although I think object space normals work with same system.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...