Git Product home page Git Product logo

strolle's Introduction

Strolle

Strolle (from strålspårning) is a real-time renderer with support for dynamic global illumination:

Strolle's goal is to experiment with modern real-time lighting techniques such as ReSTIR and see how far we can go on consumer hardware, especially the one without dedicated ray-tracing cores.

Strolle comes integrated with Bevy, but can be also used on its own (through wgpu).

Status: Experimental, no official release yet (see the demo below, though!).
Platforms: Windows, Mac, Linux & WebGPU.

Gallery

(note that currently there's no denoiser for specular lighting)

Examples

Dungeon

$ cargo run --release --example demo

Shows a dungeon tech demo, as in the example above.

Use WASD to move, mouse to navigate the camera, and:

  • H/L: Adjust sun's azimuth,
  • J/K: Adjust sun's altitude,
  • F: Toggle flashlight on/off,
  • M: Toggle diffuse/specular materials,
  • T: Remove textures,
  • 1: Show the final, composed image¹ (default),
  • 2: Show direct-diffuse lighting only¹,
  • 3: Show direct-specular lighting only¹,
  • 4: Show indirect-diffuse lighting only¹,
  • 5: Show indirect-specular lighting only¹,
  • 8: Show BVH heatmap,
  • 9: Switch camera to a path-traced reference mode (slow),
  • 0: Switch camera to Bevy's renderer,
  • ;: Toggle camera's controls on/off - useful for taking screenshots.

¹ press the same key again to toggle denoising on/off

Model thanks to:
https://sketchfab.com/3d-models/low-poly-game-level-82b7a937ae504cfa9f277d9bf6874ad2

Cornell Box

$ cargo run --release --example cornell

Usage

Bevy

Currently supported Bevy version: 0.12.1.

  1. Add Strolle to your dependencies:

    [dependencies]
    bevy_strolle = { git = "https://github.com/patryk27/strolle" }
  2. Add a patch to work-around a bug in Naga:

    [patch."crates-io"]
    naga = { git = "https://github.com/Patryk27/naga", branch = "v0.13.0-strolle" }
  3. Setup & enjoy!

    App::new()
        /* ... */
        .add_plugins(StrollePlugin);
    
    commands
        .spawn(Camera3dBundle {
            camera_render_graph: CameraRenderGraph::new(
                bevy_strolle::graph::NAME,
            ),
            camera: Camera {
                hdr: true,
                ..default()
            },
            ..default()
        });

Note that Strolle completely overrides Bevy's camera graph, so you can't use a Strolle camera together with Bevy's effects such as bloom or TAA - fragment and vertex shaders won't work as well.

Also, Strolle is not optimized well towards higher resolutions - on non-high-end GPUs, it's recommended to stick to ~800x600 and upscale the camera instead (see the demo.rs here).

Roadmap

https://github.com/Patryk27/strolle/issues?q=is%3Aissue+is%3Aopen+label%3AC-bug%2CC-feature

Algorithms

Notable algorithms implemented in Strolle include:

License

MIT License

Copyright (c) 2022 Patryk Wychowaniec & Jakub Trąd

strolle's People

Contributors

atlas16a avatar dneclv avatar dzejkop avatar patryk27 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

strolle's Issues

Support for shadow mapping

Ray-tracing generates high-quality visibility samples, but it's also relatively expensive - we could introduce a lower-quality setting where lights would be resolved through shadow maps, which should allow us to go from 1spp GI to 0.5spp GI.

Support for specular materials

Currently we "support" specular materials in the sense that GGX is implemented, but we don't actually resample and denoise it properly.

Support for ReSTIR GI validation

Currently ReSTIR GI is pretty unresponsive (slow to react to changes) - we should be able to improve that greatly by validating the reservoirs every nth frame or so.

Shadows are lagging behind

Under object movement, direct illumination is lagging behind on updates; it's related to the di_temporal_resampling pass, which doesn't properly compute MIS weights.

Implementing a debug-mode

bevy-strolle could provide some sort of debug-UI (activated on a key-press?) that would allow to disable denoisers, fiddle with rendering parameters etc.

Support for extracting just the GI information

Currently Strolle completely overrides Bevy's camera graph, making it impossible to use Bevy's effects such as bloom or TAA - if instead we exported just a texture containing the GI information, we could blend it with Bevy's raster output.

Support for samplers

Currently the sampling strategy is hard-coded to be nearest-neighbour - would be nice to support more.

Support environment maps

Currently Strolle is hard-coded to use the atmosphere envmap - that's handy for playing with the engine, but should be probably actually separated into its own crate (bevy-strolle-atmosphere?).

Support for hundreds+ of lights

Currently Strolle samples all lights for each pixel, which makes it slow to handle cases with hundreds of lights - this could be improved.

Asahi Linux compatibility (Linux on Apple M1)

I'm already certain this issue is because of the current state of the Asahi graphics driver, so I don't expect anything to be fixed by you. I'm just mentioning it in case anybody else is trying this and if maybe there's an easy workaround.

The main error is: Features(TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES | VERTEX_WRITABLE_STORAGE) are required but not enabled on the device.

The current driver has full support for OpenGL 3.3, but also has support for a lot of features in higher versions. See the "Drivers Details" section in https://mesamatrix.net. But even overriding the MESA_* versions produces the same error:
MESA_GL_VERSION_OVERRIDE=4.6 MESA_GLSL_VERSION_OVERRIDE=460 MESA_GLES_VERSION_OVERRIDE=3.2 cargo run --release --example demo

New features are being added on a regular basis and even Vulkan support is being worked on. So I'm sure this'll just get fixed on its own soon anyway.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.