Home Technical Talk

Zbrush and seamless geometry

wannabeartist
polycounter lvl 8
Offline / Send Message
wannabeartist polycounter lvl 8
Hi all,

I'm trying to make some tile-able pieces and I'd like to use ZBrush to detail them. However, the fact that they need to tile seamlessly is giving me a lot of frustration, as I'm not very fluent with ZBrush yet.

I managed to deal with a straight piece (wall), but now I moved on to a corner piece and I can't figure out how could I make it tile on itself, let alone matching other pieces, like the straight wall piece.

Symmetry wont work, since it's a corner. The only idea that I have came up with so far, is taking just half of it to ZBrush, detail it, take it back to Max, mirror it and weld it there so the corner is whole again. Take that to ZBrush and mess up the seam in the middle. The problem is, this would mean I'd have to decimate it heavily in order to get it Max, losing some detail.

Are there any smarter ways to do this?

Replies

  • Neavah
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    One thing you could do, which I've done before and it works quite well, is to unwrap the highpoly piece into a 100% square space. Then sculpt on it as usual, and when you're happy with it bake a displacement map. Take that map into Photoshop, and do the usual Offset modifier. Then bring that back into zBrush, and bake the displacement onto the mesh. What you'll get is a nasty seam in the middle, which you can now fix.

    Once that's all done, you should have a perfectly tiling mesh. If all goes well.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks guys,

    I don't see how wrap mode would help here as it's not a straight piece, but a corner of a wall. But useful for straight objects, definitely.

    Bigjohn, tested your approach and it works! I just need to learn more about making and applying displacement maps. While I managed to follow your description, the resulted quality was a bit low - this is because I'm such a noob with maps in ZBrush.

    Could you give some details on how bake them? I baked a 2048 map with the SubPix setting at 2 and adaptive on. After I chopped it Photoshop and mirrored the UV shell I took it back and pressed apply - I can see the effect, but also a lot of noise. Any tips for this?

    *If* I knew my way around ZBrush, I'd split the corner in the middle so I could "flatten" it (see screenshot). This way I could work on it as it were a flat piece, and then rotate the other side back to it's place when I'm done.
  • PhilipK
    Options
    Offline / Send Message
    PhilipK polycounter lvl 10
    Hmm couldn't you actually put the corner seam at the ends and have the tiling part in the middle of the mesh? And then offset the texture when you're done?

    The corner seems to me like a perfect natural seam anyhow.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Hey Philip,

    Hmm, so let me see if I got this right: I would break the corner in two, switch the place of the halves and weld it together to get the mesh your screenshot shows

    Then I would take that to ZBrush, sculpt away, and not worry about the ends as they are now actually what ends up being the middle.

    Then what? I'd bake the maps for that "altered" corner and then fix them in Photoshop much like in Bigjohn's idea and apply back to the original corner?
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    No, don't break the unwrap. You want the unwrap to be one continuous square. That way when you bring it into Photoshop, you can use the Offset filter easily. Don't worry about relaxing the shell, or about stretching and stuff like that. The main goal is to get it to fit in a square space.

    Just made this real quick to show:
    Unwrap.jpg


    You want the seams to be at the edges. I also made the edges at exactly 0.0 and 1.0 of the UV sheet, so the offset in photoshop fits perfectly.

    You'd bake a displacement map on to this. Bring it into Photoshop, Offset it, and bring it back into zBrush. Don't fix the seam in the center in Photoshop. Then in zBrush, apply the displacement to the geometry (or a new geometry even). And fix the seam in zBrush by sculpting over it.

    Hope this helps.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks again,

    I'm afraid I'm still having problems baking the map - now I'm getting weird lines in the map (see right side of screenshot).

    It's a very similar test piece, no thickness, and one single UV shell like you instructed.

    I don't understand where those lines come from - I double checked the UVs with a texture in Max and they are just fine.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    If you're baking in zbrush, make sure none of the uvs are touching the very edge (keep them in the 0.01:0.99 range instead of 0:1)
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks for the tip,

    I must have gone slightly off the edge of the square.

    Are there any alternatives for map baking? - I just can't seem to get a decent map out of ZBrush. If not, then what settings should I use? I already have adaptive on and suppixel at 2, but it's not capturing the detail very well, even though I made the bumps pretty obvious for this test.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    I think I got it now. But one more problem: stretching - how do I avoid that? The UVs are not stretched themselves, but the displacement map shows quite a bit of that in the edges.

    bake settings:
    Adaptive = on
    DPSubPix = 2
    Mid = 0,5

    EDIT: Tried "smooth UV" option - no stretching, but instead the map doesn't extend all the way to the edges of the piece.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    I managed to get this work in ZBrush after all - but it's still not a perfect match due to the UVs not being exactly 0.0 and 1.0.

    I assume my earlier noise problems raised from the UVs being "over border"? Like -0.0001 and 1.00001 - is there a way to snap them in the borders in Max?
  • Bigjohn
    Options
    Offline / Send Message
    Bigjohn polycounter lvl 11
    Not sure. I never had any issues with it to be honest.

    But in the Max UV editor, you have a box you can type in the coords. So just select the left-most verts and make them 0, and the right most ones and make them 1.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks for the tip, Bigjohn!
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Hello again,

    I though I'd continue this thread - it's old, but I'm working on a similar idea as when I started this thread and still having problems with the displacement map.

    So, the problem: I made a simple piece of a wall -even simpler than before with just straight sides and a top. The UVs are laid out as advised above. I managed to bake the map, but it creates white stripes along the upper edge of the wall - why is this? If I try to apply it, it will bulge out those edges, which is incorrect, as it should be just straight.
  • cryrid
    Options
    Offline / Send Message
    cryrid interpolator
    Not sure what causes it, but doing a similar test mesh I've found two things that seem to work:

    A ) Since you're not doing anything with the top, you could hide it before you create the map.

    B ) Drop back to the original mesh and lowest subdivision (a morph target helps if you have one, otherwise just reimport the obj), crease it in the geometry subpalette, and then create the displacement map.
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Thanks for the tips!

    I think I found one solution: The mesh must be divided with smooth on.
    Since this causes it to smooth (duh!) - I tried dividing the base mesh in Max before going to ZBrush - it works! Will post images soon...
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    lol...

    I obviously didn't think this through. I tried to apply the same method for this castle wall: You can see how well the offset worked for a shape like this! :D

    Must get some fresh air and try something else...
  • wannabeartist
    Options
    Offline / Send Message
    wannabeartist polycounter lvl 8
    Ah, yes - But until that, we will just have to figure it out!

    I'd call this a success - sort of. For this piece with the "teeth" I ended up using the offset method but only for the straight part. That's all it needs anyway.

    I baked the normal maps ins xNormal and took the piece to Unity - it looks ok to me. Of course if you go very close you can see the seam, but it's pretty good. With actual sculpt and diffuse map it might even look pretty!
Sign In or Register to comment.