model_loading - JayDee-github/LearnOpenGL GitHub Wiki

Model loading

This implementation loads a model to the screen with the Assimp library. It also applies directional and point lighting techniques.

Lighting techniques are used to show the model's material qualities:

  1. Directional lighting

    Directional front Directional back

  2. Point lighting

    Point lighting

The code follows examples outlined outlined in:

Changes over example code

  • Lighting modes are implemented to show the material qualities of the Model.
  • Ability to switch between mesh, point and fill rendering modes.

Running the implementation

  • Navigate the Solution Explorer to path:

    Solution -> 03.model_loading -> 01-03.model_loading_and_lighting

  • Left-click the project name and select Set as Startup Project from the pop-up window.

  • Press F5 to run the project.

Interfacing with the implementation

Exiting

Press the ESC key to exit the implementation.

Movement

The movement key-bindings follow an FPS-style scheme:

  • W move forward
  • S move back
  • A move left
  • D move right
  • Spacebar move up
  • Left-Shift move down
  • Mouse-movement look around the world.

Rendering manipulations

The numeric keys 1-5 are used to switch lighting and rendering modes:

  • 1 Directional lighting
  • 2 Point lighting
  • 3 Mesh rendering mode
  • 4 Point rendering mode
  • 5 Fill rendering mode