- Forward


Lighting and Materials in Java3D
An Introduction with Examples


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu

Print

Parts of the Process
Back SMYC Forward
  • Specify normal vectors
  • Specify material properties
  • Create and position light sources
  • Specify properties of the lighting model
Normals
Back SMYC Forward
  • Two Dimensional:
    • Vector2f and Vector2d
  • Three Dimensional:
    • Vector3f and Vector3d
  • Three Dimensional Homogeneous:
    • Vector4f and Vector4d
Materials
Back SMYC Forward
  • The Material Class:
    • Ambient, emissive, diffuse, and specular colors
    • Shininess
  • The Appearance Class:
    • Created from a Material
Materials (cont.)
Back SMYC Forward

An Example

javaexamples/java3d/lighting/LightingDriver.java (Fragment: material)
 
Lights
Back SMYC Forward
  • Kinds:
    • AmbientLight
    • DirectionalLight
    • SpotLight
  • Influence:
    • A light's influence can be limited with a bounding region
Lights (cont.)
Back SMYC Forward

An Example

javaexamples/java3d/lighting/LightingDriver.java (Fragment: lights)
 
There's Always More to Learn
Back -