Home Technical Talk

How is it called when you stack UV's of multiple parts of your mesh to save space?

polycounter lvl 7
Offline / Send Message
globglob polycounter lvl 7
Hi,

I'm really trying to go deep into UVs and optimization, I want to save texture space with my models. Often time I have objects that just repeat themselves across my model (for example the rings of a chain), so I want for them to be unwrapped the same way at the same position on my UV space (this, I know how to do), since I don't need texture variations between them.
What is this technique called?

I know it's used over and over in games.  Also, what is the workflow when doing this with Substance Painter?

If I have overlapping UV islands in Substance Painter I'm just gonna get glitches. Do I have to make a special model just for texturing it in Substance Painter, with only one instance of my repeating objects, to be able to create my textures?


If I understand correctly, they say to keep one object inside the UV space and move all the other repeated ones exactly 1 UV unit away (so basically, onto the next UV "tile") to allow for correct baking. I'll try doing that and will edit this post if it works, but even if it does I'm still very curious on what more knowledgeable artist have to say about this.

Hopefully all of this make sense, I'm self taught and kinda missing the proper vocabulary for this.

Thanks! =)

Replies

  • kanga
    Offline / Send Message
    kanga quad damage
    I dont even think there is a correct term for this, people just say 'stacking uvs'. I never tried this with sp but if it cant handle stacking, just do one link then go back to your 3d app and hit array (or whatever the the app calls it) to make your copies.

    Unreal Studio recognizes instances so its great for repeating items but in your case I wonder if that would be efficient. Perhaps someone will rock up with the correct info.
  • Andreicus
    Offline / Send Message
    Andreicus polycounter lvl 6
    It's called UVs stacking or UV overlapping for what i know.

    I do it based on the type of mesh that i have. It's quite easy really, you simply stack the UV islands that are the same, topology wise ( ex. you have 2 rings that are the same and you stack their UVs on top of each other ), then you import the mesh inside Substance Painter for baking and texturing.
    Remember to name the meshes accordingly ( _Low or _High ex. Ring_Low and Ring_High if you have an high poly ) it will be important later.
    All the UVs go into the 0-1 space.

    For baking be sure to put "Only same mesh name" for all the baking options that support it so you won't get any artifacts ( that's way you must have a proper naming convention ).
    If you have an high poly mesh that you use only for ID maps then bake the low poly with itself without the ID and after that bake the ID maps using your high poly.
    Texture the mesh in the way you want it.
    Profit.
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    @Andreicus This is incorrect. You can only overlap uvs after you bake, otherwise you will get z-fighting.

    OP - stacked, shared, overlapping. Any of these is generally a term for it.

    Substance will update your stacked uvs every time you reimport the mesh from Edit>project configs.

    You can offset uvs for baking and then reposition in 0-1 post bake. Or you can just clone geo after baking. Either is fine. Personally I don't bother offsetting.
  • Andreicus
    Offline / Send Message
    Andreicus polycounter lvl 6
    @Andreicus This is incorrect. You can only overlap uvs after you bake, otherwise you will get z-fighting.

    OP - stacked, shared, overlapping. Any of these is generally a term for it.

    Substance will update your stacked uvs every time you reimport the mesh from Edit>project configs.

    You can offset uvs for baking and then reposition in 0-1 post bake. Or you can just clone geo after baking. Either is fine. Personally I don't bother offsetting.
    Really? I usually stack uv in Maya before export and I never had a problem with z fighting like when you overlap meshes inside an engine. 
    Do you mean lightmaps errors? Because nowadays I use only dynamic lighting with gi be it in marmoset or ue4. 
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    You can get bake errors in most bakers if you have stacked UVs , as @musashidan says, at the time the Baker is working out what to project onto what Z fighting can occur and bad shit happens .  You get the same sor  of issues with overlapped lightmap uvs. 
    A little known feature in max is that you can offset UVs in W  which  will affect the bake priority (in max) 

    In Painter you can't paint directly onto parts of a mesh with offset shells but I've never seen that as a problem. Usually I leave things offset until exporting to game, at which point I shove everything back into 0-1.

    I'd be a bit nervous of what painter would do with stroke projection if you went from a stacked to unstacked version of a model - it's certainly possible strokes would be lost in translation. The other way round should be OK though 
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    Andreicus said:
    Really? I usually stack uv in Maya before export and I never had a problem with z fighting like when you overlap meshes inside an engine. Do you mean lightmaps errors? Because nowadays I use only dynamic lighting with gi be it in marmoset or ue4. 
    Different thing. This specifically relates to baking maps. Once maps are baked you can do whatever you want with your geo, chop bits off and paste it to the other side, overlap it, clone and mirror it.....
    As for Lightmaps, they should always have unique UVs.

    I usually bake only the necessary geo and then clone/mirror/whatever and re-export to Painter. Baked maps and paint strokes are propagated. The one thing not to do is scale any parts of the mesh if reimporting to Painter if you want to preserve paint strokes. Painter doe a great job of preserving strokes across overlapping islands and re-imported changes to the original mesh that you baked.
  • Kanni3d
    Offline / Send Message
    Kanni3d ngon master
    musashidan said:

    The one thing not to do is scale any parts of the mesh if reimporting to Painter if you want to preserve paint strokes. Painter doe a great job of preserving strokes across overlapping islands and re-imported changes to the original mesh that you baked.
    One thing to keep in mind, if you do happen to re-pack uv's or shift some uv's around and re-import, Painter WILL preserve those strokes perfectly, if they were done in the 3d view.

    If you did some stamping or strokes in the 2d UV view, it'll project literally where you stamped them, and be most likely incorrect on your new model with new UVs.
  • Andreicus
    Offline / Send Message
    Andreicus polycounter lvl 6
    Andreicus said:
    Really? I usually stack uv in Maya before export and I never had a problem with z fighting like when you overlap meshes inside an engine. Do you mean lightmaps errors? Because nowadays I use only dynamic lighting with gi be it in marmoset or ue4. 
    Different thing. This specifically relates to baking maps. Once maps are baked you can do whatever you want with your geo, chop bits off and paste it to the other side, overlap it, clone and mirror it.....
    As for Lightmaps, they should always have unique UVs.

    I usually bake only the necessary geo and then clone/mirror/whatever and re-export to Painter. Baked maps and paint strokes are propagated. The one thing not to do is scale any parts of the mesh if reimporting to Painter if you want to preserve paint strokes. Painter doe a great job of preserving strokes across overlapping islands and re-imported changes to the original mesh that you baked.
    I understand now, thanks.
  • poopipe
    Offline / Send Message
    poopipe grand marshal polycounter
    Kanni3d said:
    musashidan said:

    The one thing not to do is scale any parts of the mesh if reimporting to Painter if you want to preserve paint strokes. Painter doe a great job of preserving strokes across overlapping islands and re-imported changes to the original mesh that you baked.
    One thing to keep in mind, if you do happen to re-pack uv's or shift some uv's around and re-import, Painter WILL preserve those strokes perfectly, if they were done in the 3d view.

    If you did some stamping or strokes in the 2d UV view, it'll project literally where you stamped them, and be most likely incorrect on your new model with new UVs.
    Does that not depend on the brush projection mode ? 
    I was under the impression that even strokes painted in the 2d view were still projected in 3d unless you're using UV projection

    could be wrong - haven't tested it
  • musashidan
    Offline / Send Message
    musashidan high dynamic range
    @poopipe, I believe it's only if you reimport new uvs.  
  • Axi5
    Offline / Send Message
    Axi5 interpolator
    That functionality was a life saver when I was working on a motorbike model someone had bought online and wanted me to texture a few years ago. UVs and Geo were all broken in weird and wonderful ways because the file export from early 2000s and imported in newer versions (and if memory serves it probably wasn't perfect to begin with, we're talking Max's UVMap modifier, not UVUnwrap so it was never going to work well in real-time off the bat).

    It took me a week to fix all that geometry, but they wanted to see texturing work being completed so I made heavy and I mean heeeaaaavy use out of Substance's re-projection feature.

    Turbosquid. Not even once.
Sign In or Register to comment.