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
    Hi!

    Could you send the model you're trying to load to contato@ricardoreis.net ?
     
  2. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    I have been sent u the file, please check ur email.
    Thanks
     
  3. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    I am having an issue with several of my models importing through TriLib during runtime, but the textures and/or materials are bright white and blue. When loaded into the project in any other way, the textures and materials stay on, and it is just 5 of my 25 models that are doing this. I can't see what the difference between the files would be. I have attached an image of what the model should look like and what the model is looking like during run time.
     

    Attached Files:

  4. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    Hi rickomax,
    my model is loading after doing some changes in my 3d model but after few second, it gets remove and shows this error

    TriLibCore.General.ContextualizedError`1[TriLibCore.General.ProcessingTextureContext]: A contextualized error has occurred. ---> System.OperationCanceledException: The operation was canceled.
    at System.Threading.CancellationToken.ThrowOperationCanceledException () [0x00015] in <a8ed250850854b439cedc18931a314fe>:0
    at System.Threading.CancellationToken.ThrowIfCancellationRequested () [0x00008] in <a8ed250850854b439cedc18931a314fe>:0
    at TriLibCore.AssetLoader.ProcessImageData (TriLibCore.General.ProcessingTextureContext processingTextureContext) [0x0002e] in D:\TilibTest\TribTest\Assets\TriLibCore\Scripts\AssetLoader.cs:843
    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()
     
  5. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Just uploaded an update that fixes your issues.
     
  6. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    You can create and pass an AssetLoaderOptions instance to the loading methods and set the Timeout property to a higher value, like:


    Code (CSharp):
    1. var assetLoaderOptions = AssetLoaderOptions.CreateInstance();
    2. assetLoaderOptions.Timeout = 5 * 60; //5 minutes of timeout
    3. var assetLoaderContext = AssetLoader.LoadModelFromFile("MODEL_FILENAME", OnLoad, OnTexturesLoad, OnProgress, OnError, null, assetLoaderOptions, null);
     
  7. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    Are you using the 2.0 beta version?
     
  8. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    Hello.

    I am unsure of exactly what version I am using, but the TriLibVersion file starts with 1.9.0b - Hotfix.
     
  9. silvesterpang

    silvesterpang

    Joined:
    Apr 24, 2019
    Posts:
    3
    I used trilib version 1.9.0 in unity 2018.4.19 and got two errors when importing FBX (ASCII) model, and they are both related to read string property in the model.

    1) "ExecutionEngineException: String conversion error: Illegal byte sequence encounted in the input." if the length of string is too long.


    2) all string property value are empty in assimp metadata collection


    Is it any extra setting required for reading and accessing the Model properties?
     
  10. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    This is the 1.9.0 version.
    Could you download the 2.0 beta version and test your models again?
    https://ricardoreis.net?p=217 <- download link
     
  11. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    Thats probably an Assimp limitation.

    Have you tried out the 2.0 beta version?
    It should handle any string length.

    https://ricardoreis.net?p=217 <- download link
     
  12. silvesterpang

    silvesterpang

    Joined:
    Apr 24, 2019
    Posts:
    3
    hello,

    I have tried 2.0 beta to import a fbx file. The importing is very slow by comparing with v1.9 and the model is failed to load.

    Code (CSharp):
    1. TriLibCore.General.ContextualizedError`1[TriLibCore.AssetLoaderContext]: A contextualized error has occurred. ---> System.OperationCanceledException: The operation was canceled.
    2.   at System.Threading.CancellationToken.ThrowOperationCanceledException () [0x00015] in <e1319b7195c343e79b385cd3aa43f5dc>:0
    3.   at System.Threading.CancellationToken.ThrowIfCancellationRequested () [0x00008] in <e1319b7195c343e79b385cd3aa43f5dc>:0
    4.   at TriLibCore.ReaderBase.UpdateLoadingPercentage (System.Single value) [0x00006] in <e5efdcf8ebc74b27a1c4adbe85a0aa27>:0
    5.   at TriLibCore.Fbx.FBXProcessor.Process (TriLibCore.Fbx.FBXNode rootNode, System.Boolean isBinary) [0x00019] in <35de84988f0249fb99823f41bdd79320>:0
    6.   at TriLibCore.Fbx.Reader.FbxReader.ParseASCII (System.IO.Stream stream) [0x0002e] in <35de84988f0249fb99823f41bdd79320>:0
    7.   at TriLibCore.Fbx.Reader.FbxReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`1[T] onProgress) [0x0002e] in <35de84988f0249fb99823f41bdd79320>:0
    8.   at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x000a6] in D:\project\trilib 2.0 beta\Assets\TriLibCore\Scripts\AssetLoader.cs:980
    9.   at TriLibCore.General.ContextualizedAction`1[T].Invoke () [0x00000] in <e5efdcf8ebc74b27a1c4adbe85a0aa27>:0
    10.   at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00011] in <e5efdcf8ebc74b27a1c4adbe85a0aa27>:0
    11.    --- End of inner exception stack trace ---
    12. UnityEngine.Debug:LogError(Object)
    13. TriLibCore.Samples.AssetLoaderTest:OnError(IContextualizedError) (at Assets/TriLibCore/Samples/Scripts/AssetLoaderTest.cs:383)
    14. TriLibCore.General.ContextualizedAction`1:Invoke()
    15. TriLibCore.Utils.Dispatcher:Update()
     
  13. d-bugger

    d-bugger

    Joined:
    Jan 22, 2017
    Posts:
    3
    Trilib 2.0 beta worked in my case with all devices supporting Mixed Reality Toolkit (Android, iOS) but not on the Hololens. The il2cpp compile seems to create problems with the Newtonsoft JSON used by Trilib2.

    Trilib 1.9 does not work with the Hololens 2 caused by missing arm64 libraries. The libraries contained in the package are compiled for x86 and not for arm64 even if the folder says arm64.
     
  14. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    13
    Hi rickomax,
    there is something new with this issue or 1.9. update? Thank you.
     
  15. Festina_Lente

    Festina_Lente

    Joined:
    Nov 9, 2017
    Posts:
    13
    Hi rickomax,
    I have one more question. When I import some model in editor play mode by Trilib AsyncLoad everything seems to be OK. But when I export this model by Unity FBX Exporter 2.0.3 package, it saves it, but without textures. With another hierarchies FBX Exporter works properly. Have you any idea what causes this issue? Thank you.
     
  16. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    Hello,

    I was able to get one of the ship models to work with the beta, and it looks perfect. However, the other 4 ship models makes Unity completely freeze. It freezes in the ParseModel method in AssetLoader.cs on line 469 in the foreach recursive call - line 469.

    Code (CSharp):
    1.            
    2. if (model.Children != null && model.Children.Count > 0)
    3. {
    4.      foreach (var child in model.Children)
    5.      {
    6.             ParseModel(assetLoaderContext, newGameObject.transform, child, out _);
    7.       }
    8. }
    9.  
    It also takes much longer to load in ship models in the beta than with the 1.9 version.
     
    Last edited: Apr 24, 2020
  17. isdcorp2016

    isdcorp2016

    Joined:
    Feb 12, 2020
    Posts:
    1
    Hi,
    I cannot import .fbx file with light with version 1.9.
    please give a sample code
     
  18. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    88
    Hello,

    I just update to 2.13b for a new test, and now I alway get the exception when try to open any glb with the sample Scene:

    TriLibCore.General.ContextualizedError`1[TriLibCore.AssetLoaderContext]: A contextualized error has occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
    Object name: 'Stream has been closed'.
    at System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) [0x0000d] in <437ba245d8404784b9fbab9b439ac908>:0
    at TriLibCore.Gltf.GltfReader.ExternalReferenceSolver (System.String filename) [0x0000d] in <b06e95ec3a6c4ac7a3e4315dd8083c4a>:0
    at glTFLoader2.Interface.LoadBinaryBufferUnchecked (glTFLoader2.Schema.Buffer buffer, System.Func`2[T,TResult] externalReferenceSolver) [0x0002b] in <8ec94433cdcd4f7e92a4532ebd23b7b0>:0
    at glTFLoader2.Interface.LoadBinaryBuffer (glTFLoader2.Schema.Gltf model, System.Int32 bufferIndex, System.Func`2[T,TResult] externalReferenceSolver) [0x00009] in <8ec94433cdcd4f7e92a4532ebd23b7b0>:0
    at TriLibCore.Gltf.GltfReader.ParseModel (System.IO.Stream stream) [0x00041] in <b06e95ec3a6c4ac7a3e4315dd8083c4a>:0
    at TriLibCore.Gltf.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`1[T] onProgress) [0x0000c] in <b06e95ec3a6c4ac7a3e4315dd8083c4a>:0
    at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x000a6] in C:\Unity\TriLib2.13b\Assets\TriLibCore\Scripts\AssetLoader.cs:992


    Worked with 2.12b.

    Thanks for the updates!
     
  19. puhumight3

    puhumight3

    Joined:
    Apr 30, 2018
    Posts:
    1
    When i try to import glTF models in runtime, it works perfectly on PC and imports 3d model. However, when i try to import glTF on my android 8.0 phone, the app immediately stops and crashes. What could be the reason? Any help? I will be appreciated.
     
  20. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    88
    With 2.0.14 Beta and loading a GLB from file in the sample, I always get:

    TriLibCore.General.ContextualizedError`1[TriLibCore.AssetLoaderContext]: A contextualized error has occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
    Object name: 'Stream has been closed'.
    at System.IO.FileStream.Seek (System.Int64 offset, System.IO.SeekOrigin origin) [0x0000d] in <437ba245d8404784b9fbab9b439ac908>:0
    at TriLibCore.Gltf.GltfReader.ExternalReferenceSolver (System.String filename) [0x0000d] in <608ea7e3801343cf8ec6475653523d79>:0
    at glTFLoader2.Interface.LoadBinaryBufferUnchecked (glTFLoader2.Schema.Buffer buffer, System.Func`2[T,TResult] externalReferenceSolver) [0x0002b] in <043207737ad74e34ab7a9a6315e29025>:0
    at glTFLoader2.Interface.LoadBinaryBuffer (glTFLoader2.Schema.Gltf model, System.Int32 bufferIndex, System.Func`2[T,TResult] externalReferenceSolver, System.Int32 bufferViewByteOffset) [0x00009] in <043207737ad74e34ab7a9a6315e29025>:0
    at TriLibCore.Gltf.GltfReader.ParseModel (System.IO.Stream stream) [0x00041] in <608ea7e3801343cf8ec6475653523d79>:0
    at TriLibCore.Gltf.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`1[T] onProgress) [0x0000c] in <608ea7e3801343cf8ec6475653523d79>:0
    at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x000a6] in C:\Unity\Trilib 2.0.14\Assets\TriLibCore\Scripts\AssetLoader.cs:1032

    Is there any ETA for the Draco feature which makes files smaller?

    Thanks for the updates :)
     
  21. Fangh

    Fangh

    Joined:
    Apr 19, 2013
    Posts:
    81
    [EDIT] It's working with Trilib 2 beta

    Hello. I have the exact same issue as @andgest for iOS & Cloud Build : https://forum.unity.com/threads/released-trilib-model-loader-package.478480/page-11#post-4485211

    I have Trilib 1.9b + Unity 2019.3.

    1. I created a new empty project => successful Unity Cloud build on iOS
    2. Then I added Trilib
    3. Then I changed TrilibCheckPlugins.cs (see screenshot)
    4. Push, Build
    5. Error


    Here is the log and the error

     

    Attached Files:

    Last edited: May 19, 2020
  22. chrpetry

    chrpetry

    Joined:
    Mar 7, 2018
    Posts:
    22
    Hello,

    I tried your latest Trilib 2.0.14 Beta and I am struggling with your MaterialMapper.

    Inside my application I substitute materials based on names to have consistent materials on all models I import.
    After the import process though, all materials are renamed to "StandardTrilibLoading(Clone)" so I assume that I have to map my materials 'inside' the process. I saw that you added MaterialMappers, derived my own mapper from your MaterialMapper class and added this to the array in the assetloaderoptions.
    I got to the point where I get the information (MaterialRenderersContext) about the materials and the renderers (probably those with the material) but It seems I can't assign my materials in there.

    Is this still incomplete and/or do you have a documentation about that?
    I suggest you add some comments on public methods just to explain what they do...

    Best regards
    Christian
     
  23. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    260
    Hi,
    Can trilib load external files (mtl or external textures) from an obj? (it works when using a .zip with all inside but that's all)
    The same goes for fbx files. I can't get it working with embedded textures in the fbx (exporting from Cinema4D) or external textures (it only works fine if I compress both files in a zip).

    Best,
    Julian
     
  24. digiholic

    digiholic

    Joined:
    Nov 23, 2013
    Posts:
    7
    I'm using the AssetLoader.LoadFromFile method to load a model with textures already included. I'm running into this error whenever I load them:


    Unable to load texture 'materials_0'
    UnityEngine.Debug:LogErrorFormat(String, Object[])
    TriLib.Texture2DUtils:ProcessTexture(EmbeddedTextureData, String, Boolean&, Boolean, TextureWrapMode, FilterMode, TextureCompression, Boolean, Boolean) (at Assets/TriLib/TriLib/Scripts/Extensions/Texture2DUtils.cs:69)
    TriLib.AssetLoaderBase:LoadTextureFromFile(String, String, AssetLoaderOptions, EmbeddedTextureData, TextureWrapMode, Boolean&, Boolean, Boolean) (at Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:1911)
    TriLib.AssetLoaderBase:TransformMaterialData(MaterialData, AssetLoaderOptions, String) (at Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:1694)
    TriLib.AssetLoaderBase:BuildGameObject(AssetLoaderOptions, String, GameObject) (at Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoaderBase.cs:961)
    TriLib.AssetLoader:LoadFromFile(String, AssetLoaderOptions, GameObject, String, ProgressCallback) (at Assets/TriLib/TriLib/Scripts/AssetLoader/AssetLoader.cs:41)
    RuntimeGlbLoader:LoadGlbAsset(FileInfo) (at Assets/Scripts/RuntimeGlbLoader.cs:110)
    <loadMeshes>d__20:MoveNext() (at Assets/Scripts/RuntimeGlbLoader.cs:68)
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)


    I've got the resources and everything form the TriLib package, and the game seems to run fine after this error, all of the textures import just fine, but I would like to know what I can do to avoid this error.
     
  25. shashkes

    shashkes

    Joined:
    Mar 16, 2017
    Posts:
    19
    Using the latest build from store: version 1.9.0 with unity 2019.3 trying to load a zip file from your demo scene and getting an error.
    [No suitable reader found for the file format of file "$$$___magic___$$$..zip".]
    there was also another error which required us to Replace TargetGuidByName with GetUnityMainTargetGuid (but that worked)
     
  26. BilalAsadi

    BilalAsadi

    Joined:
    Aug 22, 2019
    Posts:
    4
    Hi I have been experimenting with different types of object files and Trilib so far worked like a charm.
    I was using Trilib stable release but it could not load Glb files with vector colors. It does not load colors only loads object.
    So I moved to the current Beta to check if it works with that, it doesn't work there too.
    Also tried it TriLibe - Demo it does not show vertex colors here as well.
    I am able to see vertex color using 3D viewer and few other softwares.
    I am able to load GLB files with textures (png/jpeg).
    Please help.
    Tested with these vertex color GLB files from KhronosGroup/glTF-Sample-Models
    1. BoxVertexColors
    2. VertexColorTest

    Thank you in advance.
     
  27. CAD_Schroer_GmbH

    CAD_Schroer_GmbH

    Joined:
    Jan 23, 2017
    Posts:
    10
    Hi Ricomax,

    will importing lights (FBX) be enabled with TriLib v2? This is still listed as an issue/limitation on your website.

    Keep up the great work!

    Best regards,
    CAD Schroer
     
  28. disambiguationuk

    disambiguationuk

    Joined:
    Jan 23, 2019
    Posts:
    1
    Hey did this get fixed? I'm on 1.9.0 and I'm getting the same "assimp.dll caused an Access Violation (0xc0000005)" on a particular IFC file.
     
  29. fsnoida

    fsnoida

    Joined:
    Oct 30, 2018
    Posts:
    8
    Hi rickomax,

    I have a model of size 12.5 mb, when i load this model, it takes the size of around 500 mb in the memory. This happening in my project and then i tested it on your given link http://ricardoreis.net/trilib/demo/. I am loading models on IOS and Android , my application is crashing even on 2-4 3d models loading. Please give me some solution soon.
    If u need, i can send you the 3d file or video to show the problem.
     
  30. chrpetry

    chrpetry

    Joined:
    Mar 7, 2018
    Posts:
    22
    Hi rickomax,

    Could you please add a boolean assetloaderoption to prevent merging materials with the same name together?
    Stumbled upon this error when using equal material names with different colors.
    Quickfix (in 1.9.0b) is to prevent the LoadedMaterials dictionary in AssetLoaderBase to reuse materials with the same name.

    Best regards
    Christian
     
  31. hienvic97

    hienvic97

    Joined:
    Mar 19, 2020
    Posts:
    3
    Hello bro, I'm using TriLib to download the model from the Web url at run time.But I have the following problem: when I downloaded the corresponding new model 1 image target 1 it was ok. to the second image target, model 2 appears and there is both model 1. Image of 3rd, all 3 models appear. Help me: (( I do the same in this video

    Pls help me, thank a lot ❤❤❤
     
  32. hienvic97

    hienvic97

    Joined:
    Mar 19, 2020
    Posts:
    3
    The cat image I detected the first time and it still appears in the second image
    upload_2020-6-9_11-35-59.png
     
  33. poprev-3d

    poprev-3d

    Joined:
    Apr 12, 2019
    Posts:
    11
    I was wondering. Is there an easy way to get 3D model dependencies (to copy them somewhere else). For example if I was to give as an input file My3Dmodel.OBJ to Trilib, how can I get the list of the obj dependencies path such as My3Dmodel.MTL and My3Dmodel.PNG ?
     
  34. CorneliusJones

    CorneliusJones

    Joined:
    Mar 17, 2020
    Posts:
    1
    Hey rickomax,

    Do you have any solution to simply load an image file that isn't associated with a model? I'm using TriLib for runtime model loading (great asset btw) and it would be very convenient to be able to also load the various 2D file formats it supports for use as standalone images (ie. Texture2Ds). Unity's JPG/PNG support isn't sufficient for my needs.

    I've read through some of the code and it looks like it would be fairly easy for you to expose that functionality. I'm hesitant to do it myself because it would involve changing TriLib's code (changes would be overwritten when I update the package) and I'm sure there's some complexity/considerations I'm not aware of.

    Thanks
     
  35. GaZnoDrone

    GaZnoDrone

    Joined:
    Mar 3, 2015
    Posts:
    28
    How well is metadata managed, If I import CAD model will the metadata contain data of the model? Will some data be lost.
    Pixyz has a metadata instance on each not, how does trilib manage metadata.
     
  36. Cognetic

    Cognetic

    Joined:
    Jun 15, 2017
    Posts:
    9
    Does trilib 2 currently support WebGL or is that planned for the future?
     
  37. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    260
    @Cognetic : Yes, it works in WebGL. I'm using it right now in a WebGL project and works fine.
     
    Cognetic likes this.
  38. Cognetic

    Cognetic

    Joined:
    Jun 15, 2017
    Posts:
    9
    Thanks!
     
  39. TheSpaceMan

    TheSpaceMan

    Joined:
    Nov 6, 2011
    Posts:
    153
    Might as well post it here since I am at a loss.
    We are importing ifc geometry trough Trilib. Everything works fine except that every single curve /corner in the geometry is flipped 180 degrees. Looking at other viewers we can't see this error.

    I guess that somewhere in the geometry generation step, the generation of the curve is flipped when it comes to ifc.
    But since the amount of layers responsible it really make it hard for me to debug. corner.jpg
    I can't share the IFC due to not legally being allowed to share it.
    But the ifc object in question that causes these issues is a IfcReinforcingBar. But this might be beyond a trilib issue, and is probably a assimp issue, that in turn is a openifc issue that is a....

    But then again it could also be a a "Why didn't you set the flip broken curves in the settings."
     
  40. chilton

    chilton

    Joined:
    May 6, 2008
    Posts:
    485
    Is there a way to force it use a custom shader when it brings in models?
     
  41. TheSpaceMan

    TheSpaceMan

    Joined:
    Nov 6, 2011
    Posts:
    153
    I would apply something like that in the OnLoadComplete callback, can't remember I have seen support to do it at startup.
     
  42. guerreroje

    guerreroje

    Joined:
    Jul 1, 2020
    Posts:
    1
    For TriLib 2.x, how can I update the SharpZipLib library to 1.2.0 since TriLibCore.Gltf refers to version 0.86.0.518 and generates a TriLibCore.General.ContextualizedError error?


    TriLibCore.General.ContextualizedError`1[TriLibCore.AssetLoaderContext]: A contextualized error has occurred. ---> System.TypeLoadException: Could not resolve type with token 0100006e (from typeref, class/assembly ICSharpCode.SharpZipLib.Core.StreamUtils, ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73)
    at glTFLoader2.Interface.LoadBinaryBufferUnchecked (glTFLoader2.Schema.Buffer buffer, System.Func`2[T,TResult] externalReferenceSolver) [0x0002b] in <045df4f4773e4c45b8eacb81ffc3e4c4>:0
    at glTFLoader2.Interface.LoadBinaryBuffer (glTFLoader2.Schema.Gltf model, System.Int32 bufferIndex, System.Func`2[T,TResult] externalReferenceSolver, System.Int32 bufferViewByteOffset) [0x00009] in <045df4f4773e4c45b8eacb81ffc3e4c4>:0
    at TriLibCore.Gltf.GltfReader.ParseModel (System.IO.Stream stream) [0x00041] in <8d091feb7d90474eadebb60a71c47679>:0
    at TriLibCore.Gltf.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`2[T1,T2] onProgress) [0x0000c] in <8d091feb7d90474eadebb60a71c47679>:0
    at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x000a6] in /Users/guerreroje/gsg/workspace-unity/TriLib2.0.16/Assets/TriLibCore/Scripts/AssetLoader.cs:1119
    at TriLibCore.General.ContextualizedAction`1[T].Invoke () [0x00000] in <2ad0f8014c964dd2b13eb865582d0cc3>:0
    at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00011] in <2ad0f8014c964dd2b13eb865582d0cc3>:0
    --- End of inner exception stack trace ---
    UnityEngine.Debug:LogError(Object)
    TriLibCore.Samples.AssetLoaderTest:OnError(IContextualizedError) (at Assets/TriLibCore/Samples/AssetLoader/Scripts/AssetLoaderTest.cs:382)
    TriLibCore.General.ContextualizedAction`1:Invoke()
    TriLibCore.Utils.Dispatcher:Update()
     
  43. nola_dev

    nola_dev

    Joined:
    Oct 18, 2015
    Posts:
    2
    Trilib 2.16 seems to load object with textures much slower than previously. i'm testing with file from khronos.org GLTF Model "AntiqueCamera.glb"
    I'm running the AssetLoader and AssetLoaderTest Demo scenes.
    Has anyone else noticed the difference in load time?
     
    Last edited: Jul 6, 2020
  44. StefanJV

    StefanJV

    Joined:
    Jun 2, 2020
    Posts:
    9
    Did you find a suitable solution to the " Unable to find libassimp" error ?
     
  45. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    38
    I am integrating trilib in our project and trying to load ifc files.
    While working in general I am puzzled by the meta data.
    When loading fbx files the metaData gets loaded fine. For an ifc file it only loads keys (and everything is an AI_AISTRING)
    Is there anything special to do ?
     
  46. night_cat97

    night_cat97

    Joined:
    Dec 2, 2015
    Posts:
    4
    Hey Ricardo,

    I have a question regarding IFC import, is there anyway to show BIM Data when importing IFC model. I load the model on runtime and so far everything works great, but the information is completly missing...
     
  47. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    438
    Hi!

    I apologize for the delay, but I won't be able to answer everybody here since some users are reaching me on Twitter or e-mail or Asset Store reviews, so I can't track everything.

    Please consider sending me an e-mail with your questions and sample files to:
    contato@ricardoreis.com

    Sending me one e-mail is the best approach, so I can keep track of it and answer it later if I need more information about the issue, etc.
     
    night_cat97 likes this.
  48. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    38
    @night_cat97 Seems to be the same error.
    But lucky for you, I figured it out.

    In the file AssimpInterop.cs, I did the following:
    Code (CSharp):
    1.  
    2.         [DllImport(DllPath, CharSet = CharSet.Ansi, CallingConvention = CallingConvention.StdCall, EntryPoint = "aiNode_GetMetadataValue")]
    3.         private static extern IntPtr __aiNode_GetMetadataValue(IntPtr ptrNode, uint uintIndex);
    4.  
    5.         private static IntPtr _aiNode_GetMetadataValue(IntPtr ptrNode, uint uintIndex)
    6.         {
    7.             IntPtr tmpPtr = __aiNode_GetMetadataValue(ptrNode, uintIndex);
    8.             return IntPtr.Add(tmpPtr,IntSize);
    9.         }
    I renamed the original function and added the one below, applying an offset to the pointer.

    It seems the interop code returns an pointer to the aiMetadataEntry but we need an pointer to mData

    Code (CSharp):
    1. // -------------------------------------------------------------------------------
    2. /**
    3.   * Metadata entry
    4.   *
    5.   * The type field uniquely identifies the underlying type of the data field
    6.   */
    7. // -------------------------------------------------------------------------------
    8. struct aiMetadataEntry {
    9.     aiMetadataType mType;
    10.     void* mData;
    11. };
    12.  
    13.  
    @night_cat97 Would be happy to hear if this works for you as well
    @rickomax I send you an e-mail as well.

    I would be interested to know if this is only needed for ifc, (and if so why) or if meta values are generally broken.
     
    Last edited: Jul 20, 2020
    night_cat97 likes this.
  49. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    38
    @rickomax And you should edit your post to show the correct mail addres ;)
     
  50. Cynbell

    Cynbell

    Joined:
    Jan 1, 2018
    Posts:
    2
unityunity