Search Unity

TriLib - Model Loading Package

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

  1. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Ricardo,

    Would it be possible to use the Uber shader with TribLib during import models at runtime?

    Regards
    Marko
     
  2. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi @Bartolomeus755, I don't have Uber Shader package.
    After the next release 1.6, I'll take a look at the package and study a possible implementation.
     
    Bartolomeus755 likes this.
  3. hierro__

    hierro__

    Joined:
    Sep 22, 2014
    Posts:
    59
    Hi, thank you for reply, cant really get working animator, and didnt have chance to understand my error.
    If you supply and email I can send yout the file I'm using, animations are pretty easy but I can't get to manage them into an animator.

    Btw, happy new year :)
     
  4. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Happy new year!
    You can contact me at: contato@ricardoreis.net
     
  5. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hey guys, just updating TriLib 1.6 (unreleased update) status:

    *Added: Experimental UWP build
    *Added: IFC importer working on Android
    *Added: Alpha material importing (cutout and transparent)
    *Added: Function to import models from memory. (AssimpLoader.LoadFromMemory)
    *Added: PreTransformVertices advanced loading option
    *Added: PDF documentation
    *Fixed: Android/iOS non-embedded texture loading issues
    *Fixed: FBX embedding texture issues
    *Fixed: OSX iOS dependency
    *Fixed: Linux native plugin naming issue
    *Updated Assimp version

    Known issues added:
    *At the moment, UWP builds accepts only embedded textures
    *Sample2 does not works correctly on UWP builds

    This version version should be released on the next days.
     

    Attached Files:

    Bartolomeus755 likes this.
  6. mikko_forsman

    mikko_forsman

    Joined:
    Jul 10, 2017
    Posts:
    22
    Hi rickomax,

    Does this update also include the async model loading, which you mentioned might make it to the next update? If not, is there any new ETA for that feature?

    Regards,
    Mikko Forsman
     
  7. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @layola, the 1.6 update is waiting approval on Asset Store, it has a fix that probably fixes your issue.
     
  8. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @mikko_forsman I'm studying how I could implement that.
     
  9. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
  10. Ignatius

    Ignatius

    Joined:
    Oct 28, 2013
    Posts:
    10
    Hi rickomax,
    Is the web build ready for 1.6?

    As the animation (Legacy) has bug with AddClip, we are force to look for alternative to customize the animation or break the animation into pieces. Do you have work around suggestion?
     
    Last edited: Jan 6, 2018
  11. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi @Ignatius, not yet.
    I'm studying the WebGL implementation.
     
    Ignatius likes this.
  12. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    What's the issue you're facing?
     
  13. layola

    layola

    Joined:
    Aug 6, 2013
    Posts:
    94
    it's seem there are some bug about blank material without texture
    1:3ds max have two blank materials ,without texture.,export to fbx with embed options.
    2:import use trilib, and there are only one blank material .but unity editor have two material import .
     
  14. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi @layola, could you please send me the source .MAX and resulting .FBX for studying at contato@ricardoreis.net?
     
  15. Ignatius

    Ignatius

    Joined:
    Oct 28, 2013
    Posts:
    10
    Hi Rick,

    Originally I was facing the issue with AddClip (Basically I need to slice the animation in part), after many fail then I found out Unity had declared not to solve the Animation.AddClip problem (the new sliced animationClip can only last for 1 second. This bug was already reported.)

    Then I tried to use 3dsMax to export animation clips in section with label. It work well except each new imported ClipName, the clip length are reported correct, but when apply and play through animation component, each clip's ending look like there are invincible frames was added on the last frame. For example, the perfect walk cycle loop, which the clip length is 2.15 seconds in Max, when animation["WalkLoop"].length, it also report 2.15f length (correct). When animation.CrossFade ("WalkLoop", 0.4f); the clip will not visually loop after 2.15 second. Instead it only visually loop after 20+ seconds which nearly the full length of entire fbx animation. I had implement a controller to overcome this. Basically write a simple detection to overwrite this behavior by
    if ((Time.time-ClipStartPlayTime)>ClipDuration){
    animation.Stop; animation.Play("WalkLoop"); }
    for those clip in loop mode.
     
  16. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    I wasn't aware of this bug. There are some issues when people tries to assign generic avatars to TriLib loaded objects, as the avatar definition used on animation clips must be the same as the loaded object. So I'm creating a TriLib menu command for the next update, that generates an AnimationController from an existing mesh, using TriLib. Then the user will be able to use this AnimationController when loading generic avatars with the same bone naming as the original.
     
  17. endargon

    endargon

    Joined:
    Sep 21, 2017
    Posts:
    4
    Hi @rickomax,

    Currently working on hololens project for school and we bought your amazing asset loader but currently running into some issues. Everything in the unity editor works fine the test spider loads and stuff. But when we build it for the hololens it shows a parsing file error.

    Code (CSharp):
    1. Exception: Error parsing file.
    2.    at TriLib.AssetLoader.LoadFromMemory(Byte[] fileBytes, String filename, AssetLoaderOptions options, GameObject wrapperGameObject)
    3.    at TriLib.Samples.ModelDownloader.<DownloadModel>d__8.MoveNext()
    4.    at UnityEngine.SetupCoroutine.InvokeMoveNext(IEnumerator enumerator, IntPtr returnValueAddress)
    5.    at UnityEngine.SetupCoroutine.$Invoke1(Int64 instance, Int64* args)
    6.    at UnityEngine.Internal.$MethodUtility.InvokeMethod(Int64 instance, Int64* args, IntPtr method)
    7. (Filename: <Unknown> Line: 0)
    Any ideas about this we are kinda stuck right now
     
  18. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @endargon, what's your device specs?

    (Only the Sample 1 was adapted for UWP until this moment)
     
    Last edited: Jan 19, 2018
  19. endargon

    endargon

    Joined:
    Sep 21, 2017
    Posts:
    4
  20. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
  21. endargon

    endargon

    Joined:
    Sep 21, 2017
    Posts:
    4
  22. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @endargon

    I've sent you an updated package link via private message, please tell me if it works.

    Do you have Skype?
    If yes, please send me via PM or e-mail: ricardo@ricardoreis.net

    I'm working on UWP 32 bits issues, and you could help me testing the builds (as I don't have the Hololens device).
     
    Last edited: Jan 21, 2018
    endargon likes this.
  23. endargon

    endargon

    Joined:
    Sep 21, 2017
    Posts:
    4
    @rickomax Hmm after recreating my entire UWP folder and quadruple checking my dll options are correct.
    It suddenly started working


    Going to try with some more complex models in a bit but ay I can safely say it works on the hololens emulator which means it should also work on the real device.
     
  24. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @endargon

    There's a TriLib update waiting for approval where I can load models from memory on UWP:
     
    Last edited: Jan 26, 2018
  25. CogumeloSoft

    CogumeloSoft

    Joined:
    Dec 28, 2012
    Posts:
    88
    Hi!
    I'm trying to load an FBX model that have multiple materials assign for different parts/meshes but just one material is loaded for it all. If the materials are different they all load nice but if they have the same settings only one is loaded. I need to load they all even if the are the same since i need to read some name convention and make some changes at each one after load the model.

    Any sample how to load the FBX with all materials correctly assigned even if they have the same settings ?
    Bye!
     
    Last edited: Jan 31, 2018
  26. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @CogumeloSoft,
    please send the model to: contato@ricardoreis.net
    I must check your file to figure-out a solution.
     
  27. CogumeloSoft

    CogumeloSoft

    Joined:
    Dec 28, 2012
    Posts:
    88
    Done
    Hope you guys can help us.
    Bye!
     
  28. Cretaka

    Cretaka

    Joined:
    Oct 31, 2017
    Posts:
    4
    Hello Rickomax.
    I'm trying to import Humanoid animation from fbx.
    "UseLegacyAnimations = true" works fine, but turn off the flag cause empty AnimatorController.

    What should i do?
     
  29. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi @Cretaka.
    We are working on a system to generate generic animation controllers on Unity editor, from models loaded with TriLib.
    When working with generic animations, you need an existing animation controller, and in this case, we can't use an animation controller created with clips loaded in Unity editor, as TriLib objects and Unity loaded objects hierarchies are different. The best way to work with generic animations at the moment, is using legacy animations. If you are working with humanoid animations, you can modify the code at "AvatarLoader.cs".
     
  30. Cretaka

    Cretaka

    Joined:
    Oct 31, 2017
    Posts:
    4
    Hi Rickomax
    Thank you for your quick reply.
    There is several characters in Unity scene, they have same bone hierarchy, but proportion is different.
    I want to load animation with TriLib at runtime, and attach to them.
    I should challenge with legacy animation. Well.

    Regards
     
  31. ArBuZ

    ArBuZ

    Joined:
    Dec 27, 2012
    Posts:
    9
    Hello!
    We recently bought the plugin for our project. We experience problems with some models.
    For example this model from the asset store (it's free and we used it for testing) is loaded with wrong positioning.
    http://u3d.as/mK7

    By the way the plugin is great! Good job! Hope all minor issues will be fix soon )
    Thanks in advance.
    Best regards, Alexander.
     
  32. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi. Thank you for your purchase!
    We have some FBX transform issues with certain models, as listed in our known-issues list.
    We are working to fix these issues.
     
  33. ryo0ka

    ryo0ka

    Joined:
    Sep 27, 2015
    Posts:
    37
    @rickomax Hi rick, I too will be really excited to see async loading feature with your asset. Thank you ;)
     
    ElevenGame likes this.
  34. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hey. It's planned for a future release.
    I'm focused on fixing iOS issues at the moment, after that, I still have some bugs to fix.
     
    ElevenGame likes this.
  35. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi.

    I've been receiving many e-mails about TriLib iOS issues.
    I've been replying these users and warning them I have only one Mac
    computer avaliable to work on TriLib, and this computer is under maintanance.
    I could have a second machine, but that's not my reality as an indie developer.
    I guarantee all iOS issues will be fixed as soon as possible, it's just a matter of time.

    Best regards,
    Ricardo Reis.
     
    Ignatius likes this.
  36. mikko_forsman

    mikko_forsman

    Joined:
    Jul 10, 2017
    Posts:
    22
    Hello again rickomax,

    I've noticed that *.stp and *.step files are currently not supported by trilib, but they are supported by assimp (at least according to https://github.com/assimp/assimp). Is support for those formats coming at some point?

    Best regards,
    Mikko Forsman
     
  37. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    @mikko_forsman File formats support list is quite outdated for Assimp, I'll have to check the list myself. Have you made any test with .stp or .step files?
     
  38. mikko_forsman

    mikko_forsman

    Joined:
    Jul 10, 2017
    Posts:
    22
    Hi,

    I just quickly tested with some .stp files, and got an error "Exception: Error loading asset. Assimp returns: [IFC: Unrecognized file schema: CONFIG_CONTROL_DESIGN]". So I guess that means that Assimp doesn't actually support stp files?

    -Mikko
     
  39. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Possibly, I'll report this to the Assimp team.
     
  40. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Quick update: a patch with iOS fixes is awaiting for approval on Asset Store.
     
  41. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Hi. I've just updated TriLib to version 1.6.5.
    This version fixes current iOS issues.
    Keep in mind that at least an iPhone 5s or an iPad Air with iOS version 11.2 is needed in order to load TriLib libraries.

    Best regards,
    Ricardo Reis.
     
    Bartolomeus755 likes this.
  42. Deleted User

    Deleted User

    Guest

    Hi,

    I tested your plugin with a obj file and i've this error. (attachments)

    Thanks.
     

    Attached Files:

  43. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
  44. Deleted User

    Deleted User

    Guest

    @rickomax "file.obj" i sent you a bug repport from your website two weeks ago ;)
     
  45. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Oh, thank you. I'm having some delay on bug fixing lately, as the co-developer that works with me is kinda busy.
    I'll keep you updated.
     
    Deleted User likes this.
  46. fatblueduck

    fatblueduck

    Joined:
    Feb 27, 2018
    Posts:
    5
    @rickomax

    I'm experiencing the issue reported by @hugopok earlier in this thread. I'm using Unity 2018.1.0b8 (linux) and am importing a project created by someone else that includes TriLib,

    A dialog appears when importing the project. Choosing "Ask to Save Changes and Restart" loop reloads unity showing the same dialog.

    TriLib was unable to find the native plugins.

    If you just imported the package, you will have to restart Unity editor.

    If you click "Ask to save changes and restart", you will be prompted to save your changes (if there is any) then Unity editor will restart.

    Otherwise, you will have to save your changes and restart Unity editor manually.

    [Ask to Save Changes and Restart] [I will do it Manually]
     
    Last edited: Feb 27, 2018
  47. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    You can press "No" on this dialog, then please check if "TriLib/TriLib/Plugins/x86/libassimp.so" and "TriLib/TriLib/Plugins/x86_64/libassimp.so" are enabled to be deployed on Linux.
     
  48. fatblueduck

    fatblueduck

    Joined:
    Feb 27, 2018
    Posts:
    5
    Selecting either file in the editor shows a "Platform Settings" pane at the right,

    TriLib/TriLib/Plugins/x86/libassimp.so


    * [x] Linux, x86
    * [ ] Linux, x86_64

    TriLib/TriLib/Plugins/x86_64/libassimp.so

    * [ ] Linux, x86
    * [x] Linux, x86_64
     
  49. rickomax

    rickomax

    Joined:
    Jun 11, 2013
    Posts:
    683
    Ok. that's the way it should be.
    Please, just click "No" when the dialog appears and tell me if it works.
     
  50. fatblueduck

    fatblueduck

    Joined:
    Feb 27, 2018
    Posts:
    5
    @rickomax

    I tried to load a known fbx file in the source of my project using the official example, but an error occurred with this message in the unity console

    Unable to load mymodel.fbx. The loader returned: System.Exception: Error parsing file: Assets/Sample/Samba Dancing.fbx ---> System.DllNotFoundException: libassimp

    From within the editor, the menu item "TriLib > Configure Avatar Loader Sample" is grayed out and disabled

    this link to another thread may be related
     
    Last edited: Mar 1, 2018