Hi all,
I made a shadow system to my game.
All shadows are good but I notice weird twin shadows..
In other words my shadows has their twin (more little) projected to the ground...
Please watch the vid:
http://www.youtube.com/watch?v=cnLcmitFW5w&feature=youtu.be
Now you know what I mean for twin shadows!
Here my shadow code:
` make a sun object up in the sky to the right somewhere
make object sphere 5000, 50 rem this is the sun!
position object 5000, -1300, 6000, -1600
` for DBPro shadows you need to use one of lights 1 to 8 not the default light 0
make light 1
set point light 1, object position x(5000), object position y(5000), object position z(5000)
set light range 1, 90000 rem 165000
color light 1,rgb(255,255,255)
` you also probably need to hide light 0
hide light 0
` set up the man shadows
FOR a = 1000 to ultimo_uomo
set shadow shading on a, rem -1, 300, 0 ` the sphere object casts shadows
NEXT
` set up the trees shadows
FOR a = 4000 to ultimo_albero
set shadow shading on a, rem -1, 300, 0 ` the sphere object casts shadows
NEXT
` set up the grey obstacles shadows
FOR a = 500 to ultimo_ostacolo
set shadow shading on a, rem -1, 300, 0 ` the sphere object casts shadows
NEXT
set shadow position 1, object position x(5000), object position y(5000), object position z(5000)
Please help because I am in trip with this problem!!
EDIT:
Here another vid to understand how my shadows are weird!
http://www.youtube.com/watch?v=O_ZUZ6O4CHU&feature=youtu.be