Tutorial: Adding Text to an Image with ZAppLink
From ZBrush Info
Tutorial: Using ZAppLink to Add Text to a ZBrush Scene
ZAppLink makes it easy to add entirely new elements to your scenes, placing them on different layers so that you can retain control over them within ZBrush. A great example of this is adding text to an image.
For this tutorial, we're going to add text to a very basic "scene". The object is not to create great art, but rather to show you a technique that you can easily adapt to your own work.
Draw the DemoHead model on the canvas and position it as shown in Figure 1. This is going to be the tutorial's scene. I've used the MatCap LBrownClay material, turned Draw:Perspective, set Tool:Display Properties:DSmooth to 1, and turned off Transform:Quick.
Click the Document:ZAppLink button and then click OK. ZBrush will automatically launch your image editor if it's not already running.
What you'll see in Photoshop is a layered image that looks exactly like your ZBrush canvas. If you take a look at the layers you'll see that there's one editable layer and two that are locked and labeled with a "do not edit" warning. The locked shading layers represent the effects of ZBrush's real-time rendering engine. The unlocked layer is what the rendering engine itself sees: your digital paint.(By the way, the Channels menu in Photoshop also has an alpha called Comp Z Depth. This is a depth grab of the canvas that you could use for special situations.)
We're going to add the text to a new layer. Create one as shown in Figure 2, and name it "Text 2". The number in the name is very important. It tells ZBrush that whatever is on this layer will be placed into that layer slot within ZBrush. Since our scene doesn't have a layer 2, ZBrush will create it using the contents of this layer.
In Figure 3 we've added some text with a bit of word art and a layer style using the Stroke and Inner Shadow elements.
Add a new layer beneath Layer 2. We'll use this to add some frills that will spill over onto the head itself. I just used a basic filled shape that I then copied, flipped, and merged back onto the original layer. This new layer was renamed to Layer 3. The number of course tells ZBrush that what's on this layer in Photoshop will go into the Layer 3 slot within ZBrush. Figure 5 shows the new scene with its layers.
All that's left for Photoshop is to save the document. Don't change its name with "Save As". Just press Ctrl+S or File:Save. You're now ready to switch back to ZBrush.
ZBrush should update to show the screen in Figure 6. This means that it sees that the document has been edited. If you see an "Unchanged" message instead, then click the "Return to external editor" button and Alt+Tab right back to ZBrush again. Once you see the "Re-Enter ZBrush" message, click that button.
You'll now see the message in Figure 7. Click the "Accept All Edits" button to continue.
ZBrush will import the layers one at a time and give you the options shown in Figure 8. Click the "Keep New Layer" button each time.
Now the ZBrush image will have the text and other effects from Photoshop. Figure 9 shows what you should have at this point. Each new layer consists of pixols and has depth in the canvas. This allows it to cast shadows, which you can see falling onto the head. This is a big advantage to adding the text as a ZBrush element: When shadows are cast onto a 3D surface such as the head, they wrap naturally in a way that would be difficult or impossible to achieve within Photoshop. Both new layers have the same Z depth, though. To move the text layer forward a bit, select it in the Layer palette. Then click Layer:Displace Z and set a value of -200. This will move it to be 200 pixols closer to the camera than the background frills.
You won't see any effect on the canvas, though, because these new layers use the FlatColor material, which does not receive shadows. Select the SimpleBrush and the layer with the frills on it. Turn off Draw:Zadd and turn on Draw:M so that you just paint with material. Now paint the frills layer with the FastShader material. You'll immediately see shadows created by the text layer. Figure 10 shows what you should have at this point.
The text is nice with its shadowed fill, but let's use ZAppLink and the power of ZBrush to do something really cool. Click the ZAppLink button to send the new canvas back to Photoshop, which will see that the document has changed and ask if you want to update it. Say yes.
Once back in Photoshop, select the layer with the text and use the Magic Wand tool to create a selection of just the text's fill area. (Everything inside the white outline.) Next, click Select:Save Selection. Make sure that New Channel is selected, and name this selection "stencil" as shown in Figure 11. When done, you'll see a new inactive layer called stencil in the Channels menu. The name is very important! By naming it "stencil" we've told ZBrush to use that channel as a stencil. No other name will work for this.
Photoshop doesn't really see the addition of this new channel as a change to the document. That means that ZAppLink can't send the changes back to ZBrush yet. This is easily resolved by adding an empty layer above any of the editable layers. Now merge down and when prompted click the button to Preserve the mask.
Save the document and switch back to ZBrush. Click the Re-enter ZBrush button, then apply all edits. You'll get a message telling you that a stencil has been created. Click anywhere on the canvas to clear the message.
The canvas will now have a red border around it to signify that the Stencil is active. Most of it will be faded a bit as well, with only the text fill area being normal.
Now that the canvas is masked, make sure that the layer with the text is selected. Choose the DemoHead tool again, with the MatCap LBrown Clay material. Draw the head into the text, positioning it to fill the area while still allowing the eyes and mouth to be seen. (Use the gyro to move, scale and rotate it appropriately.) While the gyro is still active, change the Draw:Rgb Intensity to about 30. This will allow the original text's color and inner shadows to show through.
When done, turn the gyro off and then turn the Stencil off.
Figure 12 shows the finished image. Thanks to ZAppLink, we've used Photoshop to add new layers to ZBrush with text and other elements. Those layers are still able to be edited independently of each other and the rest of the document. We've also used Photoshop's powerful pixel selection tools to create a selection that we were then able to use within ZBrush.
Use this tutorial as a jumping off point for your own projects. What's possible is limited only by your imagination.












