Skip to content

Generating Object files for AFrame from Unity

tiusty edited this page Feb 14, 2023 · 1 revision

Softwares used:
Unity: https://unity.com/download
Blender: https://www.blender.org/thanks/

Started with creating a template project: Sample -> 3D Sample Scene
Screenshot 2023-01-22 143620

Export unity asset to FBX file

Setting up install

To export Unity Assets to FBX file, make sure to install the FBX Exporter First Windows -> Package Manager. Click Packages: Unity Registery and then search FBX:
https://www.youtube.com/watch?v=-voE4FrU0Ms

Screenshot 2023-01-22 150221

Exporting an object

Right click on the asset and click FBX export

image

Make sure to select binary export format since Blender will fail to import ASCII FBX format
image

Importing FBX to Blender

File -> import -> import fbx
image

Select the FBX file and click import
image

8ee2cd8f5fd1.png">

Exporting as glb or gltf

Click exprot glb image

Adding assets from the Unity Store

Go to the unity store website

https://assetstore.unity.com/

Search for the desired object such as couch

image Note: I clicked the free checkmark since free is nice for proof of concept

Then you click on what you want and then click on the add to my asset button

image

Open Unity click Window -> Package Manager

image

Click My Assets and look for the asset that you added above:

Note: I added Low Poly Simple Furniture FREE instead of the one shown above

Click Download and then Import to project

Note: I already downloaded it so it says re-Download, but it should be in the same spot image

Add the assets to the project

The assets should show up in the bottom in the Project Menu. In my case, I downloaded the Low Poly Furniture which is available as one of the directories image

Add the assets to the scren

You can now open up the directories and look for the prebuilt models, you can then drag them into the scene as shown in the image image

Exporting the FBX file to OBJ file

Note: Note OBJ Files are no longer used, follow the directions for GLB files above

Click export -> Wavefont obj file
image

Save to the appropriate place and click exportfront obj
image

Attempts to export obj file with color

Click export -> Wavefront obj file Select the colors and triangulated mesh on the side <img width="531" alt="image" src="https://user-images.githubusercontent.com/10234268/215002817-aa162d91-c5d3-44f5-a919-