hi all,
i would like to know if it’s possible to load an .fbx or .mb file to unity webplayer. The goal is to connect the file (somehow) to the webplayer and upload it.
In fact it works in the editor before building the project.
hi all,
i would like to know if it’s possible to load an .fbx or .mb file to unity webplayer. The goal is to connect the file (somehow) to the webplayer and upload it.
In fact it works in the editor before building the project.
you have to implement it yourself, you can load models at runtime.
Resources only exist at build time, if present in the Assets/Resources folder basically, anything after that has to be WWW loaded, in case of models with www.bytes likely and then parsing it out
how can i convert it after that to a GameObject?
I mean, how can i decode that bytes?
You can not convert it.
You have to read the data, interpret it, regenerate the mesh from it etc etc, all yourself.
it´s the only way out?
Beside building something basing on Asset Bundles which requires Unity Pro, yes its the only way
do you know any documentation to learn the meaning of those bytes?
It looks difficult to understand…
.obj and .dae are simplier to parse because they are text, obj its in a own structure but collada daes are in xml which is very easy to work with you just need to inspect the files to know their meaning and then interpret then at runtime in unity, however you need to have a very good understanding about how 3d meshes are constructed to be able to succesfully achieve this, its not an easy thing but its completely doable
It is partially difficult. FBX is no open standard as such you are a bit out of luck, same goes for mb / ma.
For Obj there is a loader already on the store, otherwise I agree with CoatlGames, go with Collada, its an open standard and you can use www.text directly as its a text format
After working with Collada for some time I would actually suggest DirectX .x format instead. It’ll save you headaches when it comes to assigning normals and texture coordinates and is plain text. Blender has a good .x exporter.
directx x format is not an option for half the models as it can’t transport multi texture setups, only multi material ones. Thats a major pain and limitation.
but yeah x format is trivial to write a loader or writer
Hm, that’s an interesting observation that I hadn’t run across. I’ll have to check into that further.
What Collada really needs is an exporter with more options in it. Most of the exporters I’ve come across won’t do per-face vertex exporting. What you end up having to do is some tricky logic for duplicating existing vertices and with more complex meshes the whole thing just slows to a crawl.
Another path I went down for a time was writing a Blender export script in Python. It’s super easy since the API is very robust but the lack of good documentation is incredibly frustrating.