Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

TriLib - Model loader package (Support via e-mail)

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

  1. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Do you have any screenshot to compare the issue you're having? Like, one screenshot from the original model and the other one from TriLib.
     
  2. Chopium

    Chopium

    Joined:
    Jun 15, 2015
    Posts:
    3
    I can't get mesh splitting to occur on iOS or android (fbx file) over asynchronous download.
    I can't verify if it's happening on Windows standalone, either, although the loading error doesn't appear on that platform.

    On mobile, Trilib appears to hit a vertex cap and start overwriting vertices. It don't see any splits.
    When a mesh is split, should it appear like that in the hierarchy?
    I get the same behavior in the sample scene that comes in Trilib.

    EDIT: never mind, found out I wasn't actually passing in the asset loading options. Works!
     
    Last edited: Feb 12, 2020
  3. niksasaw

    niksasaw

    Joined:
    Mar 3, 2017
    Posts:
    8
    @rickomax
    I'm using Trilib BETA 2.0.10 (latest) in
    Unity 2019.3.1f1
    MacOS catilina

    but during building for iOS I'm getting the following linker errors

    iled running /Applications/Unity/Hub/Editor/2019.3.1f1/Unity.app/Contents/il2cpp/build/deploy/net471/UnityLinker.exe -out="/Users/nikhilsawlani/Mapping/Temp/StagingArea/Data/Managed/tempStrip" -x="/Users/nikhilsawlani/Mapping/Temp/StagingArea/Data/Managed/../platform_native_link.xml" -x="/var/folders/bx/5gq15nns30l0pgt60vt4hz5w0000gn/T/tmp793de444.tmp" -x="/var/folders/bx/5gq15nns30l0pgt60vt4hz5w0000gn/T/tmp5a37c0a6.tmp" -x="/Users/nikhilsawlani/Mapping/Temp/StagingArea/Data/Managed/TypesInScenes.xml" -x="/Users/nikhilsawlani/Mapping/Assets/link.xml"

    Any Fix or suggestion should I downgrade my unity version?
     
  4. sharjahtourism

    sharjahtourism

    Joined:
    May 19, 2017
    Posts:
    24
    Hi I'm using latest version. Unity editor and Android works well, but regarding iOS animation isn't working.
    Unity 2018.4.12f1
     
    Last edited: Feb 19, 2020
  5. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    26
    Hey @rickomax, how are you?

    I'm using Trilib 2.0.10b and trying to load a fbx with textures, but return Textures loaded: 0, and has 1.

    upload_2020-2-19_19-35-15.png

    Its a zip file, with .fbx and 1 texture. if you want, I can send you!
    By the way, this same file open on 1.9.0b.

    Any idea?
     
  6. gulanxiu

    gulanxiu

    Joined:
    Mar 4, 2014
    Posts:
    13
    I am using 1.9.0b version,runtime load gltf model.
    Now I have a problem: using 1.9.0b, I can't find the metallic texture in the material.
    But I used version 2.0.10 and found the metal texture in the material.
    I need your help, can help me to fix this error on 1.9.0b version.
    Thank you!
     

    Attached Files:

    Last edited: Feb 20, 2020
  7. Jimbo_Slice

    Jimbo_Slice

    Joined:
    Oct 1, 2015
    Posts:
    41
    Hi there,

    AssetLoaderOptions.RotationAngles doesn't seem to have any effect for us. Is anyone else experiencing this? Have any workarounds?

    Cheers,

    Jamie
     
  8. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    88
    Hello,

    I am just using today's latest beta 2.0.10b with Unity 2019.3.1f1 and GLB files.

    Some models are loading perfect.

    One gave me this error and did not load:

    Code (CSharp):
    1. TriLibCore.General.ContextualizedError: A contextualized error has occurred. ---> Newtonsoft.Json.JsonReaderException: Invalid property identifier character: ,. Path 'nodes[43].extensions', line 431, position 4.
    2.   at Newtonsoft.Json.JsonTextReader.ParseProperty () [0x00086] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    3.   at Newtonsoft.Json.JsonTextReader.ParseObject () [0x000f3] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    4.   at Newtonsoft.Json.JsonTextReader.Read () [0x00053] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    5.   at Newtonsoft.Json.JsonReader.ReadAndAssert () [0x00000] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    6.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x000be] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    7.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00073] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    8.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00076] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    9.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x002a4] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    10.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00179] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    11.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00073] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    12.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList (System.Collections.IList list, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonArrayContract contract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, System.String id) [0x001a4] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    13. eValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00085] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    14.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00076] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    15.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x002a4] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    16.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00179] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    17.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00073] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    18.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x00108] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    19.   at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x0005f] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    20.   at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    21.   at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x00030] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    22.   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    23.   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    24.   at glTFLoader.Interface.LoadModel (System.IO.Stream stream) [0x00054] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    25.   at TriLibCore.Gltf.GltfReader.ParseModel (System.IO.Stream stream) [0x00007] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    26.   at TriLibCore.Gltf.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`1[T] onProgress) [0x0000c] in <b78b8330fdeb401da25ddb42a7e2ee44>:0
    27.   at TriLibCore.AssetLoader+<>c__DisplayClass3_0.<LoadModelFromFile>b__0 (System.Object context) [0x0008f] in C:\Unity\Trilib 2.0.10\Assets\TriLibCore\Scripts\AssetLoader.cs:95
    28.   at TriLibCore.General.ContextualizedAction.Invoke () [0x00000] in <1def7cfe4bf34c5780646319b574289f>:0
    29.   at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00002] in C:\Unity\Trilib 2.0.10\Assets\TriLibCore\Scripts\Utils\ThreadUtils.cs:57
    30.    --- End of inner exception stack trace ---
    31. UnityEngine.Debug:LogError(Object)
    32. TriLibCore.Tests.AssetLoaderTest:OnError(Object) (at Assets/TriLibCore/Samples/Scripts/AssetLoaderTest.cs:395)
    33. TriLibCore.General.ContextualizedAction:Invoke()
    34. TriLibCore.Utils.Dispatcher:Update()
    35.  
    36.  
    An other GLB gave me this error, but it loaded and Looks good so far, so just to let you know:
    Code (CSharp):
    1. KeyNotFoundException: The given key was not present in the dictionary.
    2. TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () (at Assets/TriLibCore/Scripts/Utils/ThreadUtils.cs:68)
    3. System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
    7. System.Threading.ThreadHelper.ThreadStart () (at <437ba245d8404784b9fbab9b439ac908>:0)
    8. UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)
    Thanks a lot for the updates :)
     
  9. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I haven't tested the beta version on iOS yet!
    I'm finishing some material system changes and will start working on other platforms after.
     
  10. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    What is the file format you're using?
     
  11. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    Please send it to my e-mail: contato@ricardoreis.net

    I will check it out as soon as I have the new beta material system ready.
     
  12. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    TriLib 1x isn't ready for PBR materials.
    I'm working on a build system to allow faster Assimp (used internally by TriLib) updates, so will be easier to add this features to the 1x version.

    I'll notify users via newsletter when the build system be ready:
    https://ricardoreis.net/?page_id=192
     
    mfleurent likes this.
  13. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    It should be working fine.
    Can you show the piece of code you're using to load your model?
     
  14. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I'm using the libraries provided by Google to parse the GLTF file, so it's possible your GLTF file is malformed.
    Have you tried to load it in another application?
     
  15. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    Hello Ricardo,

    I am using updated 2.0 trilib beta and it is maintaining the original model hierarchy as promised.

    I am facing an issue with some fbx models when loading model in your given sample scene.

    TriLibCore.General.ContextualizedError: A contextualized error has occurred. ---> System.ArgumentException: An item with the same key has already been added. Key: 0

    at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <599589bf4ce248909b8a14cbe4a2034e>:0

    at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <599589bf4ce248909b8a14cbe4a2034e>:0

    at TriLibCore.Fbx.FBXProcessor.ProcessObjects (TriLibCore.Fbx.FBXNode node) [0x00496] in <6f6b74ecbc8041b9ac039b7437400714>:0

    at TriLibCore.Fbx.FBXProcessor.Process (TriLibCore.Fbx.FBXNode rootNode, System.Boolean isBinary) [0x00057] in <6f6b74ecbc8041b9ac039b7437400714>:0

    at TriLibCore.Fbx.Reader.FbxReader.ParseBinary (System.IO.Stream stream) [0x00013] in <6f6b74ecbc8041b9ac039b7437400714>:0

    at TriLibCore.Fbx.Reader.FbxReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`1[T] onProgress) [0x00017] in <6f6b74ecbc8041b9ac039b7437400714>:0

    at TriLibCore.AssetLoader+<>c__DisplayClass3_0.<LoadModelFromFile>b__0 (System.Object context) [0x0008f] in D:\HdrpTest\hdrp\Assets\TriLibCore\Scripts\AssetLoader.cs:95

    at TriLibCore.General.ContextualizedAction.Invoke () [0x00000] in <1def7cfe4bf34c5780646319b574289f>:0

    at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00002] in D:\HdrpTest\hdrp\Assets\TriLibCore\Scripts\Utils\ThreadUtils.cs:57

    --- End of inner exception stack trace ---

    UnityEngine.Debug:LogError(Object)

    TriLibCore.Tests.AssetLoaderTest:OnError(Object) (at Assets/TriLibCore/Samples/Scripts/AssetLoaderTest.cs:395)

    TriLibCore.General.ContextualizedAction:Invoke()

    TriLibCore.Utils.Dispatcher:Update()


    Another issue is, Trilib modifying the size of the model. When I am reading the file vertices, normals and uvw it massively increasing the sizes


    Triblib loaded model and then reading the file

    no. of vertices = 108262

    no. of normals = 108262

    no. of uvws = 108262

    no. of faces = 108264


    Manually import model in unity and then reading the file

    no. of vertices = 20093

    no. of normals = 20093

    no. of uvws = 20093

    no. of faces = 108264


    If u want i can send you the 3d model and the code to read the model also.
     
  16. sharjahtourism

    sharjahtourism

    Joined:
    May 19, 2017
    Posts:
    24
  17. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    88
    Hello,

    I have the same GLB file loaded in TriLib 1.8.7. In the existing sample, loaded by file.
    It looked perfect.

    I loaded the same file in the sample from 2.0.10.

    Parts are missing, maybe 10%.

    I get no warning and one error in the log (2 times the same):

    Code (CSharp):
    1. KeyNotFoundException: The given key was not present in the dictionary.
    2. TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () (at Assets/TriLibCore/Scripts/Utils/ThreadUtils.cs:68)
    3. System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
    4. System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
    5. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <437ba245d8404784b9fbab9b439ac908>:0)
    6. System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <437ba245d8404784b9fbab9b439ac908>:0)
    7. System.Threading.ThreadHelper.ThreadStart () (at <437ba245d8404784b9fbab9b439ac908>:0)
    8. UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)

    You were Right the file I tried which did not load was malformed somehow. But this one is okay and loads perfect in other applications, too.

    Thanks a lot.
     
  18. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I will ask you to wait until the next beta update be ready to check if this issue persists.
    I'm working on an update system for the legacy TriLib and will come back to TriLib 2.0 as soon as I have it done.
    It shouldn't take more than one week.

    TriLib 2.0 doesn't merge vertices yet, but I will work on a solution as soon as possible.
     
  19. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I will check it out as soon as possible.
    I'm giving some extra support to TriLib 1x at the moment, so users will have more time to update to the 2.0 version when it be ready.
     
  20. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I haven't implemented sparse accessors on GLTF 2.0 in TriLib 2x yet, so that may be the cause of your newer issues.
    I will be working on it as soon as I have the new build system for TriLib 1x done.
     
  21. Jimbo_Slice

    Jimbo_Slice

    Joined:
    Oct 1, 2015
    Posts:
    41
    Sorry, it turns out this was not the issue we were experiencing.

    The real issue is that when we import characters they are always facing the wrong way, like 180 degrees wrong.

    The forward vector of the character should align with the same direction the character is looking, but with TriLib it is always 180 degrees the wrong way (despite the object having a 0,0,0 rotation value).

    You can compare by importing a character to Unity the normal way and then importing the same character through TriLib.
     
  22. visualjoy

    visualjoy

    Joined:
    Aug 23, 2016
    Posts:
    26
    I sent a email with this issue. Thanks!
     
  23. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    95
    Hi,


    we see that the Android library libassimp.so is ~107 MB in size.
    Could you check if you can reduce it to ~16 MB?

    https://github.com/assimp/assimp/issues/2276

    Same issue with the iOS version.

    Thank you regards
    André
     
  24. softaVille

    softaVille

    Joined:
    Jan 15, 2020
    Posts:
    2
    Hi!

    I bought TriLib plugin so I could load .STEP files into Unity, but every time I load a .STEP file into Unity the Editor (or the Windows 10 executable I've built) crashes. Five different .STEP files from different sources, all seem to crash to this:

    Stack Trace of Crashed Thread 11320:
    0x1F2A4057 (assimp) Assimp::CalcTangentsProcess::SetupProperties
    0x1F2A38A4 (assimp) Assimp::CalcTangentsProcess::SetupProperties
    0x1F28945D (assimp) Assimp::BaseProcess::ExecuteOnScene
    0x1F28EA56 (assimp) Assimp::Importer::ApplyPostProcessing
    0x1F28FA8D (assimp) Assimp::Importer::ReadFile
    0x1F284E6E (assimp) aiImportFileExWithProperties
    0x1A8588F0 (Assembly-CSharp) TriLib.AssimpInterop._aiImportFileEx()
    0x1A8587B8 (Assembly-CSharp) TriLib.AssimpInterop.ai_ImportFileEx()
    0x1A83A738 (Assembly-CSharp) TriLib.AssetLoaderBase.ImportFile()
    0x1A83A17C (Assembly-CSharp) TriLib.AssetLoaderBase.InternalLoadFromFile()
    0x1874EE40 (Assembly-CSharp) TriLib.AssetLoader.LoadFromFile()
    0x18749FB0 (Assembly-CSharp) TriLibLoader.Start()

    ...

    Is Assimp::CalcTangentsProcess::SetupProperties() broken for .STEP? .FBX files seem to load very well... TriLib v1.9.0b.

    I'll send you an email with all the log files. Thanks!

    - Ville
     
  25. Zapan15

    Zapan15

    Joined:
    Apr 11, 2011
    Posts:
    95
    Hi,

    can you tell us which version of assimp you are using? Maybe we can build the assimp lib ourself.

    Thank you.

    Regards
    André
     
  26. Cookiez

    Cookiez

    Joined:
    Nov 1, 2015
    Posts:
    13
    Hi, I'm using the latest TriLib version and I'm trying to load an obj file however after calling LoadFromFile() I get this error:
    "[MODEL LOADING] Model can not be loaded because of: Error loading asset. Assimp returns: [Unable to open file \"C:\\Data\\Users\\medap\\3D Objects\\seahorse.obj\".]"
    Same goes for fbx files.

    This is the code that I'm using, any suggestions how to fix it? I'm running it on HoloLens 2, so a usual UWP device.
    upload_2020-3-11_16-6-21.png
     
  27. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    88
    Hello,

    I went back using TriLib 1.87. When trying to download, sometimes it crashes. The whole Unity Closes then...

    This is a part from the Player log:

    Code (CSharp):
    1. 0x00007FFF117FC641 (assimp) Assimp::SMDImporter::SetupProperties
    2. 0x00007FFF117FDF22 (assimp) Assimp::SMDImporter::SetupProperties
    3. 0x00007FFF1151E87C (assimp) Assimp::BaseImporter::ReadFile
    4. 0x00007FFF11529D07 (assimp) Assimp::Importer::ReadFile
    5. 0x00007FFF1152A12A (assimp) Assimp::Importer::ReadFileFromMemory
    6. 0x00007FFF11519BEC (assimp) aiImportFileFromMemoryWithProperties
    7. 0x00007FFF11519A99 (assimp) aiImportFileFromMemory
    8. 0x000001FECF87B6F0 (Mono JIT Code) (wrapper managed-to-native) TriLib.AssimpInterop:_aiImportFileFromMemory (intptr,uint,uint,int,string,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.AssimpInterop/ProgressCallback)
    9. 0x000001FECF87B1CB (Mono JIT Code) TriLib.AssimpInterop:ai_ImportFileFromMemory (byte[],uint,string,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,int,TriLib.AssimpInterop/ProgressCallback)
    10. 0x000001FECF87B04B (Mono JIT Code) TriLib.AssetLoaderBase:ImportFileFromMemory (byte[],string,TriLib.AssetLoaderOptions,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,int,TriLib.AssimpInterop/ProgressCallback)
    11. 0x000001FECF87A74B (Mono JIT Code) TriLib.AssetLoaderBase:InternalLoadFromMemory (byte[],string,string,TriLib.AssetLoaderOptions,bool,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.LoadTextureDataCallback,TriLib.AssimpInterop/ProgressCallback,TriLib.FileLoadData)
    12. 0x000001FECF87A45B (Mono JIT Code) TriLib.AssetLoaderBase:InternalLoadFromMemoryAndZip (byte[],string,string,TriLib.AssetLoaderOptions,bool,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.LoadTextureDataCallback,TriLib.AssimpInterop/ProgressCallback)
    13. 0x000001FECF87993B (Mono JIT Code) TriLib.AssetLoader:LoadFromMemoryWithTextures (byte[],string,TriLib.AssetLoaderOptions,UnityEngine.GameObject,string,TriLib.AssimpInterop/DataCallback,TriLib.AssimpInterop/ExistsCallback,TriLib.AssimpInterop/ProgressCallback)
    14. 0x000001FECF8739A3 (Mono JIT Code) TriLib.AssetDownloader/<DoDownloadAsset>d__22:MoveNext ()
    15. 0x000001FECC63C4DC (Mono JIT Code) UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr)
    16. 0x000001FECC63C607 (Mono JIT Code) (wrapper runtime-invoke) <Module>:runtime_invoke_void_object_intptr (object,intptr,intptr,intptr)
    How do I avoid this crash of the app?

    And some info: I also has Problems with positions using 2.10 beta. Some meshes positions were not okay and different from Version 1.87.

    Thanks a lot!
     
    Last edited: Mar 12, 2020
  28. ZhengzhongSun

    ZhengzhongSun

    Joined:
    Oct 12, 2016
    Posts:
    20
    Nice plugin for Unity! But I found a problem when loading the ply models. When I preview it with MeshLab, it looks good. But when I load the same ply model to Unity with this plugin, I will see the seam of texture. The test model is in google drive(https://drive.google.com/open?id=1Eo8mGo9T0_jHmk3nf_0TwLSQ6AaF9Mwr).
    Is it a bug? Any suggestions will be helpful to me.
    Thanks!
    upload_2020-3-13_17-44-35.png
     
  29. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    273
    Hi,

    I'm looking to use Trilib for Oculus Quest and I also seem to have the issue with 'libassimp' not being found:

    unnamed.png

    If I inspect the .apk it looks like 'libassimp' is in both the 'armeabi-v7a & x86' folders:

    0e8dd38136eeee083be43690da780acd.png

    It seems that a few people have run into this problem with Android. Is there anyone that has managed to overcome it?

    Thanks, Jake
     
  30. raja1250

    raja1250

    Joined:
    Mar 6, 2014
    Posts:
    6
    Hi,
    I'm using Trilib 1.8.7.1, When i'm trying to import a model in hololens i'm getting following exception. The build was made with IL2CPP scritpting backend.

    The import is working fine with .NET backend but i can't use that because my project is depended on IL2CPP.


    I have a question that Trilib doesnot support IL2CPP?

    Please help me with this problem.

    Thanks,
    Raja Sekhar.

    System.Exception: Error parsing file. ---> System.NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code.
    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.AssetLoaderAsync+<>c__DisplayClass2_0.<LoadFromFileWithTextures>b__0 () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at TriLib.ThreadUtils+<>c__DisplayClass0_0.<RunThread>b__0 () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at CI.WSANative.Advertising.WSANativeInterstitialAd+CompletedCallbackDelegate.Invoke (System.String adType) [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) [0x00000] in <00000000000000000000000000000000>:0
    at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [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.AssetLoaderAsync+<>c__DisplayClass2_0.<LoadFromFileWithTextures>b__0 () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at TriLib.ThreadUtils+<>c__DisplayClass0_0.<RunThread>b__0 () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [0x00000] in <00000000000000000000000000000000>:0
    at CI.WSANative.Advertising.WSANativeInterstitialAd+CompletedCallbackDelegate.Invoke (System.String adType) [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) [0x00000] in <00000000000000000000000000000000>:0
    at System.Threading.ThreadHelper.ThreadStart () [0x00000] in <00000000000000000000000000000000>:0
    at EventManager+OnClickGhosting.Invoke () [0x00000] in <00000000000000000000000000000000>:0
     
    Last edited: Mar 20, 2020
  31. smartinetz

    smartinetz

    Joined:
    Dec 8, 2017
    Posts:
    46
    @rickomax
    I am still suffering from the old Problem from weeks ago regarding shared texture maps, even in the latest TriLib update.

    The problem, if two or more models are loaded async and share the same texture map, the loading of the texture only works for one of the models due to an IOException (Sharing violation). The Exception is raised in your class ThreadUtils inside the method RunThread(). What would help is if we could catch the texture loading exception in the OnError handler and then retry loading the texture (even though I don't think this is possible right now or not?). Does this sound possible?

    Regards
     
  32. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    Is there any update?
     
  33. backwheelbates

    backwheelbates

    Joined:
    Jan 14, 2014
    Posts:
    143
    HI all,

    I'm running into some issues with the latest beta and ios, using Unity 2020. Any ideas on these errors?

    TriLibImage.Merged has non matching file name: TriLibImage.dll
    TriLibCore.fbx.Merged has non matching file name: TriLibCore.fbx.dll
    TriLibCore.Gltf.Merged has non matching file name: TriLibCore.Gltf.dll
    Failed Running ... UnityLinker.exe

    Thanks!!
     
  34. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    211
    Hello Ricardo

    Im trying to use Trilab to import FBX with animations and then load this animations into a character with an AnimationCOntroller in scene.

    Im able to swap the animation clips in the AnimationCOntroller in scene and assigning the animation from the imported model, what I cannot get working is to make the imported animation to be of type Humanoid. Everytime the animation is imported is in legacy format.

    I have been trying with AssetLoaderOptions, setting things like the Avatar, the AnimationCOntroller, UsingLegacyAnimations to false and DontGenerateAvatar. No matter what values I try I cannot get it to play the imported animation.

    I hope you can help me with this.

    Thank you.
     
  35. StarCoop

    StarCoop

    Joined:
    Nov 26, 2016
    Posts:
    25
    Hi there,

    bump on this! Is there any solution? Step-Fileimport would be highly appreciated by us and our customers.

    Also: Which version of Assimp is currently used in the latest release? Can I see this somewhere, and can I manually compile and exchange it with the most recent version?
     
  36. ArtRice

    ArtRice

    Joined:
    Jul 5, 2015
    Posts:
    3
    @rickomax
    Windows
    can you remove x86 and just support x64 architecture on build time with manully ?
    how can i manully disable x86 librrary on TriLib ?
     
    Last edited: Mar 31, 2020
  37. Floddi

    Floddi

    Joined:
    Feb 6, 2013
    Posts:
    28
    HI, when I do Unity Cloud builds for windows - I get the problem:

    Code (CSharp):
    1. Exception: Error loading asset. Assimp returns: [FBX-Parser unexpected end of file]
    2.   at TriLib.ThreadUtils+<>c__DisplayClass0_1.<RunThread>b__1 () [0x00000] in <10e850c7dc7344a0bb741947a0f13bd4>:0
    3.   at TriLib.Dispatcher.Update () [0x0001c] in <10e850c7dc7344a0bb741947a0f13bd4>:0
    It is working with local and cloud android builds
     
  38. mdotstrange

    mdotstrange

    Joined:
    Sep 23, 2013
    Posts:
    247
    Looking at purchasing this asset to load .fbx characters in my project. I've used the WebGl sample loader and I'm getting mixed results loading models in T-Pose directly from Mixamo- Most end up like this...



    It seems fbx's from Adobe Fuse rigged with Mixamo work perfectly though.

    I read through the online docs and couldn't find any specific intructions on supported fbx's- 2012 fbx spec fully supported- it says there is Mixamo support but most of the Mixamo models I'm using look like the above image

    Does anyone have any fbx export specs to follow to get models to load correctly? Thank you.
     
  39. Floddi

    Floddi

    Joined:
    Feb 6, 2013
    Posts:
    28
    @rickomax
    When Importing animations - animations see missing in the latest Trilib Asset Store version.
    Beta version doesn't work for me either - as it misses some codepages

    Unity Version is 2019.3.5f1

    trilib.png
     

    Attached Files:

  40. jordidamia

    jordidamia

    Joined:
    Oct 5, 2019
    Posts:
    1
    Dear Sir,

    I contact from here cause I tried to contact by the mail provided and it doesn't seems it works. For a project I'm doing related to AR, I'm trying to geolocate runtime downloaded objects into a coordinates given. I'm using trilib to download the models and works great, and for the geolocation I use AR+GPS which is also very recommendable for this kind of stuff. My trouble is when trying to take this runtime downloaded models from trilib and putting it into the geolocation defined by AR+GPS. To geolocate an object, the object must be the child of a gameobject were the coordinates have been written. In the AssetLoaderWindow I added the following line:"_rootGameObject.transform.parent = GameObject.transform;" below " _rootGameObject = assetLoader.LoadFromMemoryWithTextures(fileBytes, FileUtils.GetFileExtension(filename), assetLoaderOptions, _rootGameObject);". In the sample 1 of Trilib I add the parent gameobject and effectively the 3D model is downloaded as a child, but inside the AR+GPS seems unable to put the model in the coordinates defined. In the app (Android) the camera is always inside the object, and the object is static. I move and the object remains as if the center of graviti is always at the camera position. Any recommendation to solve that? Is there a predefined object location position for the downloaded 3D models that avoids them to locate the center of it in the coordinates defined instead of in my camera device?

    Thanks for your attention.
     
  41. srivelloSaganWorks

    srivelloSaganWorks

    Joined:
    Sep 3, 2019
    Posts:
    5
    Hello,

    Great work on this fantastic asset.

    With plans to integrate this into a larger production project, I started with a standalone project as a test.

    Works great in Unity 2019.3.x with target platforms of Windows. I will test on Mac/iOS/Android in the future. I also target WebGL, but understand that is not supported ATM per https://ricardoreis.net/?p=127. No problems there.

    I created a new project with Standard Shader. I have tried many models of many formats. Most work well and textures appear. Here is a working example. It is a success.

    upload_2020-4-5_13-36-44.png

    My production project is in URP. I upgraded the standalone prototype project above to URP latest version and none of the 10 test models work well. The geometry is there, but the textures not.

    Here is the same model above with URP. This is not a success.

    upload_2020-4-5_13-38-51.png

    Is URP supported now?

    What URP known issues exist? Workarounds for my issue?

    Is it on your roadmap to fix URP issues? When?

    Thanks for the great work!

    -Sam
     
    marcolbx and Student_tima like this.
  42. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    211
    Ricardo
    Hello, any help you could provide please. Thank you.
     
  43. mdotstrange

    mdotstrange

    Joined:
    Sep 23, 2013
    Posts:
    247
    Have you had a look at the scene in the TriLib extras folder? There's an avatar loader scene that loads characters in at runtime and uses a Humanoid rig/controller.
     
  44. unity_f8A-rlZy-xquRQ

    unity_f8A-rlZy-xquRQ

    Joined:
    Apr 9, 2020
    Posts:
    2
    Hi to all, i build example scene on android device, and app crashes after downloadin gltf model with:

    com.DefaultCompany.WEBREQ D/Unity: Unable to lookup library path for 'libassimp', native render plugin support disabled.
    DefaultCompany.WEBREQ E/Unity: Unable to find libassimp

    But on a PC everything works great.
     
  45. unity_f8A-rlZy-xquRQ

    unity_f8A-rlZy-xquRQ

    Joined:
    Apr 9, 2020
    Posts:
    2
    and another formats like .fbx, .dae, .3ds, works on android normally. what's wrong with GLTF ?
     
  46. silvesterpang

    silvesterpang

    Joined:
    Apr 24, 2019
    Posts:
    3
    hi all, for importing fbx, I have a custom metadata "ObjectMetaData" which is connected to model. Is it possible to import and access it?

    thx
     
    Last edited: Apr 15, 2020
  47. BilalAsadi

    BilalAsadi

    Joined:
    Aug 22, 2019
    Posts:
    4
    I am not able to use AssetLoaderAsync, LoadFromMemory
    Getting below error:
    Cannot convert anonymous method to type 'AssetLoaderOptions' because it is not a delegate type
    Below is the code, please help

    Code (CSharp):
    1.   GameObject myGameObject;
    2.         try
    3.         {
    4.             using (var assetLoader = new AssetLoaderAsync())
    5.             {
    6.                 //In case you don't have a valid filename, set this to the file extension
    7.                 //to help TriLib assigning a file loader to this file
    8.                 //example value: ".FBX"
    9.                 var filename = "c:/models/mymodel.fbx";
    10.                 var fileData = File.ReadAllBytes(filename);
    11.                 assetLoader.LoadFromMemory(fileData , filename, delegate (GameObject loadedGameObject) {
    12.                     Debug.Log("My object '" + loadedGameObject.name + "' has been loaded!");
    13.                 });
    14.             }
    15.         }
    16.         catch (Exception e)
    17.         {
    18.             Debug.LogFormat("Unable to load mymodel.fbx. The loader returned: {0}", e);
    19.         }
     
  48. Floddi

    Floddi

    Joined:
    Feb 6, 2013
    Posts:
    28
    I think you did some parameters wrong... here is the fixed code snipped

    Code (CSharp):
    1.  GameObject targetWrapper=null;
    2.         try
    3.         {
    4.             using (var assetLoader = new AssetLoaderAsync())
    5.             {
    6.                 //In case you don't have a valid filename, set this to the file extension
    7.                 //to help TriLib assigning a file loader to this file
    8.                 //example value: ".FBX"
    9.                 var filename = "c:/models/mymodel.fbx";
    10.                 var fileData = File.ReadAllBytes(filename);
    11.                 assetLoader.LoadFromMemory(fileData, filename,null, targetWrapper, (loadedObject) =>  {
    12.                     Debug.Log("My object '" + loadedObject.name + "' has been loaded!");
    13.                 });
    14.             }
    15.         }
    16.         catch (Exception e)
    17.         {
    18.             Debug.LogFormat("Unable to load mymodel.fbx. The loader returned: {0}", e);
    19.         }
     
    BilalAsadi likes this.
  49. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hey guys, sorry for not looking here so often!

    Was working on the latest TriLib 2 Beta Update, which is available for existing users at:
    https://ricardoreis.net/?p=217

    Gonna answer the messages as soon as possible.
     
    Firlefanz73 likes this.
  50. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    Hi rickomax,
    i just downloaded the updated beta, and run assetloader example scene and load from file ,but still there is same issues with some models.

    TriLibCore.General.ContextualizedError`1[TriLibCore.General.ProcessingTextureContext]: A contextualized error has occurred. ---> System.ArgumentException: An item with the same key has already been added. Key: TriLibCore.Fbx.FBXTexture
    at System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) [0x000c1] in <a8ed250850854b439cedc18931a314fe>:0
    at System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) [0x00000] in <a8ed250850854b439cedc18931a314fe>:0
    at TriLibCore.General.ConcurrentDictionary`2[TKey,TValue].Add (TKey key, TValue val) [0x00011] in <863ee4e129754007b317e06b033ca6e5>:0
    at TriLibCore.AssetLoader.ProcessImageData (TriLibCore.General.ProcessingTextureContext processingTextureContext) [0x0000e] in D:\TilibTest\TribTest\Assets\TriLibCore\Scripts\AssetLoader.cs:839
    at TriLibCore.General.ContextualizedAction`1[T].Invoke () [0x00000] in <863ee4e129754007b317e06b033ca6e5>:0
    at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00011] in <863ee4e129754007b317e06b033ca6e5>:0
    --- End of inner exception stack trace ---
    UnityEngine.Debug:LogError(Object)
    TriLibCore.Samples.AssetLoaderTest:OnError(IContextualizedError) (at Assets/TriLibCore/Samples/Scripts/AssetLoaderTest.cs:383)
    TriLibCore.General.ContextualizedAction`1:Invoke()
    TriLibCore.Utils.Dispatcher:Update()

    i didn't check for vertex,triangle and uvs count.
     
unityunity