[x3d-public] PR with new X3D field: Appearance.alphaMode

Don Brutzman brutzman at nps.edu
Thu Jan 28 23:54:06 PST 2021


Thanks for great work.  This is now merged in github specification.

The modified names and explanations are clearer, glad to see match to glTF as well.

Corresponding changes to X3D XML Schema, DOCTYPE, tooltips, Java and Python implementations are checked in and deploying tonight.

On 1/28/2021 2:51 PM, Michalis Kamburelis wrote:
> 
> Hi,
> 
> As promised, I added a new X3D field that corresponds to glTF
> alphaMode. The new field is called "alphaMode" in Appearance node,
> with similar naming and meaning as in glTF (and with added "AUTO"
> option to make the default behavior backward-compatible with X3D 3).
> 
> For now it is a PR on GitHub (
> https://github.com/Web3DConsortium/X3D/pull/11 ), which can be merged
> (tomorrow? if no objections).
> 
> The resulting spec is rather simple, attaching a screenshot so that
> everyone can see it :)
> 
> The testcase is on
> https://github.com/michaliskambi/x3d-tests/tree/master/alpha_mode with
> reference screenshot on
> https://raw.githubusercontent.com/michaliskambi/x3d-tests/master/alpha_mode/alpha_mode_correct.png
> . View3dscene (latest snapshot from
> https://castle-engine.io/view3dscene.php ) already supports this field
> so you can use it to experiment (well, give Jenkins a few hours to
> build it, since this mail).
> 
> Don (Brutzman): I used your placeholder in Appearance node spec,
> thanks. You placed it under CSS class="approved", I assumed this was
> correct and didn't change that CSS class.

yes that is correct.

> I'll hop on tomorrow on Web3d call to synchronize (note that I will
> have to run after 30 minutes to another meeting, hopefully we can take
> care of this first.)

Sounds good - now 9 pacific.  You can call me directly if you were thinking it is earlier.

> It's all rather straightforward, I predict only one hard question: why
> did I add it to Appearance, not inside material
> (X3DOneSidedMaterialNode) to which my answer is
> 
> """
> Because it is something "on top" of Appearance.material,
> Appearance.texture, Appearance.shaders. In particular if you use
> custom shaders, then you still can use this field to determine whether
> blending is done. When you provide shader in Appearance.shaders, you
> may leave Appearance.material empty (because material is ignored when
> your custom shader is in effect), but Appearance.alphaMode still
> matters.
> 
> In general, in X3D the "Appearance" node is corresponding to glTF
> material. The X3D "XxxMaterial" nodes are something smaller than glTF
> material concept.
> """

Makes good sense.

Questions please:

a. Wondering if this applies to all of the various texture nodes used in physically based materials?  Any issues in that direction?

b. Shouldn't we add the alphaCutoff field?  Seems like an important parameter for image analysis.

	SFInt32 [in out] alphaCutoff 0.5   [0,1]

alphaCutoff is glTF name, "Alpha Clip (clip threshold)" is terminology used by Blender.

> References:
> 
> - corresponding glTF alphaMode spec:
> https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#alpha-coverage
> 
> - relevant extension in CGE:
> https://castle-engine.io/x3d_implementation_shape_extensions.php#section_ext_alpha_channel
> (note that in CGE we support both alphaMode and (for backward compat)
> alphaChannel names)
> 
> - if you use Blender, note that you can set "Blend Mode" that
> determines this glTF parameter (when you export Blender->glTF) in a
> straightforward fashion:
> https://docs.blender.org/manual/en/latest/addons/import_export/scene_gltf2.html#blend-modes
> 
> Regards,
> Michalis

getting very close.  really tremendous, thanks Michalis!

all the best, Don
-- 
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman



More information about the x3d-public mailing list