[x3d-public] combine light scoping with rotation transform

Andreas Plesch andreasplesch at gmail.com
Fri Jul 24 08:41:22 PDT 2015


X3D experts,

I got stuck on a what must be a basic issue with light scoping.

http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Scopingoflights

 I want to use scoping for a directional light, eg. with a global field set
to 'false'

<Group>
  <DirectionalLight global='false' ... />
  <Shape DEF='illuminated_by_directional_light>
    ...
  </Shape>
</Group>

<Group DEF='not_illuminated_by_directional_light'>
   ..
</Group>

Would this be the correct hierarchy to use ?

Now I also want to enclose the directional light in a transform, in order
to control it by a routed rotation from a OrientationSensor. At the same
time, I do not want to rotate the illuminated shape.

<Group>
  <Transform DEF='light_Trafo'>
    <DirectionalLight global='false' ... />
  </Transform>
  <Shape DEF='illuminated_by_directional_light>
    ...
  </Shape>
</Group>
<Group DEF='not_illuminated_by_directional_light'>

However, now the Shape is outside the scope of the light, and not affected
by it.

This is where I am stuck. What would be the correct hierarchy to use for
this case ?

This is rather theoretical for me because I believe the global field is not
supported by x3dom at this point:

https://github.com/x3dom/x3dom/issues/83

-Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150724/3ab9f28b/attachment.html>


More information about the x3d-public mailing list