, Jr. Member
Thanks again Fabrice. I worked on this shimpleshadow method -
here is what I found. It would be good for blob shadows of meshes in your container. here’s my code, after init scene as usual.
import SuperSoftShadow
var container =new ObjectContainer3D();
var mycube = new Mesh(new CubeGeometry(32, 32, 32, 1, 1, 1,false)
container.addChild(mycube)
var shadow = new SuperSoftShadow(container,stage,20,256,1); // 1 is 1 pixel above ground//
mycube.y=1 // make sure this is at least 1 pixel above ground//
view.scene.addChild(mycube);// gotta add the original mesh or you’ll just get its shadow//
one note, in the SuperSoftShadow file, i had to change this line to make the shadow bigger than the object if object is on the ground, otherwise it is directly under it and you cant see it. if your objects floats or has holes, might not need this.
var geometry:PlaneGeometry = new PlaneGeometry(_ext*1.5,_ext*1.5);//// i added the 1.5 to make it more bigger, you could make this 1.1, etc//
and this renders a nice blurry square under your cube, simulating a light from directly above’s shadow.
oh, you can addChild the shadow to your mesh so it follows it if its a moving object or character.
andy