Raytrack

Raytrack

38 devlogs
62h 24m
Created by Kip

A multithreaded interactive software(aka CPU) raytracing renderer written in pure c++.
Renderer core uses no external libraries. Libraries are only for UI and file loading.
Comes with a custom interactive graphical user interface for real-time rendering and editing, UI is done via dear imgui and openGL. (OpenGL's only for UI! Raytracer is pure math!)

Timeline

Ship 1

Kip

4 days ago

Kip Covers 38 devlogs and 62h 24m
Kip
Kip
1h 31m 4 days ago

Finished writing help content, github repo is now up! Ready for release.
Going to update my website, then ready for ship!

Update attachment
Kip
Kip
1h 11m 5 days ago

oh my god writing the preset scenes take so long :)))))
That was hell.
But now, everything is done! Except the help window, everything is getting ready to be shipped!
omgggg

Update attachment
Earned sticker

me want stickers! Also CLion wakatime nuked 2 hours again (again) (again) (again)
Working on preset scene system: A collection of procedurally generated demo scenes that the user can load, they'll showcase most of what the engine can do.

Update attachment
Kip
Kip
2h 13m 5 days ago

Texture creation modal is done!
Image texture modal is done via ImFileDialog :3

next step is maybe a scene system (and help content) then everything is done!!!!!!!

Update attachment
Earned sticker
Kip
Kip
1h 42m 6 days ago

Texture window is done, along with all texture properties. This was quick.
Next step is the texture creation modal, the image texture one will be hard :<
anywaysss

Update attachment
Earned sticker
Kip
Kip
1h 3m 7 days ago

Material creation dialog is also done,
so everything material related is done.
next step is doing the same for textures,
then preset scenes,
finishing the help window,
then it's ready for ship!

Update attachment
Kip
Kip
2h 10m 7 days ago

materials!
Diffuse and metallic material properties are done,
material slot drag and drop is done,
added texture slots with a shortcut to create a new color texture

Update attachment
Earned sticker
Kip
Kip
1h 13m 8 days ago

Objects can now be added! Add dialog is complete, so now everything object-related is done.
Gonna do the same for materials, and then textures. Image textures will be hell though.

Update attachment
Kip
Kip
1h 42m 9 days ago

Working on the create object dialog! When this is finished, all object related things should be finished. The support methods should transfer smoothly to materials and textures as well.

Update attachment
Earned sticker
Kip
Kip
1h 16m 9 days ago

Finally got cpp includes fixed.
Compound (object list) properties is implemented, and object slots are implemented too.

Update attachment
Kip
Kip
1h 56m 10 days ago

wrestling with cpp's insane include system..
everything is broken :)

Update attachment

fuck; CLion wakatime is broken again. Oh my god.
Implemeneted quad, disk and cube properties!
All mesh properties is now complete, still has list and translators needed to be done.

Update attachment
Earned sticker
Kip
Kip
1h 56m 10 days ago

once again, wakatime bullshit removed like 2 hours of time for no reason at all '<'
but anyways, object properties now work! Sphere is implemented, but this properties system was hell to implement. A lot of refactoring was needed to make this work in realtime. But after wrapping it in some UI things look are looking pretty good

Update attachment
Earned sticker
Kip
Kip
3h 26m 11 days ago

Geometry panel is half done, scene objects can be removed/added, drag and drop support is here, and work has begun for modifying geometry at runtime. This will be hell to do, since a lot of geometry is generated using a system not really suited for runtime modification, esp. most need to regenerate low-level data based on the changing high-level parameters.

Update attachment
Kip
Kip
1h 45m 12 days ago

Scene view is done.
There's some very nasty background stuff going on with render workers (I hate multithreaded code omfg)
But it now kinda works???! The code is not pretty nor optimal but it's good for the use case (I hope)
anyways scene system is done so geometry coming up next

Update attachment
Kip
Kip
1h 6m 12 days ago

Started work on scene hierarchy!
A bit different from my original design, but this would require minimal edits to the hittable system I currently have.

Update attachment
Earned sticker
Kip
Kip
1h 3m 12 days ago

finished camera and rendering settings. Some design work has started on scene management.
Too bad wakatime broke again and nuked today's time :)

