Git Product home page Git Product logo

echo's Introduction

Echo


Echo is a CPU photorealistic rendering software written in pure C# completely from scratch1.

Echo currently support four materials: Diffuse, Glossy, Glass, and Emissive. All material properties can be controlled by texture maps, which are either loaded from file or dynamically generated. Texture maps are sampled bilinearly, with future plans of supporting bicubic texture sampling. A six-sided cubemap can be imported as skybox to provide environmental/ambient light.

Triangles and spheres are the two types of fundamental shapes used by Echo. Geometries can either be constructed through code, or loaded from Wavefront .obj files. Along with .obj files, the renderer can also read custom .mat files to load material libraries. Instancing is also supported to render large amount of identical geometries with different materials.

Echo utilizes the SIMD instructions offered by modern CPUs to improved certain calculations. A section is also displayed on the console while rendering to monitor the progress and current status.

1All core code are by me in C#. Cross platform user interface backend supported by Dear ImGui & SDL2. Optional machine learning denoiser Oidn from Intel.


Before rendering begins, Echo builds acceleration structure(s) to improve the ray-scene intersection speed. Echo considers surface area heuristics across the longest axis to further increase the hierarchy build quality. The top-down construction process is parallelized across many threads to improve its build time on very large scenes. Currently, both binary bounding volume hierarchies (BVH) and quad BVH are featured. Especially on large scenes, quad BVH better exploits SIMD instructions by computing intersections with four children simultaneously.

Echo renders in a tile-based fashion, to utilize all CPU threads while limiting memory usage. Each pixel is rendered with two passes: a fixed sample number is first used to determine the variance of that pixel. Then an adaptive sample number is calculated based on the variance to provide more samples towards areas of higher importance.

After the render concludes, a custom floating point image .fpi file is first stored. The post processing engine is then created and initialized with the appropriate layers. Layers such as Bloom and Vignette alter the image after it has been rendered. Finally, the image is saved as a .png file as the render result.


Cornell Box No Ambient (1024x1024; 38 triangles) Cornell Box

Blender BMW (1920x1080; 1.7M triangles) Blender BMW

Instanced Material Balls (1920x1080; 5.8B triangles) Material Balls

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.