Maturity of libawd ?

Software: Away3D 4.x

Polymathic, Newbie
Posted: 22 March 2013 11:57 AM   Total Posts: 5

Hi,

We try the lib to export awd file using the c++ awd lib from mercurial repo at http://code.google.com/p/awd/ for a. research project.

The awd file generated produce an error saying the model size is basically 0 when I try to import it in prefab3d.

The transform matrix of the model seems to be broken and the model doesn’t show until the scale is set to any value.

Is the SDK still supported (last log are 8 month old, so I wander) and is the SDK far behide the exporter inside prefab3D?

I attached the model and the error message.

thanks

 

File Attachments
awd.zip  (File Size: 33KB - Downloads: 183)
   

Avatar
Fabrice Closier, Administrator
Posted: 22 March 2013 02:34 PM   Total Posts: 1265   [ # 1 ]

The warning you get in Prefab is to imform you that your model is very very small. Working at low size introduces possible rounding errors. Prefab gives you the choice. I doesn’t apply any changes if you do not want to.

The easyest way to fix is change the unit or unitfactor in your app.
As about the awd exporters. Prefab uses a own brewed as3 class exporter, not using the SDK. The class was written at the same time the SDK was developped by Richard. Both are based on spec 2.0.

Now your file in Prefab, representing an inverted cube. When you get the warning, simply enter a scale factor higher than one.

 

   

Polymathic, Newbie
Posted: 22 March 2013 03:18 PM   Total Posts: 5   [ # 2 ]

Hi Fabrice,

Thanks for your quick response. About the normals, we didn’t notice that the coordinates are left-handed, so it’s ok now smile

However, the issue is still here… The cube size is 512x512x512 units, and it is shown correctly only when we manually set the transform matrix of the model to the identity matrix in Prefab3D, or when we set the scale factor to 1 when the warning occurs. The transform matrix written in the file seems to be ignored.

We attached the new AWD file (with correct normals) and two screenshots :
- WhenOpeningPrefab3D.png is what is shown just after opening the editor (notice that the transform matrix of the model seems to be broken)
- AfterTransformIsSetToIdentity.png is what is shown after we manually set the transform matrix to the identity matrix

Maybe we are missing a factor or a unitfactor somewhere in the API ? If you want, we can send you the CPP sample wich create the cube (the source code is small).

Our goal is to create 3D convertors (e.g. from DAE to AWD) embedded in a Web site, so we only use the editor to test the result of the exporter.

Regards,

Martin & Martin

 

File Attachments
Cube.zip  (File Size: 330KB - Downloads: 176)
   

Avatar
Fabrice Closier, Administrator
Posted: 22 March 2013 03:51 PM   Total Posts: 1265   [ # 3 ]

Prefab checks the bounds, in units. if it was reading 512, it would display a 512x512x512 cube. Make sure either scale values in transform or vertices values are correct in your dae. I will check later on, why Prefab gives a scale factor of one, as its expected to give the factor to meet a mininum setting in percent. everything above 1.
I did for a client an dae to awd exporter not 2 month ago, and all seems fine. Dea files are coming from CAD or BIM servers. The dimensions were tested back by architects as well. What I mean here, is that it should work and there is a chance some error is made in your exporter, it is not in awd format.

It looks broken because it is tiny, and selection box has a minimum edge of 1 around the object bounds. So you see only the selection box. If you open with factor 1, tiny * 1 is still same tiny. Prefab indeed then muliply the vertices with the given factor, otherwize it would make little sens to advise a rescaling to prevent rounding errors to finally export back with the risk still there.

 

   

Polymathic, Newbie
Posted: 25 March 2013 03:01 PM   Total Posts: 5   [ # 4 ]

After analyzed the AWD file byte per byte, i partially solved my problem : i was using a 4x4 transform matrix instead of a 4x3 transform matrix for the meshInstance, which caused the matrix to be set to something else than the identity matrix (with a z scale set to 0).

However, i found a few issues in the API and in the specification document that could cause bugs in certain cases… Since the present issue is solved, i’m posting the new issues in a new thread.

Thanks !

Martin Bousquet

 

   
   
‹‹ Unit testing

X

Away3D Forum

Member Login

Username

Password

Remember_me



X