Giter VIP home page Giter VIP logo

ecena's Introduction

Ecena

amalgamation_with_marbles

Ecena is a 3D Scene rendering program currently being written in C++. It takes a JSON-like object as the description of a scene and spits out the corresponding 3D world.

The project has two main parts:

  1. Domain-specific language. This is a Json-like language that you need to use to describe the scene you want Ecena to render. Note that Ecena doesn't offer a UI, so the only way to directly communicate with the renderer is by using the DSL (though nothing's stopping you from building your own UI). To learn more about the DSL, head to the DSL wiki page
  2. Rendering engine. This is the one responsible for the drawing of the 3D world.

Building the Project

If you want to build Ecena outside of CLion, you first need to install cmake on your machine (refer to your operating system's installation instructions).

After that, you can enter the following commands:

$ cd <path-to-ecena>
$ cmake .
$ cmake --build . --target ecena

The second command is needed to generate the build files.

If everything is successful, you should see a file named ecena generated in the current directory.

Running the Tests

Building the tests is similar to building the main module, except the target's name would be ecena_tests as opposed to ecena:

cmake --build . --target ecena_tests

Entering ./ecena_tests into the terminal should execute the tests and report the results.

Examples

While you can certainly write simple scenes directly in JSON, for more complicated scenes, a more expressive language that can generate JSON data is recommended. This project ships with examples, written in Python, that you can test and examine.

The Python script for the image above can be found here. To pass its output to Ecena, you just use the pipe operator:

$ python3 ./examples/amalgamation.py | <path-to-ecena>/ecena

Of course, you can also just print the output directly to see the generated JSON:

$ python3 ./examples/amalgamation.py

Here's another example, called Esena (named after another Ray Tracer project of mine, which outputs only a single image, a variant of the one below), with the corresponding script here:

esena_until_triangles


Primary resource for the Ray Tracer: The Ray Tracer Challenge. This book also serves as a source for test data and scenarios.

ecena's People

Contributors

melvic-ybanez avatar

Stargazers

astrolemonade avatar Laurin Harke avatar Pavel Popa avatar Hoang Nguyen avatar  avatar Kessler D. avatar  avatar Paul Varghese avatar  avatar Paul T avatar Melg Eight avatar Jason avatar D. M. avatar  avatar Chen Tao avatar

Watchers

James Cloos avatar

ecena's Issues

Contributing to the project

To make it easy for contributors, i will suggest typical areas where one can contribute should be stated using Issues or bugs that can be worked on

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.