Skip to content

An advanced Omniverse Isaac Sim extension for dynamic management and real-time animation of scene lighting, enabling more flexible, interactive, and visually compelling simulations.

License

Notifications You must be signed in to change notification settings

worv-ai/LightManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LightManager

GitHub release (latest SemVer) GitHub license GitHub stars

GitHub issues GitHub pull requests GitHub forks GitHub last commit

Python Isaac Sim OmniGraph Extension


An advanced Isaac Sim extension for comprehensive light management and animation

Preview

Preview

Users can reproduce the preview simulation using examples from the worvai.managers.light_manager extension!

Welcome diverse and refined examples contributing to the community!

Overview

The Light Manager extension provides a powerful and intuitive interface for managing lighting in Isaac Sim environments. It offers comprehensive control over all USD light types with advanced features including time-based animations, attribute management, and specialized functionalities like sun tracking.

Key Benefits

  • Unified Light Management: Control all USD light types (DistantLight, DomeLight, DiskLight, RectLight, SphereLight, CylinderLight) from a single interface
  • Real-time Attribute Control: Dynamically adjust light properties like intensity, color, exposure, and geometry-specific attributes
  • Advanced Animation System: Create sophisticated lighting animations with time-based property interpolation
  • Sun Tracking: Simulate realistic day/night cycles with automated sun movement and color temperature changes
  • Non-destructive Workflow: Original light settings are preserved and can be restored at any time
  • Extensible Architecture: Modular design allows for easy addition of new lighting features and functionalities

Features

Core Light Management

  • Multi-Light Selection: Add and manage multiple lights simultaneously
  • Attribute Filtering: Intelligent filtering of relevant attributes per light type
  • Real-time Updates: Live synchronization between UI controls and USD stage properties
  • Reset Functionality: Restore lights to original settings or reset individual attributes

Basic Light Controls

  • Intensity & Exposure: Precise control over light brightness and exposure values
  • Color Management: RGB color picker with support for color temperature workflows
  • Geometry Properties: Type-specific controls (radius for sphere lights, width/height for rect lights, etc.)
  • Visibility & Purpose: Control light visibility and rendering purpose

Advanced Functionalities

  • Sun Tracking System:
    • Time-based intensity modulation
    • Color temperature transitions (sunrise to sunset)
    • Automatic angle progression for distant lights
    • Customizable animation duration and parameters
  • Timeline Integration: Seamless integration with Isaac Sim's timeline system
  • Property Animation: Smooth interpolation between start/end values over time

Supported Light Types

The extension supports all USD light types available in Isaac Sim:

Light Type Specific Controls Advanced Features
DistantLight Angle Sun tracking, directional animation
DomeLight Guide radius, texture file/format Environment lighting control
DiskLight Radius Area light simulation
RectLight Width, height, texture file Rectangular area lighting
SphereLight Radius, treat as point Point/area light modes
CylinderLight Length, radius, treat as line Linear lighting effects

Version Compatibility

Isaac Sim Version Support Status Notes
4.2.0 Not Supported Older release, APIs incompatible
4.5.0 Supported Fully tested and verified
5.0.0 Planned Compatibility under development

Installation

Prerequisites

  • NVIDIA Isaac Sim 4.5.0+ (2025.02 or later)
  • Python 3.10+

Method 1: Extension Manager (Recommended)

  1. Open Isaac Sim
  2. Navigate to Window > Extensions
  3. Search for "Light Manager"
  4. Click "Install"

Method 2: Manual Installation

  1. Clone this repository:

    git clone https://github.com/worv-ai/LightManager.git
  2. Copy the extension to your Isaac Sim extensions directory:

    cp -r exts/worvai.managers.light_manager ~/path/to/isaac-sim/extsUser
  3. Enable the extension in Isaac Sim Extension Manager

