Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

TriLib - Model Loading Package

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

  1. sandro-ixt

    sandro-ixt

    Joined:
    May 2, 2019
    Posts:
    13
    Here is another crash:

    Code (csharp):
    1.  
    2. 0x00007FFEA89E5D0C (UnityPlayer) block_locate_free
    3. 0x00007FFEA89E6381 (UnityPlayer) tlsf_memalign
    4. 0x00007FFEA7122C53 (UnityPlayer) DynamicHeapAllocator::Allocate
    5. 0x00007FFEA7123378 (UnityPlayer) MemoryManager::Allocate
    6. 0x00007FFEA71226BD (UnityPlayer) operator new
    7. 0x00007FFEA87E1B13 (UnityPlayer) Mesh::Mesh
    8. 0x00007FFEA7527029 (UnityPlayer) BaseObjectInternal::NewObject<Mesh>
    9. 0x00007FFEA755FAC1 (UnityPlayer) MeshScripting::CreateMesh
    10. 0x00007FFEA6E92B4D (UnityPlayer) Mesh_CUSTOM_Internal_Create
    11. 0x00000219B9C6B8FA (Mono JIT Code) (wrapper managed-to-native) UnityEngine.Mesh:Internal_Create (UnityEngine.Mesh)
    12. 0x00000219B9C6B82B (Mono JIT Code) [C:\build\output\unity\unity\Runtime\Export\Graphics\Mesh.bindings.cs:20] UnityEngine.Mesh:.ctor ()
    13. 0x0000021A539887E3 (Mono JIT Code) TriLibCore.Geometries.GeometryGroup:GenerateMesh (TriLibCore.AssetLoaderContext,UnityEngine.Matrix4x4[],System.Collections.Generic.IList`1<int>)
    14. 0x0000021A539870E1 (Mono JIT Code) [C:\Users\sandro\repos\iVP\Assets\1_Plugins\TriLib\TriLibCore\Scripts\AssetLoaders\AssetLoader.cs:964] TriLibCore.AssetLoader:ParseGeometry (TriLibCore.AssetLoaderContext,UnityEngine.GameObject,TriLibCore.Interfaces.IRootModel,TriLibCore.Interfaces.IModel)
    15. 0x0000021A53985FB3 (Mono JIT Code) [C:\Users\sandro\repos\iVP\Assets\1_Plugins\TriLib\TriLibCore\Scripts\AssetLoaders\AssetLoader.cs:807] TriLibCore.AssetLoader:ParseModel (TriLibCore.AssetLoaderContext,UnityEngine.Transform,TriLibCore.Interfaces.IRootModel,TriLibCore.Interfaces.IModel,bool)
    16. 0x0000021A539866AB (Mono JIT Code) [C:\Users\sandro\repos\iVP\Assets\1_Plugins\TriLib\TriLibCore\Scripts\AssetLoaders\AssetLoader.cs:837] TriLibCore.AssetLoader:ParseModel (TriLibCore.AssetLoaderContext,UnityEngine.Transform,TriLibCore.Interfaces.IRootModel,TriLibCore.Interfaces.IModel,bool)
    17. 0x0000021A53985943 (Mono JIT Code) [C:\Users\sandro\repos\iVP\Assets\1_Plugins\TriLib\TriLibCore\Scripts\AssetLoaders\AssetLoader.cs:453] TriLibCore.AssetLoader:ProcessModel (TriLibCore.AssetLoaderContext)
    18. 0x0000021A539857F3 (Mono JIT Code) [C:\Users\sandro\repos\iVP\Assets\1_Plugins\TriLib\TriLibCore\Scripts\AssetLoaders\AssetLoader.cs:1173] TriLibCore.AssetLoader:ProcessRootModel (TriLibCore.AssetLoaderContext)
    19. 0x0000021A5396829B (Mono JIT Code) TriLibCore.General.ContextualizedAction`1<T_REF>:Invoke ()
    20. 0x00000219B9E212E4 (Mono JIT Code) TriLibCore.Utils.Dispatcher:Update ()
    21. 0x00000219B9DF8BC8 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    22. 0x00007FFEA652FB04 (mono-2.0-bdwgc) mono_jit_set_domain
    23. 0x00007FFEA646E7A4 (mono-2.0-bdwgc) mono_object_get_virtual_method
    24. 0x00007FFEA646E93C (mono-2.0-bdwgc) mono_runtime_invoke
    25. 0x00007FFEA7BC809D (UnityPlayer) scripting_method_invoke
    26. 0x00007FFEA7BAE7FC (UnityPlayer) ScriptingInvocation::Invoke
    27. 0x00007FFEA7BA0CC3 (UnityPlayer) MonoBehaviour::CallMethodIfAvailable
    28. 0x00007FFEA7BA0D9F (UnityPlayer) MonoBehaviour::CallUpdateMethod
    29. 0x00007FFEA73D07B0 (UnityPlayer) BaseBehaviourManager::CommonUpdate<BehaviourManager>
    30. 0x00007FFEA73D821D (UnityPlayer) BehaviourManager::Update
    31. 0x00007FFEA76F0EDE (UnityPlayer) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
    32. 0x00007FFEA76DE30E (UnityPlayer) ExecutePlayerLoop
    33. 0x00007FFEA76DE3DF (UnityPlayer) ExecutePlayerLoop
    34. 0x00007FFEA76E23D2 (UnityPlayer) PlayerLoop
    35. 0x00007FFEA7C3FDAF (UnityPlayer) PerformMainLoop
    36. 0x00007FFEA7C3E97B (UnityPlayer) MainMessageLoop
    37. 0x00007FFEA7C435E9 (UnityPlayer) UnityMainImpl
    38. 0x00007FFEA7C4521B (UnityPlayer) UnityMain
    39. 0x00007FF789F311F2 (iVP Planning) __scrt_common_main_seh
    40. 0x00007FFFE33B26AD (KERNEL32) BaseThreadInitThunk
    41. 0x00007FFFE46CAA68 (ntdll) RtlUserThreadStart
    42.  
     
  2. sandro-ixt

    sandro-ixt

    Joined:
    May 2, 2019
    Posts:
    13
    I'm experiencing a similar issue, but on Windows. See the stack traces I've posted above. The first one is when loading a model multiple times. Seems like the application crashes when disposing the native array in the finalizer of AssetLoaderContext. Were you able to find a solution or workaround for this?
     
  3. javierFM95

    javierFM95

    Joined:
    Sep 1, 2023
    Posts:
    1
    hello, i am new in trilib and i have a problem. i am loading some models with a link that i get with firebase, the problem is that in windows the model is downloaded well but in mac os it can not be downloaded.
    here is the error that I get.
    error loading model: System.ArgumentNullException: Buffer cannot be null.
    parametre name: buffer
    at System.IO.MemoryStream..ctor (System.Byte[] buffer, System.Boolean writable) [0x00009] in <16d1a1e3fafa4d23a275526c945e1b62>:0
    at System.IO.MemoryStream..ctor (System.Byte[] buffer) [0x00000] in <16d1a1e3fafa4d23a275526c945e1b62>:0
    at (wrapper remoting-invoke-with-check) System.IO.MemoryStream..ctor(byte[])
    at TriLibCore.AssetDownloaderBehaviour+<DownloadAsset>d__3.MoveNext () [0x0008e] in /Users/yeltic/yeltic_App/Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetDownloaderBehaviour.cs:50
    UnityEngine.Debug:Registro (objeto)
    InteractiveModel:OnError (TriLibCore.IContextualizedError) (en Assets/LeARn/Scripts/Contenidos_Scripts/3DTemplate/InteractiveModel.cs:172)
    TriLibCore.AssetDownloaderBehaviour/<DownloadAsset>d__3:MoveNext () (es Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetDownloaderBehaviour.cs:88)
    UnityEngine.SetupCoroutine:InvokeMoveNext (System.Collections.IEnumerator,intptr) (en /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/Coroutines.cs:17)
    i hope you can help me :)
     
  4. augment-it

    augment-it

    Joined:
    Jun 29, 2018
    Posts:
    5
    I am using trilib 2 version 2.2.0, and when i load model at runtime, the materials appear darker with fbx and glb models, not yet tested others, and i checked the main color, the base color is indeed different, anyone meet this problem?
     
  5. PortalVRit

    PortalVRit

    Joined:
    Oct 19, 2018
    Posts:
    15
    @rickomax seems that you stoped the upport for this product?
    I need to load the assets ina an async way and seems that trilib is not doing this also if there are code parts that seems to suggest that there is this implementation.

    it is possible to have an answer?
    thanks.
     
  6. ItsPixelFire

    ItsPixelFire

    Joined:
    Dec 15, 2021
    Posts:
    2
    I'm wanting to do the same thing. I emailed last week and haven't gotten a response yet.
    I just want to load a list of files all at once, one after the other. But I get missing object references, likely because my next file is loading before a previous file has finished.
    Need async/multiple file help @rickomax. Thanks!
     
  7. Clebosevic

    Clebosevic

    Joined:
    Mar 2, 2021
    Posts:
    3
    Hey everyone! When I try to load an ordinary OBJ-file with the "AssetLoaderFilePicker", the obj gets loaded, but the material and texture do not get set, and are set metallic.
    Is this a common issue, and am i forgetting something, or is my apporach wrong?
    Code (CSharp):
    1. // Lets the user load a new model by clicking a GUI button.
    2. private void myOwnFunc()
    3. {
    4.     // Creates an AssetLoaderOptions instance.
    5.     // AssetLoaderOptions is a class used to configure many aspects of the loading process.
    6.     // We won't change the default settings this time, so we can use the instance as it is.
    7.     var assetLoaderOptions = AssetLoader.CreateDefaultLoaderOptions();
    8.     assetLoaderOptions.LoadTexturesAsSRGB = false;
    9.  
    10.  
    11.     // Creates the AssetLoaderFilePicker instance.
    12.     // AssetLoaderFilePicker is a class that allows users to select models from the local file system.
    13.     var assetLoaderFilePicker = AssetLoaderFilePicker.Create();
    14.  
    15.     GameObject wrapper = new GameObject();
    16.  
    17.     // Shows the model selection file-picker.
    18.     assetLoaderFilePicker.LoadModelFromFilePickerAsync("Select a File",
    19.         OnLoad,
    20.         OnMaterialsLoad,
    21.         OnProgress,
    22.         OnBeginLoad,
    23.         OnError,
    24.         wrapper,
    25.         assetLoaderOptions);
    26. }
    I just want to load an ordinary OBJ file, why is that so hard in Unity? ^^ @rickomax
     
  8. augment-it

    augment-it

    Joined:
    Jun 29, 2018
    Posts:
    5
    Do you also have the mtl file together with obj in the same folder? Because the materials and textures are referenced inside mtl file.


     
  9. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
    Hey guys.
    I'm developing new systems and finding more people to help give TriLib proper support, so I apologize if I don't access the forums too often—lots of things are in the works.
    Cheers!
     
  10. ankitrajdwivedi01

    ankitrajdwivedi01

    Joined:
    Aug 29, 2023
    Posts:
    5
    Hi, I'm interested in this lib does it also provide support for export the model at run time in different format.
     
  11. Clebosevic

    Clebosevic

    Joined:
    Mar 2, 2021
    Posts:
    3
    I got the file to load, with the material and the texture, but it is super shiny and stuff, even though Blender, etc show it as matt ...
     
  12. XieAndWater

    XieAndWater

    Joined:
    Mar 18, 2022
    Posts:
    1
    Hello, I am currently using TriLib 2.2.0. When I load a Gltf 2.0 file, the material mapper has some issues. It maps materials that are not “Transparent” as “Transparent”. However, when I use other Gltf loading plugins like GltfUtility or GltFast, this issue does not occur.
     
  13. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Hi! I just updated to the latest version, and now I'm unable to switch the SFB MacOS plugin to "Any CPU" to allow it to work on Apple Silicon. This worked in older versions of Trilib, but now I can only get it to work in builds on Intel MacOS Builds.

    Any help would be appreciated. Thanks!
     
  14. kael558

    kael558

    Joined:
    Sep 27, 2022
    Posts:
    2
    Hello,

    This package is awesome, however, I'm running into an issue with Animations. I'm loading a FBX file from Mixamo and extracting the animation clip as follows:

    upload_2023-11-3_11-32-18.png
    Then I'm attaching the animationClip to an override controller to run on another Avatar.

    But for some reason, the animationClip is still in "generic" format instead of "humanoid" format.

    Has anyone had any success with this?
     
  15. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    For those having trouble with using SFB on Apple Silicon, this Github issue is super helpful. Simply delete the StandaloneFileBrowser.bundle file within Unity, then import the StandaloneFileBrowser.bundle file included in the download in the last message of this Github issue.
    https://github.com/gkngkc/UnityStandaloneFileBrowser/issues/109

    That will default the bundle to "All CPUs", and it can be changed from there if need be.
     
    Last edited: Jan 30, 2024
  16. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    996
    The DAE Importer does not work in build when "Player Settings" > "Managed Stripping Level" is set to anything higher than "Minimal". Using TriLib 2.2.2.
     
  17. Robintj

    Robintj

    Joined:
    Jan 10, 2016
    Posts:
    10
    -------- I also encountered this problem, how did solve it ?
     
  18. sarootadmin

    sarootadmin

    Joined:
    Dec 14, 2022
    Posts:
    1
    hi, I am using the latest version of Trilib and my Unity version is 2021.3.5f1c1.

    When I opened the model using the sample scenario, the following exception occurred:

    An error occurred while loading your Model: System.ArgumentException:

    The output char buffer is too small to contain the decoded characters, encoding 'Unicode (UTF-8)' fallback 'System.Text.DecoderReplacementFallback'.

    Parameter name: chars


    at System.Text.Encoding.ThrowCharsOverflow () [0x00027] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.Text.Encoding.ThrowCharsOverflow (System.Text.DecoderNLS decoder, System.Boolean nothingDecoded) [0x00026] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.Text.UTF8Encoding.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Text.DecoderNLS baseDecoder) [0x0023c] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.Text.DecoderNLS.GetChars (System.Byte* bytes, System.Int32 byteCount, System.Char* chars, System.Int32 charCount, System.Boolean flush) [0x00059] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex, System.Boolean flush) [0x000a2] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.Text.DecoderNLS.GetChars (System.Byte[] bytes, System.Int32 byteIndex, System.Int32 byteCount, System.Char[] chars, System.Int32 charIndex) [0x00000] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.IO.BinaryReader.InternalReadOneChar () [0x000e8] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.IO.BinaryReader.Read () [0x0000d] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at System.IO.BinaryReader.PeekChar () [0x00028] in <e40e5a8f982c4b618a930d29f9bd091c>:0

    at TriLibCore.Utils.JsonParser.ReadToken (System.Int64& tokenLength, System.Int64& tokenHash, System.Boolean& isString, System.Char& initialChar) [0x0016c] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue, System.Boolean insideArray) [0x00002] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseKeysAndValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue) [0x00060] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue, System.Boolean insideArray) [0x0003c] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseKeysAndValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue) [0x00060] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue, System.Boolean insideArray) [0x0003c] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseKeysAndValues (TriLibCore.Utils.JsonParser+JsonValue& parentValue) [0x00060] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Utils.JsonParser.ParseRootValue () [0x0003d] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    at TriLibCore.Gltf.GtlfProcessor.LoadModel (System.IO.Stream stream) [0x00062] in <c4859e8bd8974b1b94725226b00775e3>:0

    at TriLibCore.Gltf.GtlfProcessor.ParseModel (System.IO.Stream stream) [0x00008] in <c4859e8bd8974b1b94725226b00775e3>:0

    at TriLibCore.Gltf.Reader.GltfReader.ReadStream (System.IO.Stream stream, TriLibCore.AssetLoaderContext assetLoaderContext, System.String filename, System.Action`2[T1,T2] onProgress) [0x00016] in <c4859e8bd8974b1b94725226b00775e3>:0

    at TriLibCore.AssetLoader.SetupModelLoading (TriLibCore.AssetLoaderContext assetLoaderContext) [0x00110] in D:\UnityProjects\mr-renderer-unity\Assets\ThirdPartyAssets\TriLib\TriLibCore\Scripts\AssetLoader.cs:1182

    at TriLibCore.AssetLoader.LoadModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x00001] in D:\UnityProjects\mr-renderer-unity\Assets\ThirdPartyAssets\TriLib\TriLibCore\Scripts\AssetLoader.cs:1140

    at TriLibCore.Utils.ThreadUtils+<>c__DisplayClass0_0`1[T].<RequestNewThreadFor>b__0 () [0x00028] in <85440a99e9f344fdae5d92fe9da1aba9>:0

    UnityEngine.Debug:LogError (object)

    TriLibCore.Samples.LoadModelFromFileSample:OnError (TriLibCore.IContextualizedError) (at Assets/ThirdPartyAssets/TriLib/TriLibSamples/LoadModelFromFile/Scripts/LoadModelFromFileSample.cs:55)

    TriLibCore.General.ContextualizedAction`1<TriLibCore.IContextualizedError>:Invoke ()

    TriLibCore.Utils.Dispatcher:Update ()
     
  19. Robintj

    Robintj

    Joined:
    Jan 10, 2016
    Posts:
    10
    //todo: coroutines will be enabled on a future release
    //if (assetLoaderContext.Options.UseCoroutines)
    //{
    // ThreadUtils.RequestNewThreadWithCoroutinesFor(
    // assetLoaderContext,
    // LoadModel_Coroutine,
    // ProcessRootModel_Coroutine,
    // HandleError,
    // assetLoaderContext.Options.Timeout,
    // threadName,
    // !assetLoaderContext.HaltTasks,
    // assetLoaderContext.OnPreLoad
    // );
    //} ,------When does it support coroutine loading? Is there any other way to prevent the main process from getting stuck as soon as model loaded?:)
     
  20. aitorolazabal17

    aitorolazabal17

    Joined:
    Nov 27, 2023
    Posts:
    32
    Hello, is runtime exporting implemented yet? I saw posts saying it would be implemented in future releases but I havent found anything. thanks
     
    look001 likes this.
  21. Robintj

    Robintj

    Joined:
    Jan 10, 2016
    Posts:
    10
    Did you solve it? I also loaded FBX one by one, but it was also a memory out of error
     
  22. voolf00

    voolf00

    Joined:
    Nov 28, 2017
    Posts:
    3
    Mac os M1. Unity 22.3.10.f1 and version trilib 2.2.3
    Hello. I have 2 questions

    1. Is there an archive of old versions, since after the update there were problems loading archives that were not there before the update.
    2. The problem itself. When downloading the zip archive, a strange error appears. The line at the end is especially confusing

    C:/Repos/trilib-core/TriLibCore/Utils/Dispatcher.cs:204)
    Mac doesn't have drives C: D:

    zip archive 3d model for test - https://drive.google.com/file/d/1myhTNQ9IMdhZb14md-wCHoEqTh_3eNEI/view?usp=sharing

    this is test was. in asset viewer scene

    TriLibCore.General.ContextualizedError`1[TriLibCore.AssetLoaderContext]: A contextualized error has occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object
    at TriLibCore.Utils.TextureUtils.IsNormalMapTexture (TriLibCore.TextureLoadingContext textureLoadingContext) [0x00001] in C:\Repos\trilib-core\TriLibCore.Textures\TextureUtils.cs:353
    at TriLibCore.Utils.TextureUtils.IsSRGBTexture (TriLibCore.TextureLoadingContext textureLoadingContext) [0x00001] in C:\Repos\trilib-core\TriLibCore.Textures\TextureUtils.cs:348
    at TriLibCore.Utils.TextureUtils.BuildMetallicTexture (TriLibCore.TextureLoadingContext textureLoadingContext, UnityEngine.Texture diffuseTexture, UnityEngine.Texture metallicTexture, UnityEngine.Texture specularTexture, UnityEngine.Texture glossinessTexture, UnityEngine.Color defaultDiffuse, UnityEngine. Color defaultSpecular, System.Single shininessExponent, System .Nullable`1[T] defaultRoughness, System.Nullable`1[T] defaultMetallic, System.Boolean usingRoughness, System.Boolean mixTextureChannelsWithColors, System.Int32 metallicComponentIndex, System.Int32 glossinessComponentIndex) [0x001af] in C:\Repos\trilib- core\TriLibCore.Textures\TextureUtils.cs:489
    at TriLibCore.Fbx.FBXMaterial.PostProcessTexture (TriLibCore.TextureLoadingContext textureLoadingContext) [0x0014c] in C:\Repos\trilib-core\TriLibCore.Fbx\FBXMaterial.cs:828
    at TriLibCore.Textures.TextureLoaders.PostProcessTexture (TriLibCore.TextureLoadingContext textureLoadingContext) [0x0004a] in C:\Repos\trilib-core\TriLibCore.Textures\TextureLoaders.cs:334
    at TriLibCore.Mappers.MaterialMapper.LoadTextureWithCallbacks (TriLibCore.MaterialMapperContext materialMapperContext, TriLibCore.General.TextureType textureType, TriLibCore.Interfaces.ITexture texture, System.Action`1[TriLibCore.TextureLoadingContext][] onTextureProcessed) [0x000cb] in C:\Repos \trilib-core\TriLibCore\Mappers\MaterialMapper.cs:239
    at TriLibCore.URP.Mappers.UniversalRPMaterialMapper.CheckMetallicGlossMapTexture (TriLibCore.MaterialMapperContext materialMapperContext) [0x0001c] in /Users/voolf/Yandex.Disk.localized/ProjectsUnity/lmar/Assets/TriLib/TriLibUniversalRP/Scripts/Mapp ers/UniversalRPMaterialMapper.cs:199
    at TriLibCore.URP.Mappers.UniversalRPMaterialMapper.Map (TriLibCore.MaterialMapperContext materialMapperContext) [0x0005c] in /Users/voolf/Yandex.Disk.localized/ProjectsUnity/lmar/Assets/TriLib/TriLibUniversalRP/Scripts/Mappers/UniversalRPMaterial Mapper.cs:59
    at TriLibCore.AssetLoader.ProcessMaterialRenderers (TriLibCore.AssetLoaderContext assetLoaderContext) [0x0007e] in /Users/voolf/Yandex.Disk.localized/ProjectsUnity/lmar/Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetLoader.cs:1363
    at TriLibCore.AssetLoader.ProcessMaterials (TriLibCore.AssetLoaderContext assetLoaderContext) [0x00043] in /Users/voolf/Yandex.Disk.localized/ProjectsUnity/lmar/Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetLoader.cs:1239
    at TriLibCore.AssetLoader.ProcessRootModel (TriLibCore.AssetLoaderContext assetLoaderContext) [0x00008] in /Users/voolf/Yandex.Disk.localized/ProjectsUnity/lmar/Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetLoader.cs:1226
    at TriLibCore.General.ContextualizedAction`1[T].Invoke () [0x00024] in C:\Repos\trilib-core\TriLibCore\ContextualizedActions\ContextualizedAction.cs:93
    at TriLibCore.Utils.Dispatcher.Update () [0x00025] in C:\Repos\trilib-core\TriLibCore\Utils\Dispatcher.cs:204
    --- End of inner exception stack trace ---
    UnityEngine.Debug:LogError (object)
    TriLibCore.Samples.AssetViewerBase:OnError (TriLibCore.IContextualizedError) (at Assets/TriLib/TriLibSamples/Common/Scripts/AssetViewerBase.cs:276)
    TriLibCore.Samples.AssetViewer:OnError (TriLibCore.IContextualizedError) (at Assets/TriLib/TriLibSamples/AssetViewer/Scripts/AssetViewer.cs:767)
    TriLibCore.AssetLoaderZip:OnError (TriLibCore.IContextualizedError) (at Assets/TriLib/TriLibCore/Scripts/AssetLoaders/AssetLoaderZip.cs:59)
    TriLibCore.General.ContextualizedAction`1<TriLibCore.IContextualizedError>:Invoke () (at C:/Repos/trilib-core/TriLibCore/ContextualizedActions/ContextualizedAction.cs:93)
    TriLibCore.Utils.Dispatcher:Update() (at C:/Repos/trilib-core/TriLibCore/Utils/Dispatcher.cs:204)
     
    Last edited: Jan 26, 2024
  23. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,089
    Has anyone been able to get TriLib to work on Vision Pro?

    [Diagnostics] EXCEPTION UnityException in PolySpatialCore:

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    Unity.PolySpatial.Internals.PolySpatialCore:polySpatialAfterLateUpdate()



    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0



    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    [Diagnostics] EXCEPTION UnityException in PolySpatialCore:

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    Unity.PolySpatial.Internals.PolySpatialCore:polySpatialAfterLateUpdate()



    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0



    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    [Diagnostics] EXCEPTION UnityException in PolySpatialCore:

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    Unity.PolySpatial.Internals.PolySpatialCore:polySpatialAfterLateUpdate()



    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0



    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    Execution of the command buffer was aborted due to an error during execution. Insufficient Permission (to submit GPU work from background) (00000006:kIOGPUCommandBufferCallbackErrorBackgroundExecutionNotPermitted)

    [Diagnostics] EXCEPTION UnityException in PolySpatialCore:

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0

    Unity.PolySpatial.Internals.PolySpatialCore:polySpatialAfterLateUpdate()



    UnityException: Texture 'generated.png' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.

    at UnityEngine.Texture2D.GetRawTextureData[T] () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.GetRawTextureData (UnityEngine.Texture2D tex2d, Unity.Collections.Allocator allocator, UnityEngine.Experimental.Rendering.GraphicsFormat& graphicsFormat) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.ConversionHelpers.ToPolySpatialTextureData (UnityEngine.Texture2D tex2d, System.Action`2[T1,T2] postConversionCallback) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.SendTextureAssetChanged (Unity.PolySpatial.Internals.PolySpatialAssetID assetID, UnityEngine.Object unityTexture, System.Boolean allowNativeTextures) [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.LocalAssetManager.ProcessChanges () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialUnitySimulation.UpdateInternal () [0x00000] in <00000000000000000000000000000000>:0

    at Unity.PolySpatial.Internals.PolySpatialCore.PolySpatialAfterLateUpdate () [0x00000] in <00000000000000000000000000000000>:0
     
    jvolyn likes this.
  24. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    @rickomax I suggest looking into this for the next release to ensure it's compatible with Apple Silicon.
    Thanks!
     
  25. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,089
    How to disable this showstopping error

    UnityException: Texture 'UnnamedTexture' is not readable, the texture memory can not be accessed from scripts. You can make the texture readable in the Texture Import Settings.
     
  26. Rancor_Wrangler

    Rancor_Wrangler

    Joined:
    Jan 21, 2024
    Posts:
    1
    Hi, I'm just playing with the import model from file picker function and it's currently only letting me import 1 model using a button interface I made. Is there a way of letting me keep the already loaded model and then pick another model to load (so I can have 2, 3, 4 etc.. numbers of models loaded)?

    Many thanks

    edit: Adding that I'm currently basing my tests off the included sample file:
    LoadModelFromFilePicker
     
  27. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
  28. aitorolazabal17

    aitorolazabal17

    Joined:
    Nov 27, 2023
    Posts:
    32
    Hi, when exporting the scene in runtime as gltf using GLTFast there are some Trilib elements added such as "TriLibBlack.jpg". If I import the scene again using Trilib the scene will be slightly darker, but if I drag it into the screen the objects of the scene will be completely black. Why does trilib use that and how do i prevent it?
     
    Last edited: Feb 20, 2024
  29. distastee

    distastee

    Joined:
    Mar 25, 2014
    Posts:
    66
    Anyone upgrade to Xcode 15 and suddenly occlusion/metallic/smoothness/normal maps stopped working on your iphone?

    Happened to me. Found a solution so I'm dropping it here.

    Seems that the shader keywords stopped working (for some reason). To figure it out - I ran this locally and on my iPhone and saw I got different results on the iPhone:
    Code (CSharp):
    1.             foreach (var keyword in material.enabledKeywords) Debug.Log($"Enabled Keyword: {keyword}");
    2.  

    My hack was to manually call EnableKeyword on all my materials for everything that stopped working:
    Code (CSharp):
    1.             material.EnableKeyword(new LocalKeyword(shader, "_NORMALMAP"));
    2.             material.EnableKeyword(new LocalKeyword(shader, "_METALLICSPECGLOSSMAP"));
    3.             material.EnableKeyword(new LocalKeyword(shader, "_OCCLUSIONMAP"));
    Took me a few days to figure this out. Hope this saves someone time.
     
  30. NRBTATA

    NRBTATA

    Joined:
    Jan 5, 2023
    Posts:
    2
    Facing same issue have you got any solution
     
  31. vungocanh1174

    vungocanh1174

    Joined:
    Mar 4, 2024
    Posts:
    1
    Would love to try your asset once UWP support has rolled out.
    kèo nhà cái , keo bong da, tài xỉu w88, Baccarat W88, casino W88


     
  32. NRBTATA

    NRBTATA

    Joined:
    Jan 5, 2023
    Posts:
    2

    Facing similar issue have u got any solution
     
  33. protomor

    protomor

    Joined:
    Dec 13, 2021
    Posts:
    38
    What are some things to keep in mind when making models so they load faster? Like use png instead of jpg. limit number of materials or limit objects? Also are there any options to help trilib load faster? I'm hitting 2 min timeouts, I feel like that's a long time to load a level.
     
  34. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
  35. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
    TriLib 2.3.2 is on Asset Store.

    Changelog:

    -Fixed glTF2 WebGL out-of-memory error.
    -Added coroutine meshes loading.
    -Added MaxCoroutineDelayInMS asset loader option. Use this field to set a maximum of milliseconds a Coroutine can take without waiting for a main thread frame to execute.
    -Fixed texture compression is not being called.
    -Removed TriLibCore.Textures and moved classes to TriLibCore.
    -Added MaterialMapper.UsesCoroutine field and MaterialMapper.MapCoroutine method. You can override the field and the method if you want your material mapper to process in a Coroutine.
    -Added AssetLoaderOptions.UseCoroutines. Turn off this field to disable TriLib coroutines. Coroutines ensure that model data loads with the fewest possible main thread stalls. (This field is on by default).
    -Fixed glTF2 regression issues.
    -Fixed glTF2 occlusion map extraction.
    -Fixed glTF2 KHR_lights_punctual intensity calculation.
    -Fixed 3MF loader issues.
    -Fixed DAE loader issues.
    -Memory usage fixes.
    -Set GltfReader.SpotLightDistance default value to 100.
    -Deprecated LoadedTextures in favor of LoadedCompoundTextures.
     
  36. cckj

    cckj

    Joined:
    Apr 1, 2024
    Posts:
    2
    System.Exception: Mesh contains Draco compression but no DracoCompressionCallback was set for GltfReader.
     
  37. cckj

    cckj

    Joined:
    Apr 1, 2024
    Posts:
    2
    System.EntryPointNotFoundException: DecodeDracoMesh assembly:<unknown assembly> type:<unknown type> member:(null)
     
  38. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
     
  39. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    687
    TriLib 2.3.3 update released:

    Changelog:
    -Fixed Draco decompression mesh mismatch.
    -Fixed negative scale matrix decomposition issues.
    -Fixed FBX animation issues.
    -Fixed FBX pivot issues. Only FBX static models have pivot preservation. Pivot preservation for animated models is in the works.
    -Added MaxVertexDataInitialCapacity asset loader option. Use this field to set the maximum initial capacity of meshes vertex buffers. Vertex count higher than that will use the default .NET exponential capacity increasing method.
    -Added animation curve simplification. Please refer to SimplifyAnimations, PositionThreshold, RotationThreshold, and ScaleThreshold asset loader options.
     
  40. SiStibbs

    SiStibbs

    Joined:
    Oct 4, 2015
    Posts:
    1
    Hi. Did you ever manage to get this working? I am running into the same issue now.
     
  41. FenyceAssets

    FenyceAssets

    Joined:
    Jan 10, 2014
    Posts:
    11
    Yes, same here. I'd love to know if someone figure it out
     
  42. googlevn1608

    googlevn1608

    Joined:
    May 12, 2022
    Posts:
    2
    Hello, I'm trying to load .fbx (100mb) into my Unity project
    - My game uses the internet (Photon Pun 2)
    - I Build on the WebGL platform
    - I load the model from the Internet using AssetDownloader.LoadModelFromUri(webRequest, OnLoad, OnMaterialsLoad, OnProgress, OnError, null, _assetLoaderOptions);
    - When .Fbx loaded 83%, my game froze and the above error occurred
    Is there any way to fix it?
     

    Attached Files:

  43. ina

    ina

    Joined:
    Nov 15, 2010
    Posts:
    1,089
    Running into crashing issues for glb via Trilib so just using Unity's GLTFast for that (fbx still uses trilib)

    How do you suppress this warning?

    Multiple scripted importers are targeting the extension 'glb' and have all been rejected: GLTFast.Editor.GltfImporter (assembly: /Users/mbp16_2022_m1max/MyProjects/AI3D GO/AI3D GO/Library/ScriptAssemblies/glTFast.Editor.dll), TriLibCore.Editor.TriLibGLTFScriptedImporter (assembly: /Users/mbp16_2022_m1max/MyProjects/AI3D GO/AI3D GO/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll)
    UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters () (at /Users/bokken/build/output/unity/unity/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:112)


    Multiple scripted importers are targeting the extension 'gltf' and have all been rejected: GLTFast.Editor.GltfImporter (assembly: /Users/mbp16_2022_m1max/MyProjects/AI3D GO/AI3D GO/Library/ScriptAssemblies/glTFast.Editor.dll), TriLibCore.Editor.TriLibGLTFScriptedImporter (assembly: /Users/mbp16_2022_m1max/MyProjects/AI3D GO/AI3D GO/Library/ScriptAssemblies/Assembly-CSharp-Editor.dll)
    UnityEditor.AssetImporters.ScriptedImporter:RegisterScriptedImporters () (at /Users/bokken/build/output/unity/unity/Modules/AssetPipelineEditor/Public/ScriptedImporter.cs:112)
     
  44. interman

    interman

    Joined:
    Dec 14, 2023
    Posts:
    1
    I've encountered an issue with the LoadModelFromFile sample in URP mode. The model loads perfectly in the Editor mode, but it doesn't display after building. This issue occurs on both Windows (Unity 2021.3.34, 2022.3.25) and macOS.

    I've ensured that the UniversalRPMaterialMapper option in TriLib's PlayerSettings is checked.

    Additionally, I noticed an error when trying to toggle some options in TriLib's PlayerSettings:


    Code (VBNet):
    1. ArgumentException: The provided target platform group name () is not valid.
    2. UnityEditor.PlayerSettings.SetScriptingDefineSymbols (UnityEditor.Build.NamedBuildTarget buildTarget, System.String defines) (at <0a81bd77f3334bdfa5d31008229edcac>:0)
    3. TriLibCore.Editor.TriLibDefineSymbolsHelper.UpdateSymbol (System.String targetDefineSymbol, System.Boolean value) (at Assets/TriLib/TriLibCore/Editor/Scripts/TriLibDefineSymbolsHelper.cs:60)

    I'm not sure if this error is related to the issue with model loading, but any help or guidance would be greatly appreciated.

    Thank you!
     
  45. redblox

    redblox

    Joined:
    Dec 2, 2018
    Posts:
    3
    First I would just like to say, Amazing asset! I do have a question about some strange texture related things I'm seeing. I'm loading in a .glb into my scene and the texture looks pixelated. Im assuming the filter mode needs to be changed during the loading process, but when I try to access it, it's never found. I could see in the docs the AssetLoaderOptions has access to the FilterMode. Do I need to update the package to the latest version? I've attached a screenshot below for reference. Any help would be appreciated! :) again thank you for creating such a great asset!
     

    Attached Files:

  46. unity_4CCDA7B0FE6E2B78105D

    unity_4CCDA7B0FE6E2B78105D

    Joined:
    Feb 28, 2023
    Posts:
    1
    Hello, I'm trying to upgrade from Trilib to Trilib 2 and configure Trilib2 for URP. I wrote a very simple test script to load a model from file and fix up its materials using a new UniversalRPMaterialMapper(), but when the mapper is applied, all of the materials in the Mesh Renderer are None. When the mapper line is commented out, all of the materials in the Mesh Renderer are there, but not URP materials.

    Here is the simple test script, minus debugging (OnLoadError, DebugMaterials, OnProgress) which tell me the model loads successfully but materials are null.
    ```
    public class Trilib2Test : MonoBehaviour
    {
    public string modelPath;

    void Start()
    {
    // Create default loader options
    var assetLoaderOptions = AssetLoader.CreateDefaultLoaderOptions();

    // Add the URP material mapper to the material mappers list
    // assetLoaderOptions.MaterialMappers = new MaterialMapper[] { new UniversalRPMaterialMapper() };

    Debug.Log("Gonna Load");
    // Load the model from the specified path
    AssetLoader.LoadModelFromFile(modelPath, OnModelLoaded, null, OnProgress, OnLoadError, null, assetLoaderOptions);
    }

    private void OnModelLoaded(AssetLoaderContext assetLoaderContext)
    {
    // Access the loaded model's root GameObject
    var myGameObject = assetLoaderContext.RootGameObject;
    Debug.Log("Model loaded successfully: " + myGameObject.name);

    // Debugging material mapping
    DebugMaterials(myGameObject);
    }
    }
    ```

    Here are the materials with the MaterialMappers line commented out:
    upload_2024-6-18_11-23-58.png
    Here are the materials with the MaterialMappers line there
    upload_2024-6-18_11-24-49.png

    What am I doing wrong here? I read that the graphics' setting name needs to start with "UniversalRP" so I tried that
    upload_2024-6-18_11-27-14.png
    But still get purple missing materials
     
  47. jvolyn

    jvolyn

    Joined:
    Sep 10, 2021
    Posts:
    1
    Getting this same issue w/ Vision Pro and PolySpatial and some, but not all models across FBX, GLB file types - it seems generated textures may be set as not readable when both mappers are set to either URP or Built-In RP, which is causing a freeze / lock-up on the device. Possible link to the transparent Trilib Shaders.

    Has a workaround and / or fix been identified?