Using Unity to Build a 3D Model Viewer

Hello,

I'm just getting started with Unity and I thought it would be neat to build a simple FBX model viewer in Unity. All I really want to do is just load an FBX file at runtime, and be able to perform simple operations on it like rotation, panning, zooming etc.

I assumed this would be simple to do and I'd find a ton of tutorials explaining the same but obsessive googling has only yielded this:


I also found this thread on the Unity forum: http://forum.unity3d.com/threads/a-request-for-a-object-viewer-project.48060/

Unfortunately, both links above are 4-5 years old. Does anyone here know of any recent resources/sample projects/turorials that will give me a head start?

Thanks a lot for the help!

Welcome!

Did you try going through those guides anyway, despite their age? Regardless of any differences between versions, the concepts are still likely solid, and all that would really need done would be to update the code to fit the latest API, which can be handled with Googling on a case-by-case basis. It's rare that there are tutorials to cover exactly what you want to do in the latest piece of software, so you have to be able to adapt and learn from older content as it's available.

Yes, that's what I'm doing currently. Since there isn't a recent tutorial, I'll try to post one myself once I'm done with it.

Thanks for the reply!

You won't find a lot of tutorials because this is not simple to do. Unity's FBX importer serves the editor, not the runtime.

For runtime model loading, the easiest is to use OBJ, with something like ObjReader. (That's what we do for mod support in High Frontier.)

1 Like

It's 2018, and I only found one free 3D model viewer made with Unity. I use Blender, Autodesk FBX, and 3D Converter 5.x to view my models now, but Blender and Autodesk are too slow for frequent model browsing, and 3D Converter lacks basic features like panning the view camera so you can still see the model when you zoom in.
Anyways, I want a 3D model viewer that is quick, and let's me preview models without having to import them into my Unity project, or having to use slow loading or overly complicated 3D software. I haven't found any free 3D viewers on the Asset Store (the two I found were removed for some reason), so it looks like I will have to make my own once I learn more about loading 3D models at runtime in Unity. I am also going to make a 3D model viewer for Android using Unity, if I don't find one someone else made.
Here's a 3D model-viewer made with Unity I found (I haven't tried it yet) for anyone still looking for one:

The ViewerWin project files:
http://www.mediafire.com/file/xp2euprfzbf2adp/Viewer+Project+Files.zip

The ViewerWin built-executable:
http://www.mediafire.com/file/rqwkcpin9uc88ak/ViewerWin.zip

2 Likes

[quote=“Honorsoft”, post:5, topic: 614183]
It’s 2018, and I only found one free 3D model viewer made with Unity. I use Blender, Autodesk FBX, and 3D Converter 5.x to view my models now, but Blender and Autodesk are too slow for frequent model browsing, and 3D Converter lacks basic features like panning the view camera so you can still see the model when you zoom in.
Anyways, I want a 3D model viewer that is quick, and let’s me preview models without having to import them into my Unity project, or having to use slow loading or overly complicated 3D software. I haven’t found any free 3D viewers on the Asset Store (the two I found were removed for some reason), so it looks like I will have to make my own once I learn more about loading 3D models at runtime in Unity. I am also going to make a 3D model viewer for Android using Unity, if I don’t find one someone else made.
[/quote]
Thanks for the links, will see if I can use them. Did you end up doing the 3D viewer you were talking about?


Not yet, I took a break for a while but I have more interest in either making a modding system for Unity which could be used for adding content to a Unity application or game, without using precompiled asset packs. That would include 3D model loader and viewer code, and likely need code to import an FBX and texture it from code.

[quote=“Honorsoft”, post:7, topic: 614183]
Not yet, I took a break for a while but I have more interest in either making a modding system for Unity which could be used for adding content to a Unity application or game, without using precompiled asset packs. That would include 3D model loader and viewer code, and likely need code to import an FBX and texture it from code.
[/quote]

Hi,

I am currently working on my master’s thesis at the hospital and I am developing a VR app for surgical support. Do you have any idea how to make a 3D file loader that would put a chosen object into a prepared scene and would have certain attributes?

Thanks,
David.

1 Like

Any chance you have had any luck? I came across this feed and am trying to do something similar. I want to have a 3D viewer that I can pass a model into at runtime by a file. im coding the app in Flutter and have come across using the flutter unity widget but haven't gotten to the testing point to see if it will work.

Its quite a shame. In my eyes 3d viewers are a really cool project to undertake to learn coding. Its a shame majority of tutorials are a copy paste guide on making a program that can say "Hello world".