- Home /
Why do textures map upside-down?
Another noob question from yours truly...
When I import my sprite files and map them to quads or cubes, they are placed on the surface upside-down... I can fix this by simply rotating the image in Paint.Net before importing it, but it's a bit of a pain, as I often forget to do this.
Why does this happen?
Answer by IMD · Sep 23, 2013 at 03:43 PM
Unfortunately, some materials will fail to display if the tiling is set to -1, -1.
As a solution to this, we stopped using Unity's default plane, and used our own plane, which is simply a low poly 2D square obj file. Once imported into your Unity project, you need to update the obj model's Scale Factor from '1' to '-1'. This is accessed via the model's Import Settings accessed via the Inspector panel.
Dropping your materials onto this plane will then display correctly against Unity's world coordinate system, with the bottom-left of a plane going along X,Z being pixel (0,0) of the Material applied to it.
Isaac
Here's a superb asset, free, that does this ...
http://wiki.unity3d.com/index.php?title=CreatePlane
I love that script - it's priceless.
Answer by Waz · Aug 17, 2011 at 08:17 AM
The orientation also depends on the orientation of the quads and the UV mapping. So rotate your quads or their UV coordinates.
Rotate the plane or cube. See the Transform in the inspector.
That's what I tried but then if I want to move the object, the orientation is all screwed...
You could wrap them in an empty transform, but why not just make the trivial models in a modeling program?
I have found with the custom plane script the textures map fine... strange... they are upside-down with Unity's inbuilt planes! Also I was trying to import models I'd made in Blender (just cubes and quads) but that didn't work, either... Still.. all working with the custom script for this game, so no worries.
Your answer