Announcement

Collapse
No announcement yet.

Is there any way for material to know if it is on a mesh that has been mirrored?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Is there any way for material to know if it is on a mesh that has been mirrored?

    I have a bunch of materials that tile in world space so the textures stay at a uniform scale when you change the mesh's scale. Everything was working fine, but I just discovered that if I mirror the mesh, the normals all get reversed. It would be a huge pain for me to try to find every mirrored mesh and unmirror it now. Do you know of a way for a material to know if its mesh has been mirrored? If that's possible, I'll just flip the normals in the material.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    #2
    Turns out it wasn't that bad finding all of the mirrored meshes. I set a material instance so that the flipped normal would be more obvious, and I went and replaced all of those meshes' materials with a flipped-normal version of the offending material.

    Still, if any of you know how to make a material aware if its mesh has been flipped, I'd be interested in knowing.
    Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

    Comment


      #3
      Try this. Vector transform will get you DrawSize of your mesh. Then you just need to check if it's positive in all directions, I guess.


      Comment


        #4
        Wow. I actually didn't think this was possible. Thanks!
        Check out Himeko Sutori, the upcoming tactical RPG where you control armies of over 100 unique characters.

        Comment

        Working...
        X