i have a problem about “SoftShadowMapMethod”

Software: Away3D 4.x

Avatar
venom, Newbie
Posted: 04 October 2011 10:23 PM   Total Posts: 26

hi Away3D Team, what a great project I must say that but I have a problem about SoftShadowMapMethod, i can see shadows clearly but sometimes when I turn the camera just a litte, the shadow just disappears. is there a problem with me or not? I couldn’t figure out.

i have added the pictures of my problem. one of it is ok but the other is just from a little different angle

 

   

Avatar
Alejandro Santander, Administrator
Posted: 05 October 2011 01:55 AM   Total Posts: 414   [ # 1 ]

It would help us if you could reduce the problem to the simplest possible code and file it as an issue in GitHub. Otherwise, please paste the reduced code here so we can have a look.

   

Avatar
theMightyAtom, Sr. Member
Posted: 05 October 2011 05:40 AM   Total Posts: 669   [ # 2 ]

See this thread: http://away3d.com/forum/viewthread/309/

Unfortunately there’s no absolute fix for this, afaik.

   

Avatar
venom, Newbie
Posted: 05 October 2011 10:30 AM   Total Posts: 26   [ # 3 ]

thanks guys for reply. i guess my problem is the same in that thread. I think I have to wait for that fix. thanks again for your replys

these are my codes I used. I cut some of the code becouse there were useless and just the same part in any project:
I have used these settings for light:
light1 = new DirectionalLight();
light1.x = -15000;
light1.z = 15000;
light1.y=125000
light1.color = 0xffddbb;
_view.scene.addChild(light1);

the camera is from “HoverDragController” which is in the away3d-examples-broomstick folder

and there is the ResourceComplete part:
private function onSceneResourceComplete(event : LoaderEvent) : void {
var containera : ObjectContainer3D = ObjectContainer3D(event.target);
_view.scene.addChild(containera);

var materia2 : BitmapMaterial = new BitmapMaterial(new tI_Bina().bitmapData);
materia2.normalMap = new tI_BinaN().bitmapData;
materia2.shadowMethod=new SoftShadowMapMethod(light1,0.00025);
materia2.lights = [light1];

var sceneMesh2 : Mesh = Mesh(containera.getChildAt(0));
sceneMesh2.geometry.scale(0.5);
sceneMesh2.material = materia2;
sceneMesh2.castsShadows=true;

var sceneShape2 : AWPBvhTriangleMeshShape = new AWPBvhTriangleMeshShape(sceneMesh2);
var sceneBody2 : AWPRigidBody = new AWPRigidBody(sceneShape2, sceneMesh2, 0);
physicsWorld.addRigidBody(sceneBody2);
}

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X