Keep the color of a .obj imported ?

Software: Away3D 4.x

Goupix, Newbie
Posted: 21 May 2012 01:03 PM   Total Posts: 9

Hello,
I realized this scene: without light
(You can use the arrows or ZQSD keys to move)
At this stage, I add a light and therefore a material: with light

light = new PointLight();
light.15000;
light.15000;
light.15000;
light.color 0xffffff;
light.ambient 1;
lightPicker = new StaticLightPicker([light]);
scene.addChild(light);

material = new TextureMaterial();
material.lightPicker lightPicker;
material.gloss 10;
material.specular 3;
material.ambientColor 0x303040;
material.ambient 1

But I would keep the color of my imported objects (.obj With .mtl)
Is it means to do or should necessarily pass through a UV unwrapping?

thank you

   

Richard Olsson, Administrator
Posted: 16 June 2012 02:31 PM   Total Posts: 1192   [ # 1 ]

Your objects already have materials (or they wouldn’t show up at all) so there is no need to create a new one. Just assign the light picker straight to your existing materials.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X