Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Converting a black/white image to a transparent layer

Virrginia Tombola
Equestrienne
Join date: 10 Nov 2006
Posts: 938
06-13-2008 12:09
Hullo, this is one of those "I know there is a basic technique to do this, but I can't for the life of me remember" questions.

I've been baking shading in Zbrush using the Material Baker. It adds shading to the texture on the object and exports as a PSD. It's a bit strong, though, so I need to decrease/fiddle with it.

Now, the way I've been doing this is to use the unshaded texture as the base. Material Baker then creates a shaded version of that texture. I just layer that new shaded texture over the original, then play with opacity and blend options.

I think it would be more flexible and give me greater control if I simply created a shading layer without any of the original texture (i.e. black/grey/transparent). I can create a shading texture without using a base texture, with the unshaded areas export as white.

Soooo.....how do I create a layer with the white bits transparent, and the grey bits translucent? This sounds an awful lot like making translucency/transparency via alpha channels for SL, doesn't it? But I'm not trying to mask the whole image, just part of the shading layer.
_____________________


Horses, Carriages, Modern and Historical Riding apparel. Ride a demo horse, play whist, or just loiter. I'm fair used to loiterers.

http://slurl.com/secondlife/Caledon%20Eyre/48%20/183/23/
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
06-13-2008 13:47
From: Virrginia Tombola
Soooo.....how do I create a layer with the white bits transparent, and the grey bits translucent?

Unless I'm misunderstanding you, this should be really easy to do:

1. Create a new layer in your PSD, and fill it with black.

2. Give the black layer a mask.

3. Copy your shadow map to the black layer's mask, and then invert the mask's colors. Inverting will turn the white parts black, causing the mask to hide those areas on the black layer. And of course, the grayscale values will get reversed as well, so the gray parts will become translucent in the right way, just as you want.

4. Assign whatever blending mode you feel will work best to turn the black layer into a good shadow. I'd recommend either Overlay or Multiply, but there's no hard rule there. Play with it.

Easy.
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
2k Suisei
Registered User
Join date: 9 Nov 2006
Posts: 2,150
06-13-2008 15:11
You could just rebake the texture with more suitable light settings. :)

Increase the 'Ambient' setting to lighten the shaded areas and decrease the 'Intensity' setting to decrease the brightness of the spot light. Turning ZBrush's shadows off will also help. The shadows don't seem to be effected by the Ambient setting when in 'Preview' mode and so they can look really strange when there's a lot of ambient light present.

I'm not sure, but I think Material Baker might be bugged. For some reason I couldn't get it to bake textures in 'Best' render mode.


Something else you might wanna consider is sometimes skipping Material Baker and using Projection Master to bake both sides of your model in 'Colorize' mode (Polypaint) and then paint in the seams roughly with the Standard brush and smooth your painted seams with the Smooth brush (Shift key). But don't forget to turn off ZAdd so as not to disturb your mesh. I'm always forgetting!! grr

The great thing about using Projection Master is that you really do get what you see. Unlike Material Baker which can tend to be a little iffy sometimes.
Virrginia Tombola
Equestrienne
Join date: 10 Nov 2006
Posts: 938
06-13-2008 15:34
Thanks, both of you! Yes, that was what I was asking about. I rather suspected it was easy, but I am just being brain dead, is all. I kept thinking...mask....probably something invert...gah.... Well, I've embarrassed myself in public, but at least now I can use the shadows as a separate layer. Easier to fiddle with and all.

I've had hit or miss with Material Baker--sometimes its just what the object needed, sometimes it only seems to darken the texture in random bits and seem unconvincing. I really should sit down with Projection Master and the lighting controls (I'll admit it, I looked at the lighting palette for the first time yesterday!). It's just been one of those "if one walks before running, one's nose won't be going so fast when it hits the pavement" sort of situations.
_____________________


Horses, Carriages, Modern and Historical Riding apparel. Ride a demo horse, play whist, or just loiter. I'm fair used to loiterers.

http://slurl.com/secondlife/Caledon%20Eyre/48%20/183/23/
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
06-13-2008 19:45
Nothing to be embarrassed about, Virginia. If everyone who had a question would actually ask, the world would be a much better place. :)
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.