Sunday, September 15, 2013

Tutorial: ZBrush Tiling Textures in 3D

Remember when I posted this



and was all like, "I've finally solved zbrush tiling textures!" and the didn't say how I did it? Yeah, that was a dick move. It also bit me when I tried to do it again today, only to realize I'd more or less forgotten how. So, I spent some time retracing my steps and I think I've got it down again. This time I'm going to be smart about it and write it down.

This method holds some significant advantages over the better-known 2.5D + tilde key method illustrated here because it allows you to rotate the model while you work, but as we shall see it has some drawbacks, too.

Create a 4x4 polyplane and group the middle four polys together. The yellow area is where our final texture is going to be.

Subdivide as many times as you think you'll need (without smoothing) and store a morph target.

Sculpt to your heart's content, using brushes with wrap mode (brush>curve>WrapMode) set to 2.


Now at some point, you've probably nudged around the border of your plane to the point where "fit mesh to frame" leaves gaps around the border. That's no good.

Time to break out the morph brush! Go to the highest subdiv level and carefully morph back the plane's borders, taking care not to get too close to the yellow area.


Frame the mesh, and use grabdoc to get maps for color, normals, and/or height.

Bring the maps into your image editor of choice and crop the canvas to 50%.



Voila! Perfectly tiling textures with NO seams whatsoever!



The big drawback to this method is that it doesn't work with dynamesh, and all the wonderful insert mesh brushes that come with it. It can work with appended subtools, as long as they're kept safely away from the yellow border.

However, if you still want to use inserted meshes on the border area, there is a way to do so.

Position your subtool on the seam where you want it.



Duplicate it, and using the deform sliders, offset it exactly 100 units so it's on the opposite side of the green square. (This is provided that you started with the default zbrush plane and haven't scaled it at all.)

If the subtool intersects a corner you'll need to do this two more times, for all four corners. If you want to nudge them around afterwards, just merge them together and use the move tool to re-position.

You can keep the ztools as they are and keep working, or grab the zproject brush (make sure it's set to wrap mode of 2) and use it on your plane to project details from the underlying subtools, then delete them when you're done.

When you're finished, morph back the borders as we did before, frame the document, and grab your maps!



This is what my final, cropped normalmap looks like.



And here it is applied to a plane in Toolbag. Beautiful!



An additional, smaller drawback to this technique is that you can't use the morph brush while you sculpt, because it's being used to hold the blank plane. If you're super-dependent on morph targets for sculpting, you can always mask out the edges of the plane instead. Just be very careful that you don't accidentally un-mask while you're sculpting, and save a new morph target at the highest subdiv level when you're done.





1 comment: