How difficult would dynamic shadows and sun be to create?

Guys I am attempting to add something like this to my unity level, its not a game I am attempting as such, just trying to create a semi realistic environment.

I think this was done in Torque, but where would I start if attempting this in Unity, I have my scene and some rain worked in, I have a sun that moves and increases light as it moves around my environment, but it has no effect on shadows and doesn’t look realistic at all, anyone able to help me on this? I am really new to unity so far and just confused at where to start on alot of issues.

Thanks.

Realtime shadows are a feature of Unity Pro and as such are inaccessible in the free version of Unity. Sorry :frowning:

Hey thanks for your response, I actually do have a copy of pro, its the trial of 2.6 and got another 15 days on it before I need to give in this coursework, I have pixel lightmapped my environment from two lighting sources, one being ambient lighting and the other being a directional light which is my sun, in theory then if I had the sun positioned correctly and moving correctly, could I achieve something like below?

These pages from the docs should set you in the right direction:

Thanks for the reply, managed to get it working, thank you for the help and direction, basically I have the sun point at an invisible cube on the map and using the “lookat” function, to keep it fixed on there as it moves, so I do have some kind of dynamic shadows following the sun, main issue is I need a little more control over it. think I have taken a little too much on here with my java incompetence, here is the scripy attached to my directional light, could anyone help with a script to speed or slow down the movement on two keypresses? Sorry to be a pain and regards.

var target: Transform;

function Update () {
// need an if state ment to control
transform.Translate(60*(Vector3.forward * Time.deltaTime), Space.World);
transform.LookAt(target);
}

Ps - tried to upload to both a webplayer and to the site and neither would accept the exe. If anyone could take a look and perhaps offer improvements on how I can make this look better, please do. Thanks alot. Ps yes the modelling is meant to be poor :stuck_out_tongue: Y+H control rain emissions.

http://rapidshare.com/files/313425336/Game.rar.html —Only place I could think to upload, cheers.

Hi,

I found that and it’s very interesting

http://www.pixelstudio.nl/?p=138

Hope it helps.

++
:wink: :wink: :wink:

Thanks for the reply DisTrash, I had seen that previously and was very interested in implementing it, however, I didn’t have the knowledge to do so unfortunately, very new to Unity and the only thing I have attempted to make a game in before was Director, so was unsure on the specifics of getting it in my scene!