Giter Site home page Giter Site logo

echo's Introduction


Logo

Echo

An awesome ray traced 3D renderer build in C# from scratch!
Getting started »

Report Bug · Request Feature

Table of Contents
  1. About the Project
  2. Features
  3. Installation
  4. Contributing
  5. License
  6. Gallery

About the Project

Echo is a physically based 3D rendering software package; that is, Echo takes in a 3D scene and captures a 2D picture of it. Scenes are given to Echo as a data collection of geometric shapes, texture and material parameters (which describe physical properties of the shapes), light sources that illuminate the scene, and a camera perspective from which the picture is captured. Since Echo is a ray tracer, it captures and synthesizes a 2D picture by shooting billions of rays in the 3D scene to understand its visual features.

Echo was built from the ground up using C# without any external libraries for all its core components. All rendering features are available to be explored through a standard GUI application (see Echo.UserInterface) and/or accessed via an extensive programming library API (see Echo.Core). While Echo was only initially an exploratory project, it has now grown to become fully usable as a photorealistic renderer with many advance features. See the Gallery for renders produced by Echo, or navigate to the Getting Started page to begin using it!

Features

  • Unidirectional path tracing with multiple importance sampling and next event estimation.
  • Many cool physically based materials (e.g. Diffuse, Dielectric, Conductor, Emissive).
  • Quad-width bounding volume hierarchy acceleration with SIMD utilization across the application.
  • Light hierarchy tree to provide better per-bounce selections when importance sampling lights.
  • Multithreading worker pool system supporting pause/resume and C# async keyword constructs.
  • Support for auxiliary false-color data (e.g. normal, depth, albedo) through common ray tracing interface.
  • Common texturing system allowing various filter modes, color types, and internal memory layouts.
  • Customizable compositing stack with many enhancing post processing operators (e.g. AutoExposure, Bloom, ToneMapper, Vignette, and Intel Open Image Denoise).
  • Flexible scene construction using Echo description language with image IO support from ImageMagick.
  • Intuitive renderer control using a graphical user interface through Echo.UserInterface for debugging implementation and scenes.

