LogoLogo
  • Get Started
  • Getting Started
    • Initial Setup
    • Create Your First Game
    • API Reference
    • Build Your First World Map
    • Multiplayer Testing
    • Use Templates & Examples
    • Styling & Assets
      • Modeling Guidelines
      • Texturing Guidelines
      • Default Assets
  • Build Faster With AI Tools
  • SDK Guides
    • Assets
    • Audio & SFX
      • Audio Manager
    • Blocks & Chunks
      • Block Types
      • Block Type Registry
      • Chunks
      • Chunk Lattice
    • Camera
    • Chat & Commands
    • Debugging
    • Entities
      • Animations
      • Block Entities
      • Colliders & Hitbox
      • Child Entities
      • Entity Controllers
        • Base Entity Controller
        • Pathfinding Entity Controller
        • DefaultPlayer Entity Controller
        • Simple Entity Controller
      • Entity Manager
      • Model Entities
      • Movement & Pathfinding
      • Player Controlled Entities
    • Events
    • Input & Controls
    • Lighting
      • Ambient Light
      • Light Manager
      • Point Lights
      • Spot Lights
      • Sun Light (Directional)
    • Mobile
    • Persisted Data
    • Players
      • Player Manager
      • Persisted Player Data
    • Plugins
    • Physics
      • Colliders
      • Collision Groups
      • Debugging
      • Gravity
      • Raycasts
      • Rigid Bodies
    • User Interface
      • Overlay UI
      • Scene UIs
      • Scene UI Manager
    • Worlds
      • Map Data Format
  • Helpful Resources
    • HYTOPIA Architecture & Platform Overview
    • Useful Third-Party Tools
Powered by GitBook
On this page
  • Types Of Lights
  • Next Steps
Export as PDF
  1. SDK Guides

Lighting

PreviousInput & ControlsNextAmbient Light

Last updated 4 months ago

Lighting is a critical piece for making a game look and feel a certain way to players. The HYTOPIA SDK gives developers full control of the most common types of lighting a game might need.

Lighting is controlled in a few different ways depending on the lighting type. For example, ambient and directional light is controlled through a instance, while point lights and spot lights are controlled through an instance of the .

Types Of Lights

There's 5 types of lighting that HYTOPIA supports. All lighting besides emissive lights are dynamic and will cast physically accurate shadows in real time. All lights automatically interpolated value changes for smooth visual changes to lighting effects. We'll cover the 5 lighting types below.

  • Ambient Light - Ambient light is the base lighting of the entire world. This determines the minimum brightness and light color of your world.

  • Emissive Lights - Emissive lights can emit light from static/fixed game elements like blocks. This lighting is the only lighting that will not cast shadows. Emissive lights are not yet supported!

  • Point Lights - Point lights are lights that emit from a fixed point in space. They can move dynamically through the world, follow entities, have their color or intensity controlled in real time and more. Point lights are real time lights that are graphically expensive and should be used sparingly.

  • Spot Lights - Spot lights are lights taht emit from a fixed point in space in a cone-like shape. They can move dynamically through the world, track a position or an entity and have their angle, color, intensity and penumbra controlled. Spot lights are real time lights that are graphically expensive and should be used sparingly.

  • Sun Light (aka Directional Light) - Sun light, also known as the directional light, is a single light source emitting from a set position. It casts a light across the entire world relative to its position with a intensity and color you can control. Its position when updated is automatically interpolated, as well as its color, so it can be used to control lighting effects like day/night cycles, and more.

Next Steps

Ambient Light

Learn more about ambient lighting and how to use it.

Light Manager

Learn more about the light manager that tracks and allows lookup of point lights and spot lights in a world.

Point Lights

Learn more about point lights that emit light from a point in the world.

Spot Lights

Learn more about spot lights that emit a cone shaped spot light from a point in the world.

Sun Light

Learn more about sun light that emits a directional light from the sky across the entire world.

World
Light class
Ambient light and sun light used together to create a day/night cycle.