shadow is not correct,why?

Software: Away3D 4.x

datouaizi, Member
Posted: 15 April 2012 04:02 PM   Total Posts: 98

sunLight = new DirectionalLight(-1, -0.5, 1);
  sunLight.color = 0xFFFFFF;
  sunLight.castsShadows = true;
  sunLight.ambient = 0.7;
  sunLight.diffuse = 1;
  sunLight.specular = 1;
  scene.addChild(sunLight);
  sunLight.y = 1000 ;
 
  //create a light for ambient effect that mimics the sky
  skyLight = new PointLight();
  skyLight.castsShadows = true ;
  skyLight.y = 1000;
  skyLight.color = 0xFFFFFF;
  skyLight.diffuse = 1;
  skyLight.specular = 1;
  skyLight.radius = 2000;
  skyLight.fallOff = 2500;
  scene.addChild(skyLight);
 
  lightPicker = new StaticLightPicker([sunLight,skyLight]);
 
  //create a global shadow method
  //filteredShadowMapMethod = new TripleFilteredShadowMapMethod(sunLight);
  filteredShadowMapMethod = new SoftShadowMapMethod(sunLight);
  //filteredShadowMapMethod.epsilon = 0.1;

when move camera shaodow flaming too!shodow far from obj

 

   

roco, Newbie
Posted: 24 April 2012 01:24 PM   Total Posts: 8   [ # 1 ]

try to play with camera.lens.far and the whole scale of your model. I’m really disappointed in shadows myself, and still tweaking them. but I got to improve them a little by changing the above.

   

inSertCodE, Sr. Member
Posted: 25 April 2012 11:07 PM   Total Posts: 105   [ # 2 ]

It looks to me like a size problem I had. For some reason the shadows were way off from where they should have been, and the solution was quite unexpectable… Scale everything by lets say 10 times and see if it fixes it.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X