Home Technical Talk

Solutions for sculpting tileable textures (other than bricks) in zbrush 4.

1
synergy11
polycounter lvl 6
Offline / Send Message
synergy11 polycounter lvl 6
Hello folks.

I am having trouble finding information on creating tile-able textures in zbrush.

I am not looking to create a tilable mesh. Plenty of tutorials and good workflows for that method.


The only good info I found was from PhilipK.net
http://www.philipk.net/tutorials/materials/stonerock/stonerock.html

Priceless info on that site. Props to PhilipK for taking the time to help others.

Now from what I understand however this method still require some odd work-arounds and fixing normal map seams in Photoshop, that I would like to avoid.

I am not sure how old those tutorials, are there newer ways around this?

I know it's possible because ParoXum the guy who made the incredible Helms Deep project has done this for his Cliff walls.

http://www.polycount.com/forum/showthread.php?t=74720&page=4
http://uppix.net/3/f/7/8d0d3b0f72d38187a5b67b36560b2.jpg
http://uppix.net/9/4/e/8a67f33edba4b4b02f787749e850c.jpg

Those jaggie cliffs are exactly what I have been trying to create in zbrush. I have good sculpting results however I cannot figure out how to tile it.

Any help would be great!

Thanks

Chris

Replies

  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    What I do to avoid all of that painting out of seams in photoshop etc... is I make a plane, that looks like this:
    wrapplane.gif
    The center area is where the tiling will happen, and it has some subdivision padding around it. I bring this into zbrush and subdivide a with smoothing off until I get to the resolution I want, and then in the brush-curve settings turn the wrap mode to 2, you will then have a properly tiling texture, and because you don't actually sculpt on the edges things line up properly once you remember to change the wrap mode when changing brushes.

    You don't need to optimize the corners of your plane, but you end up with quadruple the amount of polys that you actually want, but optimizing the edges even a little bit, you end up using alot less.

    There are a bunch of other ways to go about it, but this is how I do it.

    A quick and really shitty example of the technique:
    tiling.jpg
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Hey, thanks for posting.

    2 questions.

    1) Do you bake your maps in zbrush?

    2) In your first picture you have the extra geometry around the area. Where did that geometry go on your zbrush pics? I don't get that part!

    Thanks again m4dcow.

    EDIT: Oh wait looking at it a few more times. I guess you sculpted 4 versions of the tile into that mesh. Now you just cut out the center and it will tile perfect? How do you separate the center?

    Great method by the way. Most intuitive one I have scene so far!
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    I bake everything in xNormal, but you could frame the zbrush object and do a grabdoc at double the size that you want, and then crop out the center part for you tiling texture (grabdoc at 2048px, to get a 1024px texture).

    If you look closely at the zbrush screen, the detail along the egdes is fairly faceted while the inner parts have more detail. So the area around the center part hasn't been removed, but is simply there so the wrapping works properly.

    The maya picture is just a plane with the texture tiling twice, I just realized that I baked the green channel out wrong from xnormal so it's inverted, but the principle works.

    Another useful reason for having the texture repeat twice in zbrush is that you can bake seamless AO also without having to instance copies of your high poly in maya or max.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Impressive. That's pure genious.

    So after you have your sculpt you bake it in xnormal as the High Poly and you import the original plane, minus all the crap around the edges as the Low Poly?

    Boom no seams!

    I'll post my results soon.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Not sure what I did here but my result does not tile.

    Heres my sculpt showing the Polyframe.

    http://imageshack.us/photo/my-images/577/planesculpt.jpg/

    My Result

    http://imageshack.us/photo/my-images/716/normalplanebakepic1.jpg/

    Any help would be great,

    Thanks.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    So it looks to me like there is a tiling image but you are projecting from a slightly larger low poly, this should explain it.
    tiling.gif
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Thanks m4d.

    That looks like exactly how I screwed it up!

    I will try the fix as soon as I get home.

    Cheers.

    Chris.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    How do you handle smoothing using this method? I find when I turn wrap mode on for the smooth brush it "sucks" in the edges of the plane. This is probly ok because that part isn't getting baked right?

    Thanks.

    Chris
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    I subdivide to a certain level intitially without smoothing, then sculpt a bit, and then smooth normally as I go, but you could increase the "padding area" if you tend to run into problems.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Ok. But when you do your smoothing, you have wrap mode on 2 for the smooth brush as well?
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Yeh, Every brush even the smoothing ones need wrap mode on to make sure it tiles.
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    This thread and worklfow has helped me out tremendously. Thanks for sharing this technique m4dcow.

    For anyone interested I've created a little utility PSD for this workflow. It's really just a mask to give you a better idea of where your mesh is beginning and ending tiling in zbrush.

    utilityImage.jpg

    Link to plane mesh and utility psd: Here
  • Zepic
    Offline / Send Message
    Zepic polycounter lvl 6
    Hey Lucas,
    It looks like your links aren't working correctly.
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    Thanks zepic. I've fixed that link now.
  • Cordell Felix
    Offline / Send Message
    Cordell Felix polycounter lvl 9
    Hey thanks everyone in this thread. Taught me how to properly do a tileable sculpt in zbrush.
    One thing that I found myself not getting in this thread was how to turn on wrap mode.

    So for the newbies that are looking at this thread and are asking the same thing. Let me save you a google.
    Turn on wrap mode by going to the brush tab at the top, go to the curve tab and turn the wrap from 0 to 2.

    @darbeeno, you the man for uploading those :)
  • Octo
    Offline / Send Message
    Octo polycounter lvl 14
    Why o why isn't wrap mode a global brush setting?
    Same with the Backface Masking option, and probably a few more...
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    I've been noodling around with insert multimesh brushes. In this example I created a few rock meshes and inserted them against the ground plane. Unfortunately though, IMM brushes do not support wrap mode, so I've created a macro that will take a layer you have named 'Tile' then duplicate the layer and offsets it + and - on the x and z axis, and then combine the meshes.

    From there you can use the guide texture applied to the plane to delete the extra stuffs.

    [IMG]https://drive.google.com/file/d/0Bw5X8u9sXDRkM2JGaWdFYWpCR00/edit?usp=sharing"]Macro download[/URL] Put this in your ZStartup/Macros folder. Make sure your tiling layer is named 'Tiled'[/img]
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    @Octo - I totally agree! What I've done to combat this is to put backface masking and wrap right next to my brush toolbar so that its always in my face to help prevent me from accidently brushing without em.
  • Joshua Stubbles
    Offline / Send Message
    Joshua Stubbles polycounter lvl 15
    Here's a tool I made for making tiling scults:
    https://dl.dropboxusercontent.com/u/1482056/TexturePlane.ZTL

    Two subtools - a flat plane used to frame the document, then the actual sculpting plane. Your brushes will need to be set to WrapMode 2 in order for it to tile.
  • Brygelsmack
    Offline / Send Message
    Brygelsmack polycounter lvl 8
    darbeenbo wrote: »
    I've been noodling around with insert multimesh brushes. In this example I created a few rock meshes and inserted them against the ground plane. Unfortunately though, IMM brushes do not support wrap mode, so I've created a macro that will take a layer you have named 'Tile' then duplicate the layer and offsets it + and - on the x and z axis, and then combine the meshes.

    From there you can use the guide texture applied to the plane to delete the extra stuffs.

    sbTfhdC.jpg
    Macro download

    Put this in your ZStartup/Macros folder. Make sure your tiling layer is named 'Tiled'
    Very cool! Thanks for sharing that.

    Going forward how would you go about texturing the small stones in this case? I assume you'd want to separate them texture wise from the ground so they are more visible. I haven't yet figured out a good way to get a selection map from high poly sculpts like in your example. Do you know of any good techniques?
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    @Brygelsmack - When you are baking your high poly meshes to a low poly plane, just make sure to export your rocks as a seperate object, then you can bake a mask from it. In xnormal i'm pretty sure it will add a mask by default in your alpha of the normal map. I'm sure there is also a way to create a mask for the rocks in zbrush as well.
  • Brygelsmack
    Offline / Send Message
    Brygelsmack polycounter lvl 8
    Oh, great idea! I will keep that in mind next time I make a texture like this. Cheers!
  • Ged
    Offline / Send Message
    Ged interpolator
    Here's a tool I made for making tiling scults:
    https://dl.dropboxusercontent.com/u/1482056/TexturePlane.ZTL

    Two subtools - a flat plane used to frame the document, then the actual sculpting plane. Your brushes will need to be set to WrapMode 2 in order for it to tile.

    thanks, so is this the same as the m4dcow methods described above or is it different?
  • Eric Chadwick
    Thread added to the wiki. Thanks for sharing these!
  • soneone
    darbeenbo wrote: »
    I'm sure there is also a way to create a mask for the rocks in zbrush as well.

    you could color the plane and the rocks differently (1 color for every object(s) you want to be able to select), and use the flat color shader, then do a bpr. you can then generate masks off these by using the wand tool in ps.
  • Zepic
    Offline / Send Message
    Zepic polycounter lvl 6
    darbeenbo wrote: »
    I've been noodling around with insert multimesh brushes. In this example I created a few rock meshes and inserted them against the ground plane. Unfortunately though, IMM brushes do not support wrap mode, so I've created a macro that will take a layer you have named 'Tile' then duplicate the layer and offsets it + and - on the x and z axis, and then combine the meshes.

    From there you can use the guide texture applied to the plane to delete the extra stuffs.

    sbTfhdC.jpg
    Macro download

    Put this in your ZStartup/Macros folder. Make sure your tiling layer is named 'Tiled'

    Hey Lucas,
    Could you explain in a bit more detail how to use you macro? (i'm still a bit rusty with my zbrush skills).
    I made a subtool with some insert meshes but it looks like it's duplicating them on top of each other, not off setting them.
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    Nice work. I would also like to see more details on this macro.

    Also if anyone can figure out how to layout a texture like this in zbrush I'd love to hear your theories.

    http://www.zbrushcentral.com/attachment.php?attachmentid=171940

    The 2.5 method is not perfect and the tielable plane with wrap mode will not get the needed overlaps of the roots.

    Check it out! A great texture from Uncharted 2!

    Cheers
  • Moutrave
    Offline / Send Message
    Moutrave polycounter lvl 8
    synergy11 wrote: »
    Nice work. I would also like to see more details on this macro.

    Also if anyone can figure out how to layout a texture like this in zbrush I'd love to hear your theories.

    http://www.zbrushcentral.com/attachment.php?attachmentid=171940

    The 2.5 method is not perfect and the tielable plane with wrap mode will not get the needed overlaps of the roots.

    Check it out! A great texture from Uncharted 2!

    Cheers

    The only way I've thought for this is to copy+paste my original non tiling texture below the first one in photoshop, flip it vertically and horizontally, and...well that'sit. Probably the crapiest noobest thing to do but since I used it as an alpha for the noise maker...guess it was ok'ish...

    still I'd also like to know better methods :d
  • Artaekos_inactive
    Guys I have a question about this method involving the plane template. I understand that you can not have smooth on when subdividing, but is it safe to have smooth on after that when shifting between subdivisions already created without smooth on? I use this in my workflow to iterate up from lower to hight subdivisions, to deliberately smooth rough details made on lower subdivisions as I scroll up. I just used this method for the first time, and when I offset my normal map in photoshop, I can notice slight seams. I'm not sure if this is because I turned smooth on for switching between subdivisions after initially subdividing up to 6 without smooth on...
  • synergy11
    Offline / Send Message
    synergy11 polycounter lvl 6
    darbeenbo.

    Can we get more info on what the macro does? I'm not understanding from your screenshots.
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    Artaekos wrote: »
    Guys I have a question about this method involving the plane template. I understand that you can not have smooth on when subdividing, but is it safe to have smooth on after that when shifting between subdivisions already created without smooth on? I use this in my workflow to iterate up from lower to hight subdivisions, to deliberately smooth rough details made on lower subdivisions as I scroll up. I just used this method for the first time, and when I offset my normal map in photoshop, I can notice slight seams. I'm not sure if this is because I turned smooth on for switching between subdivisions after initially subdividing up to 6 without smooth on...

    I can subdivide with smoothing fairly quickly without issue, while the extents of the plane will pinch in and curve on the edges this doesn't affect the wrapmode sculpting, since with the padding the center part will divide normally.

    Now a seam problem can happen, if you are framing the plane, and then cropping the center part in photoshop, because the edges may have been sucked in the plane would be slightly smaller than it should be, in that case you could just have a copy of the plane not divided as a subtool to use to accurately frame your sculpting plane.
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    There seems to be a bit off confusion with the macro I posted, so I've made a better image hopefully. The macro is only supposed to be used in conjuntion with the tile helper plane, ass the offsets seem to only work correctly at this scale.

    X27pTs6.jpg



    Here is a new link to a zip with an updated version of the macro, plane, and mask texture.

    I've also gone and created another macro that goes through all your brushes and sets them to wrapmode 2 that you can use before you start your tiling sculpting so that you don't forget to do it on certain brushes. Wrapmode2_True will initialize this, and Wrapmode2_False will remove it from all brushes.

    TileHelpers Download
  • xvampire
    Offline / Send Message
    xvampire polycounter lvl 12
    other method is using 2.5d to create tilable map
    i wont go much detail on how to do 2.5 d texture since the tutorials are quite plenty out there :)
    like this
    [ame=" Tileable Textures 01 - 2.5D Workflow - YouTube[/ame]


    btw in my case I created 16 bit alpha map to create rock ridges in 2.5
    started with some random sculp, I usually dont bother about tiling at first
    YPD7sh0.jpg
    at this stage I dont draw high definition rock noises yet.

    once i satisfied with the sculp I projected it on even bigger plane using project all:, here you can smooth out the edges and leave some empty area for depth blending.
    ZjZBh1Y.jpg?11CanLqT.jpg

    its time to render the scene use Best render with no shadow ( not bpr)

    just drag MRGBZgrabber on your screen, then you should be capture both rgb and 16 bit depth information. ( make sure you save the 16 bit alpha somewhere)

    I use this mrgbzgraber to avoid black seams like these http://www.polycount.com/forum/showthread.php?t=107510

    dj1VbrN.jpg

    render the scene use Best render with no shadow ( not bpr)
    then


    after that,
    its time for 2.5 d painting, change your document into something big like 2k x 2k, press ctrl N to refresh the screen, and zoom out to see the entire canvas.

    create another empty plane, this time, fill up the entire screen, and not to use edit mode, you will enter 2.5 d mode
    now you can draw the previous displacement map you created, (probably you need to turn on radial fade)
    i97k0FO.png

    in the layer tab , you can slide displace h and v ,
    zZPlRCv.jpg
    this is the same function like offset image in photoshop. a key to create seamless map.
    12nm2U5.jpg



    once you satisfy with the map you can bake the normal map

    make sure you change the material rgb into normal map , just get really large brush, in my case i just use sphere mesh
    KGlVdFV.jpgand choose normal map material
    iswrgZm.png

    once you turn it into normal map you can capture the canvas again using best render and MRGBZgrab



    and btw this is the tiled zbrush normal map result
    pwWxzHE.jpg the map should be completely tilable
  • Thousand
    Offline / Send Message
    Thousand polycounter lvl 8
    darbeenbo wrote: »
    Here is a new link to a zip with an updated version of the macro, plane, and mask texture.

    I had to scale down the tile plane by half (deformer: -100), then it worked for me as well

    thanks for sharing!
  • Lucas Annunziata
    Offline / Send Message
    Lucas Annunziata polycounter lvl 10
    Another method just shown to me by Joe 'Flakked' Dionisio is fairly simple.

    Using a normal plane, set your brushes to WrapMode 1, then go into your transform panel and under 'Modifiers' change XYZ to Z. This will make it so your brushes are only affecting the z-depth of the mesh.

    The one issue we're running into however, is that for some reason while in Z the brushes no longer use their alphas.
  • raul
    Offline / Send Message
    raul polycounter lvl 11
    synergy11 wrote: »
    Nice work. I would also like to see more details on this macro.

    Also if anyone can figure out how to layout a texture like this in zbrush I'd love to hear your theories.

    http://www.zbrushcentral.com/attachment.php?attachmentid=171940

    The 2.5 method is not perfect and the tielable plane with wrap mode will not get the needed overlaps of the roots.

    Check it out! A great texture from Uncharted 2!

    Cheers

    Ive always just changed the docuement size. Drop your tool, tile it in 2.5 D or just drop your tool if you know it tiles. Sometimes you have to crop the alpha in photoshop. Then when you create a plane before making a polymesh_3d, initialize it so that its longer on the direction needed.

    Thanks for this thread, i have always used 2.5d and clean up my alpha in photoshop off the seam. Then reimport and apply to whater. Will try this way :)
  • bhall27
    Hi guys,

    Been trying to figure how to do the tileable sculpting in this thread (I'm at work so google drive/dropbox/imageshack are blocked - haven't been able to get to any of the files you guys have shared).

    I've tried to do what the original poster (m4dcow) showed after making a similar mesh in maya - however I'm not getting the tiling I would expect...I think I'm just doing it all wrong :(


    Any help would be greatly appreciated. I'm trying to teach myself zbrush and some of this is really confusing too me.

    Thanks again,

    brian
  • Eric Chadwick
    bhall27 wrote: »
    I'm not getting the tiling I would expect...

    Did you fit your UVs to the orange edge in his screenshot? And did you tile your UVs 2x?
  • bhall27
    Did you fit your UVs to the orange edge in his screenshot? And did you tile your UVs 2x?

    Actually no I didn't I must have missed that being called out :) Let me try that!

    Thank you Eric!
  • bhall27
    Did you fit your UVs to the orange edge in his screenshot? And did you tile your UVs 2x?


    Yeah that didn't help me either, I think I'm missing something else.

    I guess what I'm expecting to happen is that when I sculpt along the "inner border" of the mesh that it would tile there but it doesn't seem to be. Maybe I'm just not understanding how it's supposed to work :)
  • Eric Chadwick
    It's supposed to tile 2x, inside the border. When you make the lowpoly for baking, you make it just 1/2 the size, in the center. The highpoly is much wider, so when you bake the maps, you get no seams.
  • bhall27
    It's supposed to tile 2x, inside the border. When you make the lowpoly for baking, you make it just 1/2 the size, in the center. The highpoly is much wider, so when you bake the maps, you get no seams.


    Oh maybe I didn't really convey my problem properly - I'm not even to the baking part.

    Having trouble with the sculpting part as where I expect it to tile my stroke - via the wrap mode of 2 on the brush - it's not wrapping/tiling where I would expect it too.

    My guess is my expectations are off?

    I've included a quick screen shot of what I mean.

    Sorry I'm so novice at this.

    Thanks again,

    Brian
  • Eric Chadwick
    What do your UVs look like in Maya?
  • bhall27
    What do your UVs look like in Maya?

    Hey Eric,

    Here they are, my guess is they are wrong?

    Thanks for all the help!

    Brian
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    bhall27 wrote: »
    Hey Eric,

    Here they are, my guess is they are wrong?

    Thanks for all the help!

    Brian

    Your UVs shouldn't actually matter for this (they should actually be the size of the patch near 0-1 space, all welded together though).

    Did you append the plane to anything, use GOZ, deform it...? Zbrush's weird coordinate space annoys me and can screw up things like this.

    I replicated your issue of the seams not lining up where they should, by importing another object which was a bit offset from the plane, which screwed up the wrap mode stuff. I think this also happens when you append to another subtool.

    Not sure if it helps you, but maybe it works after giving it another try.
  • bhall27
    m4dcow wrote: »
    Your UVs shouldn't actually matter for this (they should actually be the size of the patch near 0-1 space, all welded together though).

    Did you append the plane to anything, use GOZ, deform it...? Zbrush's weird coordinate space annoys me and can screw up things like this.

    I replicated your issue of the seams not lining up where they should, by importing another object which was a bit offset from the plane, which screwed up the wrap mode stuff. I think this also happens when you append to another subtool.

    Not sure if it helps you, but maybe it works after giving it another try.

    Hey M4dcow!

    So yes I made the shape in maya - in zbrush I made a new scene - one way I brought it in was I placed a PolyMesh3D and then imported the shape over it.

    I've also tried just importing it straight in and drawing it on the canvas.

    Maybe I'm not importing it in correctly then? What's the best way to import an OBJ from Maya for this purpose?

    I fixed the uvs per what you said and still having the same problem.

    Anyway still having the same issue :(

    Thanks,

    brian
  • m4dcow
    Offline / Send Message
    m4dcow interpolator
    bhall27 wrote: »
    Hey M4dcow!

    So yes I made the shape in maya - in zbrush I made a new scene - one way I brought it in was I placed a PolyMesh3D and then imported the shape over it.

    I've also tried just importing it straight in and drawing it on the canvas.

    Maybe I'm not importing it in correctly then? What's the best way to import an OBJ from Maya for this purpose?

    I fixed the uvs per what you said and still having the same problem.

    Anyway still having the same issue :(

    Thanks,

    brian

    Try just importing the obj, draw it onto the canvas, and going into edit mode.
    I suspect that it may have inherited whatever scale of the polymesh3d you import it onto, which is why things might be thrown off.
  • bhall27
    m4dcow wrote: »
    Try just importing the obj, draw it onto the canvas, and going into edit mode.
    I suspect that it may have inherited whatever scale of the polymesh3d you import it onto, which is why things might be thrown off.

    Same problem still just drawing straight to the canvas. :(

    Do you have an obj that works that I can test?
  • bhall27
    bhall27 wrote: »
    Same problem still just drawing straight to the canvas. :(

    Do you have an obj that works that I can test?

    I just tried importing the ZTL from this post:

    http://www.polycount.com/forum/showthread.php?t=126224

    getting the same issue - see attatched.
  • bhall27
    so I was able to get this tutorial to work:

    https://gumroad.com/ninjatastic

    I have no idea why....
1
Sign In or Register to comment.