<div dir="ltr"><div><div><div><br></div>Doug,<br><br></div><div>thank you for input. Manipulating the direction field would work but does require more effort. The approach would not apply to the case of enclosing the light in a GeoLocation node - a Grouping node -  which allows for using a direction of '0 0 1' as north directed, in the correct orientation relative to other geospatially registered geometry. Most of the times you would want the objects illuminated by the directional light to _not_ be affected by the same GeoLocation parent as the light.<br></div></div><div>It just seems like a strange situation where there should be obvious solution but there does not seem to be.<br></div><div><br>Perhaps light scope would need to be defined more flexibly than the global field allows. I could see a "scope" field which defaults to 'global' and otherwise contains the DEF of a group to which the light should be applied. Would this interfere with some default logic of scene traversal ?<br><br></div><div>The use case for such scoping may be limited but manipulating a light direction with a spheresensor, and the GeoLocation case may be a good start.<br></div><div><br></div><div>-Andreas<br></div><div><br><br></div><div><div><div><div><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Today's Topics:<br>
<br>
   1. Re: combine light scoping with rotation transform (doug sanden)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Sat, 25 Jul 2015 08:05:30 -0600<br>
From: doug sanden <<a href="mailto:highaspirations@hotmail.com">highaspirations@hotmail.com</a>><br>
To: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>><br>
Subject: Re: [x3d-public] combine light scoping with rotation<br>
        transform<br>
Message-ID: <BAY181-W50C1E53DC236806912AFEAB6800@phx.gbl><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Andreas,<br>
I suspect you'll need to use the location and direction attributes of the lights, rather than a transform wrapper, to keep the light as sibling to your geometry while rotating it. You may need to convert an axis-angle rotation to a direction vector.<br>
-Doug<br>
<br>
><br>
> X3D experts,<br>
><br>
> I got stuck on a what must be a basic issue with light scoping.<br>
><br>
> <a href="http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Scopingoflights" rel="noreferrer" target="_blank">http://www.web3d.org/documents/specifications/19775-1/V3.3/Part01/components/lighting.html#Scopingoflights</a><br>
><br>
> I want to use scoping for a directional light, eg. with a global field<br>
> set to 'false'<br>
><br>
> <Group><br>
> <DirectionalLight global='false' ... /><br>
> <Shape DEF='illuminated_by_directional_light><br>
> ...<br>
> </Shape><br>
> </Group><br>
><br>
> <Group DEF='not_illuminated_by_directional_light'><br>
> ..<br>
> </Group><br>
><br>
> Would this be the correct hierarchy to use ?<br>
><br>
> Now I also want to enclose the directional light in a transform, in<br>
> order to control it by a routed rotation from a OrientationSensor. At<br>
> the same time, I do not want to rotate the illuminated shape.<br>
><br>
> <Group><br>
> <Transform DEF='light_Trafo'><br>
> <DirectionalLight global='false' ... /><br>
> </Transform><br>
> <Shape DEF='illuminated_by_directional_light><br>
> ...<br>
> </Shape><br>
> </Group><br>
> <Group DEF='not_illuminated_by_directional_light'><br>
><br>
> However, now the Shape is outside the scope of the light, and not<br>
> affected by it.<br>
><br>
> This is where I am stuck. What would be the correct hierarchy to use<br>
> for this case ?<br>
><br>
> This is rather theoretical for me because I believe the global field is<br>
> not supported by x3dom at this point:<br>
><br>
> <a href="https://github.com/x3dom/x3dom/issues/83" rel="noreferrer" target="_blank">https://github.com/x3dom/x3dom/issues/83</a><br>
><br>
> -Andreas<br clear="all"></blockquote></div><br>-- <br><div class="gmail_signature">Andreas Plesch<br>39 Barbara Rd.<br>Waltham, MA 02453</div>
</div></div></div></div></div></div>