Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

FBX Mesh Importer At Runtime

Discussion in 'Works In Progress - Archive' started by carlossarria00, Feb 26, 2014.

?

Why do you need an fbx importer at runtime if you can use unity editor or simply use AssetBundles?

  1. Customize models at runtime

    28.3%
  2. Exchange models on fly

    45.1%
  3. Visualize

    14.4%
  4. It's better than have to recompile the project

    11.4%
  5. I don't need it

    0.8%
Thread Status:
Not open for further replies.
  1. LeeBold

    LeeBold

    Joined:
    Mar 4, 2016
    Posts:
    3
    Hi

    Some FBX files like ours do not use UVIndices, but just the UV coordinates,, the way to check that is in Your code is with LayerElementUV bellow a property called ReferenceInformationType: "IndexToDirect"
    i believe.

    LayerElementUV: 0 {
    Version: 101
    Name: "UVW"
    MappingInformationType: "ByPolygonVertex"
    ReferenceInformationType: "IndexToDirect"
    UV: *768 {

    How do we send large files to You Carlos?
     
  2. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
     
  3. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hello Unity Community

    Upgrading to Unity 5 and two aditional options

    Ojects per frame: how many objects will be created before a frame (16.667 at 60fp) occurs. In Main Thread we can load files without "pausing" the game but it takes longer

    Maximum Threads: the number of async process that the machine can run at the same time. It depends on the proessor cores.

    Some errors with FBX SDK 2010 (as Blender exports) have been corrected

    UniFBXImporter_Thread_Options.jpg
     
  4. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Great news, looking forward to the patch.

    Marko
     
  5. RegisB

    RegisB

    Joined:
    May 14, 2013
    Posts:
    41
    Hi,
    Could you confirm if it is possible or not to load a skeleton animation at runtime ?
    My objective being to load/change/add an animation on some already compiled skinnedMesh.
    Thank you.
     
  6. alphakanal

    alphakanal

    Joined:
    Jan 21, 2013
    Posts:
    52
    Hi,
    very interesting asset. Just tried the Demo and tested some own FBX but the loading times are horrible. The FBX-Filesize is about 20MB because of the ASCII format and loading times up to 10 Minutes.
    Is there a newer faster Version ??
     
  7. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi RBV.

    No, skinnedmesh renderer is not supported yet. Bones are imported as null objects ort empty game objects wih theirs respective TRS animations if apply.
     
  8. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi people (Upgrading to Unity 5)

    Now, we can import fbx models with an standard material depending on material channels (texture maps):
    Normalmap
    Heightmap
    Occlusionmap (AO)
    Detailmask

    002_u5_unifbx_mtl_standard.jpg

    003_u5_unifbx_scenes.jpg
     
    Last edited: Mar 16, 2016
    Bartolomeus755 likes this.
  9. Aryan_Behzadi

    Aryan_Behzadi

    Joined:
    Dec 24, 2015
    Posts:
    5
    Hi
    Thanks For Your API This is Work really good and useful
    but i have a problem
    i get export from a 3D model with texture and upload that to URL and also upload textures as your document
    But the API imports my model Without texture . how can i fix that
     
  10. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi Aryan_Behzadi

    Yes, Some models don't have "Layered Textures". That's why you can't see textures. But, fortunately I prepare an upgrade correcting those problems and some other, also models will load faster. Wait for it!!!
     
  11. Aryan_Behzadi

    Aryan_Behzadi

    Joined:
    Dec 24, 2015
    Posts:
    5
    ok thanks
    but another question
    how to create a model with "Layered Texture" Or how to Export a model With Layered Texture to sow the texture in runtime?
     
  12. G33RT

    G33RT

    Joined:
    Dec 27, 2013
    Posts:
    52
    Carlos,

    I have a very simple question: how large can de fbx file be to be usable by this component? Or more specifically: what is the largest fbx file you have successfully imported?

    Geert
     
    carlossarria00 likes this.
  13. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Layered Texture is generated when you use a material for two or more mesh model. But you don't to worry anymore in the upgrade. Or send me a mail for send you partially this correction until entire upgrade be updated
     
  14. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hello Geert

    You must to know people have written me about this saying that a file of 20MB for example take too long. Fortunately, in the upgrade I prepare I've got succesfully reduce the loading time. A file of 20MB for expample, depending of hierarchy and other issues takes about 2 - 6 seconds with textures (no animations yet).
    Remember that unity can load upto 64K vertices, when you try to load in editor (from unity importer), unity split the mesh in two parts but this features is not contemplated by this component. The upgrade I prepare really has several improves.
     
    Bartolomeus755 likes this.
  15. 2Dto3D

    2Dto3D

    Joined:
    Apr 7, 2016
    Posts:
    1
    Was looking to purchase this, but need it for Unity 5. Any approximate timeline on when the upgrade will be released? Thanks!
     
  16. Nicolas_id3c

    Nicolas_id3c

    Joined:
    Apr 11, 2016
    Posts:
    2
    Hi Carlos,
    I am interested on your plugin, but before buying it, I wanted to test it.
    I downloaded the demo and tested it, and unfortunately, the demo can't load my fbx file, even after I put it in "UniFBX - Demos/Windows/Resources/", because I get the error : "FBX SDK binary format is not supported".
    Can we have a free demo version with basics functionalities in a unitypackage, only to test the mesh generation when we import a FBX ?

    Can we use your plugin in a script editor ?

    Do you have a mail where we can join you ?
     
  17. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi Nicolas

    NO, the UniFBX asset doesn't support binary format. You can try ir exporting your models in ASCCI format.
     
  18. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Last edited: Apr 12, 2016
    Bartolomeus755 likes this.
  19. Nicolas_id3c

    Nicolas_id3c

    Joined:
    Apr 11, 2016
    Posts:
    2
    Hi Carlos,

    Thank you for your answer.
    Unfortunately, I can't change the format of my fbx models because I get them from online fbx stores or external people. Moreover, the final user needs an easy solution to import any fbx models without any knowledge about graphics work, so I can't ask him to only take FBX in ASCII format.
     
  20. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hello People:

    Here I leave a little Demo about UniFBX updated for unity 5. Try it as usual (if you have tested the previous ones) and let me know your experiences.

    Remember:
    • Only ASCCII format is accepted for this release
    • Triangulated or quad meshes are supported (not NGons or irregular meshes)
    • Texture files with format jpg, png (for transparent if apply).
    In the Demo you can set the import entries so you can previsualize the results at runtime. At the same time the file comes with some fbx files as examples in the "models" folder (models/tex/ for texture files)

    UniFBX-Demo (Unity 5).jpg

    Demo
    UniFBX-Standalone-Win (Updated for Unity 5)
    PD:
    The main scene contains a fly camera. So you can move around the scene like in the unity editor.
     
    Last edited: Apr 28, 2016
  21. Naphier

    Naphier

    Joined:
    Aug 4, 2014
    Posts:
    114
    I'm working on an interactive web app that I plan to make available to 3D artists to display some interactivity of their models. This is basically planned to just explode the models with physics and an explosion effect as well as have the ability to click on parts to show the model in a exploded perspective view. At the moment there's no good way to load models on the fly so I need to modify this app for every client. Your solution would help me tremendously as I could offer a basic package and only need to do installation.
    So, best wishes and I can't wait to see this working!
     
    carlossarria00 likes this.
  22. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Thanks for your comment Naphier. Here some of asset can do.

     
  23. longroads

    longroads

    Joined:
    Dec 19, 2014
    Posts:
    2
    Hi Carlos,

    I have set up a web server and put the forest.fbx,folder tex and Material (which are in yoru tutorial) to the server. It works fine in unity editor, but we I try to build it to webgl and windows, it always give me a purple full screen after loading, but the loading status is "Success". When I tried it in your windows demo "UniFBX-Standalone-Win (Updated for Unity 5)", It works fine again. Is there anything I need to do when build it to webgl and windows platform?

    Another question is that when a fbx which already contains textures and materials, can unifbx import it directly? We don't need to give the textures and models folder. Just like when putting a fbx file to unity editor, the material and texture folder can generate by unity editor itself.

    The images shows as:
    in editor:
    success_in_editor.jpg
    in your demo:
    success_in_demo.jpg
    in windows build:
    failed_in_window_build.jpg
    in webgl:
    failed_in_webgl_build.jpg

    Best Regards!!
     
  24. HakJak

    HakJak

    Joined:
    Dec 2, 2014
    Posts:
    192
    Realtime FBX import may be useful for users to be able to import their own creations into an in-game level editor.
     
    carlossarria00 likes this.
  25. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108

    Hi @longroads

    When you build a project take always in account to include shaders that are going to be used in "Graphics Settings" as shown above

    GraphicsSettings.png

    For more information clic here

    Yes, UniFBX can import materials and textures directly. But you must to copy all textures from models in a path ../models/tex/
     
  26. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi People:

    UniFBX (2) Release 2
    Here

    unifbx_2.png
     
  27. Aryan_Behzadi

    Aryan_Behzadi

    Joined:
    Dec 24, 2015
    Posts:
    5
    Hi
    One time I Purchased the first version of that
    and i have problems with the Textures (layer texture if you remember)
    in my app we have the online users and also i want to know its possible to users upload their model with the textures (With the standards you supported) and i\ll be import them into the program with texture and animations with out problems ??
     
  28. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi @Aryan_Behzadi

    Yes, you can but I'd like you update the "lib" folder for the attached one here, there is a a correction for layered textures
     

    Attached Files:

    • Lib.zip
      File size:
      408.1 KB
      Views:
      504
  29. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi People:

    Link: UniFBX (2)



    1.
    This library works with 2D/3D models imported from FBX SDK 2012, 2013, 2014, 2015, 2016.

    2. ASCII importation from 3D Editors like Maya, 3DMax, Cinema4D.

    3. Setting folder or URL containing FBX files

    4. Setting folder or URL containing JPG and/or PNG format for textures

    5. Main thread or async load mode implemented

    6. Meshes importation with global scaling, normals, tangents and collider type, selectables

    7. Materials and textures importation

    8. Standard or Legacy Material

    9. Lights, cameras and TRS animation importation

    10. Web player (Depreciated), Standalone (Linux, Win and Mac), Android, iOS, WebGL supported. Unity Personal and Pro editions

    11. Faster than previous UniFBX 1.0

    12. Complete C# source code. No DLLs
     
    Last edited: May 6, 2016
  30. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,963
    You state on the asset store that pro is required for asset bundles, is that really true? Isn't that included in personal edition?
     
  31. longroads

    longroads

    Joined:
    Dec 19, 2014
    Posts:
    2

    It works after loading shaders. Thanks!

    And I noticed that unifbx 2 was released just three days after I have bought unifbx 1. I don't know why not upgrad but can I use the new version? Seems the new version is faster than previous one. :) Please send the new version to longroads@163.com if possible.
    Thanks again!
     
    carlossarria00 likes this.
  32. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Alright!
     
  33. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi Virror

    As far as I know Pro Edition is required for Unity 4 and Unity 5. You can create asset bundles with a simple scripts but always Unity Editor is needed.
     
  34. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Carlos, I've purchased version 1 of UniFBX. I would also buy the new version of your Asset. But I need to load DDS textures for my models. It is possible to add this feature to UniFBX?

    Marko
     
  35. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi Bartolomeus755

    Yes, I'm about to update UniFBX (2) with those two features:

    1. Load Embedded Textures: it is not necesary to save jpg and/or png files in a folder (normally in ../../models/tex/) required for some users

    2. DDS files are DXT1 and DXT5 formats for unity.

    As I have to submit the package to asset store as a draft to update we can load after. It takes from 5 to 10 days (Unity time).
     
    Bartolomeus755 likes this.
  36. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Great news, will there be a new demo with the new features? I would like to test it the one of my models.
     
  37. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Last edited: Jun 1, 2016
  38. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Carlos, I tried the to import one of my Sub models with the Windows Demo. And I run into some trouble. Here is the result after the import.



    I can import the model without any issues in Unity and with the aiImporter for Unity. But I would prefer your UniFBX for importing FBX files to Unity.

    Marko
     
  39. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
     
    Bartolomeus755 likes this.
  40. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi people:

    unifbx_2.JPG

    Here is two additional features for UniFBX (2) (not available yet as update)

    1. Embedded Textures loading: it is not necesary to save jpg and/or png files in a folder (normally in ../../models/tex/) required for some users

    2. DDS format files loading: they are DXT1 and DXT5 formats for unity.

    Demo (Win): UniFBX (2) - (Win)

    Demo (Mac): UniFBX (2) - (Mac)
     
    Last edited: Jun 1, 2016
    Bartolomeus755 likes this.
  41. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Carlos, I tried the new demo, but I still have the problem mentioned above. :(
     
  42. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi Bartolomeus755

    Try to export the .dds suitable for your models. Try to do it with jpg format or png format textures to know if the application bugs
     
  43. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Carlos, I changed the textures to png. Now, the textures are loaded. Only the position of the model is still bugged.

     
    carlossarria00 likes this.
  44. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Bartolomeus755

    Remember that a good model should have its pivot in the geometrical center of the mesh or at least inside its geometrical boundary. If you are using 3D Max for example center the pivot of each mesh. Remember too put the normals looking outside.
     
  45. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    The pivots and other settings of the model are all correct. I tried to import with two other importer and it works fine also with Unity itself. I use this model also for other projects without export issues.
     
  46. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Is it possible that you send your file with dds embedded or not textures?
     
  47. Bartolomeus755

    Bartolomeus755

    Joined:
    Jun 20, 2013
    Posts:
    283
    Hi Carlos, can you send me your mail. Then I can send you the download link for the sub model.
     
  48. kityanlam3

    kityanlam3

    Joined:
    Feb 2, 2016
    Posts:
    41
    Hi Carlos, I'm interested in purchasing your importer but I have a few questions I want to confirm. Does it work for Unity 5 webplayer games and which UniFBX do I get, I see that there are 2 of them on the assetstore. Lastly, do I need pro version of Unity or will personal work?
     
  49. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    csarria00@gmail.com
     
  50. carlossarria00

    carlossarria00

    Joined:
    Feb 25, 2014
    Posts:
    108
    Hi kityanlam3

    UniFBX (2) is faster than UniFBX. It works for Personal and Pro editions and for WebGL and WebPlayer platforms BUT you should know that webplayer is goint to be deprecated for new releases of unity.
     
Thread Status:
Not open for further replies.