Textures not uploading well in accordance with mtl files in Stop motion

3d
upload

(Fluxplanet Com) #1

I’ve been working to upload stop motion on Sketchfab these days.

I have obj sequence (Facial Expression)with mtl, and textures (Diffuse map, Normal map, SSS map, Glossiness map)

Our each obj file has two materials called face, and eye. And only face material are needed to use maps I have. (Eyes are just used for transparency and glossy)

After I import zip files( which includes all objs,mtls,textures and sketchfab.timeframe) and check the materials in 3d settings, it just shows material like Face#_0, Face#_1 … and so on and doesn’t upload maps correctly.

I’ve tried to change the name of materials and name of textures as it’s mentioned here(https://help.sketchfab.com/hc/en-us/articles/202600873-Materials-and-Textures) but it still doesn’t work.

Sometimes I use more than 20 frames and set all the textures for this manually is really time-consuming …

How can I upload stop motion files correctly?


(Nomadking) #2

MTL files and Sketchfab can be a bit of a tricky beast - I’ve experienced many of the same problems you’ve encountered, but I have come across some workarounds that I can share. It’s not entirely Sketchfabs fault, as OBJ / MTL have a pretty wide set of definitions!

When it comes to texture assignments, I make / edit my own MTL file that I know will work with Sketchfab rather than relying on one exported from any 3D package. For texture assignments I follow the Wavefront definitions for MTL found here on Wikipedia.

An example from my last uploaded animation:

newmtl Lab
Ka 0.6 0.6 0.6
Kd 0.6 0.6 0.6
Ks 0.9 0.9 0.9
d 1.0
Ns 0.0
illum 2
map_Kd Textures/FLab.jpg

Some of the number values are probably irrelevant, but I haven’t had chance to dig down to what the least amount of data I can use and still get textures assignments to work, so I keep them in for now. This material just used a Diffuse texture.

I also make sure to keep my folder structure fairly strict with all of my OBJ files in the parent directory, all assigned to use the same MTL file, and all my textures in a Subdirectory. I then use relative pathing in the MTL file. This is the structure of the ZIP file from my last animation upload:

As for the naming… yeah, I haven’t figured that one out yet. In my last upload everything was grouped correctly for each material but all the names where ‘Rain_1’ etc. I’ve tried material names, mesh names, even some of the subnamed parts of the OBJ files themselves. Nothing seems to work 100%.

A minor annoyance more than anything since the material grouping works, but it would be nice if there was a way to fix it - if anything just for inspector readability.

Hopefully some of this was helpful :slight_smile:


(Fluxplanet Com) #3

Ok , Finally I’ve figured out some. The problem which causes not uploading specular maps automatically is just the name of texture files.

image

I changed the name of maps like that, and now it works.
(I didn’t need to change the name like Face_0_Diffuse,Face_1_Diffuse … although I thought I should’ve done because the materials are created like Face_0,Face_1,Face_2… when I upload the obj sequence )

Thanks for your help and explanation!


(Nomadking) #4

Glad you figured it out :ok_hand:


#5

This isn’t specific to OBJ, we use material/texture naming conventions to match textures to the correct material slots: https://help.sketchfab.com/hc/en-us/articles/202600873-Materials-and-Textures#textures-auto-pbr

Careful of material names that share substrings! It’s best to use completely unique names.