Re: controlling shading

Hi Donna,


> I am using java3D to render a flat surface (for color interpolation
> reasons) and would like to turn off shading, since it sometimes relects
> light somewhat strangely. I saw references in the mailing list archive to
> gouraud and flat shading, but I could not figure out how one can set these.
> Thanks in advance---

Texture mapping uses flat shading, so you can get it
with GraphicsModeControl.setTextureEnable(true). This
does not work for IrregularSet domains, and will give
you "blocky" pixels.

You can explicitly control shading by creating a custom
DataRenderer (see tutorial - no day at the beach) that
uses ShadowTypes that override the makeAppearance()
method of ShadowTypeJ3D. Shading is controlled in the
Material used in the Appearence.

Writing a custom DataRenderer will take you out of the
realm of a casual user.

Cheers,
Bill


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