Academic Papers & Articles Implemented:

  • Physically Based Rendering: From Theory To Implementation (Link) - [Pharr, Jakob, and Humphreys 2018]
  • Optimally Combining Sampling Techniques for Monte Carlo Rendering (Link) - [Veach and Guibas 1995]
  • Shallow Bounding Volume Hierarchies for Fast SIMD Ray Tracing of Incoherent Rays (Link) - [Dammertz et al. 2008]
  • Importance Sampling of Many Lights with Adaptive Tree Splitting (Link) - [Estevez and Kulla 2018]
  • Hierarchical Geometric Models for Visible Surface Algorithms (Link) - [Clark 1976]
  • Heuristics for Ray Tracing Using Space Subdivision (Link) - [MacDonald and Booth 1990]
  • Fast and Tight Fitting Bounding Spheres (Link) - [Larsson 2008]
  • Higher Density Uniform Floats (Link) - [Reynolds 2017]
  • Average Irregularity Representation of a Rough Surface for Ray Reflection (Link) - [Trowbridge and Reitz 1975]
  • A Simpler and Exact Sampling Routine for the GGX Distribution of Visible Normals (Link) - [Heitz 2017]
  • Generalization of Lambert's Reflectance Model (Link) - [Oren and Nayar 1994]
  • A Tiny Improvement of Oren-Nayer Reflectance Model (Link) - [Fujii]
  • The Reflection Factor of a Polished Glass Surface for Diffused Light (Link) - [Walsh 1926]
  • A Quantized-diffusion Model for Rendering Translucent Materials (Link) - [D'Eon and Irving 2011]
  • Photographic Tone Reproduction for Digital Images (Link) - [Reinhard et al. 2002]

Installation

To get the project source code, simply clone the repository:

git clone https://github.com/GaryHuan9/Echo.git

You will need at least dotnet 6 to run the project. A good visual introduction to Echo would probably be Echo.UserInterface, and you can launch that by going into the Echo root directory and run the following command. Note that the first argument is a path to a scene to be rendered, and in this case, it will render the Stanford bunny!

dotnet run --project src/Echo.UserInterface ext/Scenes/Simple/bunny.echo

For more extensive information on how to use Echo, please see the Getting Started page!.

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contribution you make will be greatly welcomed and appreciated. If you have a suggestion that would make this project better, please fork the repo and create a pull request. Take a look at the contribution guide for tips and suggestions on contributing to this project. You can also simply open an issue with the tag enhancement. Thanks again for your contribution!

License

Distributed under the MIT License. See LICENSE.txt for more information.

Gallery

All the following images were completely rendered and post-processed in Echo:


Canonical Cornell Box


Rough Glass Material Ball


Lego 856 Bulldozer on a Table, model by Heinzelnisse (CC-BY-NC) and PolyHaven (CC0)


Two Blue Bugatti Chiron, model by zizian on Sketchfab (CC BY-NC 4.0)


Echo.UserInterface During a Render

echo's People

Contributors

clemensu42 avatar garyhuan9 avatar

Stargazers

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

Watchers

 avatar

echo's Issues

[Feature Request] Add support for .echo format

Is your feature request related to a problem? Please describe.
This is a critically needed file format to scene description in Echo.

Describe the solution you'd like
A loader for the new .echo format will be needed to be added and supported to use the various features Echo offers.

Additional context
Along with other features implemented in the preparation rewrite, this file format will complete most of the preprocessing work prior to the main rendering.

[Bug] RGBA128.Parser Unit Tests Failing

Describe the bug
RGBA128.Parse and RGBA128.TryParse unit tests failing on edge cases.

To Reproduce
Steps to reproduce the behavior:

  1. Run the unit tests.
  2. See the errors.

Expected behavior

  • hdr(123, 45, 67, 89,) and hdr(-12, 3, 4) should fail.
  • rgb(1, 2, 3, 4.5) and rgb(-12, 3, 4) should fail.
  • hdr(.10, .001, .102) should pass with the expected value equalingnew RGBA128(0.1, 0.001, 0.102, 1)

Systems

  • OS: Windows 10
  • Hardware: AMD Ryzen 9 3900X
  • Version or Commit: 49b6f3d

Additional context
Add any other context about the problem here.

Implement ParseRGB and ParseHDR for RGBA128.Parser

RGBA128.Parser is a ref struct that helps converting from a string that is representing a color into an actual RGBA128. It is designed to support three modes: HEX, RGB, and HDR. Currently the mode detection and HEX mode are already implemented, but the implementation for RGB and HDR are missing.


RGB mode:
Input string format rgb(123, 456, 789) where 123, 456, and 789 can be any integer between 0 (inclusive) and 256 (exclusive). After the preprocessing that determines the mode, the content field will contain the version with stripped prefix and postfix: 123, 456, 789. Determine the separation between each integer based on the comma , character. Note that there can be optional white spaces between the numbers and the commas. Use the YieldError method if any input error occurs.


HDR mode:
Similar input string format hdr(0.123, 0.456, 0.789) where 0.123, 0.456, and 0.789 can be any decimal larger than or equals to 0 (no upper bound). The content field will also contain the stripped version after preprocessing: 0.123, 0.456, 0.789. Optional white spaces are also allowed.


Implement the ParseRGB and ParseHDR methods in RGBA128.Parser.

[Feature Request] New Asynchronous API to Echo.Core.Common.Compute

Is your feature request related to a problem? Please describe.
The Echo.Core.Common.Compute namespace works well for our main parallel rendering workload, however it needs to be more flexible for other applications such as pre-render compute or post-processing compositing.

Describe the solution you'd like
A new type of Operation<T> that supports the asynchronous programming paradigm through custom Task like async method wrappers.

Additional context
https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.asyncvoidmethodbuilder

https://github.com/dotnet/roslyn/blob/main/docs/features/task-types.md

https://devblogs.microsoft.com/premier-developer/dissecting-the-async-methods-in-c/

[Feature Request] Mesh reader integration

Is your feature request related to a problem? Please describe.
We need a universal way of feeding the streamed data from the various mesh format readers into Echo.Scenic, specifically, to the MeshEntity object. Additionally, this should also be an interface that allow us to efficiently feed mesh data into Echo from the outside (other code using Echo).

Describe the solution you'd like
A new interface that requires a ReadTriangle method which will allow the consumer to read the stream of triangles one by one. MeshEntity will use this interface to handle the request from Echo.Scenic during preparation. Since this interface will be implemented by many file loaders, it should also implement IDisposable, to give the loaders a way to dispose of their resources.

Additional context
Note that for the time being, we will not allow different triangles from the same mesh to have different Materials. Each triangle will simply contain 3 vertices, 3 normals, and 3 texture coordinates, with the latter two being optional.

[Feature Request] Triangulation of all n-gons where n > 3

Is your feature request related to a problem? Please describe.
All Faces containing more than 3 vertices whill be incorrectly imported from the .ply file.

Describe the solution you'd like
If a n-gon with more than 3 vertices appears, it should be triangulated.

Describe alternatives you've considered
Let the blender plugin triangulate the meshes, but this could cause problems when creating/editing a .echo file outside of blender.

Additional context
Seems like a good starting points: https://www.youtube.com/watch?v=QAdfkylpYwc

[Feature Request] More Materials

After revamping essentially the entire Core.Evaluation system, we have created a strong architecture allowing for many different materials. However, currently we have only added two: Matte and Mirror. We need to implement more BxDF and Material to support a wider range of rendering scenarios and requirements.

[Feature Request] Create struct Transform to replace Float4x4s

Is your feature request related to a problem? Please describe.
The Transform struct is an improvement to increase performance

Describe the solution you'd like
The Transform struct stores Float3x3s internally for rotation and translaton.
It can be multiplied with other Transforms just like a Float4x4.
It can be inverted like so: here
It can multiply with directions and positions.

[Feature Request] Echo Logo

Is your feature request related to a problem? Please describe.
We do not have a logo for Echo yet!

Describe the solution you'd like
make a logo.

[Feature Request] Optimizing and documenting the PolygonFileFormatReader

Is your feature request related to a problem? Please describe.
Looking at the PolygonFileFormatReader, there are a lot of things that can be improved in terms of performance, readability and documentation.

Describe the solution you'd like
The PolygonFileFormatReader should be able to load the default blender monkey head in less than 10ms, maybe in even less time

[Feature Request] Remove CodeHelpers Dependency

Is your feature request related to a problem? Please describe.
The Echo project relies heavily on my CodeHelpers library. While reusing code is certainly advantageous, originally CodeHelpers was designed to only be used by Unity projects. This dependency slowly became a large impediment to some of the new language features and optimizations. Furthermore, most a majority of the abilities provided by CodeHelpers is not used.

Describe the solution you'd like
Fork CodeHelpers and incorporate the library intrinsically.

[Feature Request] Improved readme

Is your feature request related to a problem? Please describe.
The old readme is outdated

Describe the solution you'd like
make a new readme

[Feature Request] New Preparation System

Core.Scenic is the oldest system in Echo right now. We need to restructure a major part of it to support better a preparation phase prior to rendering. This rewrite will also involve a big change of Core.Aggregation to support light bounding volume hierarchies and removing virtual method invocations.

[Feature Request] New Compositing System

After recreating basically the entire Core.Evaluation system, we have also broke the old post processing pipeline. Using the new Compute components, we need a new system that is executed after rendering is complete to composite together the different evaluations and enhance them into a single final image.

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.