How to add lightpicker to a loaded .awd model?

Software: Away3D 4.x

Ankur, Jr. Member
Posted: 22 January 2013 07:51 PM   Total Posts: 43

I know how to add light picker to a Cubegeometry made in Away3d, but what about .awd that I load. Can I add lighting to them?

Thanks

   

Ankur, Jr. Member
Posted: 23 January 2013 07:48 AM   Total Posts: 43   [ # 1 ]

Please reply!
bump

   

yohann, Newbie
Posted: 12 February 2013 05:24 AM   Total Posts: 17   [ # 2 ]

I would love to know this as well!

   

Ankur, Jr. Member
Posted: 12 February 2013 07:40 AM   Total Posts: 43   [ # 3 ]
yohann - 12 February 2013 05:24 AM

I would love to know this as well!

Hi yohann,

The trick is not to use a Loader3D, instead use AssetLibrary to load the model. When you have loaded it in assetLibrary, you can get the mesh and apply a lightpicker to its material as shown in the code below.

private function onAssetComplete(e:AssetEvent):void
{
_myMesh 
e.asset as Mesh;

_myMesh.material.lightpicker _myLightpicker

Also if you know about AssetLibrary, please reply to my question at- http://away3d.com/forum/viewthread/3981/

   

yohann, Newbie
Posted: 13 February 2013 04:06 AM   Total Posts: 17   [ # 4 ]

Excellent! That worked…thanks so much!! ...and I saw you got your question answered re: clone().  smile

   

Ankur, Jr. Member
Posted: 13 February 2013 07:42 AM   Total Posts: 43   [ # 5 ]

Hi yohann,

Glad it worked for you.

For my question, clone() did work to duplicate the meshes, but do you know how to duplicate skeleton, animationsets, animators etc?

Thanks

   

yohann, Newbie
Posted: 13 February 2013 01:04 PM   Total Posts: 17   [ # 6 ]

Sorry Ankur, I don’t know. Sounds like you’re a few steps ahead of me with Away3D stuff. I’m still trying to master importing and skinning meshes; all of my “animations” so far have been limited to what I can do w AS3. Good luck!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X