Skip to the content.

RayScale

RayScale is a network distributed, 3D renderer based on the ray tracing algorithm. Written in Node.js / TypeScript, RayScale is designed for scaling out using containers. The objectives of RayScale as a working project is to explore and demonstrate concepts such as:

What Is Ray Tracing

In computer graphics, ray tracing is a rendering technique for generating an image by tracing the path of light as pixels in an image plane and simulating the effects of its encounters with virtual objects. The technique is capable of producing a very high degree of visual realism, usually higher than that of typical polygon based scanline rendering methods, but at a greater computational cost.

Ray Tracing Features

It is not the goal of this project to create a completely fully featured ray tracer, as the scope of that is almost limitless. RayScale currently provides:

Sample Images

These are some sample images rendered with RayScale

Sample Video Animations

IMAGE ALT TEXT HERE

🎬 Complete Playlist Here

Core Components (Microservices)

RayScale is comprised of two separate microservices, the Controller and the Tracers. Both are written in Node.js using TypeScript, and all interaction to/from these services is via REST API (using Express).

RayScale is intended to be run with a single Controller and one or more Tracers (either on the same machine as the controller (each on different TCP ports) or elsewhere on the network). Tracers can be started & stopped at any point, more added etc. and the Controller keeps track of tracers via health checks much like a network load balancer.

Basic System Architecture

diagram

Controller

Acts as control point and the user’s main interface with RayScale. It provides the API and Web UI for submitting jobs. It also coordinates the Tracers, keeps tracks of which tracers are online etc. The Controller splits up jobs into tasks and sends them to Tracers, and also reassembles & saves the results as they are sent back

📘 Controller documentation

Tracer

Tracers do the actual rendering work, by ray tracing the tasks given to it via the Controller. Each Tracer registers itself with the Controller on startup. The Tracer carries out scene parsing and also the work of actually computing the ray tracing algorithm of the task it has been given. Once completed, the results are POSTed back to the controller as a binary buffer of image data

📘 Tracer documentation

Web UI

The Controller provides a simple web UI, available at http://<controler-addres>:<port>/ui. The UI allows for:

Objects & Terms

As well as the Controller & Tracer, RayScale has several named objects and concepts which it’s worth understanding:

Running RayScale

As RayScale uses Node.js and is also containerised there are numerous ways you can run RayScale, here are a few that have been tried tested:

📘 Running & Deploying RayScale

Scene Definition Language

The way Scenes and the JobInput are defined is yia YAML, there’s a full guide to the objects and their properties linked below. However it is recommend to use one of the included example jobs as a starting point rather than write a new job & scene YAML from scratch.

📘 Job & Scene Definition Reference

Limitations and Design Constraints

These constraints are either by design or known issues