Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Model Texture's Flipping?

Discussion in 'General Graphics' started by Foestar, Oct 27, 2016.

  1. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    344
    So the issue seems to be something that I don't remember ever having when I first started but as of late ever since I got back into design has been happening frequently and I wanted to know if there's a work around or am I just doing something wrong?

    I design my characters, unwrap them, design their textures, attach said texture through the material editor, then export into unity. The model looks good (despite my poor texture skills), however it's skin seems to be flipped when in Unity. HERE is an image to show what I mean.



    I've read a bit about this and heard it could have something to do with normals but nothing I tried with those worked. I also had this problem on my previous model which I used the collapse method but I only collapsed and it worked. The resetXform didn't. When I try doing that with this model it turns all black and awkward and the textures no long work with it properly at all.
     
  2. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    344
    Sigh. I have no idea why, but for some unknown reason to me my normals must be inverted in an incorrect manner on this model in order for this model to show up right in Unity. So the image on the right which is in Unity I had to make it look like that in 3ds Max just to get it to work. I'm not even gonna ponder it anymore, just gonna move on since I got it working. But if anyone else knows why the normals are acting this way I'd love to know.
     
  3. RiokuTheSlayer

    RiokuTheSlayer

    Joined:
    Aug 22, 2013
    Posts:
    356
    Check the import settings for the model, there should be an option to calculate or import normals. Try messing with that.
     
  4. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,246
    The most common cause is the faces in 3ds Max are flipped, since it defaults to not back face culling people frequently don't notice anything is wrong. However in this case it sounds like that's not the problem, which makes me think the mesh has an asymmetric scale in Max.

    Basically meshes in Max have multiple sets of transforms, the main one you manipulate, sometimes a second one (or many compound ones) in the modifier hierarchy, and then a third hidden one that I have never found a good way to directly adjust.

    When ever I experience something weird that I eventually track down to be being caused by this hidden transform I try two things. First is the reset transforms tool, and if that doesn't work the nuclear option of I make a box, make it a editable poly, append my model to it, then delete the box mesh from the model and rename it. There are a number of scripts out there for max for testing transforms, and many of them do almost exactly what I just described because it really is the only way to ensure a completely clean transform on an object. It's annoying though because it means you lose the modifier hierarchy.
     
    Foestar likes this.
  5. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    344
    Yeah your box trick worked, so I followed up reading about that and found that it was a messed up transform that originates from the origin model I used.

    I created a humanoid model to base as a starting point for all my models for each individual projects. It's just the basic outline of a male that I can reform into the build I need before customizing the details or adding some. When I did this I used the box cut mirror technique where you have half a human you model and the mirrored side molds sculpt the first. The problem with this is when you have it mirrored like that it flips the faces as well and screws with the transform when you convert it to an editable poly.

    So that was where it originated from. Thanks for the info, even though I was passed the issue by using another work around it's good to have figured it out to avoid in the future or fix. Also my mind isn't screaming at me with ideas about it anymore. lol
     
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Glad you found the problem and was able to solve.
    For anyone else who run into this problem, to avoid this issue just reset the xform of the model from the utilities tab, when you are complete with the modeling phase, before rigging/skinning.
    All models need to have transforms set to 100 on local x,y,z respectively. Easiest way to check if the transform is correct is to have the model selected and right click on the scale button. If the numbers of the local axis read anything other than 100, reset xform.

    upload_2016-10-31_12-31-9.png
     
    Foestar likes this.
  7. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,246
    Works most of the time, but not 100% ... hence my "nuclear" option above which does work 100% of the time.
     
    theANMATOR2b and Foestar like this.
  8. GilesDMiddleton

    GilesDMiddleton

    Joined:
    Aug 12, 2015
    Posts:
    91
    And similarly I've seen very odd behaviour in imported Blender files where textures appear to crawl over the surface, or polygons reflect completely the wrong light. IIRC it was due to not hitting 'apply rotation & scale' on the transform before saving.
     
    Foestar likes this.