Thanks for the explanation! Although now I’m confused on the difference between raytracing and raycasting, because I’ve heard people call what you’ve described raycasting. Is there a difference between the two, or are they just different ways of talking about the same thing?
(I’ve also heard of raymarching, but I have even less idea what that is lol)
Raycasting is faster but offers less detail as it stops at step 2. : a surface has been hit. Meaning you cannot simulate reflections, refractions). Furthermore, raycasting casts not necessarily a ray per pixel, rather a ray per row or column of pixels.
Raytracing:
Raytracing usually follows physical properties of light - as described by the 4 steps (simplified). Raytracing casts a ray from each pixel in a scene and it even casts multiple rays per pixel for greater detail.
Raymarching is an optimization technique to speed up ray-tracing.
oh right, those exist. i assume doing this in roblox was very challenging considering u cant directly access gpu and other optimization techs, cool stuff bro
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.
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
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
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
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:
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.