Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Creating Shadow Plane with Blender?

Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
02-24-2009 14:43
Hiya!
So, I'm getting back into sculpting (I seem to have my streaks of loving it), and am using Blender, and am loving it, blahblahblah. ANYWAY...

I'm trying to create a shadow plane for a sculpt I made, by baking one in Blender. So far, I've got it so that I can bake it with shadows on a solid background, but I can't figure out how to bake just the shadow, on a transparent background.

So far, I have the attached image as my results.. the shadow and grass are all one texture.

I just want a normal 'shadow plane' like many trees available in SL have. Transparent, with dark gray/black section of shadow.

Any help would be most appreciated.

_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-24-2009 17:22
There should be a way to bake just a shadow map, but I have no idea what the settings might be in Blender. Here's the next best thing. Simply bake the shadow onto a white surface, and use the resulting image as an alpha channel.

Here's the step-by-step. This should take you about 10 seconds (not counting render time for the bake itself):

1. Cast the shadow onto an all white surface, and bake.

2. Take the resulting image into Photoshop, or whatever your raster editor of choice happens to be, and invert the colors so the shadow is white, and the background is black.

3. Copy & paste the inverted image to an alpha channel.

4. Make a new layer in the image, and flood it with black.

5. Save as 32-bit TGA, and upload to SL.

You should now see the shadow shape in black, on an otherwise transparent canvas. If you find the shadow is too transparent, increase the contrast in the alpha channel, save again, and re-upload.

Alternatively, you could make the base color white instead of black, and then color it any shade you want after it's been uploaded. That way, if the shadow is going over grass like in your screenshot, you can tint it whatever shade of deep green looks most realistic over SL's grass. As you probably know, shadows are never actually black unless they're being cast on an almost black surface. They're always a deeper shade of the diffuse color(s) of whatever surface they're being cast on. A shadow on a green surface is darker green, a shadow on a blue surface is darker blue, a shadow on a red surface is darker red, etc.
_____________________
.

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.
Keira Wells
Blender Sculptor
Join date: 16 Mar 2008
Posts: 2,371
02-24-2009 20:28
Thank you, Chosen!


Unfortunately, I don't currently have any image editor beyond mspaint installed atm =P Fixing later... (Otherwise I would have done exactly as you described, already ^-^)

Anywho, I finally did figure out my issue!

Turns out I was baking with just RGB values, instead of RGBA, silly me!

Finally got a transparent shadow-plane image baked straight from Blender =D


Thanks again, Chosen!
_____________________
Tutorials for Sculpties using Blender!
Http://www.youtube.com/user/BlenderSL