[x3d-public] combine light scoping with rotation transform

Andreas Plesch andreasplesch at gmail.com
Mon Jul 27 12:58:13 PDT 2015


Doug,

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.
It just seems like a strange situation where there should be obvious
solution but there does not seem to be.

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 ?

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.

-Andreas



Today's Topics:
>
>    1. Re: combine light scoping with rotation transform (doug sanden)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 25 Jul 2015 08:05:30 -0600
> From: doug sanden <highaspirations at hotmail.com>
> To: X3D Graphics public mailing list <x3d-public at web3d.org>
> Subject: Re: [x3d-public] combine light scoping with rotation
>         transform
> Message-ID: <BAY181-W50C1E53DC236806912AFEAB6800 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Andreas,
> 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.
> -Doug
>
> >
> > 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
>

-- 
Andreas Plesch
39 Barbara Rd.
Waltham, MA 02453
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150727/64eedc4a/attachment.html>


More information about the x3d-public mailing list