All Projects → martin-pr → Embree_viewer

martin-pr / Embree_viewer

Licence: mit
Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic, OBJ file formats, with a JSON file to describe a scene.

Programming Languages

cpp
1120 projects
cpp17
186 projects

Projects that are alternatives of or similar to Embree viewer

Tinykaboom
A brief computer graphics / rendering course
Stars: ✭ 2,077 (+10831.58%)
Mutual labels:  3d, 3d-graphics, raytracing
Tinyraytracer
A brief computer graphics / rendering course
Stars: ✭ 3,971 (+20800%)
Mutual labels:  3d, 3d-graphics, raytracing
Curated List Of Awesome 3d Morphable Model Software And Data
The idea of this list is to collect shared data and algorithms around 3D Morphable Models. You are invited to contribute to this list by adding a pull request. The original list arised from the Dagstuhl seminar on 3D Morphable Models https://www.dagstuhl.de/19102 in March 2019.
Stars: ✭ 375 (+1873.68%)
Mutual labels:  3d, 3d-graphics
Recent Stars 2021
🔥🔥🔥SLAM, Pose/Object tracking, Depth/Disparity/Flow Estimation, 3D-graphic, etc. related papers and code
Stars: ✭ 393 (+1968.42%)
Mutual labels:  3d, 3d-graphics
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (+2184.21%)
Mutual labels:  3d, 3d-graphics
Limonengine
3D FPS game engine with full dynamic lighting and shadows
Stars: ✭ 331 (+1642.11%)
Mutual labels:  3d, 3d-graphics
Dotscad
Reduce the burden of mathematics when playing OpenSCAD
Stars: ✭ 344 (+1710.53%)
Mutual labels:  3d, 3d-graphics
Openscad
OpenSCAD - The Programmers Solid 3D CAD Modeller
Stars: ✭ 4,444 (+23289.47%)
Mutual labels:  3d, 3d-graphics
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (+1363.16%)
Mutual labels:  3d, 3d-graphics
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (+2500%)
Mutual labels:  3d, 3d-graphics
Klein
P(R*_{3, 0, 1}) specialized SIMD Geometric Algebra Library
Stars: ✭ 463 (+2336.84%)
Mutual labels:  3d, 3d-graphics
Hybridrenderingengine
Clustered Forward/Deferred renderer with Physically Based Shading, Image Based Lighting and a whole lot of OpenGL.
Stars: ✭ 563 (+2863.16%)
Mutual labels:  sdl2, 3d-graphics
C Ray
C-Ray is a small, simple path tracer written in C
Stars: ✭ 323 (+1600%)
Mutual labels:  sdl2, raytracing
Softwarerenderer
Software rendering engine with PBR. Built from scratch on C++.
Stars: ✭ 323 (+1600%)
Mutual labels:  sdl2, 3d-graphics
Glmaps
Data visualization examples and tutorials from scratch. 数据可视化示例代码集与新手学习教程。
Stars: ✭ 288 (+1415.79%)
Mutual labels:  3d, demo
Cpp 3d Game Tutorial Series
C++ 3D Game Tutorial Series is a YouTube tutorial series, whose purpose is to help all those who want to take their first steps in the game development from scratch.
Stars: ✭ 400 (+2005.26%)
Mutual labels:  3d, 3d-graphics
Blender
Mirror of the official Blender Git repository. Updated every hour.
Stars: ✭ 609 (+3105.26%)
Mutual labels:  3d, 3d-graphics
3D-Engine-OpenGL-4
3D Graphics Engine For Games | C++ OpenGL 4.1
Stars: ✭ 19 (+0%)
Mutual labels:  3d, 3d-graphics
Realityui
A Swift Package for creating familiar UI Elements and animations in a RealityKit rendered Augmented Reality or Virtual Reality scene.
Stars: ✭ 275 (+1347.37%)
Mutual labels:  3d, 3d-graphics
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (+2242.11%)
Mutual labels:  3d, 3d-graphics

Embree Viewer

Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic and OBJ model file formats, with a simple JSON file to describe a scene.

Use case

Embree viewer is intended as a simple example implementation of a progressive renderer with Embree, one step above the simple examples Embree ships with, but significantly simpler than Ospray and similar.

Its main purpose is to demonstrate the performance of Embree raytracing kernels, and the scalability of its instancing system, in a simple real-time multithread framework that can load common model files. It is not intended as a full raytracer - it does not have any support for materials, textures, normals, lighting or sampling.

Clarisse scripts

Isotropix Clarisse is a professional lighting tool, heavily focusing on efficient object instancing. It is available as a professional package, or as a Personal Learning Edition.

For the purposes of experimentation with Embree, the clarisse directory contains a number of PLE scene files, with a set of scripts to export their scattering setup to a set of JSON and binary files compatible with Embree viewer.

Building

Embree viewer was developed on a standard installation of Debian Linux; it has not been tested on MS Windows (any contribution in that respect would be appreciated).

Dependencies

Non-standard dependencies, which have to be compiled on the target Linux machine, and installed into a location available to CMake:

Standard dependencies, available in Debian (or other Linux distro):

  • Boost (tested against 1.62.0)
  • OpenEXR and IlmBase (tested against 2.2.0)
  • SDL2 (tested against 2.0.5)
  • TBB (tested against 4.3)

Compilation

The repository contains a standard set of CMake build files:

mkdir build
cmake ..
make -j

Usage

Command line options

Allowed options:
  --help                produce help message
  --mesh arg            load mesh file (.abc, .obj)
  --scene arg           load a scene file (.json)

Mouse interaction

The viewer implements only minimal mouse interaction (for now):

  • left mouse button + movement rotates around the current origin point
  • right mouse button + movement moves the camera towards or away form the origin point (using logarithmic scale based on distance)
  • left double click selects the camera's focus point to the point of intersection between the camera ray determined from the click and the scene

File formats

At the moment, there are 3 input file types - .abc, .obj and .json.

Scene file format

Scene file is a very simple JSON-based file format, describing the input files and scattering information.

The root of the scene is a json list, enumerating the elements of the scene. Each element can either be a subscene or an object.

Each object is represented as a simple dictionary, with a filesystem path (absolute or relative) to an .obj or a .abc mesh file, and a 4x4 matrix transform represented as an array.

A scene is a dictionary containing an array of objects (each either an object, or another sub-scene), a transform acting as a parent for all objects and either a set of instances in an array of structs with id and transform, or an instance_file link to a binary file containing the instancing information. A scene_path string then represents a unique ID of the instanced sub-scene in the scene file, serving as an identifier to de-duplicated sub-scenes.

Binary instances file format

The instancing file is a plain binary file, containing 17x32bit data records:

  • first 4 bytes represent a 32-bit unsigned integer, referencing which of the objects records should be used for this particular instance
  • 16 4-byte records after that represent a transformation matrix of each instance (composed of 32-bit floats)

Example files

Embree viewer comes with a small number of example files in the data directory (each directory includes a LICENSE file for the files it contains):

Virtual Emily mesh

Virtual Emily project's main mesh, demonstrating how to load a single model file.

/embree_viewer --mesh data/Emily/Emily_2_1_Alembic_Scene.abc

A Grass Scatterer

A simple scattering scene, using assets exported from Blender and Clarisse, showing the performance and possible complexity of the scene.

/embree_viewer --scene data/Grass/scene.json

License and contributions

This demo is licensed under MIT license, and as such you can use this code for both commercial and noncommercial purposes.

Any contributions are welcome, in terms of ideas, improvements, bugfixes or additional example files.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].