Search Unity

TriLib - Model Loading Package

Discussion in 'Assets and Asset Store' started by rickomax, Jun 21, 2017.

  1. BakuDigital

    BakuDigital

    Joined:
    May 9, 2013
    Posts:
    18
    Hello Ricardo,

    Since the update to v1.8.9, all the animations of my models stopped working. In the Animation panel, the properties are "(Missing!)". I'm using Unity 2018.3.14f1.

    Do you have an idea of what may have caused this to break? Thanks!
     
    Last edited: Jun 13, 2019
  2. ThibaultFran

    ThibaultFran

    Joined:
    Oct 10, 2018
    Posts:
    2
    Hello,
    Since the latest version, I cannot use Trilib on Android. Everything is working fine on the editor.
    Every time I try to load a gltf model in android it just crashes with the error below.

    I checked the apk packages, and it does contain the correct libs, and the plugin configuration is correct.

    Is someone able to use the latest trilib version on android?

    Thanks!

    E Unity : Unable to find libassimp
    E CRASH : signal 6 (SIGABRT), code -6 (?), fault addr --------
    E CRASH : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    E CRASH : Build fingerprint: 'oculus/vr_pacific/pacific:7.1.2/N2G48H/256880.5390.0:user/release-keys'
    E CRASH : Revision: '0'
    E CRASH : backtrace:
    I UtilPoller: GPU Util 0.146568 / CPU Util 0.732673 (avg 0.508107)
    I Telemetry: App memory usage: PSS=475MB
    I VrApi : FPS=11,Prd=43ms,Tear=0,Early=5,Stale=53,VSnc=1,Lat=1,Fov=0,CPU2/GPU=4/3,1593/401MHz,OC=F,TA=E/0/0,SP=F/N/N,Mem=1017MHz,Free=1209MB,PSM=0,PLS=0,Temp=26.5C/25.0C,TW=2.54ms,App=4.49ms,GD=0.00ms
    E CRASH : #00 pc 0004ac1c /system/lib/libc.so (tgkill+12)
    E CRASH : #01 pc 00047dff /system/lib/libc.so (pthread_kill+34)
    E CRASH : #02 pc 0001db91 /system/lib/libc.so (raise+10)
    E CRASH : #03 pc 00019475 /system/lib/libc.so (__libc_android_abort+34)
    E CRASH : #32 il 0000004f at (wrapper managed-to-native) TriLib.AssimpInterop._aiImportFileEx (string,uint,intptr,intptr,TriLib.AssimpInterop/ProgressCallback) <0x0004f>
    E CRASH : #33 il 0000003f at TriLib.AssimpInterop.ai_ImportFileEx (string,uint,intptr,intptr,TriLib.AssimpInterop/ProgressCallback) [0x00000] in <0ecbf3571d6f489abf90fa16e3031966>:0
    E CRASH : #34 il 0000005f at TriLib.AssetLoaderBase.ImportFile (string,TriLib.AssetLoaderOptions,TriLib.AssimpInterop/ProgressCallback) [0x0001e] in <0ecbf3571d6f489abf90fa16e3031966>:0
    E CRASH : #35 il 0000004b at TriLib.AssetLoaderBase.InternalLoadFromFile (string,string,TriLib.AssetLoaderOptions,bool,TriLib.AssimpInterop/ProgressCallback) [0x00006] in <0ecbf3571d6f489abf90fa16e303
    E CRASH : #36 il 0000006b at TriLib.AssetLoader.LoadFromFile (string,TriLib.AssetLoaderOptions,UnityEngine.GameObject,string,TriLib.AssimpInterop/ProgressCallback) [0x0001b] in <0ecbf3571d6f489abf90fa
    E CRASH : #37 il 000001ff at TopicScript.Draw3DObjectContent (UnityEngine.GameObject) [0x000e8] in <0ecbf3571d6f489abf90fa16e3031966>:0[/code]
     
  3. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Could you send your models for testing to: contato@ricardoreis.net?

    Best regards,
    Ricardo Reis.
     
  4. BakuDigital

    BakuDigital

    Joined:
    May 9, 2013
    Posts:
    18
    I just sent you two models, thanks for your support.
     
  5. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    Hi , I am getting an "unable to find LibAssimp" followed by a crash on Android. I tried it on my google pixel as well as the new Oculus Quest with no luck. I see someone else had a similar error previously but there diddnt seem to be a good answer. I using unity on Mac and minimum build target is set to Android 7 in unity. Any help would be appreciated.
     
  6. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    it does seem to work on IOS without an issue, the problem is android. Also I am loading the assets from Application.persistentdatapath.
     
  7. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    more information: so, tried building this on my PC, Unity 2019.1.4f1 . Fails on pixel and oculus quest when attempting to load a gltf file. the gltf file is first downloaded from a remote server (with acompaning bin file), via WebClient. the download sceeds and trilib then loads the file correctly if I play in editor. But when I deploy to my device, the loading step crases with . LibAssimp not found exception. So in summery, I have tested this on both Unity 2019.1.4f1 mac and PC, on both oculus quest as well as google pixel. My guess is this is a common issue so but I cant seem to find a solution online.
     
  8. Pixygon

    Pixygon

    Joined:
    May 9, 2013
    Posts:
    26
    I am also getting a missing libassimp.so on Android, but seems to only be on ARM64. It seems it gets stripped away, so adding it to a link.xml should work. But what should I put into the link.xml as the Assembly name?
     
  9. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Last edited: Jun 16, 2019
  10. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    38
    Oi Ricardo, tudo certo?
    Te mandei um email há 3 dias e não tive retorno, então basicamente vou copiar e colar aqui!

    Apliquei aqui, mas continua dando o mesmo erro.
    Vou copia de novo aqui
    assetLoader.LoadFromMemoryWithTextures - filename: etc.fbx - exception: System.Exception: Error parsing file. ---> System.NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. at TriLib.AssimpInterop._aiImportFileFromMemoryWithProperties (System.IntPtr ptrBuffer, System.UInt32 uintLength, System.UInt32 uintFlags, System.Int32 fileId, System.String strHint, System.IntPtr ptrProps, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssimpInterop.ai_ImportFileFromMemoryWithProperties (System.Byte[] fileBytes, System.UInt32 uintFlags, System.String strHint, System.IntPtr ptrProps, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, System.Int32 fileId, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.ImportFileFromMemory (System.Byte[] fileBytes, System.String fileHint, TriLib.AssetLoaderOptions options, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, System.Int32 fileId, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemory (System.Byte[] fileBytes, System.String filename, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback, TriLib.FileLoadData customFileLoadData) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip (System.Byte[] data, System.String assetExtension, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderAsync+<>c__DisplayClass2_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at TriLib.ThreadUtils+<>c__DisplayClass1_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0 --- End of inner exception stack trace --- at TriLib.AssetLoaderBase.InternalLoadFromMemory (System.Byte[] fileBytes, System.String filename, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback, TriLib.FileLoadData customFileLoadData) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip (System.Byte[] data, System.String assetExtension, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+DataCallback dataCallback, TriLib.AssimpInterop+ExistsCallback existsCallback, TriLib.LoadTextureDataCallback loadTextureDataCallback, TriLib.AssimpInterop+ProgressCallback progressCallback) [0x00000] in <00000000000000000000000000000000>:0 at TriLib.AssetLoaderAsync+<>c__DisplayClass2_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at TriLib.ThreadUtils+<>c__DisplayClass1_0.b__0 () [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) [0x00000] in <00000000000000000000000000000000>:0 at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) [0x00000] in <00000000000000000000000000000000>:0



    vou tentar reimportar tua biblioteca aqui e tentar novamente

    Edit:
    tá, eu descobri o problema, mas eu preciso de uma ajuda pra solução...

    Esse é o código que eu tenho no momento:
    assetLoader.LoadFromFileWithTextures(filename, assetLoaderOptions, null, delegate (GameObject loadedGameObject)
    {
    _rootGameObject = loadedGameObject;
    }, null, (progress) => { progressCallback.Invoke(progress); });



    Por algum motivo quando uso o Action<float> progressCallback o IL2CPP não aceita por ser um delegate.
    Esse delegate veio dessa função aqui:

    void CalcProgress (float progress)
    {
    TriLib.Dispatcher.InvokeAsync(() => ChangeProgress(progress)); // Uso dispatcher pois eu altero a UI da Unity, e isso não pode ser feito no main thread
    }

    void ChangeProgress (float progress)
    {
    if (cProgress != null)
    cProgress(progress, 1f); // Delegate que chama a mudança da barra (slider.value = progress)
    }


    Quando removi deu certo:
    assetLoader.LoadFromFileWithTextures(filename, assetLoaderOptions, null, delegate (GameObject loadedGameObject)
    {
    _rootGameObject = loadedGameObject;
    });


    Tem ideia de como poderia fazer essa barra de progresso? Ou tu teria que alterar ai? Tento usar o Dispatcher no progresso?
     
  11. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    @rickomax any thoughts on the libassim missing error on android?
     
  12. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    O progressCallback não aceita um delegate mesmo, precisa ser um método estático.
    Não entendo o motivo de não alterar a UI no Thread principal, até onde eu sei, esse é o único Thread onde isso pode ser feito, ao menos nas versões da Unity que costumo utilizar, não sei se mudaram algo na versão 2019.
    O único tipo de paralelismo que eu utilizo com o TriLib é a AssetLoaderAsync que já cuida desses detalhes.
    Detalhe, se você estiver compilando para WebGL, não vai conseguir utilizar Threads.
     
  13. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Not yet, I'll redo the Android tests today.
     
  14. Pixygon

    Pixygon

    Joined:
    May 9, 2013
    Posts:
    26
    Updated to newest version of TriLib, got it to work on Android and ARM64, except... some models looks like this..! This was an FBX. Happens in windows editor, and on Android (32 and 64 bit), but not on mac or iOS. Worked perfectly in the last version!
     

    Attached Files:

  15. andgest

    andgest

    Joined:
    Apr 26, 2018
    Posts:
    26
    Hi @rickomax !
    Work now with Unity Cloud :)
    Thank you for the job.
    I have just a regression on some models that appears like ghost (at least on windows and android), any idea ?
    Ghost_object_trilib.jpg
     
    Last edited: Jun 18, 2019
  16. hsyeo

    hsyeo

    Joined:
    Jul 22, 2017
    Posts:
    2
    my fbx has only humanoid animation, no mesh and other stuffs.
    I can successfully imported the fbx and it creates a new animation in root object.
    How to save that animation as Humanoid animation?
     
  17. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    hi @rickomax thanks for looking into it. Seems like perhaps this is a new bug with the latest build and unity? see the above post from @ThibaultFran , i am having the exact same issue . (libassimp not found). Let me know if you need further info.
     
  18. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    This is a regression issue and we are still trying to track it down.

    Best regards,
    Ricardo Reis.
     
  19. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    What's the file format you're loading?

    Best regards,
    Ricardo Reis.
     
  20. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    I couldn't reproduce the issue with my Android devices yet, I'm yet to test on more devices.

    Best regards,
    Ricardo Reis.
     
  21. lores3000

    lores3000

    Joined:
    Feb 23, 2016
    Posts:
    4
    I have some clues regarding the assimp.so loading issue on Android:
    I saw that the file permissions are different than those of other so files (no execution permissions).
    Using 'chmod 755 libassimp.so' and 'chmod 755 libstb_image.so' i could fix the permissions and the library is now loaded on the device.

    The library now crashes in my case however - i now get a SIGSEGV Error.
    I am trying to load a .glb file, the app runs fine on iOS and the MacOS Editor.

    I tried to run the project with Unity 2018.4.1f1 and 2019.1.6f1, with Mono and IL2CPP scripting backends on three different devices (Galaxy S8, Nokia 8, Asus Zenfone AR).

    Also i saw that the arm64 libraries are not configured properly in Unity, the android checkbox is not ticked. Using the 64-bit library i get a SIGSEGV error as well.

    Hope this helps to track down the issue, here's the stacktrace for Galaxy S8 / 32bit arm:
    ----

    Code (csharp):
    1. 2019/06/21 18:07:18.430 29040 29574 Error CRASH: pid: 29040, tid: 29574, name: UnityMain  >>> my.test.app <<<
    2. 2019/06/21 18:07:18.609 29040 29574 Error CRASH: #01  pc 0041bc6d  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so (unwind_phase2(unw_context_t*, _Unwind_Control_Block*, bool)+156)
    3. 2019/06/21 18:07:18.609 29040 29574 Error CRASH: #02  pc 0041bd1d  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so (_Unwind_Resume+24)
    4. 2019/06/21 18:07:18.609 29040 29574 Error CRASH: #03  pc 004034ad  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so
    5. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #05  il 00000167  at TriLib.AssimpInterop.ai_ImportFileFromMemoryWithProperties (byte[],uint,string,intptr,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,int,TriLib.AssimpInterop/ProgressCallback) [0x00008] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/AssetLoader/AssimpInterop.cs:132
    6. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #06  il 000001c3  at TriLib.AssetLoaderBase.ImportFileFromMemory (byte[],string,TriLib.AssetLoaderOptions,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,int,TriLib.AssimpInterop/ProgressCallback) [0x00022] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:1966
    7. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #07  il 0000049b  at TriLib.AssetLoaderBase.InternalLoadFromMemory (byte[],string,string,TriLib.AssetLoaderOptions,bool,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.LoadTextureDataCallback,TriLib.AssimpInterop/ProgressCallback,TriLib.FileLoadData) [0x0003a] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:686
    8. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #08  il 00000137  at TriLib.AssetLoaderBase.InternalLoadFromMemoryAndZip (byte[],string,string,TriLib.AssetLoaderOptions,bool,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.LoadTextureDataCallback,TriLib.AssimpInterop/ProgressCallback) [0x00003] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:907
    9. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #09  il 000000f3  at TriLib.AssetLoaderAsync/<>c__DisplayClass3_0.<LoadFromMemoryWithTextures>b__0 () [0x00001] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderAsync.cs:200
    10. 2019/06/21 18:07:18.610 29040 29574 Error CRASH: #10  il 000000a7  at TriLib.ThreadUtils/<>c__DisplayClass0_0.<RunThread>b__0 () [0x00002] in /Users/rsenn/Documents/git/tokyo_unity_mobileplayer/tokyo_unity_mobileplayer/Assets/TriLib/TriLib/Scripts/Extensions/ThreadUtils.cs:50
    11. 0001/01/01 00:00:00.000 -1 -1 Info : --------- beginning of crash
    12. 2019/06/21 18:07:18.611 29040 29574 Fatal libc: Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0xe28abf00 in tid 29574 (UnityMain), pid 29040 (.bitforge.tokyo)
    13. 2019/06/21 18:07:18.712 29577 29577 Fatal DEBUG: pid: 29040, tid: 29574, name: UnityMain  >>> my.test.app <<<
    14. 2019/06/21 18:07:18.817 29577 29577 Fatal DEBUG: #01 pc 0017ac14  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack_full+1260)
    15. 2019/06/21 18:07:18.817 29577 29577 Fatal DEBUG: #02 pc 0017a6b4  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack_with_state+296)
    16. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #03 pc 0017a71c  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (mono_walk_stack+68)
    17. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #04 pc 00c96b80  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libunity.so (NativeRuntimeException::signal_handler(int, siginfo*, void*)+520)
    18. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #05 pc 0023e74c  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (mono_chain_signal+136)
    19. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #06 pc 0023e800  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (__krait_sigabrt_signal_handler+132)
    20. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #07 pc 0044421d  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libmonobdwgc-2.0.so (signal_handler+16)
    21. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #10 pc 0041bc6d  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so (unwind_phase2(unw_context_t*, _Unwind_Control_Block*, bool)+156)
    22. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #11 pc 0041bd1d  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so (_Unwind_Resume+24)
    23. 2019/06/21 18:07:18.818 29577 29577 Fatal DEBUG: #12 pc 004034ad  /data/app/my.test.app--yJAiS9lAmeibWbDcBs_Kw==/lib/arm/libassimp.so
     
  22. andgest

    andgest

    Joined:
    Apr 26, 2018
    Posts:
    26
    Hi,
    It's an .obj file. I have the same problem on other .obj file.
    This .obj file work well with the previous version of TriLib.
    You can found a problematic file here : https://www.designconnected.com/Lighting/Floor-lights/Dauphine-Floor-Lamp_p9047 > OBJ
    Work well with other .obj file like this file : https://www.designconnected.com/fr/Seating/Lounge-chairs/Downtown-Fireside-Chair_p1095

    When I check the materials, it seems that the rendering mode is set on "Transparent" but should be on "Opaque" (see screenshot)

    Material-transparent.png

    Thank you in advance :)
     
    Last edited: Jun 26, 2019
  23. houssen1598

    houssen1598

    Joined:
    Apr 10, 2018
    Posts:
    1
    Any tips how to pass generic uri and save it when the application is close usingwebservice api
     
  24. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    109
    Hello,

    Maybe somebody already tried to add some unit test with the Unity test runner and can help me with my problem:
    I created a simple user test and added my class and method that loads stuff.
    For my own scripts I Right-clicked my Scripts Folder, and choosed "Create" then Assembly definition.
    I added that file to my Editor Test.asmdef (as an Assembly Definition) and the build Errors because of my missing scripts where gone.
    I still got an error, that a "using TriLib" line does not know TriLib.

    So I Right clicked TriLib Folder in my Project, created a Assembly Definition like before and added it to my Test.asmdef again. Did not help. I tried switching "Use GUIDs" on and off, did not help.
    So I copied all TriLib cs files I found into my own scripts Folder in a TriLib subdirectory. Remimported my own script Folder afterwards and made a new Assembly Definition for it.

    Now the unknown TriLib error is gone, but I got 15 new ones instead like:

    Assets\Scripts\TriLib\Editor\TriLibAssetEditor.cs(545,73): error CS0246: The type or namespace name 'AssetAdvancedConfigType' could not be found (are you missing a using directive or an assembly reference?)

    Assets\Scripts\TriLib\Samples\AssetLoaderWindow.cs(359,58): error CS0246: The type or namespace name 'AssimpMetadataType' could not be found (are you missing a using directive or an assembly reference?)

    and so on.

    They seem to all have the same Namespace, the files are all there, but do not seem to be found anymore.
    My build target is PC standalone x64_x86.
    Any idea what's wrong? How can I get unit test with test runner working with having TriLib included?

    Thanks a lot!
     
  25. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    109
    I guess I solved this myself: creating a new Assembly Definition directly for all assets including TriLib and my own scripts seems to work fine.
     
  26. antonin_unity551

    antonin_unity551

    Joined:
    Jul 3, 2019
    Posts:
    2
    Hi @rickomax,

    You said you couldn't reproduce the issue on Android, which means you can load textured objects (I am especially interested in GLBs) on your android devices?

    Thanks
     
  27. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    I don't have a login to download the file.
    Could you send it to contato@ricardoreis.net?

    This way you can track your issue on:
    https://ricardoreis.net/?p=446

    Best regards,
    Ricardo Reis.
     
  28. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    You want to save the downloaded file to the local storage?

    Best regards,
    Ricardo Reis.
     
  29. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Could you please provide the steps to reproduce it so other users can benefit from this fix?

    Best regards,
    Ricardo Reis.
     
  30. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Yes, I can.

    Having the specific device name you used to test the models could help as I could try to test on a similar device or even the same device if I be able to get one for tests.

    Best regards,
    Ricardo Reis.
     
  31. antonin_unity551

    antonin_unity551

    Joined:
    Jul 3, 2019
    Posts:
    2
    Hi,

    We have tested on Oculus devices.

    EDIT :
    I juste imported the Trilib package in a new project on Unity 2019.1.6f. Built the scene2, and launched the apk on my Sony Xperia X.
    The trilib loaded objects don't show
     
    Last edited: Jul 3, 2019
  32. agustinmende

    agustinmende

    Joined:
    Feb 22, 2014
    Posts:
    3
    Hello!
    Im using trilib in my proyect and everething work ok in unity 2018
    Now im change to unity 2019.3.0a7 (because im using vuforia and when i compile to X64 the camera dont work with unity 2018)
    And now trilib show me this error (building for ARM64)
    DDLNotFoundException unable to load DLL libassimp

    I follow this steps 3 times.
    https://ricardoreis.net/?p=282
    but every time i reopen unity shows me the popup “Trilib plugins not found”.

    Any idea to how fix that?
     
  33. anupamd

    anupamd

    Joined:
    Feb 22, 2019
    Posts:
    11
    @rickomax , I can tell you exactly which devices I am testing on
    1. Oculus Quest (not sure what
    2. Google Pixel Gen 1 32 GB running Android 7 (nougat)

    One last thing, I only tested building from my MAC using XCode, I have not tried building from PC.
     
  34. PWendtInneo

    PWendtInneo

    Joined:
    Oct 14, 2016
    Posts:
    5
    @rickomax Hi Ricardo,

    I have encountered a bug with the new version where meshes with a high amount of vertices are not imported/created correctly anymore.


    Old Version:

    ImportedModelOldVersion.PNG

    New Version:

    ImportedModel1_8_9_b_Version.PNG

    The shown model is a .fbx model, but I tested it with .blend and .obj versions of this model as well. My presumtion is, that the bug happens, when a mesh in unity is created. I know, that unity has problems with meshes with a high amount of vertices, when there is a buffer overflow of some sort, where the "first" created vertices of a mesh will be overritten by the following ones. Happens around 65k vertices in a single mesh, if I recall correctly.
    I am fully aware that such a 3D model is a pretty S***ty one, but our customers mostly use CAD data or high detailed render models, which we need to import and display correctly, so I use this model to test some extremes.
     
  35. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!
    Do you get any error message?
     
  36. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    These issues are generally due to mismatched plugins being included into your build or even plugins don't being included at all.

    I would ask you to check if the "libassimp.so" and "libstb_image.so" located on your Gradle project folder or directly in your APK (in case you use the legacy building system) are the same as the ones located at "TriLib/Plugins/Android/arm64".
     
  37. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Are you compiling for Android?
    Android devices has no 32 bits mesh indices support, so it may cause issues with high polycounts.

    Besides that, it could be an Assimp regression issue, so I'll have to dig further for a solution.
     
    PWendtInneo and mfleurent like this.
  38. unitydevstudio

    unitydevstudio

    Joined:
    Jun 24, 2017
    Posts:
    24
    Hello @rickomax ,

    I am using your latest trilib plugin for my iOS AR project with Unity2019.
    When I load the model has texture from the server, imported texture size is too huge and app is crashed due to memory lack problem.
    When I tested in Unity Editor, imported texture size is 8192x8192, texture size is around 80M in texture import inspector.
    Memory usage of texture is around 300M.

    On iOS, when I load this model, app memory usage was around 1.7G and crashed. :(

    How can I reduce memory usage for texture?
    and is there any way to set texture size smaller like 1024x1024 or 2048x2048 for big size textures?


    Thanks.
     
    Last edited: Jul 11, 2019
  39. carvayne

    carvayne

    Joined:
    Jul 7, 2018
    Posts:
    3
    Hello, @rickomax!

    Build: WebGL
    Unity version:2018.3.12f1
    Trilib version:1.8.9b

    I get an error when loading several 3d models, or one big 3d model in FBX format
    For the case of one big 3D model, your demo (https://ricardoreis.net/trilib/demo/) handles it perfectly.

    Invoking error handler due to
    Uncaught RangeError: Maximum call stack size exceeded

    Tell me how can I solve this problem?
    Is it possible to look at the source code of the demo?
     
  40. Propellent

    Propellent

    Joined:
    Apr 22, 2016
    Posts:
    2
    Hello, I have attempted emailing you directly twice, to no response.

    I am attempting to load a downloaded zip file that contains a model and its texture(s), currently in editor mode, and upon calling LoadFromFileWithTextures on a zip file, I get the following error:

    Exception: Error loading asset. Assimp returns: [No suitable reader found for the file format of file "$$$___magic___$$$..zip".]

    My Unity version is 2019.1.9f1
    Build: Android
    TriLib version 1.8.7f
     
  41. PWendtInneo

    PWendtInneo

    Joined:
    Oct 14, 2016
    Posts:
    5
    Thank you for your fast answer. Indeed, it was the Android build target, which caused the problem. I switched it to another build target and it worked flawlessly again, so don't worry that this problem might have something to do with Assimp :).

    *sigh - Yet another platform specific problem...
     
    Last edited: Jul 15, 2019
  42. Hyuan02

    Hyuan02

    Joined:
    Dec 18, 2018
    Posts:
    1
    Hello, I'm with a techinical problem. I want to read models from a html file input. Because i can only use SendMessage() to send parameters to a GameObject (which accepts only strings or number values), my solution was to create a temporary url (using URL js class) which is linked to a blob type containing the url to the file (for example:
    "blob:http://localhost:4200/02eaa0dd-3b1b-41d2-bf9b-78a8f5d1c63a"), but in this way, the trilib can't resolve the paths correctly. I can't read textures uploading just the model files (".fbx" type) neither read zip files correctly. What should i do as a suggestion?
     
  43. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Any method to reduce the textures size would involve loading the original textures to do that, so I don't see another alternative besides changing the original textures resolution.

    Best regards,
    Ricardo Reis.
     
  44. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    The website demo is simply the Scene1 from TriLib samples.
    This may be a Unity 2018 limitation, the demo was compiled on Unity 2017.4.1f1.
    I'll compile and test the demo on your Unity version this week.

    Best regards,
    Ricardo Reis.
     
  45. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    Your TriLib version is outdated, this issue has probably been fixed on latest updates.
    Are you able to update it?

    Best regards,
    Ricardo Reis.
     
  46. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    There are two files which could help you on this situation.

    The first one is the triLibHelper.js located on the TriLib WebGL template that you can download from:
    https://ricardoreis.net/trilib/WebGLTemplate.zip (make sure you include the script in your HTML page, or use the template provided in the ZIP file)
    • When user has selected a file or multiple files in the HTML file input, on your JS code, you should call the window.triLibResetFiles method, passing the number of files user has selected on the browser as the length parameter.
    • Right after calling the above method, for every file you get from your HTML file field, you should call the window.triLibAddFile method passing the file name, and the file data as parameters (File data should be a Uint8Array containing the raw file data).
    The second important script is the JSHelper.cs script located in TriLib\Scripts\Extensions.
    • Adding this script to a GameObject in your scene allows you to set a callback on the OnBrowserFilesLoaded field which will receive the files count when all files from the JS call above have been processed.
    • On your callback method, you can call the AssetLoader/AssetLoaderAsync LoadFromBrowserFilesWithTextures method, passing the files count received in the callback as the filesCount parameter.
    This workflow should allow you to load your data from HTML file inputs.
    Please tell me if you have any question.

    Best regards,
    Ricardo Reis.
     
  47. Propellent

    Propellent

    Joined:
    Apr 22, 2016
    Posts:
    2

    My bad, I wrote the wrong version, and it turned out to be an issue with the file format. Luckily I have no need for specific file formats so your relatively expansive list does the job. I just exported the model to an accepted format and my zip files loaded without a problem.
     
  48. unitydevstudio

    unitydevstudio

    Joined:
    Jun 24, 2017
    Posts:
    24
    Hi @rickomax

    Thanks for your reply.
    But I am not sure why memory usage is increased while loading object.
    Original texture size is 80M. How can take this texture loading 1.7GB memory on iOS?
    In Unity Editor, when loading model, editor froze for a few secs then present memory usage around 300~400M.
    It seems your plugin make temp textures and use them while loading model has textures?

    Is there any solution to avoid memory crash issue?

    Regards.
     
  49. thebigheadone

    thebigheadone

    Joined:
    Jul 26, 2019
    Posts:
    1
    Hello!

    We've recently bought your library and while most of our exported models work (we use Blender to export as a FBX), there's one in particular that is giving us a tougher time. This model (which is a single mesh with a single rig) works perfectly in Blender as well as Unity's default importer, but as soon as we import in Trilib the mesh works like separate meshes, with some of the mesh being animated and the rest not.

    Here is the original Blender file, as well as the exported .FBX and some gifs demonstrating the problem will be attached (the first one shows the original file animating inside Blender, the second shows the exported .FBX reimported inside Blender and working correctly and the third the model imported with Unity's default importer).

    Original .blend as well as .fbx: https://gofile.io/?c=cWoXFE



     
  50. mifprojects

    mifprojects

    Joined:
    Mar 15, 2019
    Posts:
    1
    Hi.
    I am trying create arm64 app for android. I updated trilib to last version and update Unity to 2017.4.16 version.

    After runing app i have exception:
    Code (CSharp):
    1. "DllNotFoundException: Unable to load DLL 'libassimp': The specified module could not be found. Stacktrace: TriLib.AssimpInterop._aiCreatePropertyStore () (at <00000000000000000000000000000000>:0)
    2. TriLib.AssetLoaderBase.BuildPropertyStore (TriLib.AssetLoaderOptions options) (at <00000000000000000000000000000000>:0)
    3. TriLib.AssetLoaderBase.ImportFile (System.String filename, TriLib.AssetLoaderOptions options, TriLib.AssimpInterop+ProgressCallback progressCallback) (at <00000000000000000000000000000000>:0)
    4. TriLib.AssetLoaderBase.InternalLoadFromFile (System.String filename, System.String basePath, TriLib.AssetLoaderOptions options, System.Boolean usesWrapperGameObject, TriLib.AssimpInterop+ProgressCallback progressCallback) (at <00000000000000000000000000000000>:0)
    5. ...
    Plugin configuration is correct.
    I checked apk file, folder arm64-v8a does not contain libassimp and libstb_image.
    On iphone and editor all works.
    What am I doing wrong.

    Thanks.