[SOLVED] Shadow from PointLight

Software: Away3D 4.x

demo, Newbie
Posted: 28 August 2012 01:03 PM   Total Posts: 9

Hello

First sorry for my english.

For my project, i need to display shadow of objects on the ground (a plane), from a point light source. 
The objects can be very close to the light source, and i need to display the shadow on long distance.

In order to calcul shadow from a PointLight, i use HardShadowMapMethod.

My problem is:

Either i set light falloff with small value (or epsilon with high value) and a lot of parrallel lines are displayed on the ground (kind of artifact??)

Or i set light falloff with high value but there is a big shadow gap between the object and his shadow.

Is there a solution for this kind of situation?
is there other method than HardShadowMapMethod which support point light source?


I use Gold version.

playing with light radius, light falloff, epsilon and dephtmapsize, impossible to have shadow without gap AND without parrallel lines.

 

   

demo, Newbie
Posted: 29 August 2012 12:57 PM   Total Posts: 9   [ # 1 ]

any idea?

 

   

demo, Newbie
Posted: 03 September 2012 07:39 AM   Total Posts: 9   [ # 2 ]

help please

 

   

Avatar
David Lenaerts, Administrator
Posted: 21 September 2012 02:42 PM   Total Posts: 80   [ # 3 ]

To get a sense of scale, in those cases, what are the values of:
- the casting object’s size (radius)
- the light fallOff value
- the epsilon


Cheers,
David

 

   

demo, Newbie
Posted: 22 September 2012 08:53 AM   Total Posts: 9   [ # 4 ]

- the casting object’s size (radius) = 1
- the light fallOff value = 60 (the field’s size)
- the epsilon = 0.01 (less increase the gap, more increase the parrallel lines)

thanks

 

   

demo, Newbie
Posted: 25 September 2012 10:39 AM   Total Posts: 9   [ # 5 ]

other points:
my pointlight is close to the field (field y 0, light y 1.6)
dephtmapsize is “limited” to 1024 (if i put no value:dephtmapsize=512 , if i put 2048: it display nothing)

 

   

Avatar
David Lenaerts, Administrator
Posted: 28 September 2012 09:28 AM   Total Posts: 80   [ # 6 ]

Could you try changing the values by a factor of 30 or so - except for the epsilon, keep that small to see if it affects anything?

 

   

demo, Newbie
Posted: 28 September 2012 11:12 AM   Total Posts: 9   [ # 7 ]

with a ratio of 30 between radius and falloff, the result look like my first screenshot. (gap reduced but lot off parralel lines) (radius:1 falloff:30)


with a ratio of 60 between radius and falloff, the result look like my last screenshot. (parralel lines reduced but big gap) (radius:1 falloff:60)


those 2 setup with same epsilon value : 0.01

thanks

 

   

Avatar
David Lenaerts, Administrator
Posted: 28 September 2012 11:17 AM   Total Posts: 80   [ # 8 ]

I didn’t mean change the ratio, I meant multiplying all the values by 30 (radius: 30, falloff: 1800, etc) grin

 

   

demo, Newbie
Posted: 28 September 2012 11:56 AM   Total Posts: 9   [ # 9 ]

Ok sorry. I already tested all the scene with a scale factor of 100 (and radius, falloff… x 100) but it’s exactly the same effects.

 

   

demo, Newbie
Posted: 05 October 2012 12:21 PM   Total Posts: 9   [ # 10 ]

If i understand well the way to map shadow, It realy seems to be a problem between the bias, the depthmap size and distances light/ground.

In attached picture, i tried to represent my situation.

looks like there is not enough distance between 2 points on the ground when translated to the light’s point of view, am i right?

So is there a way to increase dephtmap size (for better “resolution”)

Maybe my explanations are not very clear but any ideas or advices would be very useful

 

 

 

 

   

demo, Newbie
Posted: 10 October 2012 08:46 AM   Total Posts: 9   [ # 11 ]

Solved!

problem was due to my ground which cast is own shadow.

-castsShadows disabled on my ground meshe.
-epsilon still on very small value to avoid gap, cause the light is very close to the ground.

no parrallel lines anymore.

Thank you David!

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X