Problems converting .dae to awd

Software: Other

Fred, Newbie
Posted: 30 April 2017 05:18 PM   Total Posts: 3

Hi,

I’m trying to convert a .dae file, exported from Blender, to .awd using Away Builder. The file uses skeleton animation and I’ve managed to imported it correctly into the Away Builder and played the animation, but when I save the file as .awd and try to re open it, I get an error#1034 and the scene is not loaded.

If I import the file and save it, without attaching the animation into the model, I can open it fine, but as soon I try to attach the animation a get the error#1034 again.

I’m attaching the .dae file I’m using for the test, can you help me on this matter?

Thank you in advance.

 

File Attachments
test.zip  (File Size: 66KB - Downloads: 101)
   

Avatar
Fabrice Closier, Administrator
Posted: 30 April 2017 05:51 PM   Total Posts: 1260   [ # 1 ]

Loaded it with Prefab, and reexported it.
I can reload it and it plays same way.

However, in order to load in your project, you have to modify the parser.
Its not related to the animation, its the bug of the parser that has inverted flags for compression.

Here’s the quick fix to load back in your project.

switch (_compression) {
    case DEFLATE:
    _body = new ByteArray();
    _byteData.readBytes(_body, 0, _byteData.bytesAvailable);

    try {
    _body.inflate();
    } catch(e:Error){
    //Deflate failed. The AWD2 encoder used another compression than the one specified in this awd file.
    _body.uncompress();
    }
    break;

    case LZMA:
    _body = new ByteArray();
    _byteData.readBytes(_body, 0, _byteData.bytesAvailable);
    _body.uncompress(LZMA_STRING);
    break;

    case ZLIB:
    _body = new ByteArray();
    _byteData.readBytes(_body, 0, _byteData.bytesAvailable);
    _body.uncompress();
    break;

    case UNCOMPRESSED:
    _body = _byteData;
    break;
  }

oh and forgot to say that the error comes from a null name in a skeletonPose object. On itself no problem, hence why it plays in the app, but in fact thats another bug in awd2Parser, that doesn’t give a tmp name to it if none is found. So when exporter write the pose, it exits with the error, because It can’t write the bytes length of the null name before actually write it.

Also notice that the zip is bigger, because Prefab assigns a default 512x512 map to missing materials data.

 

File Attachments
mesh001.zip  (File Size: 176KB - Downloads: 84)
   

Fred, Newbie
Posted: 02 May 2017 07:27 PM   Total Posts: 3   [ # 2 ]

Hi Fabrice, I hope you are well!

Thank you for the quick reply.  I’ll risk making a fool of myself here.

About the code snippet you provided, does it need to go in the end of the “encode” method of the AWDEncoder class, under the awaybuilder-core, on the AwayBuilder repository?

I have no idea how to build the project from source after forking and editing it, as you advised. Do I need to use the Flash Builder for that?

I couldn’t import the file you provided in Prefab3D, it gets stuck in a parsing loop. And if I try to open in AwayBuilder it crashes with error#2058, but I haven’t made the changes you proposed yet.

I’m sorry for the newbie questions, but I’m really lost here.

Thank you again!

 

   

Avatar
Fabrice Closier, Administrator
Posted: 02 May 2017 08:18 PM   Total Posts: 1260   [ # 3 ]

if you edit the encoder of AwayBuilder, you need go to the part that encodes the skeletonPose, I dunno the code, but knowing the format, in the block, it will try to write the skeletonPose name. So if you add before it tries the write string (the name) a check lile, if(!sp.name || sp.name == “”) sp.name = “whatever”;
then next line the sp.name.length necessary to write the string will not fail.

so if you use latest away3d, and want modify the exporter, you are done.
as they exporter sets wrong compression flag and the parser has same error, it will load.

If you want your away to load new, old and awd’s coming from many more apps, like blender, prefab etc… just mod the awd2Parser part that checks the flags and simply replace. Then away3d will load all the awd 2’s.

That the public old version of prefab falls on this file is possible. I dunno, I’m using my own version. Thats AwayBuilder fails at loading it, is exactly the flag issue. Prefab sets it according to awd specs, so it does decompress vs deflate and vide versa.

 

   

Fred, Newbie
Posted: 03 May 2017 11:14 PM   Total Posts: 3   [ # 4 ]

Got it! Thanks man!

 

   

hidingglass, Newbie
Posted: 29 June 2017 06:43 PM   Total Posts: 3   [ # 5 ]

I’m having the same problem. I’m trying to convert .DAE files to .AWD for a client (unfortunately I’m new to Away Builder as of today).

I’m not too familiar with these code edits and how to implement these quick-fixes but is it possible to create an .AWD file that I can send to them with animations that does not open with errors?

I would prefer not to have to send them patches that they need to make to get it to work in their pipeline.

Thanks for any help!
Matt

 

   

Avatar
Fabrice Closier, Administrator
Posted: 29 June 2017 07:46 PM   Total Posts: 1260   [ # 6 ]

Depends…
First the dae must be correct, (many exporters produce most shitty dae’s)
and if AB loads it and reproduces the animation. You are fine.
If the error occurs the moment you assign the animator, then there is something that is incorrect somewhere. In this case, you could send me fabrice3d at gmail dot com the “faulty” dea, so I could test it in my own Prefab and may be pin point the prob.

If you get an error loading it back into AB or Prefab after export, try to give a name per state in the app. if it still give the error, you will have to recompile AB so it encodes the name as explained above.
The client doesn’t have to change anything for that.
You could also try export the awd from Prefab.

then the compression flag
if you export for away3D latest version, the bug for compression flag being in both AB and away3d. your client will have no problem, as they are both wrong they understand each other smile If you use Prefab, you need provide the awd2parser for the flag fix, as Prefab sets the right format flag but Away will decompress instead of deflate.

 

   

hidingglass, Newbie
Posted: 29 June 2017 08:28 PM   Total Posts: 3   [ # 7 ]

Hey Fabrice,

Unfortunately I’m not very familiar with the system and might need some more step-by-step instruction if you don’t mind.

The .DAE plays back fine in Away Builder when I import it, but after saving an .AWD file and trying to open it back in AB I get hundreds of #1034 Errors.

Fabrice Closier - 29 June 2017 07:46 PM

If you get an error loading it back into AB or Prefab after export, try to give a name per state in the app. if it still give the error, you will have to recompile AB so it encodes the name as explained above.
The client doesn’t have to change anything for that.

Where do I give it a name per state? In AB or in Maya where I exported the .DAE? I named the skeleton, animation set, and animation clip in AB but still have the problem.

I’m a 3D artist and unfortunately not well equipped to write ActionScript or compile an AIR file. Is there a patched .air file somewhere with the fix applied?

I am using OPENCollada to export out of Maya. Would a different animation file work better? I have not been able to find a stable DM5 plugin for Maya.

Best,
Matt

 

   

Avatar
Fabrice Closier, Administrator
Posted: 30 June 2017 10:30 AM   Total Posts: 1260   [ # 8 ]

I’ve received your mail and send you back the awd.

Using my own Prefab, no issues loading or exporting.
So good news is its not your dae file.

If AwayBuilder isn’t able to reload its own exports, obviously there is bug either in encoder or decoder. I bet it’s one of the two explained above if not the two.
However the less good news for you is: I’m not involved in AwayBuilder’s dev at all. So while I’m happy to help you id the probs, give you hints/snipets for the fixes, inspect your files etc..
I’m not the one that is going to fix this soft, I have enuff dev on my plate with own softwares…

 

   

hidingglass, Newbie
Posted: 30 June 2017 01:57 PM   Total Posts: 3   [ # 9 ]

No problem at all Fabrice. Sorry, I didn’t realize you weren’t on the AB team. I really appreciate the insight though!

The info is definitely something I can pass along and since it seems like version issues it’s possible they worked out the encoding/decoding bug in their own pipeline.

Thanks again for all the help.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X