Search Unity

TriLib - Model Loading Package

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

  1. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    40
    Its .net instead of .com
     
  2. Cynbell

    Cynbell

    Joined:
    Jan 1, 2018
    Posts:
    2
    Thank you Mese!
     
  3. night_cat97

    night_cat97

    Joined:
    Dec 2, 2015
    Posts:
    4
    @Mese96 thank you a lot, the offset fixed it for me completly :)
     
    Mese96 likes this.
  4. HexinUnity1

    HexinUnity1

    Joined:
    Aug 27, 2019
    Posts:
    5
    Hello, I have some questions. In the example Scene8 - Custom IO asset loading scenario, you can use "private const string objdata =" mtllib " cube.mtl \n\nv -1.000000 -1.000000 1.000000\nv 1.000000 -1.000000 1.000000\nv -1.000000 1.000000 1.000000\nv 1.000000 1.000000 1.000000\nv -1.000000 1.000000 -1.000000\nv 1.000000 1.000..... "Successfully loaded a cube. I want to know how to convert my model into such a string. Does trilib provide such API?
     
  5. night_cat97

    night_cat97

    Joined:
    Dec 2, 2015
    Posts:
    4
    @Mese96 upon further testing i dicovered that Meata data is not really complete when comparing to other IFC viewers like BIM Vision. Is your data being displayed completly?
     
  6. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    40
    I did not test enough to confitenly say yes or no. Also my IFC knowledge in general is very little. Just enough to realize that no meta at all can't be right :D
    But one thing that I discovered, the IFC Metadata is only strings.
    Is this the same with your modells ?
    (The aiMetaType)
    Maybe the mentioned offset is not always needed ?


    One more thing, I got an crash from assimp if I tried to load an ifc model with an Ü in its name, after replacing with an U it worked. (Probably Ä and Ö wont work as well)
    If you get the same problem, and/or an solution also keen to hear about it.
     
  7. antp17290

    antp17290

    Joined:
    Aug 22, 2018
    Posts:
    1
    Hi @rickomax,
    I'm using Trilib v1.9 and want to load model with embedded materials and textures. Is it possible with v1.9, and how can i archive this.
     
    Last edited: Jul 25, 2020
  8. night_cat97

    night_cat97

    Joined:
    Dec 2, 2015
    Posts:
    4
    @Mese96 yeah, my importer won't even load any file with ä,ü,ö in it, so "Umlaute" are a big no no.

    I do have other data types besides strings in the ifc model, but they are being reasd correctly as well, it's just that some stugg ist being read... I am not sure if it is due to the structure of the file. But I as well don't know much about ifc.
     
  9. Mese96

    Mese96

    Joined:
    Jul 23, 2013
    Posts:
    40
    @night_cat97 Then again, I can load the file in assimp directly if I format the string in UTF8, can be probably also be fixed if the string is differenty marshalled, but without c++ access thats out of reach.
    As I am in holidy this and next week, it will take some time until I do more test.
    Did you get any answer from @rickomax ?
     
  10. craig026

    craig026

    Joined:
    Jul 1, 2017
    Posts:
    1
    Hi,

    I am having the same issue, @rickomax was there a solution to this?

    Thanks.
     
  11. HexinUnity1

    HexinUnity1

    Joined:
    Aug 27, 2019
    Posts:
    5
     
  12. HexinUnity1

    HexinUnity1

    Joined:
    Aug 27, 2019
    Posts:
    5



    Hello, have you successfully implemented it in hololens? Are you using version 2.0?
     
  13. EnduvoJD

    EnduvoJD

    Joined:
    Aug 12, 2016
    Posts:
    50
    Did you ever get an answer/solution for this?
     
  14. flecheria

    flecheria

    Joined:
    Apr 25, 2019
    Posts:
    17
    Hi All
    have this problem. WHen I try to compile for iOS Unity says that
    Trilib doesn't support Bitcode and will be disable

    Anyone has a solution to solve this problem?
    I'm in unity 2019.1 and xcode 11.6 for an application that run on iPadPro
    Thanks. This thing is driving me crazy

    Paolo
     
  15. flecheria

    flecheria

    Joined:
    Apr 25, 2019
    Posts:
    17
    it seems there are two problems:
    - during export to AndroidStudio I miss assimp lib. Which library I need tp add to AndroidStudio project?
    - there is also a marshalling problem with IL2CPP

    Only two word: Help me
    Thanks
    P

    Code (csharp):
    1.  
    2. 08-05 22:48:39.276: E/Unity(1714): Unable to find libassimp
    3. 08-05 22:48:39.368: W/Unity(1714): Plugins: Couldn't open assimp, error: dlopen failed: library "assimp" not found
    4. 08-05 22:48:39.368: W/Unity(1714): TriLib.AssimpInterop:_aiCreatePropertyStore()
    5. 08-05 22:48:39.368: W/Unity(1714): TriLib.AssetLoaderBase:BuildPropertyStore(AssetLoaderOptions)
    6. 08-05 22:48:39.368: W/Unity(1714): TriLib.AssetLoaderBase:ImportFileFromMemory(Byte[], String, AssetLoaderOptions, DataCallback, ExistsCallback, Int32, ProgressCallback)
    7. 08-05 22:48:39.368: W/Unity(1714): TriLib.AssetLoaderBase:InternalLoadFromMemory(Byte[], String, String, AssetLoaderOptions, Boolean, DataCallback, ExistsCallback, LoadTextureDataCallback, ProgressCallback, FileLoadData)
    8. 08-05 22:48:39.368: W/Unity(1714): TriLib.<>c__DisplayClass3_0:<LoadFromMemoryWithTextures>b__0()
    9. 08-05 22:48:39.368: W/Unity(1714): System.Action:Invoke()
    10. 08-05 22:48:39.368: W/Unity(1714): TriLib.<>c__DisplayClass0_0:<RunThread>b__0()
    11. 08-05 22:48:39.368: W/Unity(1714): System.Threading.ThreadStart:Invoke()
    12. 08-05 22:48:39.368: W/Unity(1714): System.Threading.ContextCallback:Invoke(Object)
    13. 08-05 22:48:39.368: W/Unity(1714): System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    14. 08-05 22:48:39.368: W/Unity(1714): System.Threading.ThreadStart:Invoke()
    15. 08-05 22:48:39.368: W/Unity(1714): [./Runtime/Misc/Plugins.cpp line 282]
    16. 08-05 22:48:39.368: W/Unity(1714): (Filename: ./Runtime/Misc/Plugins.cpp Line: 282)
    17. 08-05 22:48:39.419: W/Unity(1714): Plugins: Couldn't open assimp, error: dlopen failed: library "assimp" not found
    18. 08-05 22:48:39.419: W/Unity(1714): TriLib.AssimpInterop:_aiSetImportPropertyInteger(IntPtr, IntPtr, Int32)
    19. 08-05 22:48:39.419: W/Unity(1714): TriLib.AssimpInterop:ai_SetImportPropertyInteger(IntPtr, String, Int32)
    20. 08-05 22:48:39.419: W/Unity(1714): TriLib.AssetLoaderBase:BuildPropertyStore(AssetLoaderOptions)
    21. 08-05 22:48:39.419: W/Unity(1714): TriLib.AssetLoaderBase:ImportFileFromMemory(Byte[], String, AssetLoaderOptions, DataCallback, ExistsCallback, Int32, ProgressCallback)
    22. 08-05 22:48:39.419: W/Unity(1714): TriLib.AssetLoaderBase:InternalLoadFromMemory(Byte[], String, String, AssetLoaderOptions, Boolean, DataCallback, ExistsCallback, LoadTextureDataCallback, ProgressCallback, FileLoadData)
    23. 08-05 22:48:39.419: W/Unity(1714): TriLib.<>c__DisplayClass3_0:<LoadFromMemoryWithTextures>b__0()
    24. 08-05 22:48:39.419: W/Unity(1714): System.Action:Invoke()
    25. 08-05 22:48:39.419: W/Unity(1714): TriLib.<>c__DisplayClass0_0:<RunThread>b__0()
    26. 08-05 22:48:39.419: W/Unity(1714): System.Threading.ThreadStart:Invoke()
    27. 08-05 22:48:39.419: W/Unity(1714): System.Threading.ContextCallback:Invoke(Object)
    28. 08-05 22:48:39.419: W/Unity(1714): System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    29. 08-05 22:48:39.419: W/Unity(1714): System.Threading.ThreadStart:Invoke()
    30. 08-05 22:48:39.419: W/Unity(1714): [./Runtime/Misc/Plugins.cpp line 282]
    31. 08-05 22:48:39.419: W/Unity(1714): (Filename: ./Runtime/M
    32. 08-05 22:48:39.461: W/Unity(1714): Plugins: Couldn't open assimp, error: dlopen failed: library "assimp" not found
    33. 08-05 22:48:39.461: W/Unity(1714): TriLib.AssimpInterop:_aiImportFileFromMemoryWithProperties(IntPtr, UInt32, UInt32, Int32, String, IntPtr, DataCallback, ExistsCallback, ProgressCallback)
    34. 08-05 22:48:39.461: W/Unity(1714): TriLib.AssimpInterop:ai_ImportFileFromMemoryWithProperties(Byte[], UInt32, String, IntPtr, DataCallback, ExistsCallback, Int32, ProgressCallback)
    35. 08-05 22:48:39.461: W/Unity(1714): TriLib.AssetLoaderBase:ImportFileFromMemory(Byte[], String, AssetLoaderOptions, DataCallback, ExistsCallback, Int32, ProgressCallback)
    36. 08-05 22:48:39.461: W/Unity(1714): TriLib.AssetLoaderBase:InternalLoadFromMemory(Byte[], String, String, AssetLoaderOptions, Boolean, DataCallback, ExistsCallback, LoadTextureDataCallback, ProgressCallback, FileLoadData)
    37. 08-05 22:48:39.461: W/Unity(1714): TriLib.<>c__DisplayClass3_0:<LoadFromMemoryWithTextures>b__0()
    38. 08-05 22:48:39.461: W/Unity(1714): System.Action:Invoke()
    39. 08-05 22:48:39.461: W/Unity(1714): TriLib.<>c__DisplayClass0_0:<RunThread>b__0()
    40. 08-05 22:48:39.461: W/Unity(1714): System.Threading.ThreadStart:Invoke()
    41. 08-05 22:48:39.461: W/Unity(1714): System.Threading.ContextCallback:Invoke(Object)
    42. 08-05 22:48:39.461: W/Unity(1714): System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
    43. 08-05 22:48:39.461: W/Unity(1714): System
    44. 08-05 22:48:39.515: E/Unity(1714): NotSupportedException: IL2CPP does not support marshaling delegates that point to instance methods to native code. The method we're attempting to marshal is: com.meng.coreapp.TrilibHelper::Print
    45. 08-05 22:48:39.515: E/Unity(1714):   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
    46. 08-05 22:48:39.515: E/Unity(1714):   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
    47. 08-05 22:48:39.515: E/Unity(1714):   at TriLib.AssetLoade
     
  16. HexinUnity1

    HexinUnity1

    Joined:
    Aug 27, 2019
    Posts:
    5
    Hello, did you test that trilib can load the model normally on hololens2? I'm using trilib1.9 now. It can't load the model. Can only the latest version of the plug-in be loaded?
     
  17. PauSchiSea

    PauSchiSea

    Joined:
    Aug 3, 2020
    Posts:
    8
    Hi i have Trilib 2.0 Beta 17 and try to get it working with Unity 2019.4 WebGL, sadly something seems not to work. i can start the download but its never finished.

    Working ThreeJs Mesh:
    http://webgl.sideeffects.ch/paul//ThreeJS/
    not working Unity WebGL Build:
    http://webgl.sideeffects.ch/paul/UnityWebGLModelLoad/

    both are trying to download the same model.(Press Space to start the download)
    http://webgl.sideeffects.ch/paul/FbxTest.FBX

    Thanks if someone can help me, and get it running.

    used code in the WebGL Sample:

    Code (CSharp):
    1. using System.Collections.Generic;
    2. using TriLibCore;
    3. using TriLibCore.Extensions;
    4. using TriLibCore.General;
    5. using TriLibCore.Utils;
    6. using UnityEngine;
    7. using TMPro;
    8.  
    9. public class AssetLoadTest : MonoBehaviour
    10. {
    11.     public string modeluri = "http://webgl.sideeffects.ch/paul/Test.fbx";
    12.     public string modelExtension = "fbx";
    13.  
    14.     public float timerDownloadTime = 0;
    15.     public TMP_Text timerText;
    16.  
    17.     /// <summary>
    18.     /// AssetLoaderOptions used when loading the model.
    19.     /// Will use default AssetLoaderOptions if null.
    20.     /// </summary>
    21.     [SerializeField]
    22.     private AssetLoaderOptions _assetLoaderOptions;
    23.  
    24.     /// <summary>
    25.     /// Selected filename.
    26.     /// </summary>
    27.     private string _filename;
    28.  
    29.     /// <summary>
    30.     /// Load models async?
    31.     /// </summary>
    32.     [SerializeField]
    33.     private bool _async = true;
    34.  
    35.     /// <summary>
    36.     /// Loaded model SkinnedMeshRenderers.
    37.     /// </summary>
    38.     private SkinnedMeshRenderer[] _skinnedMeshRenderers;
    39.  
    40.     /// <summary>
    41.     /// List of loaded animations.
    42.     /// </summary>
    43.     private List<AnimationClip> _animations;
    44.  
    45.     /// <summary>
    46.     /// Created Animation component from the loaded model.
    47.     /// </summary>
    48.     private Animation _animation;
    49.  
    50.     /// <summary>
    51.     /// Loading progress.
    52.     /// </summary>
    53.     private float _progress;
    54.  
    55.     /// <summary>
    56.     /// Represents a loading asset context.
    57.     /// </summary>
    58.     private GameObject _rootGameObject;
    59.  
    60.     /// <summary>
    61.     /// Is there any asset loading?
    62.     /// </summary>
    63.     private bool _loading;
    64.  
    65.     /// <summary>
    66.     /// Active window id.
    67.     /// </summary>
    68.     private int _activeWindowId;
    69.  
    70.     /// <summary>
    71.     /// Uri dialog model Uri.
    72.     /// </summary>
    73.     private string _modelUri;
    74.  
    75.     /// <summary>
    76.     /// Uri dialog model extension.
    77.     /// </summary>
    78.     private string _modelExtension;
    79.  
    80.     /// <summary>
    81.     /// Downloads the model with GET method?
    82.     /// </summary>
    83.     private bool _downloadWithGet = true;
    84.  
    85.     // Start is called before the first frame update
    86.     void Start()
    87.     {
    88.         _modelUri = modeluri;
    89.         _modelExtension = modelExtension;
    90.     }
    91.  
    92.     // Update is called once per frame
    93.     void Update()
    94.     {
    95.         if (Input.GetKeyDown(KeyCode.Space))
    96.         {
    97.          
    98.             DownloadModel();
    99.         }
    100.         if (_loading == true)
    101.         {
    102.             timerDownloadTime += Time.deltaTime;
    103.             //timerText.text = timerDownloadTime.ToString() + " | " + (_progress*100) + " % | " + "is loading: " + _loading.ToString();
    104.             timerText.text = "Loading";
    105.         }
    106.     }
    107.  
    108.     void DownloadModel()
    109.     {
    110.         //Resets previously loaded model info.
    111.         _skinnedMeshRenderers = null;
    112.         _animations = null;
    113.         //Blocks a new loading until the current model is loaded or an error occurs.
    114.         _loading = true;
    115.         //Destroys the previously loaded model, if there is one.
    116.         if (_rootGameObject != null)
    117.         {
    118.             Destroy(_rootGameObject);
    119.         }
    120.         Debug.Log($"Start model download: {_modelUri}");
    121.  
    122.         //Begins downloading the new model.
    123.         //AssetDownloader.LoadModelFromUri(AssetDownloader.CreateWebRequest(_modelUri, _downloadWithGet ? AssetDownloader.HttpRequestMethod.Get : AssetDownloader.HttpRequestMethod.Post), OnLoad, OnTexturesLoad, OnProgress, OnError, gameObject, _assetLoaderOptions, null, _modelExtension);
    124.         AssetDownloader.LoadModelFromUri(AssetDownloader.CreateWebRequest(_modelUri, _downloadWithGet ? AssetDownloader.HttpRequestMethod.Get : AssetDownloader.HttpRequestMethod.Post), OnLoad, OnTexturesLoad, null, OnError, gameObject, _assetLoaderOptions, null, _modelExtension);
    125.     }
    126.  
    127.     /// <summary>
    128.     /// Handles the current model loading progress.
    129.     /// </summary>
    130.     ///  <param name="assetLoaderContext"></param>
    131.     /// <param name="value">Loading progress, ranging from 0 to 1.</param>
    132.     private void OnProgress(AssetLoaderContext assetLoaderContext, float value)
    133.     {
    134.         _progress = value;
    135.     }
    136.  
    137.     /// <summary>
    138.     /// Handles any model loading error.
    139.     /// </summary>
    140.     /// <param name="contextualizedError">The contextualized error.</param>
    141.     private void OnError(IContextualizedError contextualizedError)
    142.     {
    143.         //Displays the error message on the console
    144.         Debug.LogError(contextualizedError);
    145.         //Resets the loading info.
    146.         _loading = false;
    147.         _rootGameObject = null;
    148.     }
    149.  
    150.     /// <summary>
    151.     /// Handles the model loading event.
    152.     /// This event is called when the model has been loaded, but textures loading may still pending.
    153.     /// </summary>
    154.     /// <param name="assetLoaderContext">Context used to load the model.</param>
    155.     private void OnLoad(AssetLoaderContext assetLoaderContext)
    156.     {
    157.         //If the root game object has been loaded.
    158.         if (assetLoaderContext.RootGameObject != null)
    159.         {
    160.             //Stores all loaded SkinnedMeshRenderers.
    161.             _skinnedMeshRenderers = assetLoaderContext.RootGameObject.GetComponentsInChildren<SkinnedMeshRenderer>();
    162.             //Stores all loaded animations, if present.
    163.             if (assetLoaderContext.Options.AnimationType == AnimationType.Legacy)
    164.             {
    165.                 _animation = assetLoaderContext.RootGameObject.GetComponent<Animation>();
    166.                 if (_animation != null)
    167.                 {
    168.                     _animations = AnimationUtils.GetAllAnimationClips(_animation);
    169.                 }
    170.             }
    171.             //Stores the root game object reference.
    172.             _rootGameObject = assetLoaderContext.RootGameObject;
    173.             //Fits the camera to the root game object.
    174.             Camera.main.FitToBounds(_rootGameObject, 2f);
    175.         }
    176.         //Displays the number of models loaded.
    177.         Debug.LogFormat("Model loaded: {0}", assetLoaderContext.Models.Count);
    178.     }
    179.  
    180.     /// <summary>
    181.     /// Handles the textures loading event.
    182.     /// This event is called after OnLoad, generally when all model textures have been loaded.
    183.     /// </summary>
    184.     /// <param name="assetLoaderContext">Context used to load the model.</param>
    185.     private void OnTexturesLoad(AssetLoaderContext assetLoaderContext)
    186.     {
    187.         //Displays the number of textures loaded.
    188.         Debug.LogFormat("Textures loaded: {0}", assetLoaderContext.LoadedTextures.Count);
    189.         //Resets the loading info.
    190.         _loading = false;
    191.     }
    192. }
     
    Last edited: Aug 13, 2020
  18. Student_tima

    Student_tima

    Joined:
    Jul 7, 2020
    Posts:
    1
    The Same problem with textures
     
  19. maherahmedraza

    maherahmedraza

    Joined:
    Jun 28, 2017
    Posts:
    15
    Hi I am working with Trilib 1.9.0b - Hotfix and Unity 2019.4.8f1. I am facing a problem loading GLTF or GLB files with Trilib in Android app at runtime. I have been facing this problem for months but didn't able to solve it. When I tried to load the same model in Editor at runtime it work and there is no error But when I build the application in my mobile and try to load the same model then the app crashes. I am attaching logs obtained from Android studio.
     

    Attached Files:

  20. marcolbx

    marcolbx

    Joined:
    Mar 4, 2019
    Posts:
    11
    Hi, I'm having the same issue. Did you find a workaround?
     
  21. fra3point

    fra3point

    Joined:
    Aug 20, 2012
    Posts:
    269
    Hello,

    at our company we are using Trilib for a large project, and we're very happy of it!

    I've already sent you a support email, but it was rejected by the server.

    Recently, we came across a critic issue which is related to FBX import. When we use 3DSMax FBX files, the generated hierarchy has a lot of garbage transforms like the following:

    upload_2020-9-9_14-9-50.png

    The correct hierarchy should be like this one:

    upload_2020-9-9_14-9-59.png

    Please, note that both hierarchies have been created by Trilib from 2 different FBX files. The first file came from 3DSMax, the second from Pixyz studio.
    Importing those files with Unity importer, the hierarchies are both fine, but when we use Trilib, the issue happens.

    I made a little research, and I found that this is related to Assimp's AI_CONFIG_IMPORT_FBX_PRESERVE_PIVOTS property, but I couldn't fix it by myself.
    Attached, you can find the "broken" model.

    Since our software is strictly based on meshes names, it's very important for us to get a clean hierarchy, as shown in the second screenshot. Could you please tell us how to solve this problem?


    Thank you,
    Francesco


    EDIT: Trilib 2.0 fixed this issue
     
    Last edited: Oct 19, 2020
  22. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    109
    Hello,

    a general question maybe somebody had the same problem and can help me?

    I am loading multiple files async.

    I need to give them some more data for each one if loading finished.
    Do I need to remember or can I put it into the "onAssetLoaded" somehow?

    Code (CSharp):
    1.         private IEnumerator DownloadExchange(AssetDownloader aDown, string uriString, GameObject downloadGo, GameObject aggregatChild, string newName)
    2.         {
    3.             //this works! but I want to have more arguments...
    4.             //aDown.DownloadAsset(uriString, "GLB", onAssetLoaded: onExchangeLoaded());
    5.             aDown.DownloadAsset(uriString, "GLB", onAssetLoaded: onExchangeLoaded(downloadGo, aggregatChild, newName));
    6.             yield return null;
    7.         }
    8.  
    9.         //this works! but I want to have more arguments...
    10.        //private void onExchangeLoaded(GameObject loadedGameObject)
    11.  
    12.         private void onExchangeLoaded(GameObject loadedGameObject, GameObject aggregatChild, string newName)
    13.         {
    14.         }
    15.  
    Error CS1503 Argument 3: cannot convert from 'void' to 'TriLib.ObjectLoadedHandle'

    if I addd my additional arguments / parameters. Any good idea how to solve this?

    Thanks a lot!
     
  23. LR-Developer

    LR-Developer

    Joined:
    May 5, 2017
    Posts:
    109
    Solved it by adding a component with a link to the original gameobject before loading.
     
  24. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,267
    Hi is loading of lights, from fbx, supported? I am having trouble there.
    Also does it not support fully fbx? There are notes on a v2 on your website but it is not on asset store
     
    Last edited: Sep 30, 2020
  25. agpatel0007

    agpatel0007

    Joined:
    Aug 21, 2014
    Posts:
    14
    same thing happens to me too,
    any settings for android ?
     
  26. andyz

    andyz

    Joined:
    Jan 5, 2010
    Posts:
    2,267
    Support seems dead for this?!
     
  27. PauSchiSea

    PauSchiSea

    Joined:
    Aug 3, 2020
    Posts:
    8
    i think the most chances for a responce is to write a e-mail to the developer. you find the kontact probably on his site. he works on version 2.0 i see from week to week little activity on his webseite
     
  28. d-bugger

    d-bugger

    Joined:
    Jan 22, 2017
    Posts:
    4
    Hi.

    I did not get any response from Ricardo yet. I have the problem that I need the latest version of 2.0 but the download link I had does not work since Ricardo updated his website.
    Do you have a current download location for 2.0?

    Thanks
    D
     
  29. chrpetry

    chrpetry

    Joined:
    Mar 7, 2018
    Posts:
    65
    The AssetStore already removed Trilib 1.x.
    As his website seems to be changed I still hope this project gets continued. I'm currently heavily using this.

    @rickomax Can you please give us an official statement?

    EDIT:
    Just read on Twitter (https://twitter.com/realrickomax/status/1315627752205287424)
    "TriLib 1.9 has been deprecated on Asset Store in order to allow TriLib 2.0 approval. The new version should be online in the next few days."
     
    Last edited: Oct 13, 2020
  30. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi all!

    I'm sorry I don't access this topic as I should.

    Maintaining TriLib 1.9 is a hard and time-consuming task.
    TriLib 1.9 is based on Assimp, an open-source project with daily pull-requests and code-breaking changes.

    Knowing these issues and thinking about offering a better product for existing and new users, I've started to work on TriLib 2.0 two years ago and I'm proud to say it has been released on Asset Store today.

    TriLib 2.0 works with a smaller subset of file formats compared to TriLib 1.9: FBX, OBJ, GLTF2, PLY, STL, and 3MF at the moment. This decision was taken to provide the highest possible compatibility with the aforementioned formats. More file formats are in the works and other formats will be implemented with more popular demand.

    TriLib 2.0 is written entirely in C#, providing better compatibility with major Unity platforms.

    Since the beginning I told existing users would get a free copy of TriLib 2.0 and there it is, if you're an existing user you can upgrade it for free on Asset Store.
    https://assetstore.unity.com/packages/tools/modeling/trilib-2-model-loading-package-157548

    Please access the Asset Store page to see an "almost full" list of features.

    For anyone who strictly needs to stick to TriLib 1.9, I will offer the best support I can.
    The next step for legacy TriLib 1.9 is providing access to Assimp and the code repository it uses for existing users.

    I will be accessing this topic more often and probably creating a new topic for TriLib 2.0.

    As always, the best way to reach me is via e-mail:
    contato@ricardoreis.net

    I would like to thank everyone who supported TriLib.
     
    Bartolomeus755 and Firlefanz73 like this.
  31. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    I'm trying trilib 2.0 and I'm getting an error loading the model in this file.
    (Using AssetLoaderZip.LoadModelFromZipStream ())
     
  32. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    This issue was caused by bones being applied multiple times at the same mesh on the FBX parser.
    I've fixed it and will include the fix on the next update.
     
    gtk2k likes this.
  33. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    287
    Thanx!
     
  34. chrpetry

    chrpetry

    Joined:
    Mar 7, 2018
    Posts:
    65
    I have the same issue of all my gameObjects being rotated 180° y-Axis different to Trilib 1.x.
    Can I somehow rotate my meshes via assetLoaderOptions?

    Best regards,
    Christian
     
  35. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!

    You have two options:

    One is enabling the AssetLoaderOptions.UseOriginalPositionRotationAndScale flag.
    This will create a wrapper around the GameObject and use the original rotation Assimp loaded for the GameObject.

    The other is using the AssetLoaderOptions.RotationAngles field and set the rotation manually.

    If these don't work, I fear there won't be more options available for TriLib 1.9.

    TriLib 2.0 load models respecting the original transform and doesn't rely on wrapper GameObjects. You can upgrade to TriLib 2.0 for free.
     
  36. Camilojr

    Camilojr

    Joined:
    Mar 26, 2014
    Posts:
    6
    En:
    Hello Ricardo! All right?

    I've been using Trilib since the first beta! I'm enjoying how things are working! I had a recent problem and that made me a little worried, I realized that some models are not loading the textures correctly, leaving the model with the white aspect.

    I looked for the source of the problem until arriving at 3Ds Max 2020+, until the 2019 version the standard materials were "standard materials", in versions above 2020 the standard materials are "physical materials". I did two tests to show you.

    Test 1: Standard Materials
    mat_standard_ok.jpg

    Test 2: Physical Materials
    mat_physical_not_ok.jpg

    Somehow Trilib does not load materials/textures when they are "Physical Materials". I wonder if there is any alternative to this problem. Will it be implemented in future updates? Is there any configuration either in the type of material or in Trilib to support?
    Thank you for your help!


    Pt-br:
    Olá Ricardo! Tudo bem?

    Estou usando a Trilib desde a primeira versão beta! Estou gostando como as coisas estão funcionando!
    Tive um problema recente e que me deixou um pouco preocupado, percebi que alguns modelos não estão carregando as texturas corretamente, deixando o modelo com o aspecto branco.

    Procurei a fonte do problema até chegar no 3Ds Max 2020+, até a versão 2019 os materiais padrões eram os "standard materials", nas versões acima de 2020 os materiais padrões são "physical materials". Fiz dois testes para te mostrar.

    Teste 1: Standard Materials
    mat_standard_ok.jpg

    Teste 2: Physical Materials
    mat_physical_not_ok.jpg

    De alguma forma a Trilib não carrega os materiais/texturas quando são "Physical Materials". Gostaria de saber se existe alguma alternativa para esse problema. Será implementado em atualizações futuras? Existe alguma configuração tanto no tipo de material ou na Trilib para suportar?
    Obrigado pela ajuda!
     
  37. icefallgames

    icefallgames

    Joined:
    Dec 6, 2014
    Posts:
    75
    Regarding TriLib2, what Unity 2019.3 features does it use? We're interested in using it (it seems to work better than TriLib v1 based on some quick tests), but we're on 2019.2.19 and can't feasibly upgrade to 2019.3 at this point in time.

    Is it possible I'd be able to get the code running on 2019.2 (obviously the sample scene files wouldn't work), or does it really require some Unity 2019.3-only features?
     
  38. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!
    I'm planning to downgrade it.
    The only features it uses are newer C# features that earlier Unity versions don't support.
    I will test it on 2019.2 today.
     
    icefallgames likes this.
  39. icefallgames

    icefallgames

    Joined:
    Dec 6, 2014
    Posts:
    75
    Just so you know, on Windows, I managed to get TestLibCore running on 2019.2, seemingly without issue (although models seem to load more slowly than they do with 2019.4, at least when running the game in the editor). TriLibStandaloneFileBrowser also worked, but the editor was spewing a bunch of errors about Editor plugins with the same name.
     
  40. Pixel2015

    Pixel2015

    Joined:
    Mar 10, 2016
    Posts:
    35
    Hi,

    finally the 2.0 is here but it completely stopped working for me. No model loads any kind of textures it is always white and there is no error why it is so anywhere.

    If I try to use ZIP model+textures it always crashes with error that there is no suitable model file inside the ZIP.

    Any ideas? Is there some kind of structure or naming I need to use etc.?
     
  41. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!
    Are you mixing TriLib 1x with TriLib 2.0?
    I've seen such errors when mixing both packages, otherwise, it should work on any Unity version after 2019.3.0.
    I have tested it on several Unity versions.
     
  42. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!
    Have you used the code from the sample scenes?
    Please send me the code you're using to load the model, if possible.
     
  43. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi!
    TriLib 2.0 handles PBR materials coming from 3DS Max and Maya. I will upload a tutorial on these in the next few days.
     
  44. icefallgames

    icefallgames

    Joined:
    Dec 6, 2014
    Posts:
    75
    Oh, no, I'm the guy who was trying to backport it to 2019.2. There are no problems at all when I use it in 2019.4. I was just saying in that trying to backport it to 2019.2, it was complaining about duplicate plugins (one 32bit, one 64bit). Looks like the plugin import settings are pretty different in 2019.2. I ended up working around it by renaming the 32bit plugin (since we don't actually need it in our case).
     
  45. Pixel2015

    Pixel2015

    Joined:
    Mar 10, 2016
    Posts:
    35
    Yep I just basically build the AssetViewer example.
     
  46. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    What is your Unity version?
     
  47. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Yep, I was testing it here and it seems compatible, only the native plugins used by the StandaloneFileBrowser and GltfDraco have to been reconfigured on this version. I'll work on it till the end of the week, but if you managed to make it work by yourself, that is great.
     
    LR-Developer likes this.
  48. Pixel2015

    Pixel2015

    Joined:
    Mar 10, 2016
    Posts:
    35
    2019.4.12f1 and working with URP pipeline.
     
  49. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    I was testing it here and there are some issues with the UniversalRP Material Mapper, none is preventing it from assigning textures, but anyway, I will provide an update that should be ready tomorrow.
     
    Pixel2015 likes this.
  50. icefallgames

    icefallgames

    Joined:
    Dec 6, 2014
    Posts:
    75
    Is there a way to tell TriLib2 to combine meshes? TriLib1 had a CombineMeshes on AssetLoaderOptions that we were using.

    Also, TriLib2 doesn't seem to work with any glTF files.

    I get this error for all three that I've tried, downloaded from poly.google.com: (this was on 2019.4, and also my 2019.2 backport)

    Code (CSharp):
    1. /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2415
    2.   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) [0x00161] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:493
    3.   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) [0x0006d] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:300
    4.   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) [0x00173] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:1697
    5.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x000dc] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:877
    6.   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) [0x0007f] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:302
    7.   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) [0x0005c] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:1039
    8.   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) [0x00280] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:2415
    9.   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) [0x00161] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:493
    10.   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) [0x0006d] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:300
    11.   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType, System.Boolean checkAdditionalContent) [0x000db] in /root/repo/Src/Newtonsoft.Json/Serialization/JsonSerializerInternalReader.cs:202
    12.   at Newtonsoft.Json.JsonSerializer.DeserializeInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00046] in /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:907
    13.   at Newtonsoft.Json.JsonSerializer.Deserialize (Newtonsoft.Json.JsonReader reader, System.Type objectType) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonSerializer.cs:886
    14.   at Newtonsoft.Json.JsonConvert.DeserializeObject (System.String value, System.Type type, Newtonsoft.Json.JsonSerializerSettings settings) [0x0002d] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:837
    15.   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value, Newtonsoft.Json.JsonSerializerSettings settings) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:792
    16.   at Newtonsoft.Json.JsonConvert.DeserializeObject[T] (System.String value) [0x00000] in /root/repo/Src/Newtonsoft.Json/JsonConvert.cs:720
    17.   at glTFLoader2.Interface.LoadModel (System.IO.Stream stream) [0x00063] in <3025ede5049e46e29aee9719fef531f6>:0
    18.   at TriLibCore.Gltf.GltfReader.ParseModel (System.IO.Stream stream) [0x00007] in <39606ce478e6497da0972ae0738d76cb>:0
    19.   at TriLibCore.Gltf.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`2[T1,T2] onProgress) [0x0000c] in <39606ce478e6497da0972ae0738d76cb>:0
    20.   at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x000ec] in C:\Users\ome_d\Documents\TestModelLoad\TestModelLoader\Assets\TriLib2\TriLibCore\Scripts\AssetLoader.cs:961
    21.   at TriLibCore.General.ContextualizedAction`1[T].Invoke () [0x00000] in <3b49f491cb3044fc919add269ff6c0dd>:0
    22.   at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RunThread>b__0 () [0x00011] in <3b49f491cb3044fc919add269ff6c0dd>:0
     
    Last edited: Oct 20, 2020