ToxicBakery / Rajawali-Serializer

Tool to quickly serialize models on your sdcard.
5 stars 5 forks source link

Parsing forever... #5

Open AvanOsch opened 10 years ago

AvanOsch commented 10 years ago

I don't know how long the parsing process is supposed to take, but the Serializer keeps displaying "Parsing File"... I'm guessing it failed somewhere, and just never closes the dialog. I built the Serializer from source, and also tried the "master-realease.apk" from the bin folder. (v1.0.4)

Although loading does take a long time, the (obj) files I'm trying to serialize work fine with my Rajawali Live Wallpaper. I presume the parsing should not take much longer than when loading a model "normally".

I'll investigate some more, and maybe try some other file formats... It would be nice if the Serializer would at least display an error message of some kind.

If you're interested in checking the files, you can download them from: http://avanosch.nl/projects/android/wallpaper/ao.obj http://avanosch.nl/projects/android/wallpaper/v.obj

AvanOsch commented 10 years ago

I Also tried stl files (converted with Blender) with the same results. LogCat shows these WARNings for com.ToxicBakery.apps.rajawaliserializer:

dalvikvm - threadid=13: thread exiting with uncaught exception (group=0x412136d8)
KeyCharacterMap - Load KCM of non-default device may incur unexpected result
AvanOsch commented 10 years ago

I can confirm (just a beginner though) that thread 13 is the parsing of the file. It runs for some time (about a minute), and when it finishes/fails LogCat shows the uncaught exception error...

ToxicBakery commented 10 years ago

Not sure what is broken but I would suggest that you use AwayBuilder instead as it is far more robust as long as you are not aiming to use animations. If not, then AWD files work pretty well and load significantly faster in Rajawali than any of the other modeling types including serialization.

AvanOsch commented 10 years ago

Thanks for your reply. I'd never heard of AwayBuilder. Excellent stuff. I'm on Linux (so Adobe support sucks (or does not exist)), and the "Live Tool" is just great. No installing, no fuss.

One thing to note when saving to AWD: Make sure to save an Uncompressed model for Rajawali: Edit --> Document Settings --> Compression

Thanks again, I'm pretty happy with the result. The loading time is much better indeed! [EDIT] This information should really be included on the Rajawali help pages. Could have saved me a couple of hours...

ToxicBakery commented 10 years ago

You can find a link to this page on the main page of the Wiki.

https://github.com/MasDennis/Rajawali/wiki/Tutorial:-AWD-File-Parsing

It covers a lot of the background info and I am pretty sure I mention compression as well in there. In any case just keep in mind that AWD support is partial. Its hard to say specifically what does and does not work as each block parser is somewhere between full and partial and AWD does not provide any testing material that I know of. Additionally as mentioned; animations are not supported at all, yet.

AvanOsch commented 10 years ago

Thanks for explaining.

I "missed" the link you mentioned, because I had no idea what an AWD file was. I was just looking for a way to optimize my Wallpaper's loading speed...

As you get "pushed in the direction" of Serializing your models, I didn't look back, and wasted hours figuring out how to serialize... (without ever running into any mention of using AwayBuilder)

AvanOsch commented 10 years ago

Ian, I only just noticed that you forked the Rajawali library... Could I have been using the wrong library for the Serializer? (I'm not sure which I had installed) Which library should I be using? The "original", or your fork?

ToxicBakery commented 10 years ago

The original, all of the Rajawali devs have their own forks for dev purposes but anything listed in the wiki 'should' be supported in the master branch.

ToxicBakery commented 10 years ago

Thinking of which, if you check out the examples app it actually has an AWD instancing example.

https://github.com/MasDennis/RajawaliExamples/blob/master/src/com/monyetmabuk/rajawali/tutorials/examples/parsers/AwdFragment.java

The model is composed of a single dual arrow mesh that is instanced several times in the AWD file.