shadows

(Túrin Turambar) #1

I know that blender cannot do realtime shadows yet. Is there an easy way to manually make static shadows for objects?

0 Likes

(The Red Hand) #2

Red hand to the rescue! Yes there is a way for non moving objects. Set up the camera or view in the angle you want your light to be. Make it be alone and the background set to white. Take a screenshot (ctrl + Prt Scr) and go into a photo editing program (I only know how to do it in photoshop. Hit ctrl+V and you should see your game window. Go to select and press color range. and select the white background. go to select inverse and your object should be there. Copy and paste it into another layer and delete the background layer. You should just have your object on an alpha channel. Make the object black, and save it as a .png. go back to blender and put a plane mesh and uv that texture in and match it all in, and TADA! Your very own shadow!

Hope it helped. By the way, you posted it in the wrong forum. oops!

0 Likes

(Túrin Turambar) #3

Yah, I noticed that. thanks though, man. The only thing is that if you have a hill, that it screws up.

0 Likes

(Captain Oblivion) #4

if you set the faces the shadow is mapped on to “shadow” they should rotate to be flat with the surface the object is above (this means that the shadow will stay on the ground if your character jumps, too). make sure to have the shadow faces just a very small amount higher than the center of the object, or it’ll go into the ground.

0 Likes

(EST) #5

I have one question. If i have made my own shadow and placed it on plane, so how can i make it stay on ground all the time ? Like on mountains and those stuff.
Edit: Oblivion lol u posted when i was writing:evilgrin:, but still will it work on mountains too?

0 Likes

(Túrin Turambar) #6

Yah, but what about texture backing and ambient occlusion. Isn’t there a way to do it with those?

0 Likes

(Captain Oblivion) #7

give this a shot:
-put the plane that’s to receive the shadow at your character’s feet.
-make a new image (in the image editor window), and UV the plane to fill this image.
-place a sun lamp to cast the shadow
-in the render buttons, go to the bake tab
-with the sadow plane selected (it needs to be it’s own object, I believe) bake full render. the image should turn out as the shadow, but without the alpha map.
-save the image on your HD, open it with GIMP
-go filters->colors->color-to-alpha
-save the image, and send it back into blender. you should have a shadow.

I haven’t tried this so there may be kinks, but it should work in theory.

0 Likes