Point light question - star light simulation

Software: Away3D 4.x

kz, Newbie
Posted: 27 January 2012 04:36 PM   Total Posts: 30

Hi, I’ve attached an image:

I got this “sun”, I’d like the point light to illuminate the silver rings on the INSIDE, but I can’t. I tried with radius and fall’off but I still don’t get it. Any suggestion?

light = new PointLight();
light.color 0xff0000;
light.radius .001;
light.fallOff .5;
light.diffuse 1;
light.specular .3;
addChild(light); 

Thanks in advance (:

 

   

inSertCodE, Sr. Member
Posted: 27 January 2012 04:53 PM   Total Posts: 105   [ # 1 ]

You need to assign the light to the materials that you want to be affected by it. Also you adjust each material how to interact with the light. Start from there…

ringsMaterial.lights = [light];
ringsMaterial.specular = 0.5;

   

kz, Newbie
Posted: 27 January 2012 05:26 PM   Total Posts: 30   [ # 2 ]

I’ve already done it, the red that you see is the material affected by the light, everything looks fine when I position my pointlight far from the object, but it fails when it comes to light the object from the inside.

var fres:EnvMapDiffuseMethod = new EnvMapDiffuseMethod(cubeMap);

material.addMethod(fres);
material.lights [light];
material.ambient =  .1;
material.gloss 5;
material.specular .7
   

inSertCodE, Sr. Member
Posted: 27 January 2012 11:50 PM   Total Posts: 105   [ # 3 ]

The inner part of the rings (grey) are same material as the outer (red)?

I haven’t done any specific test with lights, just the basic lightning of a scene, so not 100% sure how they behave in away3d. But 1 thing I could think of that can cause trouble in some engines is you putting the light in the middle of the ball, which might contain the lightning, therefor no light comes out. Try the scene without the ball or putting the light beside it.

Also, if you want a shining star in the middle I would go with billboard (or animated billboard) rather than geometry (sphere). I’m not sure away3d has a method to make a geometry luminous like a star.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X