Activity

captaintriton167

Shipped this project!

Hours: 71.49
Cookies: 🍪 670
Multiplier: 22.13 cookies/hr

I added a lot of key features of a proper pathtracer, such as texture atlas packing allowing multiple textures to be passed to the GPU; proper project structuring; and a GUI. Next I want to work on the GUI more to add more features and probably smooth out some bugs with the BVH traversal.

captaintriton167

I did a lot of work this week, mainly working on implementing a UI similar to that of Blender’s with an outliner and properties panel for selecting and editing object data. I still have a few bugs to iron out, but I think it works pretty well! Next I want to fix some rendering issues with the BVH traversal code and also add more features like saving the scene, deleting and adding objects, plus other parameters for materials.

Attachment
0
captaintriton167

Did a lot of work behind the scenes, mainly updating the structure of the project. I’ve moved the different modules into their own folder now, so it is much easier to maintain.

Attachment
0
captaintriton167

A feature that I added a while back but couldn’t find much use for was textures, since you could only use one and it would affect all diffuse materials. With some work, I created a function that compresses the textures into an atlas to be passed to the GPU which then decodes it. After testing it out with some legacy Minecraft textures I found, I think it’s safe to say it looks pretty awesome!

Attachment
0
captaintriton167

Shipped this project!

Hours: 22.45
Cookies: 🍪 503
Multiplier: 22.43 cookies/hr

Made quite a few backend changes, like adding a BVH for optimisation and adding texture support. It is looking more and more like a proper raytracer! Next I think I want to focus on further optimisations, as it is still fairly slow.

captaintriton167

I did a bit of work on various aspects of the raytracer. Most notably I redid a lot of the object loading code to use a new, more expandable system. Here is an example with a single cube (which would be broken up into 6 quads).

Attachment
0
captaintriton167

I made quite a few changes to the way the objects are processed before being sent to the GPU, mainly by removing a lot of the hard coding intended for sphere objects. Now I’m able to support other object types, notably this quad type that I’m showing off in this small Cornell Box scene. There’s a lot to be desired currently - the emissive materials aren’t bright enough, and this scene especially is very noisy. Overall however, I’m quite happy with the progress so far.

Attachment
0
captaintriton167

Added BVH construction to optimise the raytracer. It does speed up scenes with lots of objects by quite a bit, but I’m still not entirely happy with it, as it doesn’t perform quite as well as I had expected.

Attachment
1

Comments

nmsoukmandjiev007
nmsoukmandjiev007 about 1 month ago

great project!!!!!!!!!!! :)

captaintriton167

After moving onto the second book (Ray Tracing: The Next Week), I implemented texture loading into the GLSL shader. I also added depth of field, and cleaned up some of my previous work, like fixing the maths for the glass shader.

Attachment
6

Comments

hack.clubber
hack.clubber about 1 month ago

Yo this looks amazing

hack.clubber
hack.clubber about 1 month ago

btw, you said in the description that it only works on arm64 but I got it working on x64 without any trouble.

captaintriton167
captaintriton167 about 1 month ago

yeah for the most recent build I built it for x64 from a different device, in the future I want to find a way to build to multiple platforms

hack.clubber
hack.clubber about 1 month ago

I actually built it on my machine I didn’t run your build

hack.clubber
hack.clubber about 1 month ago

And for linux, you can use WSL

captaintriton167
captaintriton167 about 1 month ago

oh yeah that’s a good idea

captaintriton167

Shipped this project!

Hours: 18.47
Cookies: 🍪 361
Multiplier: 19.53 cookies/hr

I added lots of features to my raytracer (which is technically a path tracer now!), like options for different materials, scene config files to create your own scene, denoising and more. I’m really happy with how the project is coming along, and I have lots of ideas which I’d like to add in the future. :)

captaintriton167

After quite some time, I’ve added a feature that I’ve wanted to add for a while: camera rotation! You can now use your mouse to look around the scene.

Attachment
0
captaintriton167

I finally added a way to adjust objects in the scene without having to change them from within the fragment shader; you can now create a .toml file and specify all the objects and materials in the scene.

Attachment
1

Comments

secretaditzu78
secretaditzu78 about 2 months ago

Cool!

captaintriton167

Managed to get per-object materials to work, so you can have a metal shader on one object, and a diffuse shader on another! I also added a really cool glass shader, which surprisingly doesn’t tank performance that much.

Attachment
0
captaintriton167

Did some BTS work with updating the project structure and cleaned up some of the code. I also updated the github page and pushed the first v1.0 release.

Attachment
0
captaintriton167

I’ve finally added different materials to the raytracer! Currently you can choose between either Lambertian scatter (diffuse) or metallic scatter from within the fragment shader. In the future I’d like to make it easier to change parameters like materials and objects from the main loop, instead of the shader code.

Attachment
0
captaintriton167

Did some general chores, mainly cleaning up the shader preparation code by moving the loading functions to a helpers.c file. I also improved the denoising by making it more efficient and fixed frame blurring with movement (still a WIP as zooming isn’t fixed yet).

Attachment
0
captaintriton167

After lots of work, I finally got temporal denoising to work! Essentially, it accumulates each newly rendered frame by blending it with the previous one. I also fixed the previous hash seeding error.

Attachment
0
captaintriton167

Shipped this project!

Hours: 3.16
Cookies: 🍪 48
Multiplier: 15.07 cookies/hr

First working version of the raytracer with a diffuse shader! Other added features are anti-aliasing, zooming and dedicated GPU rendering.
I’ve learned a lot about vector maths and how GPU rendering works, and next I think I want to work on different materials and buffer rendering.

captaintriton167

First proper raytraced result!

I have a lot of work to do with updating the hash function to get rid of the striations and also optimise it, but this is a great result.

Next, I want to create a glossy material and try to make an emissive material (which isn’t part of the RTIOW blog)

:3

Attachment
0
captaintriton167

After lots of pain, I finally got the anti-aliasing code to work and added controls for it.

Getting closer to making the diffuse shader!

:3

Attachment
0
captaintriton167

Finished updating the fragment shader to use an abstraction for hittable objects, and added zoom and better movement functionality.

Next step is to add a diffuse shader for the first actual raytraced result!

Attachment
0
captaintriton167

Working on updating the fragment shader with an abstract struct for hittable objects.

Attachment
0
captaintriton167

Currently working on the code for the camera, with the help of the Ray Tracing in One Weekend blog.

Attachment
0
captaintriton167

Created the basic structure using Raylib. Implemented a simple fragment shader that displays the screen UV.

Attachment
0