GLARE

The glare effect creates a diffuse glow over and around ALL the objects of a world that was marked with "emits light" in the Builder.If you define "glare" to a subworld/model the root-primitive will have "glare". So: if you like that only some objects have glare, you need to create the lighting effects for objects using "emits light" and re-color some objects not having "emits light" to not have "glare".

At our demo we create the "red lamp" like a subworld. We did the lighting of the root-primitive having the "red lamp" inside it and erase it after this, exporting the group like an object.

The subworld has the program:

glareEffect.radius     = 20;
glareEffect.brightness = 3;
glareEffect.active     = true;
And the root-primitive has:
lamp = Model("./lamp.aer").add();
lamp.position = Vector(0, 0, 0);
i = 0; //Creates an index "i"
lamp.timestep = function(){ 
 if(lamp.loaded){ 
  lamp.orientation = Rotation('Y',i);  
  i=i+.01; //Each loop the box rotates .1 radians more
  if(i>=6.28) i=0; //6.28 is 360 degrees in radians (2PI)
 } 
} 
addAnimator(lamp); 

You can see that the lighting system of Atmosphere is "static". It's more like the creation of a texture. :-(




PREVIOUS LESSON NEXT LESSON
T. CONTENTS HOMEPAGE