Alpha blending value problem


(Cordero) #1

Base of the problem is this: planes with a simple absolute black diffuse, and with a brush stroke like alpha show up differently in value in 3dsmax and Sketchfab.

Same two textures in 3dsmax and sketchfab, same background color.
Texture is unlit both in 3dsmax and sketchab, so only diffuse should be visible.
No post process, no filters or anything inside sketchfab, a simple full white backround, a plane, and two textures turned on. ( alpha used as additive set to luminance )
Single sided polygons.

3 images below:
First showing additive with luminance. somehow the brushstroke fades out.
Second I set the alpha to dithered, it now has the correct value, but with the undesirable noise effect of dither-
Third I completely turn off the background, and the card again has the correct value.
The brushstrokes with the navigation arrows are from 3dsmax, and to each side the sketchfab version as explained above.

I suspect I messed up something somewhere :smiley:
please halp


(Stephomi) #2

Thanks for the report, we’ll investigate!

Edit: ok found the culprit.
So basically, it’s about the colorspace blending.
We are performing the blending operation in linear space (and not in srgb space).

3ds max is probably doing it in srgb.
In sketchfab without background we don’t control the compositing anymore, so it’s the canvas/browser that will handle it (and it’s probably doing it in srgb).
Dithering alpha value was kind of eyeballed, so it shouldn’t be used as a reference.

I tested in marmoset viewer and in UE4, and they also perform the blending in linear space.

We consider that linear space blending is the correct way to go (in 3d!), so we are probably going to stick with our current solution, unless it becomes a wider issue though.