- Home /
Load 3D models without AssetBundles?
I am building an app in a way that the based on user's location it will download a particular model(.blend file) from internet and show it. The models won't be build by me, but the user. How do I load a 3D model on the fly without building an AssetBundle?
Thanks in advance.
There are FBX and OBJ importers, check the forums and asset store. *.blend files I assume are specific to Blender3D so I don't think it'll be possible to load those directly into Unity.
Thanks @Cherno. Yes, they are there, but the requirement specifically needs .blend files, because the user already has them all. Also for the .blend files contain all the parts of the design individually, which Unity can import natively. This will be really helpful
Answer by Bunny83 · Jan 26, 2017 at 02:42 PM
No, Unity can't import blend files natively. Read this page carefully.
To quote the page:
Unity can read .FBX, .dae (Collada), .3DS, .dxf and .obj files.
A bit further down:
Unity can also import, through conversion: Max, Maya, Blender, Cinema4D, Modo, Lightwave & Cheetah3D files, e.g. .MAX, .MB, .MA et
Note the through conversion part.
Also note that this only applies to the Unity Editor and not the Unity Player (the runtime). Unity doesn't support importing any 3d model asset at runtime. You always need your own loading code if you need that functionality. To import blend files the Unity editor actually uses blender to export it as FBX and imports the FBX file instead. This all happens automatically in the background.
So if you need to import .blend files at runtime you need to find a library / code snippet that does that or write your own importing code.
Be warned that most "custom blender asset importer" aren't custom importers but just AssetPostProcessors which just adjust the already imported object.
If you opt for writing your own importer, have a look at this post. So unfortunately there is no file format specification (hence "blend" is not really a standardised format at all and most applications simply use Blender to convert it or have written their own importer). Keep in mind that blender is open source so you can look it up if you need to. But be warned that Blender is under the GPL, so "copying" or directly deriving / porting something from it's source code would force your project to be released under the GPL as well.
That said, blend files are simply a very bad choice for loading assets at runtime.
ps: Those who complain why this functionality isn't built-in into the Unity engine are usually the same that complain that an empty Unity build is so "huge". They want to have all features possible and want the result to fit onto a 3.5'' floppy disk.
Thanks Bunny83 for the help. I used the word natively in a wrong way. I meant by itself.
Answer by Lesliehdez · Jan 25, 2018 at 05:19 PM
can i converter a .obj (3D model) in a assetbundle and load it to my server?