Intro to Painting over U-V maps
with project Dogwaffle(c) 2003 Philip Staiger
- A starting point
Let's say we're using a 3D program like Carrara Studio 3 from Eovia, or if you're more into game design on a very (very!) tight budget perhaps Milkshape3D will do. (Although you should know that Carrara 1.1 which includes uvmapper beta (the free version) sells for under $30 at Purplus.com and unwrap3d.com has a similarly priced uv mapping and editing tool which rocks! Then for some of the best 3D modeling there's also Amapi 5.15 (now free) or Blender and some earlier versions of Truespace, Poser, Strata etc etc etc and the list goes on.
Whatever your favorite 3D tool is, eventually you'll want to paint over the polygons you've modeled, right? So you use a uvmapping and editing tool, either built-in like in Carrara 3, or separate, like with Ultimate Unwrap or uvmapper.
|Anyway, so here we've modeled a
pumpkin which magically survived last
Halloween without being smashed, in a polygonal / vertex modeler. In
map editor we've created a flattened display of the spherical
mapping of the polygons, made some minor tweaks and adjustments, and
we're ready to save the uvmap thus created.
Now I'm no real expert at making uvmaps, so that's why I didn't take 17-legged alien monster with 5 heads and 23 tails as an example, A pumkin is just fine. And it looks more sophisticated than a cube.
- map it onto a color channel
Notice that this uvmap can already be applied to the 3D geometry. It was saved as a Targa file, and is available to be mapped onto the color channel for example.
- into Dogwaffle
Now let's start project Dogwaffle and select File > Open ... to open the image file containing the saved uvmap.
This could also be a Jpeg or other image, 24-bit deep or not.
If your 3D program can directly utilize the alpha channel as well, for transparency masking, then use a 32-bit deep format. Hence Targa.
As we'll see, Dogwaffle lets you also paint directly on Alpha.
- Getting down to business
Ok, here we go. We' have the map loaded into our favorite paint program. Before we paint over it, let's put it into a layer which will remain protected from our brushes. That way we'll be able to paint and erase and try again to our heart's delight, without loosing the uv map underneath.
This version of Dogwaffle (1.6) supports two layers, called the Main buffer and the Swap buffer. Initially the image was loaded into the main buffer.
We can either switch over to the other buffer and paint in there, or we can transfer (swap) the content of the current buffer to the other one. We could also copy the current buffer to the other and the safely erase the current buffer's content. You pick the way you like it.
- swap buffers
We can swap buffers, i.e. switch from looking at the Main buffer to looking at the alternate buffer (called Swap buffer). Use the Buffer... menu.
There's also a shortcut - lowercase "j" (as in "jump")
Using this method you're not transfering pixels from Main to Swap buffer, you're just switching (jamping) between buffers. The point is that we want to select the buffer which does NOT contain the uvmap, so we may safely paint into it.
- swap buffers (alt.)
Another way to work is from the upper-right-most icon in the Tools palette. This is the Layers mixing and control icon.
Right-click on the icon (it shows the current buffer as an icon).
Reminder: Right-clicking on any of the icons in the Tools palette typically brings forward a menu with a bunch of options for that icon's tool. In this case, select "Swap buffers".
You'll notice in the main window's titlebar which buffer you're looking at, Main or Swap.
- enabling layer mixing
It doesn't matter which buffer contains the uvmap, as long as we're not painting into it.
From the layers mixing icon, right-click and select "Mixing active". This will then show the two buffers (the Main and the Swap buffer) in a way controlled by the mode shown in the same menu further down. Use Multiply mode.
By using "Multiply", each pixel from the Main buffer is multiplied by the pixel of the Swap buffer. Since the uvmap contains either white or black pixels, what we'll see is either black or the pixel color of the other buffer. (which of course could also be black in itself).
You will therefore still see the grid form the uvmap's buffer even as you paint over the other buffer.
- layer mixing toggle
You can quickly toggle layer mixing on/off also by left-clicking the icon.
A small orange triangle in its upper-left corner indicates if mixing is active.
- time to paint
Ok, let's pick our favorite brushes and start painting.
There's a neat effect from the Rake brush, leaving streaks.
Right-click on the brush icon, select Tempera, etc..... There is another way to see this menu: right within the painting buffer (canvas), if your mouse has a middle button or thumbwheel, press it and you'll see the menu of brushes.
- time to try and experiment
Ok, at this point you'll be painting over the map and creating the colors you wish to have across the map. You can also load images into the brush and stomp them onto the artwork, like a decal. You can even warp them into a region, such as a polygonal region.
Dogwaffle has many presets for predefined brushes. But you may want to change some parameters too. Or even create your own brushes. Even animated brushes. Very cool.
Notice also that some brushes use a paper texture. You can also use your own or select from existing paper textures. If paper textures are enabled you'll see a small orange triangle in the upper left corner of the paper textur icon (the top-middle icon). Paper textures are great for quickly conveying the appearance of leathery skins for snakes and dinosaurs and more.
- Brush settings
click on the brush settings icon. It's the one in the upper-left corner of the Tools palette. (to the left of the paper textures icon)
That icon shows you the bristles or image of the current brush, by-the-way.
- change some Brush settings
Brushes are made of images (one or more) and parameters which affect the way color is blended and mixed and applied.
For eample, check what happens when you change the Bleed factor, or random position, or Dryout or other features.
- Brush Post FX
There are also post FX features within the brush, such as shadow drop and Embossing.
Yep, the brush can cast its own shadow, or so can the heavy deposit of paint.
- are we done yet?
We may want to add some more filter effects and paint with other types of brushes. The Filter... menu shows many things to try, some traditional and expected in imaging applications, others just freakin awesome. Try the wet paint filter, or brush strokes, in the artistic effects.
There may be more (new) filters, from freely available patches such as Doggybag #1, so be sure also to check the list in the Filters plugins at the bottom end of the menu.
- Fractal Particle Brushes,
Think you've seen it all? Think again.
Here's a feature in Dogwaffle that will keep you busy for a while: painting with fractal particle emitters coming from the brush. You move the mouse with the button down and instead of one line drawing along you see lots of particle traces shooting away from it.
There's a shortcut for this one: "i" as in "freakin' <i>ncredible!"
- LongHair preset
There are a bunch of presets included with the basic Dogwaffle installation. Additional presets can be found in the freebies section at www.thebest3d.com/dogwaffle/freebies/optipustics
Here' we'll use the "LongHair" settings.
Ever since we remember, there's been a color gradient in Dogwaffle, and particles do change color during their lifetime based on how the colors change in the gradient.
One of the great new features introduced in v1.6 is that the optipustics particles also change opacity based on the gradient's opacity channel.
This lets you add tremendous fine detail and realism in line particle mode. It's great for all sorts of hair, foliage, grass, fibers.... you might argue even that this is in itself worth the upgrade from earlier versions or moving from the free 1.11b version to 1.6 or whatever the latest release is.
Read more about optipustics here.
- growing hair
So, we can use the particle brushes to quickly paint realistic hair and foliage effects. Strands of hair are growing right out of the brush as you drag the mouse. They can change color, opacity and other parameters against the color gradient. You can add light shading (darkening on lower shady side), and vary the many parameters which affect the particles such as their lifespan, number of splits, angle at split, gravity pull, (or anti-gravity push!) latency to mouse movement, mouse speed, and more.
- Sharpen, Emboss, Blurr and
There's also a number of filters, amongst which for example the noise and the embossing filter.
- from Fast to Realtime
A lot of emphasis has been given towards optimizing performance especially since Dogwaffle v1.6. Many filters work very fast fast or work even in realtime. As you drag the sliders you'll immediately see the embossing effect take shape. Filters like Sharpen and contrast/lightness/gamma make Dogwaffle a great tool for users of digital cameras too.
- Painting on Alpha?
As mentioned earlier, we can also paint on Alpha. If you want to mask out some areas as transparent, or to the contrary mask them as opaque, it can be painted right on the image. Alpha is a plane holding a selection. That pixel selection can be used in 3D application as transparency mask. Inside Dogwaffle it can also block or enable manual painting and filters.
Right-click on the paint brush icon to select the "Paint on Alpha " submenus and you'll be able to directly add transparency holes.
- Brush size
If the brush is too big, use the Resample function in the Brush menu to make it smaller
There's also a brush manager since Doggybag #1, to manager custom and animated brushes. This is great when you need to switch between various sizes often and quickly. Check it out.
- resampling the brush
What's great is that you can enter the exact desired pixel size for the brush.
- marching ants
When you paint in alpha, the color may appear to change as you paint. Immediately after you release the mouse button it gets restored to the color it had before and the selected alpha is outlined with marching ants lines.
Here we have painted a crude pumpkin face made of two eyes, a nose and a mouth.
- invert Alpha
If you later want to paint some more, e.g. to add some coloration on the cheeks or lips of the pumpkin face, you may find that the painted alpha is in fact the selection wherein you can paint. To enable painting outside of the selection, simply invert the alpha.
- Use airbrush or other tools
to add to your heart's delight.
- Save the Image
When you save the painted image, you should end up seeing only the color and optional alpha, not the uvmap's grid from the alternate layer buffer. The grid of the uvmap is showing in Dogwaffle, but that's because layer mixing is enabled. If you disable it, only the painted colors and alpha (if any) will show. Regardless of layer mixing mode, we can save the current buffer.
If your 3D application can directly read the alpha and map it to transparency you could save from Dogwaffle as 32-bit Targa. This will save the alpha info in the alpha channel.
Dogwaffle doesn't let you paint just on single static images. You can paint over a sequence of images. There's bluescreening and more effects in the timeline editor introduced in Doggybag #1.
- reload color channel
In Carrara, we can now see the painted map if we load it into the color channel.
What about transparency? We have a separate channel for that.
Let's go back to Dogwaffle and save the alpha in a separate image file.
- erase color, see alpha only
Disable layer mixing.
Then use the 'X' in the 4rth row of the Tools palette to erase the color buffer. If the erase color is white we'll just see the alpha mask like this.
The shortcut to erasing is "K" (Kill)
- copy the Alpha to the swap
Uppercase "W" is the shortcut: "W"ay cool!
You may not immediately be seeing the result, if you're not looking at the Swap buffer. You may be currently looking at the Main buffer. Just jump ("j").
- clear alpha
Now that it's in one of the main buffers (Main or Swap buffer), we don't need the alpha anymore, so clear it.
- alpha transfered
Here's what you might now be looking at. The inner portions of the selection (the painted alpha) might be black on white background. Or the other way round. We can always invert it.
- save to different file -
it's the transparancy mask
Save the image to a different file than the one containing the colors. For example, same filename plus add 'mask' in the filename.
- into transparency channel
Load the mask image into the transparency channel. In some 3D applications it might be called opacity channel.
Or you may need to invert the values (opacity vs. transparency).
- now w're done
Here are the files we created. At left the painted color map. At right the painted alpha mask.