Uploading Textures and Models

Importing assets on Polygonjs is very easy. Here is a quick demo on how to import an image and use it as a texture.

Compressing Assets

Depending on the size of your assets, you will also need to ensure they are as small as possible.

Models

Reducing your models can be done with the gltf-pipeline.

Here are the compression settings that I regularly use:

gltf-pipeline -i input.gltf -o output.gltf -d --binary --secure --stats --draco.compressionLevel 10 --draco.quantizePositionBits 14 --draco.quantizeNormalBits 10 --draco.quantizeTexcoordBits 12

And if you need to convert to gltf first, what you will need may depend on the initial format of your model. If it is an .obj file, you may want to use obj2gltf

obj2gltf -i scene_mesh_decimated_textured.obj