OK, noob question. Im new to this whole process (maybe I should have started with an easier project) so bear with me. Ive checked this forum and Google but I couldnt quite find what I was looking for. My problem is that I have mirrored geometry that share UV space with its non-mirrored counterpart. The mirrored geometrys UVs are inverted. Max displays all mirrored geometry properly. Marmoset does not. It only became noticeable to me when I added the specular map. As you can see there is weird specularity going on with all mirrored (inverted UVs) geometry:
Is this dependent on the 3d app/game engine whether or not it can display mirrored UVs properly? Am I doing something incorrectly or that isnt standard practice? Do I need to provide unique UV coordinates for all mirrored geometry? For instance, I mirrored the left leg to the right. The right leg is sharing UV coordinates with the left leg but they are inverted. Do I need to provide unique UV coordinates for the right leg and mirror the UV coordinates so they are right side up? It would be a shame since I save texture space by sharing UVs.
Ideally Id like to keep my UVs as they are but Ill change them if what Im doing isnt standard practice or is not possible.
Im using version 1.10 of Marmoset.
Replies
Un-instancing and freezing geometry in Maya will cause the faces on that mesh(es) to point in the opposite direction of the normal. In the viewport, things usually don't look faulty, but when toggling face normals one will find out that they are inverted.
Here you might think that you just select the faces and go to Normals > Reverse. Wrong! That doesn't solve the issue. The faces will still point in the opposite direction.
So to bypass this somewhat annoying issue, I wrote this MEL-script (it works on instances objects as well):
proc string[] getShapes(string $mesh[])
{
string $shapes[];
$shapes = `listRelatives -fullPath -shapes $mesh`;
return $shapes;
}
proc string getXform(string $shapes[])
{
string $xform;
for ($obj in $shapes)
{
if ( "transform" != `nodeType $obj` )
{
string $parents[] = `listRelatives -fullPath -parent $obj`;
$xform = $parents[0];
}
}
return $xform;
}
///////////////
string $mesh[], $shapes[], $xform;
// Un-instance
convertInstanceToObject;
// Freeze
makeIdentity -apply true -t 1 -r 1 -s 1 -n 0;
// Invert normals
polyNormal -normalMode 0 -userNormalMode 0 -ch 1;
// Get mesh name, then shape name, then transform node
$mesh = `ls -sl`;
$shapes = getShapes($mesh);
$xform = getXform($shapes);
// Turn off double sided, flip the face and turn on double sided again
setAttr ($xform + ".doubleSided") 0;
setAttr ($xform + ".opposite") 0;
setAttr ($xform + ".doubleSided") 1;
hey dude, I know this post as old AF but you just saved me so much headache. Thank you to your past self for this script.