You know that realtime shadow is just for Unity Pro. But you also can use Projector object to create semi realistic shadow (depends on how you draw the shadow).
- First what you need is shadow projection shader. You can download it here, https://www.box.com/s/20e66cf1ff20f06a9f9a
- And then open photoshop. Create some black and white shadow.
- Create new image with 256×256. Click Rectangular Marquee tool and set the feather to 30 / 15. And then draw it
- Press CTRL + Backspace to fill the selection. Make sure the color is white, black.
- Save it as .JPG
- You also need a falloff image.
- Create new image (photoshop) 256x*8. Choose the Gradient tool and then drag it from left side to right side (left side : black, right side : white). Save it as .JPG
- In Unity, create new material and then choose the shader to FX / Projector Multiply
- You also need to set the shadow image and the falloff image properties
- for shadow image, Set texture type to Advanced. Turn on the “Alpha from Grayscale”, and “Border Mip Maps”. Set the Mip Maps Filtering to Kaiser. And the final, set the Wrap Mode : Clamp
- Do the same for Falloff image.
- and then import shadow image to cookie (in shadow material), and falloff to falloff.
- Create new Projector object. Rotate it 90 in the X Axis.
- Create a new Layer named “NoShadow”. And then select to an object you want to ignore the layer. For Instance, blob shadow for player, set blob shadow as the child of Player, and then click player change the layer from Default to NoShadow.
- You also can use a script to lock the projector (for something like crate) by using private var awakeRot : Quaternion. At the Start function, write awakeRot = transform.rotation; and then at Update function, write transform.rotation = awakeRot;