When is Prefab for Away3D 4.0 likely to be available?

Software: Prefab3D

Avatar
3d4ever, Newbie
Posted: 03 November 2011 06:26 AM   Total Posts: 21   [ # 16 ]

Hi Fabrice….

It works!!!!!!!!!!!

Oh my I feel so stupid….

I always moved the camera outside the cube

it runs perfect now…. 

Another question: is it also posible that the image file is embedded into the swf.. I mean that I dont have to place image folder in same directory where the swf is ???

I want to post my little walkthroug on a forum what allows to upload swf files only..

anyway thnx for all your help and patientce with me..

regards: 3d4ever

   

Avatar
Fabrice Closier, Administrator
Posted: 03 November 2011 01:34 PM   Total Posts: 1265   [ # 17 ]

yes but it requires custom work. You can remove in awd the urls and generate/set the materials yourself or mod/extend the awddata class so that it uses embeds instead of using BitmapFileMaterial.

Glad you finally nailed the issue.

   

Avatar
3d4ever, Newbie
Posted: 04 November 2011 09:49 AM   Total Posts: 21   [ # 18 ]

Hi…

So I have to add a embed command into these lines ??

_tree = BSPTree(AWData.parse(new BSPFile(), {customPath:”./images/”}));
  _view.scene.addChild(_tree);
  _tree.usePVS = true;

I tried to place the embed command at every position in these lines.. but all swf’s turn blank again…

   

Avatar
Fabrice Closier, Administrator
Posted: 04 November 2011 10:29 AM   Total Posts: 1265   [ # 19 ]

replace in header awd file #f:2 by #f:1, and then apply the materials to your objects by parsing the scene.
Or edit/duplicate awddata class. On line 330 where it generates a BitmapFileMaterial, you could replace by something like buildMaterialFromEmbeds(ref.material), if you change the url’s stored in awd by the classname of your embeds, this custom function would then do new BitmapMaterial(new param().bitmapData);

Regarding the issue you were having (all white, bitmaps not found), just replace customPath:”./images/” by another url. All depends on your project setup.

   

Avatar
3d4ever, Newbie
Posted: 04 November 2011 10:51 AM   Total Posts: 21   [ # 20 ]

ok will try

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X