blob: efbbeef7024e3dad7fffdce99ab0a6ee62f1f845 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Racer Tracer
A simple ray tracer written in rust. A hobby project for now. Feedback
and contributions are still very welcome.

# Building
## Using nix
`nix-shell default.nix`
After that you can do `cargo build`, `cargo run --release` etc.
## Not using nix
Currently uses rust version 1.65.0(may work on lower versions).
On Linux you may need to install these dependencies for the `minifb`
crate to work.
`sudo apt install libxkbcommon-dev libwayland-cursor0 libwayland-dev`
# Running
The application accepts the following arguments.
`--config` path to the config file.
`--scene` path to the scene file (only supports yml).
`--image-action` (png, show).
Png saves the resulting image to `image_output_dir`.
Show just stops the rendering once its done and waits
for you to press `R` again to continue with the real-time render.
Just running it without any arguments will use the default config and
scene provided by this repository. Once the application starts it will
present a crude preview image of the scene.

## Configuration
The configuration file has two blocks that controls the preview
quality and the render quality. You can set the number of samples,
max_depth etc through threre.
## Controls
`WASD` Moves the camera in a currently crude way.
`R` Starts rendering the image.
## Rendering Progress
As you start rendering the image it will replace preview image with a
more refined one with the settings from the render block in your
configuration file.




Once the image is done rendering it will go forward with the selected
image action.
|