Another full roblox ray tracer

so here’s a thing

The ray tracer renders with a ray tracing algorithm, multithreaded using Luau and a python web server hosted locally and ensures my PC is being tortured at maximum efficiency
Renders quite fast with parallel Luau (faster renders are usually mostly occupied with uploading to the server)
Trying it yourself & contributions much appreciated, more images coming soon

images

upload times ± 20 seconds on all images considering upload time is inaccurate (program waits for user input before continuing while still counting the time)

3 minutes render time
1
newer version of parallel implementation: 126 seconds w/ upload
2020 12 16 - 11 37 12
6 minutes w/ R channel used for green and blue


10 mins with 25 samples 2 bounces

18 mins with 100 samples 2 bounces

8 mins with 25 samples 2 bounces

6 mins with older algorithm

30 mins with 200 samples and a really bad skybox

no shading (10 seconds render, 50 seconds to upload, 1530x830)

comparison render: 1 sample 2 bounces (40 seconds render, 20 upload)

comparison render: 2 samples 2 bounces (54 seconds render, 33 upload)

comparison render: 10 samples 2 bounces (80 seconds render, 33 upload)

comparison render: 20 samples 2 bounces (120 seconds render, 34 upload)

comparison render: 100 samples 2 bounces (8 mins render, 34 secs upload, server crashed once, I fixed the sky lol)

27 Likes

Really cool. I never knew this was possible and yet again, you amaze me with your work.

3 Likes

Ye might need to find a solution for the noise chief. it’s impressive how you pulled it off but the problem we got here is noise for now.

3 Likes

throw more samples at it is always the solution
(I have no idea how to write a denoiser)

3 Likes

Got it chief. will try to do it.

3 Likes

Sorry for the bump, but how did you get this high of a resolution without having your studio crash from the lag?

2 Likes

Frame compression (i’m pretty sure). Never use a single frame for every pixel. You can at least use 1 frame to represent 10 pixels with UIGradients. And if your renderer doesn’t have much colours, you can do a lot of frame count reducing.

3 Likes

I actually found something out for a one time HIGH resolution image, you have to code a PHP program to make an image outside of Roblox studio, so you don’t use so many frame instances, but still get the r a y t r a c i n g

3 Likes

So yeah that is one of the downsides of using the UIGradient trick. Unless your image is perfectly square and you tweak it specifically every time (so no high contrastable images as you get blurs on the contours) it will cause a bit of blur. There is actually better ways to do this than using PHP, you can use a django backend along with opencv and GRIP to basically create a macro which takes a image of a selected portion of your screen (very easy with opencv) and then get those images data and run it through some shader. Now that’s not very impressive is it though? That’s why people like to code it in luau

1 Like

It’d be very coo if someone posted a tutorial about the things you stated, because I have absolutely no idea how to do the things.

2 Likes

if you look at the source code it exports the images to png

Really so good. I believe u will do more.
Keep up the good work!

I easily removed the blur from BoatBomber’s greedy canvas system by making sure it only allows ten colours max for pixels per gradient. This removes the blur and creates a clean image while also having super efficient compression. Sure you may get at least a thousand or so frames, but it is still waaaay much better than having a frame for every pixel.

^
Example of me using the edited module rendering a textured scene at 250x200 creating 2960 frame instances

Can you share/pull request the fixed version, and when you mean by max do you mean to have 10 max 10 with even distribution? seems to not work for me.

edit: i saw your dm, setting the variable lossy in GreedyCanvas to 0 fixed it