I just did :) ...still no shadows visible, though.....
On Jun 6, 1:03 pm, Michael Iv <explomas...@gmail.com> wrote: > have you set "castShadow=true" to the shadow casting object? > > > > > > > > > > On Mon, Jun 6, 2011 at 1:59 PM, RocketClowns <rocketclo...@gmail.com> wrote: > > Hi Michael, > > > of course, you're right! > > > First, setting up the view: > > > view = new View3D(); > > view.antiAlias = 8; > > > view.camera.lens.far = 1000; > > addChild(view); > > > Then I create the light like this: > > > light1 = new DirectionalLight(0, 1, -1); > > light1.color = 0xFFFFFF; > > view.scene.addChild(light1); > > > Then the materials: > > > matCube = new BitmapMaterial(new > > WoodBitmap().bitmapData); > > matCube.specular = 0.6; > > //matCube.addMethod(new SoftShadowMapMethod(light1, > > 0.0006)); // throws Error #1125 > > matCube.lights = [light1]; > > > matFloor = new ColorMaterial(0xFFFFFF); > > matFloor.lights = [light1]; > > > Then I add the objects to the scene: > > > floor = new Plane(matFloor, 500, 1000); > > floor.z = 400; > > floor.rotationZ = 90; > > container.addChild(floor); > > > cube = new Cube(matCube, 100, 75, 5); > > //cube.y = 100; > > cube.z = 200; > > container.addChild(cube); > > > And finally, on ENTER_FRAME: > > > view.render(); > > > That's about it... > > > On Jun 6, 12:46 pm, Michael Iv <explomas...@gmail.com> wrote: > > > Seeing your code could be extremely helpful > > > > On Mon, Jun 6, 2011 at 1:43 PM, RocketClowns <rocketclo...@gmail.com> > > wrote: > > > > I could really use some help with getting shadows going in a very > > > > simple 3D-scene. > > > > > I have a simple object that can be rotated with user mouse-input. The > > > > object is lit by a DirectionalLight, and behind it is a simple white > > > > plane. > > > > > I'd like the object to cast shadows onto the plane. > > > > > Adding a SoftShadowMapMethod to the object's material throws this > > > > error: > > > > > RangeError: Error #1125: The index 4294967295 is out of range 8. > > > > at away3d.lights.shadowmaps::ShadowMapperBase/renderDepthMap() > > > > at away3d.containers::View3D/updateLights() > > > > at away3d.containers::View3D/render() > > > > at Away7/onFrame() > > > > > What am I doing wrong? I'd really appreciate it if someone could point > > > > me in the right direction! > > > > -- > > > Michael Ivanov ,Programmer > > > Neurotech Solutions Ltd. > > > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net > > > Tel:054-4962254 > > > mich...@neurotech.co.il > > > t...@neurotech.co.il > > -- > Michael Ivanov ,Programmer > Neurotech Solutions Ltd. > Flex|Air |3D|Unity|www.neurotechresearch.comhttp://blog.alladvanced.net > Tel:054-4962254 > mich...@neurotech.co.il > t...@neurotech.co.il