Ray Tracing Module #2 [SOURCE RELEASE]

Great job on the update! You’re literally making ray-tracing on Roblox possible lol.
However I fear that you might be starting to run out of optimization methods to use, so I don’t think you’ll reach too far due to Roblox still for some reason not giving us access to GPU.

Though, keep on improving it! I’m waiting for future updates to see where this project will go.

1 Like

Shader sneakpeak:
image

I got one more thing that can be improved, that is migrating to buffers rather than using tables to store the render-data.
Yes, I have used tables for the entire time. Buffers would decrease the memory usage for sure…
Well, that is if implemented correctly… ehhh
image

Give it a shot! That might improve it a lot. If it’s even possible, maybe you can use the bit32 library, though I don’t know if that’ll be useful.

1 Like

This looks really awesome! I myself have tried recreating this and what I did to not use EditableImages was to instead create beams on every row of the face with differing light emissions, transparency gradient and color depending on a nearest light source. It was EXTREMELY hard to code and also looks pretty janky but im sharing this in hopes you can use it somehow :V

1 Like

I am very interested! I hope you will be able to optimize a decent level for FHD resolution

1 Like

With the currently available technology that ROBLOX provides, it’s simply impossible to achieve faster render times.

Although the rendering is running in parallel, the CPU simply isn’t made for those types of mass operations. Having access to the GPU would immediately fix the slow render time; however, I think that ROBLOX is far from implementing such an API.

I tried rendering a 1920x1080 image, however, my studio crashed more than 4 times, so I settled with a sampled 1000x1000 image.

rays per pixel: 1
rays per light: 3
render distance: 35 studs
iterations: 50
total render-time: 23.25335 seconds
fastest render-time: 0.433823199942708 seconds
slowest render-time: 0.5374267000006512 seconds
avg render-time: 0.44557239999994636 seconds

the same image with no Anti-Aliasing and no sampling:
total render-time: 0.3714971999870613 seconds
iterations: 1

List of my optimization techniques:

  • batch processing
  • multi-threading (parallel lua)
  • implementation of buffers
  • custom Color4 class
  • custom (vector) math library
  • using native lua math library
  • sampled rendering (enabling better quality other multiple frames)
2 Likes

I hope that roblox will update their engine after all… There are few opportunities

3 Likes

Where do i get the module



Real time Pathtracing
1000x1000 runs around 20 Fps , 50 ms

4 Likes

I mentioned aiming to release a polished version in late September. However, due to unexpected events, I haven’t been able to refine it enough for release. My new deadline is mid-November.

In addition, I have to rework my implementation of EditableImages as ROBLOX has updated it:

It is very cool! How did you implement this at all??? Can I see the source code? I’m sooo interested in what it says.

WE NEED THIS MODULE

Thank you for your feedback ^^

As by my last message I am going to release the source code once I’ve fully cleaned it up and migrated to the new update. For the time being the update released by ROBLOX has broken the entire Ray-Tracer.

2 Likes

Would be nice if you could post a video of your scene rendering at 20FPS at 1000x1000 pixels.
How many actors are you using to achieve this?

Please keep working in the same spirit, it’s amazing

Hello, there is an update for the edited image. This is now available for publishing and rendering on the client

Sadly not, haven’t had much time to focus on it. Much has changed with their new API update, forcing me to rebuild the back-bone completely.

1 Like

Here is some current progress.
image

Note how the area that is not receiving light is full of noise for some reason.
Ye, idk why that is either…

1 Like

can we get source

maybe.

Alright, since there have been so many asking for it I, I hereby publish the source code. I docuemented some stuff already. More is explained in the “ReadMe” and “Documentation” Scripts.

In there I also mention that I will create a git repo for better source-control.
I am going to announce it once it’s set up.

Please note that due to the API update, some advertised features may not be functional anymore.

Long story short, here is the source:
RayTracer.rbxm (31.4 KB)

1 Like

It had some noise so ive been trying to make a denoiser. Its a shame roblox just got their new id update but here’s progress.
Screenshot 2024-11-27 150655

1 Like