How to load custom models at runtime?

Hello,
I’m creating a game where the player will be able to create some models (maybe in fbx format) and load them in the game (example: a custom car, a new robot, etc…). Something like a modding feature.
Is it possible? How can I do it? Please consider I do not want to distribute via web, but only with locally installed.

Thank you for your help!

Most of the examples and suggestions apply to resources loaded from web servers, but the WWW class can also use file URLs.

Thank you!
If I load a FBX model, how can I create it (since it is not an asset, but some data coming from a file)?

Thank you!

If you want to use .obj instead of .fbx, you could license my .obj importer and save quite a few hours of development time…

–Eric

im interested to know more about your obj importer, can you tell us more about it?? 8)

Yes, I would not mind hearing about this aswell.

You can see a demo here. If you have .obj files saved on the web somewhere, you can try loading them in by typing the URL in the appropriate box and clicking the load button. (There are a couple other demo .obj files at the default address, namely “cube.obj” and “sphere.obj”, so you can also try those if you don’t have any others handy.)

If the scale of the .obj files is very large/small, or they are too far off the origin, you might not be able to see them in the demo. Also the .obj specification is a little vague, so it’s possible some files might not work correctly, although the routine was tested with quite a few files output from a number of different sources, so it should handle most files. Certain .obj features, such as polygons made from five vertices or more, aren’t supported, but that sort of thing isn’t common, especially for game models. Both tris and quads are supported of course.

There’s support for multiple objects per .obj file, which you can either treat separately or have auto-combined, plus a few other bits and bobs. It’s USD$50 for an unlimited license; i.e., use in as many projects you like and do what you want with the code, as long as you don’t resell it. PM me if you are interested.

–Eric

Is it possible to load characters with IK and motion through this importer?

Hi, nice OBJ-importer!

But what if i want ( or have to ) to load DAE, 3DS or FBX instead ?

This video shows REALIS3D - a tool for architects and engineers. We can import an FBX at runtime. We are announcing this technology tomorrow…

This shows a model that has been imported and is then being edited. We have no plans to release the importer yet but definitely this year. However it is possible.

Thanks! I answer also in my own thread :wink: but i’m interested in the importer only - need no textures, bump etc ( maybe some different diffuse colours but nothing fancy )

Look up “FBX File Format” in Google and it will start you down the road to being able to read it in as binary data. I did many importers for many different files into 3ds Max, its not that hard. :wink: