How to match your materials on Sketchfab

Back to overview

This announcement is out of date, and some information is deprecated. You can find up-to-date information on the Material Editor in our Help Center: https://help.sketchfab.com/hc/en-us/articles/202512446-Material-Editor


The wavefront format (.obj and .mtl) is one of is one of the most straightforward format for Sketchfab. But matching the materials and get the expected results is not always obvious.

image

Materials

Materials in a material wavefront file are directly related to a Sketchfab material.

newmtl material_0

Channels

A material contains one or more parameters. Some of them are supported by Sketchfab and can be directly bound from the wavefront format to Sketchfab’s material editor. Most of them accept either a color or a texture (prefixed withmap_).

Colors are Red-Green-Blue float values inside the range [0-1].
Accepted texture file formats are jpg, tiff, dds and png (for alpha transparency).

Diffuse

Kd 1 0 0
map_Kd diffuse.jpg

The diffuse color as in phong illumination model is the color of a lit object.

Specular Color

Ks 0 1 0
map_Ks specular.jpg

Color of the lighting highlights.

Shininess

Ns 42
map_Ns shininess.jpg

Specular shininess : the lower, the shinier. Texture should be greyscale levels of shininess.

Bump / Normal Map

map_bump bump.jpg
map_normal normal.png

Simulates lighting and make bump details on the surface of an object without actually modifying its shape. Accepts only textures used as bump (greyscale heightmap) or normal map (bluish texture).

Opacity

d 1
map_d transp.png

Makes an object transparent. Overlapping transparent surfaces should be split into different objects for better results. More details about this here.

Emission

Ka 0 0 0
map_Ka ambient.jpg

Colorizes and textures an object disregarding lights.

Notes

Currently objects sharing the same material are merged into one object.
Also duplicate materials (which have the same values) are merged into one material. This behaviour could cause difficulties making separate objects, and will be reworked soon.

For more info and demos on how to use our material editor, you can check this blog post.

About the author

Sketchfab Team


Leave a Reply

Your email address will not be published. Required fields are marked *

Related articles