Guys, I am working on my first Away3D project & I'm trying to light up
the inside of a room that is 2000x8000x8000 pixels. How can I make the
room bright? First, I don't see why I would need 8 lights to light the
room up, but I tried adding this many hoping it would help.
I have 2 PointLight3Ds per side of the room, which are all white, and
I have tweaked with this code over and over and over to try and make
it brighter in the room, but it always very dark. The walls are all
PhongBitmapMaterial which is a jpg of a wallpaper type texture.
Also, how can I make sure the floor of the room is always visible?
When I tilt the HoverCamera3D up past about 0 degrees tilt, the floor
disappears.
Here is a snippet of the code for the lights to get an idea of what I
have done:
private function initLights():void
{
// PointLight Front 1 & 2
_lightFront = new PointLight3D();
_lightFront.color = 0xFFFFFF;
_lightFront.ambient = 0.2;
_lightFront.diffuse = 0.75;
_lightFront.specular = 0.1;
_lightFront2 = new PointLight3D();
_lightFront2.color = 0xFFFFFF;
_lightFront2.ambient = 0.2;
_lightFront2.diffuse = 0.75;
_lightFront2.specular = 0.1;
// PointLight Back 1 & 2
_lightBack = new PointLight3D();
_lightBack.color = 0xFFFFFF;
//_lightBack.ambient = 0.2;
//_lightBack.diffuse = 0.75;
//_lightBack.specular = 0.1;
_lightBack2 = new PointLight3D();
_lightBack2.color = 0xFFFFFF;
//_lightBack2.ambient = 0.2;
//_lightBack2.diffuse = 0.75;
//_lightBack2.specular = 0.1;
// PointLight Left 1 & 2
_lightLeft = new PointLight3D();
_lightLeft.color = 0xFFFFFF;
//_lightLeft.ambient = 0.2;
//_lightLeft.diffuse = 0.75;
//_lightLeft.specular = 0.1;
_lightLeft2 = new PointLight3D();
_lightLeft2.color = 0xFFFFFF;
//_lightLeft2.ambient = 0.2;
//_lightLeft2.diffuse = 0.75;
//_lightLeft2.specular = 0.1;
// PointLight Right 1 & 2
_lightRight = new PointLight3D();
_lightRight.color = 0xFFFFFF;
//_lightRight.ambient = 0.2;
//_lightRight.diffuse = 0.75;
//_lightRight.specular = 0.1;
_lightRight2 = new PointLight3D();
_lightRight2.color = 0xFFFFFF;
//_lightRight2.ambient = 0.2;
//_lightRight2.diffuse = 0.75;
//_lightRight2.specular = 0.1;
positionLights();
_scene.addChild(_lightFront);
_scene.addChild(_lightFront2);
_scene.addChild(_lightBack);
_scene.addChild(_lightBack2);
_scene.addChild(_lightLeft);
_scene.addChild(_lightLeft2);
_scene.addChild(_lightRight);
_scene.addChild(_lightRight2);
}
private function positionLights():void
{
_lightFront.x = -(_roomWidth / 8);
_lightFront.y = _roomHeight * 0.8;
_lightFront.z = _roomWidth / 4;
_lightFront.radius = _roomWidth / 100;
_lightFront.lookAt(new Number3D(0, 0, _roomWidth / 2));
_lightFront2.x = _roomWidth / 8;
_lightFront2.y = _roomHeight * 0.8;
_lightFront2.z = _roomWidth / 4;
_lightFront2.radius = _roomWidth / 100;
_lightFront2.lookAt(new Number3D(0, 0, _roomWidth / 4));
_lightBack.x = -(_roomWidth / 8);
_lightBack.y = _roomHeight * 0.9;
_lightBack.z = -(_roomWidth / 4);
_lightBack.radius = _roomWidth / 10;
_lightBack.lookAt(new Number3D(0, 0, -(_roomWidth / 2)));
_lightBack2.x = _roomWidth / 8;
_lightBack2.y = _roomHeight * 0.9;
_lightBack2.z = -(_roomWidth / 4);
_lightBack2.radius = _roomWidth / 10;
_lightBack2.lookAt(new Number3D(0, 0, -(_roomWidth / 2)));
_lightLeft.x = -(_roomWidth / 4);
_lightLeft.y = _roomHeight * 0.9;
_lightLeft.z = -(_roomWidth / 8);
_lightLeft.radius = _roomWidth / 10;
_lightLeft.lookAt(new Number3D(-(_roomWidth / 2), 0, 0));
_lightLeft2.x = -(_roomWidth / 4);
_lightLeft2.y = _roomHeight * 0.9;
_lightLeft2.z = _roomWidth / 8;
_lightLeft2.radius = _roomWidth / 10;
_lightLeft2.lookAt(new Number3D(-(_roomWidth / 2), 0, 0));
_lightRight.x = _roomWidth / 4;
_lightRight.y = _roomHeight * 0.9;
_lightRight.z = -(_roomWidth / 8);
_lightRight.radius = _roomWidth / 10;
_lightRight.lookAt(new Number3D(_roomWidth / 2, 0, 0));
_lightRight2.x = _roomWidth / 4;
_lightRight2.y = _roomHeight * 0.9;
_lightRight2.z = _roomWidth / 8;
_lightRight2.radius = _roomWidth / 10;
_lightRight2.lookAt(new Number3D(_roomWidth / 2, 0, 0));
}