Contents
alternate_email

  ondemand_video   animation
Reviewed: 2021-05-09

Buy and import assets from the Unity Store

Import process is similar for importing any asset

Most meshes as stored as .fbx format (Maya/Autodesk) or .glb/.gtlf - but you will also find some .obj (wavefront) and a few other formats. Try to purchase assets created and/or updated in the last year or two - they tend to have lower poly counts and perform much better in general.
Unity Import Step 1

Download and import assets using Unity

Unity Import Step 2

Once Imported textures and meshes can be inspected

Unity Import Step 3
Unity Import Step 4 Right clicking an element allows you to "Show in Explorer"
To convert meshes to babylon format - we'll use Blender and the Blender plugin for Babylon - Babylonjs Blender Plugin - make sure to check the box after importing to enable the plugin.
If the textures are not already baked, consider using Ian Dean's Mesh Baker plugin for Unity - costs about 30 bucks

In Blender you can delete objects by clicking on them and pressing the [del] key.

Import Mesh into Blender
Clean the hierarchy down to only the mesh you want to export - the export tool exports a scene of which the first mesh in the scene is loaded into babylonjs
Blender Hierarchy
Remove materials from mesh to export successfully
Remove materials in Blender
Export Mesh to Babylon Import the mesh into scene builder to adjust the scale - sometimes things are very small (when in meters) or very large when in mm or inches.
Import Mesh into webGL
Import the material
First we need to convert the images to either png (if transparency is needed, or is small anyways) or jpg for large images where we need lossy compression to save space.
GIMP is recommended but use your favorite editor. In the picture below when you see a 4 color channel called alpha, it's probably best to export to png if it's the base texture - transparency only applies to the base (or albedo texture) - otherwise jpg is almost always better - these texture files tend to be very large and reducing their size is critical to fast download performance. If a file is small save it as a png so there is no loss - but anything over 100kb will be greatly reduced (usually) in jpg vs png.
Image Export GIMP
Material Import - texture raw images
Import texture images Final Result in webGL
Result Mesh and Material
Result Files
The diffuse texture is used for spectral also to brighten up the model - as the spectral texture is very very large in these models and the emissive does "good enough" without the huge size.
Result Mesh and Material
The addon wizard can now be used to create the rows
Import Mesh Addon

To get things to work switch around the emissive, spectral, ambient and diffuse textures - at times you'll get a result that is better after conversion - and try to eliminate large files that are for spectral or emissive only and use the diffuse or the smaller of the s/e for both. Keeping the size small is very important in imported assets, and they usually contain 5 or 6 texture files at time - which can all be used but keep each item 2-5mb max size - think of 10 objects at 2M or 5M = 20-50mb. That's a chunky download. 10mb is a strong target for a quick experience, 30 mb for a longer experience. Above this and they need wifi and a bigger screen to really see things.

Usually assets in one package are very similar, once you decide which images and textures to use, formats, scaling and front direction - it's the same for all the assets in the package.

Internal: Map to meshes autofill

To get a list of items, split the mesh files (.babylon, .glb or .gltf) into one directory, and the texture files into a different directory.
Then use cmd.exe (not powershell) and run dir -b > meshlist.txt
Use cmd to export mesh list
Upload meshes to /meshes (to use sb:) - also use a subdirectory per package, such as divebar
Upload textures to /textures (to use sb:) - ditto ~ subdirectory
Use cmd to export mesh list

Add meshes to suggestion list in spreadhseet and export the json list to copy into source control.

Add to suggestion spreadsheet

When importing assets try to find a decently quick and simple way to do each one, and be prepared to repeat the process to fix small details like locating the object at 0,0,0 or removing a glass material that doesn't convert well, etc