Skip to main content



3D Photos on Facebook and Substance Painter

Today I went tinkering with Substance Painter and the new 3D photos on Facebook. Turns out the feature is viewable, but not uploadable yet in France.
However, if you "like" the official Facebook 360 page, and restart your phone Facebook app, that feature will be enabled, as a "beta" before it becomes official.

I got it working, and it was quite fun! Here is my original Facebook post, using a sample scene provided with Substance Painter.

1. I had to write an openGL shader extension to output depth in a usable range. The code is pretty trivial, I am rerouting a function of gl_FragColor.z to
Here is my code snippet:

// change distance curve to something visually readable
float dist = pow(gl_FragCoord.z, 256.0); // add contrast dist = dist * 2.0 - 0.5; // feed to the emission component of the pbr shader outputs_.emissiveColor = vec3(dist);

2. Save screenshots with the color and the depth. There is no tool for that AFAICT, so I simply used my OS s…

Latest Posts

It’s a small (CG) world after all

Baking and procedural patterns

Lyon heat, Labs, Siggraph and California

FMX 2018

Living Lyon

Joining Allegorithmic

Nouvelles Aventures

Portable Material Descriptions

Material Layering

Kicking it underwater

Shading at Siggraph 2017