Update attachment
Kip
Kip
1h 42m 13 days ago

Started working on windows and configuration panels. Integration should not be too hard. The hard part would be the scene system.

Update attachment
Earned sticker

Updated imgui theming with Inter as the font
Apparantly clion decided to report my project as two repos now uh
hope it doesn't break the time tracking again

Update attachment
Kip
Kip
1h 34m 15 days ago

Added a system to make the rendering process perceptually faster and more responsive!
The render workers will randomly decline rendering some pixels to speed up the image submit process, so a render will be presented to the user quicker. Then after a few cycles, the workers will prefer rendering pixels that has been neglected (with low sample counts) so the final image will have roughly the same amount of samples.

Update attachment
Kip
Kip
2h 59m 15 days ago

integrated with opengl + imgui, now the viewport automatically refreshes the viewport based on render
Next step: maybe do some rendering optimizations (checkerboard render?), create the scene system (this will be hell)

Update attachment
Kip
Kip
2h 40m 15 days ago

Multithreaded rendering is done!
C++ ownership/references/pointer is hell lol 0-0
but now multithreading works! Here I have 10 render workers running each on there own thread, with 1 sample per worker. The result is then merged together on the fly.
Still a bit slow, maybe checkerboard rendering in the future? But mixing algorithm would be pretty hellish

Update attachment
Kip
Kip
2h 57m 16 days ago

Mostly finished the multithreaded rendering!
Next step is to integrate opengl to display the render!

Update attachment
Kip
Kip
2h 43m 18 days ago

Started work on UI
decided to use dear imgui via glfw(opengl3~4ish)
Now I gotta research how to use opengl now arghh '-'
=]

Update attachment
Kip
Kip
1h 34m 18 days ago

Added volumetrics!
Rendering side features are mostly complete now, next step is to create an interactive realtime scene system / UI

Update attachment
Kip
Kip
1h 31m 19 days ago

Added transformation modifiers:
translation (move) modifier
rotation (x,y,z axis rotation) modifiers

So now the cubes in the cornell box has fallen over lol

Update attachment

uhhh it's the funny box!!!

Update attachment

Added emissives support! Now (diffuse) lights can be added!
(1000 samples, texture controlled emission)

Update attachment
Kip
Kip
1h 26m 21 days ago

Added quad + better" disk primitives. Spent way too long wrangling with cpp's insane inheritance system oh my god cpp why are you like this

Update attachment

uhhhh procedural marble texture via perlin noise manipulation
:>

Update attachment
Kip
Kip
2h 24m 24 days ago

added image texture support! via stb_image library for image read

Update attachment

uhhh work on procedural textures!

Update attachment
Kip
Kip
2h 46m 26 days ago

Implemented bounding volume hierarchy, which uses AABBs to do an initial ray intersection test before doing the expensive shape intersection checks. This brings some dramatic speed increases! sped up by 87% with 50 samples!

Also added space-time rendering (fancy way of saying motion blur) but yeah animation is technically possible now lol

  • some other small refactoring (aka cpp is hell)
Update attachment

Copied the scene from ray tracing in a weekend to debug any render artifacts. Everything seems right!

Update attachment

Added more materials!
- refractive
- reflective
- debug normal thingy (prototype of a basic custom shader system, lambert with normal as albedo)
More camera controls!
- FOV
- Pose control
- Depth of Field
Started work on more primitive meshes too
- Y-aligned circular disk (arbitrary height and radius)

Gotta work on getting this thing multithreaded, and make a gui (im thinking sdl+dear imgui? not sure yet) for it some time.
Doing barebones graphics stuff is super fun though.
Here's a render showcasing everything new (DOF made everything a bit blurry)
150 samples, 800x450, max 24 bounces

Update attachment

added lighting model system!
Materials aka shaders can now be assigned to objects,
currently true lambert and true reflective(Metallic) materials are added!

Update attachment

Basic diffusion rendering is here! Reflected environment lighting
Currently no any materials yet ("Shaders) but diffuse lighting looks okayish?
raytracing is remarkably simple to do though

Update attachment

Doing this project mostly to teach myself c++ (hell), and some computer graphics stuff on the way! Will probably move on to opengl after this project is done :3

Currently done: Fake sky shader, normal shading!

Update attachment