Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Question Some way to get different PB objects' textures to tile consistently?

Discussion in 'World Building' started by dgoyette, Feb 14, 2022.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,204
    I'll probably describe this poorly...

    Does anyone know of a way to force multiple PB objects to tile their UVs such that they tile seamlessly between multiple PB objects?

    For example, here you can see a seam between two PB objects:

    upload_2022-2-14_17-36-11.png

    This seam is present because the two PB object don't have the same origin, so the automatic UV mapping for the two objects isn't consistent. I could almost "fix" this by setting their origins to one of the vertices they have in common, but even that doesn't work if the two objects have different rotations. And this approach totally falls apart if I want to align three objects.

    One approach is to merge everything back into a single object, then split it all apart again, but that's cumbersome. (And leaving it as one enormous option isn't good for other reasons, such as lightmapping.)

    So, what I'd like is a way to kind of force an arbitrary number of PB objects to all tile their UVs as though all of the PB objects has the same origin and rotation. Is there a simple way to achieving that? I had hoped that selecting multiple objects and choosing "Freeze Transform" would do this, but it doesn't correct for the object rotations.
     
  2. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,204
    Okay, so I found a way to do this. It's a little clunky, but not too bad. First select the objects you want to make consistent, then press the "Freeze Transform" for those objects. That will reset the origin to (0,0,0) for all of the objects. However, it will also set all of the objects' UVs to Manual. So, individually for each PB object, open the UV Editor, convert to Auto, then clear out / reset all of the offset, tiling, and rotation from all of the objects.

    It would be pretty nice if "Freeze Transform" came with an option to reset all UVs, and leave them at Auto. But this is at least an approach that seems to work pretty well. It's not perfect, since I don't necessarily like having every PB object in the scene set to (0,0,0). (That's pretty awkward for small objects.)