Skip to content

Raysnail Render Examples

Hj. Malthaner edited this page Aug 12, 2024 · 11 revisions

Raysnail Render Examples

The balls scene from "Raytracing in one Weekend"

Rendered with the raysnail 0.1.1, using 122 samples per pixel.

balls_scene

3D fractal rendering test

The code is crude and lacking the precision I'd like in the surfac calculations, but this can serve as proof of concept that the raysnail code can also trace 3D fractals.

Rendered with the raysnail 0.1.1, using 122 samples per pixel.

raymarching

OBJ File loading test

The sample dragon, loaded as triangle mesh from an *.obj file.

Rendered with the raysnail 0.1.1, using 122 samples per pixel.

sample_dragon

CSG intersection test

The raysnail 0.1.2 got a fist CSG operation, the intersection of two objects. Here, the intersection of sphere and a cube.

Rendered with the raysnail 0.1.2, using 64 samples per pixel.

csg_intersection

PovRay SDL parsing example

Support for PovRay SDL is still very limited but a few basic features like boxes and sphere, also simple pigments, already work.

Rendered with the raysnail 0.1.2, using 122 samples per pixel.

sdl_sample_scene

The SDL file used to create this scene: https://github.com/Varkalandar/raysnail/blob/e34a42adcdcc4f299d517f04938d33e91d93d766/sdl/example.sdl

CSG intersections and differences

The raysnail 0.1.3 can calculate and display the volumes of object intersections and differences, and apply translations and rotatation to all object types, including CSG objects.

Rendered with the raysnail 0.1.3, using 257 samples per pixel.

csg_sample_scene

The SDL file used to create this scene: https://github.com/Varkalandar/raysnail/blob/d612db2f9e8fb5257baa6f0ff2ce61a974c1bf6b/sdl/csg.sdl

SDL Quadric rendering test

One ring, erm, one formula to rule them all! Quadrics can create planes, sphere, cones, cylinders, saddle shapes and some more. While eachg of these can be calculated more efficiently with specially tailored code, I'm happy to be able to offer a whole set of shapes with one new object type, the quadric surface. Here a quadric cone as example.

Rendered with the raysnail 0.1.3, using 257 samples per pixel.

sdl_quadrics

The SDL file used to create this scene: https://github.com/Varkalandar/raysnail/blob/6735a68518927e5543a2c069588a444ba8fbc6ca/sdl/quadric.sdl

SDL declare directives and while loops

Since version 0.1.5, the raysnail support SDL declare directives for objects, also float and vector values. Only the while loop is supported currently, but it can be used to place objects in calculated patterns, like the fan blades in this example.

Rendered with the raysnail 0.1.5, using 257 samples per pixel.

declares_and_loop

The SDL file used to create this scene: https://github.com/Varkalandar/raysnail/blob/33cdd1576772695b66425f1bc5f426f2eb763c5a/sdl/declares.sdl