Apertus
  • Documentation
  • Introduction
    • Definitions
      • Coordinate systems
      • Primitives
    • Features
      • Basic
        • Nodes
        • Light sources
        • Geometries
        • Primitives
        • Texts
      • Environment simulation
        • Water
        • Sky
        • Terrain
      • Browser
      • UI technologies
        • HTML UI
        • Presentation
        • Gallery
      • PointCloud
      • 360
        • 360 Images
        • 360 Videos
      • 3D Model Formats
      • Scene Sharing
        • Multiplayer
      • Video and Voice Chat
      • Hand Tarcking
        • Leap Motion
      • Head Tracking
        • Fob
      • Displays
        • Multi Display
        • Cave System
        • HMDs
      • Industry
        • IoT, and Sensors
        • Robot monitoring
        • Robot calibration
  • Developers
    • Development Cycle
    • Architecture
      • Project folders
      • Configuration ecosystem
    • API
      • C++ API
      • JavaScript API
      • HTTP REST API
    • Getting Started
      • Creating a plugin
      • Creating a sample
  • Contribute
    • Report a Bug
    • Suggest a Feature
  • Tutorial - How to visualize CAD models in VR
    • Introduction
    • Import CAD Models
    • Convert CAD Models
    • Create Low-poly from CAD Models
    • Create Photorealistic CAD Models
  • Plugins - Photorealistic Render
  • Plugins - Physics
  • Tutorial - How to visualize Tensorflow training in VR
  • Tutorial - Virtual Learning Factory Toolkit Gamification
  • Overview
    • Introduction
    • Architecture
    • Use Cases
  • Installation
    • Windows
    • Android
      • How to use
      • Writing an application
    • MacOS
  • Build
    • Windows
      • How to build the source on Windows
    • Android
    • MacOS
  • Plugins on Windows
    • Photorealistic Render
      • How to use
      • How to configure
      • Features
      • Sample
    • Physics
      • How to use
      • How to configure
      • Features
      • Samples
      • Demo video
  • Plugins on Android
    • Java Native Interface
      • How to use
      • Extending the API
    • Filament render
      • How to use
      • How to configure
      • Developers
  • Plugins on MacOS
    • Untitled
  • Samples on Windows
    • Deep learning
      • Untitled
      • Use the Fastai-PythorchVR Sample
      • Use the HTTP API
      • Create HTTP Requests from Python
      • Demo video
    • Virtual Learning Factory Toolkit Gamification
      • Installation
      • Lobby - User Interface
      • Local - User Interface
      • Student - User Interface
      • Teacher - User Interface
      • VLFT Gamification Session
      • VR Mode
  • Virtual Learning Factory Application
    • Installation on Windows
    • Installation on Apple
    • Lobby
    • Single Player
    • Multi Player - Student
    • Multi Player - Teacher
Powered by GitBook
On this page
  • Lightning Types
  • Spot
  • Directional
  • Point
  • Reflection types
  • Diffuse
  • Specular
  • Eamples
  1. Introduction
  2. Features
  3. Basic

Light sources

Lightning Types

ApertusVR provides three types of lighting:

Spot

Ape::Light::Type::SPOT

This Light works like a flashlight. It produces a solid cylinder of light that is brighter at the center and fades off.

Directional

Ape::Light::Type::DIRECTIONAL

This Light simulates a huge source that is very far away - like daylight. Light hits the entire scene at the same angle everywhere.

Point

Ape::Light::Type::POINT

This Light spreads out equally in all directions from a point.

Reflection types

The Ape::ILight class has a wide range of properties. Two of the most important are the diffuse and specular color. Each defines how much specular and diffuse lighting a material reflects.

Diffuse

Diffuse light is reflected equally in all directions. This is one component of dynamic lighting. It is affected by the distance and angle between the surface and the light, but is unaffected by the viewer's position or viewing angle.

Specular

This is light that reflects more intensely along and around the reflection vector from a surface. It is used to add highlights to a surface that make it look shiny. Specular reflection is not only affected by the relationship between the surface and the light, but also the viewer - since when the viewer is closer, they will see a brighter spot at the point of reflection.

Eamples

Create a directional light:

if (auto light = std::static_pointer_cast<Ape::ILight>(mpSceneManager->createEntity("light", Ape::Entity::LIGHT).lock()))
{
	light->setLightType(Ape::Light::Type::DIRECTIONAL);
	light->setLightDirection(Ape::Vector3(1, -1, 0));
	light->setDiffuseColor(Ape::Color(0.35f, 0.35f, 0.35f));
	light->setSpecularColor(Ape::Color(0.35f, 0.35f, 0.35f));
}
PreviousNodesNextGeometries

Last updated 6 years ago