.AWD 2 model not loaded anymore

Software: Prefab3D

lisophorm, Newbie
Posted: 24 January 2013 12:31 PM   Total Posts: 10

Hello,

I have created with a previous version of prefab3D a simple model.
I have downloaded the latest update and when I try to import the model I got just an empty scene. No materials or anything. But I got the “model loaded successfully”.
The model is correctly loaded and displayed into my Away3d4 project (latest release).
You can get the model here: http://www.ignitesocial.co.uk/ball.zip I hop,e this will be of help for me and for anybody else.

Thanks for any help.

A.

   

Avatar
Fabrice Closier, Administrator
Posted: 24 January 2013 03:34 PM   Total Posts: 1265   [ # 1 ]

There were 2 materials index issues. One introduced after some internal changes in 2.136. fixed in 2.137 and one that was in there since Prefab exports awds occuring in some combos of multiple materials (when set on submeshes).
Both issues are fixed with 2.139.

So if you want to load and export again, you need to load your original model in latest version, then export to awd. The awd that you have exported is unfortunatly corrupt.

Several threads covering the subject were answered in this very forum during past week.

   

Trips, Newbie
Posted: 24 January 2013 05:18 PM   Total Posts: 6   [ # 2 ]

Hi Fabrice,
I already note the same issue that lisophorm. When I import a DAE object to Prefab 2 (2.139) and export to AWD2, the materials were lost.In this case, the model is complex with submeshes.

Otherwise, when I export a simple cube with a simple material. Flash fires the next error, and then the model is rendered with the material correctly.

TypeErrorError #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo.
 
at away3d.loaders.parsers::ParserBase/finishParsing()[/Applications/Adobe Gaming SDK 1.0/Frameworks/Away3D/src/away3d/loaders/parsers/ParserBase.as:442]
 at away3d
.loaders.parsers::ParserBase/onInterval()[/Applications/Adobe Gaming SDK 1.0/Frameworks/Away3D/src/away3d/loaders/parsers/ParserBase.as:421]
 at flash
.utils::Timer/_timerDispatch()
 
at flash.utils::Timer/tick() 

I hope this will be useful. Thanks!

 

 

   

Avatar
Fabrice Closier, Administrator
Posted: 24 January 2013 05:28 PM   Total Posts: 1265   [ # 3 ]

Please send me your original files.

   

Trips, Newbie
Posted: 24 January 2013 05:38 PM   Total Posts: 6   [ # 4 ]

Here you are.

https://www.wetransfer.com/downloads/abe41cbe77fa139b3cb6c9ab1cf0f4df20130124173527/6aeea097400d01b0bebaecd84f361ff520130124173527/467ec1


There are 2 models. A cube and a car. The first is a simple model with a simple material, and the second, is a complex model with submeshes.

Both were exported with 2.139.


Thanks

   

Avatar
Fabrice Closier, Administrator
Posted: 24 January 2013 07:59 PM   Total Posts: 1265   [ # 5 ]

Thank you.

   

Avatar
Fabrice Closier, Administrator
Posted: 24 January 2013 08:04 PM   Total Posts: 1265   [ # 6 ]

I see only the awd’s, I need the original files in order to compare.
Please send them to fabrice3d at gmail dot com

   

Trips, Newbie
Posted: 25 January 2013 07:30 AM   Total Posts: 6   [ # 7 ]

Sorry.  The DAE models..

https://www.wetransfer.com/downloads/4cc7d78b2ebc05e87ff7f4f617e973c820130125072753/d83cf71855ed44f66d3c3e90e921b9ef20130125072753/c51496


Thanks

   

Avatar
Fabrice Closier, Administrator
Posted: 25 January 2013 10:30 AM   Total Posts: 1265   [ # 8 ]

I’ve tried the model and see the problem. It’s a combination of things that causes the loss or other order of materials:

As you know Away3D is very flexible with materials, where you can set a material on mesh or on submeshes. You also can have null material on mesh and have just one submesh material…

In your case, the models are having both submeshes and meshes materials set. And here comes the flaw: In awd parser there is a rule that says, if a material is set in block and if the mesh has only one subgeometry, set the mesh material equal to the first entry in stored materials. This leads to unexpected result in your case, because in Away and Prefab, submeshes material have priority. so Prefab/away render the submesh. However, when Prefab exports, it parses the objects, save them all. Where a typical mesh in your model would lead to the sequence: write mesn material, write mesh submesh 0 material. At reconstruct time, because of the awd rule, the materials collected (2) only first one is used because your meshes hold only 1 submesh. So the first material entry is set on mesh. as a result the reconstruct is not what the original source was and aspect on screen is different. Unfortunatly for the 2.0 specs, changing parser behavior would break the format.

So how can you go around this flaw for now? You have 2 options:
- 1 change your export option in your editor or use another format such as obj where multiple materials per mesh are ignored.
- 2 in Prefab, open each mesh info, and set for every submesh a null material. Assign the material that you want to the mesh.
To illustrate I’ve made a project where I deleted all materials and assigned new ones (not done all as there are 67 meshes in this model). http://www.closier.nl/downloads/forum_files/peugeot.zip
I haven’t merged where necessary, so some parts like doors need to be either merged or collapsed, then get unique mesh material. Then you can see that once assigned this way awd is exported and reloaded with the intended material. Again, in this project, I haven’t done it on all meshes, so reloading the awd will fail as before on some meshes.

I’ll try to add another rule for awd2 exports, that should simplify this process. Unfortunatly a fullproof fix is not in the game. I’ve talked with Richard about this and we’ll take that in account for awd 2.1 specs.

   

Trips, Newbie
Posted: 25 January 2013 01:04 PM   Total Posts: 6   [ # 9 ]

Thank you very much Fabrice!!

Now I have it clear. We’ll work with the second option, it’s more appropriate for us.

The awd 2.1 will be welcome for us. You’re doing a great job!!! Thanks again.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X