[x3d-public] lights in switch nodes

Michalis Kamburelis michalis.kambi at gmail.com
Mon May 14 01:27:55 PDT 2018


. 2018-05-14 7:54 GMT+02:00 Don Brutzman <brutzman at nps.edu>:
> I've added the following warning to X3D Tooltips.
>
> "Warning: DirectionalLight default global=false to limit scope and avoid
> inadvertently illuminating every object in a large scene. PointLight and
> SpotLight default global=true since they are each scoped by maximum radius
> value."
>

Small note: I would avoid using the word "scope" in 2nd sentence
above, as the specification (
http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Scopingoflights
) kind of "reserves" this word to describe lights with global = FALSE.

So I would write

"""
Warning: DirectionalLight default global=false to limit scope and avoid
inadvertently illuminating every object in a large scene. PointLight and
SpotLight default global=true since they are each limited by maximum radius
value.
"""

(I just changed "scoped"->"limited" in 2nd sentence.)

> p.s. who is posting the Blender bug and testing correct implementation of
> their exporter?  This might even fix a mystery bug on their end that
> DirectionalLight was ineffective.  Past experience has shown that the
> Blender developers are very responsive.

Exporting DirectionalLight with global=TRUE from Blender *will* fix
this bug definitely :) I would be grateful for anyone who has time to
submit this to Blender.

You can in general submit any Castle Game Engine improvements to
Blender exporter. They are not specific to Castle Game Engine, and
include e.g. the ability to export CommonSurfaceShader with various
additional textures. See
https://castle-engine.io/creating_data_blender.php ,
https://github.com/castle-engine/castle-engine/wiki/Blender .

> Hi Michalis.  Am looking for the specification section that governs such behavior but not finding it... please advise.
>
> Partial:
> ==============================
> 4.3.5 Transformation hierarchy
> "Some nodes, such as Switch or LOD, contain a list of children, of which at most one is traversed during rendering."
> ==============================
> This seems implicit, possibly vague/incomplete.  Hopefully some stronger statement can be found, otherwise maybe we should add one.

Hm, indeed, I also cannot find an explicit sentence in the
specification that says something like

"""
Light nodes that are not traversed, do not shine (do not contribute to
any shape's color).
"""

I thought it is natural (following a general rule that "things that
are not traversed are invisible"). Also, the place of the light node
inside transformation hierarchy obviously matters (light
location/direction is affected by Transform nodes, specification makes
this clear), so it seemed natural to me that it matters if the light
is inside an active or inactive Switch/LOD child.

Regards,
Michalis



More information about the x3d-public mailing list