- Home /
Can I independently manipulate UVs of a multi-material object?
I have created an object in Blender where I created two UV mappings -- each to it's own material. I have also successfully imported that object into Unity and assigned separate materials to each "set" of UVs.
To further illustrate, think of a coin object where I have separate UV mappings and materials for the head and tail; or a painting where I have separate UV mappings and materials for the frame and picture. Each of these example is modeled as a single object.
When I import my multi-material object from Blender, I have 2 submeshes for it in Unity. OK.
My question: I am trying to employ texture atlases for each of my material UV "sets" (submesh?) where I would manipulate each set of UV coordinates independently (coin head vs tail; or frame vs picture).
Is this possible?
Let's assume that for the sake of this question, that alternatives approaches including changing out the materials at runtime, changing the material scale and offsets at runtime or splitting my object into two distinct objects have been considered and discarded for various reasons.
I really want to be able to do this by UV coordinates.
Thanks, Manny
Not something I've ever done, but: The UVs are associated with vertices, so the key to making this work will depend on having independent vertices for each submesh. You cannot share vertices between triangles used by one submesh and triangles used by another submesh. $$anonymous$$esh.GetTriangles() will get the triangle list associated with a particular submesh. So as long as the vertices are not shared, then you should be able to use an atlas on a material by material basis.