Lighting, Shadows & Materials


M3D-Engine handles 3 different types of lights:
Directional Light
This type of light is best suited for global scene illumination. There is no specific light source, and every point in the world is lit by the same light vector
Point Light
Point Lights extends the notion of directional light vector by adding a light source. Light rays are still infinite, but these vectors are not collinear any-more.
Spot Light
Spot lights are an extension of Point Lights, they are bounded in a 3D space. you can control the aperture angle and the falloff of the light.


Static Shading
Static shadows can be computed and baked in the final textures either in the production pipeline, or during the game’s execution.
Dynamic Shading
M3D-Engine use shadow mapping for real time dynamic full scene shading. Shadow Mapping algorithms are
  • Simple – SSM
  • Poisson Sampling
  • Percentage Closer Filtering – PCF
  • Variance – VSM


Material objects in M3D-Engine are defined as
  1. attribute slots for dynamic variables
  2. shader object
  3. texture set
Once your Material is defined, you must bind it the a Mesh object and link the attributes slots to dynamic variables, such as timers and oscillators. M3D-Engine’s Rendering Module perform Mesh batching, using the Materials definitions, to limit OpenGL state changes.

Comments are closed