Re: Lighting

Hi Erik,

> I want to display a 3D object (i.e. a car body) with displayImplJ3D and
> a Gridded3DSet. Is it in visad possible to set a light (like spotlight).
> Or are there other solutions to generate light and shadows.

Do this:

  DisplayImplJ3D display = ...
  DisplayRendererJ3D dr
    (DisplayRendererJ3D) display.getDisplayRenderer();
  BranchGroup root = dr.getRoot();

Then you can add Java3D lights as children of root. If you want
lights that rotate, pan and zoom with the data, then use:

  TransformGroup trans = dr.getTrans();

and add lights to trans.

Good luck,

  • References:
  • 2002 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: