r/KerbalSpaceProgram • • 2d ago

KSP 1 Mods Ray Tracing / Path Tracing mod

Post image

Hey guys i've been working on a graphics mod for kerbal space program to add ray tracing / path tracing to the game using compute shaders and deferred rendering as a base. Right now i'm working on compatibility with other graphics mods like raymarched volumetric clouds, scatterer and parallax. I'm also optimizing the mod because right now the game runs around 30 or 60 fps, this is an in-game screenshot, later i'll show you comparisons but i want from you some suggestions to improve the mod. I already have G and Z-Buffers, Accumulation Buffer, motion vectors, a basic denoising algorithm, BVH and even a global lighting system integrated to the pipeline

75 Upvotes

13 comments sorted by

18

u/hermannehrlich Believes That Dres Exists 2d ago

We got KSP ray tracing before GTA VII

12

u/Socksandsandelsboii 2d ago

Please have a settings menu that has presets and individual options because I just know large craft and ships with lights are going to kill the fps even more with this if it's stuck on full path tracing lol

6

u/Raulidd 2d ago

There's already a settings menu so don't worry about that

3

u/lost-my_old_account 1d ago

Did you make it or did claude make it? Please forgive the accusation, there's just so many people right now claiming "they" made some revolutionary mod for a game, and it turns out to be a vibe coded mess that breaks any other mods and is unstable as hell.

1

u/Raulidd 1d ago

It's partially made by claude, it made a base where i started working on because this is really really hard to do, more than the other simpler projects i have done. On that base i started fixing bugs, visual problems, compatibility with other mods and even new features. Soon i'll upload the mod's source code on github so you can check it out

2

u/blackrack Scatterer Dev 22h ago edited 21h ago

Can you tell us some technical details of how this works? Is this software raytracing or did you change unity version or rendering api? Is this raytracing or using another GI technique? Do you use any surface caches or any of the recent reservoir techniques? Do you accumulate temporally? Usually the issue with vibe coded projects is that they have no idea what's going on and if you ask them any questions they meat proxy it to claude

1

u/Raulidd 12h ago

I'm using hybrid Monte Carlo path tracing and is by software, the game is exactly the same it uses unity 2019.4.18f1 and DX11, primary visibilty comes from deferred G-buffer so it doesn't use camera rays, at each point of impact direct lighting is calculated via a shadow cast towards the sun while the bounces are terminated randomly. Material emission is factored in, at the end the result is added to the deferred lighting as a difference. If a ray doesn't collide with anything it doesn't change anything so it keeps the base lighting, and yes i'm using temporal accumulation

1

u/neural_processor_314 Colonizing Duna 2d ago

How does it compare to ReShade?

7

u/Raulidd 2d ago

is running directly on the game and is not an effect

2

u/IntelligentStrain198 stranded 4 kerbals on moho 1d ago

can we see spacecraft and other planets?

1

u/Lamar_Aerospace 2d ago

Excited to see 👏

1

u/No_Confusion6706 1d ago

Beau travail !
Je travail aussi sur un mod du genre j’ai hâte de tester le tiens !