Quick Start

  1. Open Isaac Sim and load your scene with lights
  2. Enable the Extension: Navigate to Window > Extensions and enable "Light Manager"
  3. Access the Interface: Open the Light Manager panel from the menu or dock it to your preferred location
  4. Add Lights: Use the dropdown to select and add lights from your scene to the manager
  5. Control Properties: Expand the "Basic" section to adjust intensity, color, exposure, and geometry-specific attributes
  6. Enable Advanced Features: Use the "Advanced Functionalities" section to enable sun tracking or other animations

Basic Workflow Example

# Access the Light Manager API programmatically
from worvai.managers.light_manager.api import AttributeUtils
from worvai.managers.light_manager.impl.utils import LightPrimManager

# Get a light prim and create a manager
stage = omni.usd.get_context().get_stage()
light_prim = stage.GetPrimAtPath("/World/Lights/sky")
light_manager = LightPrimManager.from_prim(light_prim)

# Create time-based animation for intensity
intensity_attr = light_prim.GetAttribute("inputs:intensity")
intensity_util = AttributeUtils(intensity_attr)
intensity_util.set_live_update()

# Define animation keyframes (time, value)
intensity_util.set_attr_path([
    (0, 0.0),        # Night
    (150, 1500.0),   # Dawn
    (300, 6000.0),   # Sunrise
    (600, 10000.0),  # Noon
    (900, 7000.0),   # Sunset
    (1200, 0.0)      # Night
])

Architecture

Extension Structure

The Light Manager follows a modular architecture:

worvai.managers.light_manager/
├── impl/
│   ├── extension.py          # Main extension class
│   ├── ui_builder.py         # UI construction and management
│   ├── utils.py              # Light prim management utilities
│   └── sub_ui/
│       ├── attributes.py     # Attribute widget builders
│       └── funcs/
│           └── track_sun_distantlight.py  # Sun tracking functionality
├── api/
│   └── light_utils.py        # Public API utilities
└── example/
    ├── preview.py            # Example simulation
    └── utils/
        ├── lamp_light.py     # Warehouse lighting example
        └── distant_light.py  # Distant light examples

Key Components

  • LightPrimManager: Manages individual USD light prims and their original state
  • UIBuilder: Constructs and manages the user interface dynamically
  • AttributeUtils: Provides timeline-based attribute animation
  • TimeBasedLightController: Handles advanced animation features like sun tracking

API Reference

LightPrimManager

# Create from existing prim
light_manager = LightPrimManager.from_prim(prim)
light_manager = LightPrimManager.from_path("/World/Lights/sun")

# Reset to original values
light_manager.reset_to_original()  # Reset all attributes
light_manager.reset_to_original("inputs:intensity")  # Reset specific attribute

AttributeUtils

# Create time-based animation
attr_util = AttributeUtils(light_prim.GetAttribute("inputs:intensity"))
attr_util.set_live_update()  # Enable real-time updates
attr_util.set_attr_path([(time1, value1), (time2, value2), ...])

Examples

The extension includes comprehensive examples in the example/ directory:

  • preview.py: Complete warehouse simulation with day/night cycle
  • lamp_light.py: Industrial lighting control with programmatic lamp management
  • distant_light.py: Sun/sky light manipulation examples

Contributing

We welcome contributions! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with appropriate tests
  4. Submit a pull request with a clear description

For detailed contribution guidelines, see our Contributing Guide.

License

This project is licensed under the Apache-2.0 License - see the LICENSE file for details.

Changelog

See CHANGELOG.md for version history and updates.

Acknowledgements

We would like to express our gratitude to the following:

  • NVIDIA Corporation for Isaac Sim and the Omniverse platform that makes this extension possible
  • Pixar Animation Studios for the Universal Scene Description (USD) framework

Author: kickthemoon0817 kickthemoon0817@gmail.com
Version: 0.1.0
Isaac Sim Compatibility: 4.5.0 (2025.02+)

About

An advanced Omniverse Isaac Sim extension for dynamic management and real-time animation of scene lighting, enabling more flexible, interactive, and visually compelling simulations.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages