Open cx20 opened 3 years ago
This uses the old "glTF Metallic Roughness" group. The docs for how alpha are supposed to be determined are here.
@scurest Thank you for your advice.
I have seen that changing the default Blend Mode
from Opaque
to another value changes the alphaMode
of glTF.
However, the value of AlphaCutoff
0.5
is not output to the glTF file and seems to be 0
. Is this the expected result?
default Blend Mode | modified Blend Mode | glTF alphaMode |
---|---|---|
Opaque | Alpha Blend | BLEND |
Opaque | Alpha Clip | MASK |
Material name | Before | After |
---|---|---|
Location Transparent | ||
Polly Display |
Material name | Before | After |
---|---|---|
Location Transparent | ||
Polly Display |
I was just diagnosing the problem, sorry if I was unclear.
The exporter currently always uses "Blend Mode" to set alphaMode and (when using Alpha Clip) "Clip Threshold" to set alphaCutoff. Some parts of the old "glTF Metallic Roughness" group are implemented, like doubledSided, but the alpha stuff is not.
You can use "Clip Threshold" to set the alphaCutoff for the moment.
You can use "Clip Threshold" to set the alphaCutoff for the moment.
Yes. I set the "Clip Threshold" and made sure it is reflected in the glTF "alphaCutoff".
Blender | glTF |
---|---|
I could see that there are compatibility issues with 2.79 and 2.90 so far.
BTW, I think it's another matter, but Polly exported in Blender 2.90 seems to pop its eyeballs.
Sounds like we should update the source .blend
sample file to be compatible with 2.90? At least for the material settings portion of the question.
@donmccurdy Yes, I think it would be nice to have a .blend
file for Blender 2.90.
The Project Polly glTF file in the old repository had a lot of validation errors, so I tried to re-export it with the latest version of Blender 2.90. But that didn't work either and I was having trouble with it.
BTW, the reason for this in the first place was because I wanted to know what was correct, as each viewer had a different result for the Project Polly nameplate display.
While the results of Filament
are apparently the desired result, I feel that Three.js
and Babylon.js
are more correct in terms of glTF output. However, I have not been able to make a decision because I don't know the correct answer.
Not to make things more complicated, but Polly has always abused alpha blending to look like glass, which was never the intention of alpha in glTF. Alpha is supposed to indicate the absence of a material, such as the edge of a leaf in a quad, or medical gauze wrap with lots of holes too small to see.
For glass, we recently ratified a new extension, KHR_materials_transmission
. Among other things, this allows full specular reflections to take place on the clear parts of the glass (which alpha blending does not do). It also allows for frosted glass (via material roughness), and lets path tracers know they can trace reflections in the glass.
Blender support for this is documented in 2.91.
@emackey Thank you for telling me.
I was wondering why the wooden part of the base of the nameplate was transparent, and then I realized it was because glass and wood are made of the same material. Perhaps it is better to separate this part of the material.
(Why the wood isn't transparent in the case of Filament
is a curious but different topic).
And, I thought it would be nice to have a Polly v2 that takes advantage of the new glTF extension.
Describe the bug I have tried loading the Project Polly model in Blender
2.90
and outputting it in glTF format. However, some information seems to be missing. For example, thealphaMode
/alphaCutoff
.To Reproduce Steps to reproduce the behavior:
2.79
)2.90
project_polly.blend
project_polly.gltf
Format : [gltF Separate (.gltf + .bin + textures)] [x] Camerasproject_polly.gltf
.alphaMode
/alphaCutoff
is not output.Expected behavior
The output results are expected to be similar to the glTF file below. https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/polly/project_polly.gltf
Screenshots
.blend file/ .gltf https://github.com/KhronosGroup/glTF-Blender-Exporter/blob/master/polly/project_polly.blend
Version