ZBrushCentral

Alpha export

Well I know what I want to blow my One wish on in the ZWish thread, but I’m not sure if it can be done already…
I want a straight black and white alpha-grab WITHOUT ZDepth! Useing the MRGB-grabber coverts the zdepth to a greyscale elevation. I don’t want this, I want your run-of-the-mill black & white only alpha channel. Black is the negative space and white is the “occupied” space of your tool. I feel this would be REALLY useful especially with use in other programs that use 2d-images with alpha channels -webpage graphics, after effects, photoshop, etc…

Anyway, here’s my findings so far…

  1. Spend some time making the most incredible design to go onto an web-page. It has lots of colors, materials, bells & whistles (unlike my example below).

  2. Use the mrgb-grabber to covert the document into a alpha and texture image. Then export each image out as a psd file.
    (This is where I’d like to have the option of grabbing without Zdepth - or grabbing just the negitive space)

  3. Load each image up in photoshop (or whatever). You may notice that the alpha- grab has two alpha-channels. We only want to use the Alpha1 channel.

  4. Make sure the ZB-texture picture is selected and under SELECTION choose LOAD. Load the Alpha from the Apha-grabbed picture (beside Document) and choose Alpha1 from the channel selection.

  5. Now my selection is based on the alpha grab I can copy’n’paste it into a new layer.

    As expected the greyscale-depth alpha has made half of my image dissapear. :frowning:
    Well it doesn’t look too bad with a ghost, but if my design was for a webpage or animation-package, ZBrush would be pretty impractical!

Help!
Upham :eek:

'Morning Upham . . . :slight_smile:

I don’t know if this will help you or not, but I’ll throw it at you anyway. If you draw your object on the screen, then select the “Flat Renderer”, you can export that image into PhotoShop or where ever, convert it into a grayscale image & I believe you’ve got what your looking for??? :rolleyes:

Hope this helps some? Have a good one . . . :cool: Mark.

imho, at least with the given example, another workaround would be to use the mrgbz-grabber/modifiers with auto-crop off and exporting the texture instead of the alpha. in photoshop you use the magic wand at low tolerance at the black background to define an alpha or reverse selection and copy it right away to a new file with transparent background or whatever. might get tricky when having used the smudgetool or blurring or a softedged alpha with a 2.5d brush in zbrush (same goes, as i just found out by experimenting, for Marks FlatRender-method, BTW) but with welldefined edges it should not be a problem, methinks.

  • juandel

edit: but as i think of it, i’m sure that you’ve thought about all that yourself, upham… :confused: probably i’m getting things wrong once more.

This may or may not help, but…

When you grab your image using the MRGBZ-Grabber, turn on MRGB in the Draw Palette.

This “imbeds” material information in the grabbed texture.

When you export this texture, you’ll get a dialog box similar to this:

The resulting PSD file will have an extra alpha channel with a material map.

Here’s an example: let’s say you wanted to use this ghost (I can’t imagine what for :p):

The ghost is material number 1 on the palette, the rest of the canvas is blank (material 0).

I get a PSD with an extra alpha channel that looks all black – the ghost portion is actually RGB-colored (1,1,1), and the rest is colored (0,0,0).

Using the Magic Wand with tolerance set to 0, I can select everything inside the ghost:

Then I can edit my image in that other nameless image program.

Hope it helps,
dave

Hi :slight_smile:
Very good suggestions have been posted (thanks :)) and Davey suggestion is excellent when you need to isolate(mask) a specific item within an image.

One more method…
If you are interested in creating a simple black&white mask of a gray scale alpha that is exported from ZBrush, simply use the ‘MagicWand’ to select the black area of the alpha and than invert your selection.

-Pixolator

P.S. So many methods, so little time :slight_smile:

Well thanks guys for the replys. I appreciate your time replying, but I think I’ve got it sussed now. I want to be able to cut out all the middle-stuff as much as possible - all the magic wands and hopefully develop this as a batch-script in ZBrush. At the end of the day I want to use ZBrush with After Effects, or Photoshop to make Web-pages. I’ll also have to sweet-talk Digits into incorporating steps 1-4 into his brilliant Animation script (maybe).

Here’s what I’ve done…

  1. Create your object you plan to export as a multi-marker object. Convert it to a Polymesh and save it. Also Export the image as a PSD via the document palette.
    IMPORTANT: place a marker on the polymesh makeing sure the size and tool are selected in the picker menu.
    I’ve made a ROUGH bunch of flowers (and I need a bit more practice with the multimarker tool!) You could use ZBrush to make 3d-buttons for webpages or even graphic-interfaces!

  2. If you look at the texture palette your main texture on the polymesh will look something like this , depending on what your multi-marker/polymesh tool is…

  3. I want to turn that texture ALL WHITE to do this I select the block-white-alpha (brush-00) in the Alpha palette and click MAKE-TX (make texture)

:b4: EDIT :b4: Whoops! I missed an important step here! Clear the docunent (CTRL-N), Select a White color, turn OFF MRGB, and double click on the marker to bring your tool back to life :b4:

  1. Wha-hoo! I have my block alpha image which I save via the document palette.

  2. I load up the two images in Paint Shop Pro. (I don’t think I can do this step in Photoshop) and with the Colour picture selected I go MASK>NEW MASK>FROM IMAGE.

  3. Now select the Alpha from the luminance from the second picture (or the non-image data)

  4. And now I have an alpha channel in the negitive area around my object!

  5. And now I can use my ZBrush object tool to composite into a number of different applications!

    :b4: This is still the long-&-hairy way of doing this. I’ll make this my ZWish to be able to Alpha-grab the negative area around the tool with the MRGB-grabber cutting down steps 1-4 into one step.

Upham :slight_smile:

Howdy!

Off the bat I can help you automate the Mask making part. Try this script and see if it does the job

MakeMask.txt

Since it is a standalone button you can add it to any existing script that you load regularily by just cutting the button part and pasting into another script. As long as the button name or variables don’t have a conflict it should work great.

If you like I could make it automatically export the image as well, let me know

I thought I might add that you really don’t need to know anything about the Zscript language to do little tasks like this. Here is a method that you could have used to make this script.

  1. Start up Zbrush
  2. if it is set up to autorecord turn the recording off in the Zscript pallete, it will ask you for a file name just use the default.
  3. Figure out what you want to do, whether it is to make this alpha mask etc… make a custom brush, or perform some tedious thing that you do alot of.
  4. when you are ready press the “Record” button in the zscript pallete
  5. Perform the steps that you need to accomplish the task
  6. when you are done press the “End” button in the zscript palette. It will ask for a file name. In my example you could call it MakeMask.
  7. load MakeMask.txt back into Zbrush and you will have a button called “Play” press it and it should repeat whatever it was you did.
  8. since it is just a button that executes the code within it, open it up in a text editor and change the name of the button to something useful.
  9. Create a special script to hold all your tasks that you do alot of and copy and paste these buttons into it.

You will have created a bunch of useful functions without having to learn a line of code!

Hope this helps