Crazytracer [Raytracing Project]

More tweaks today to make the performance more scalable! I can now render 288x162 at 60FPS+, which beats the previously posted video on both fronts! We’re still rendering from a single thread too, so this is going to scale reaaaally well.

5 Likes

It’s a rainy day in crossroads…

10 Likes

WOW big improvement here this is incredible. Can I ask what changed? Also, the real time rendering is quite performant all things considered. I think this rendering style could DEFINITELY be used in some niche circumstances, like a game that would take advantage of the “artstyle” of it. Fantastic job!

3 Likes

I think this rendering style could DEFINITELY be used in some niche circumstances, like a game that would take advantage of the “artstyle” of it.

as someone who built their own optimized renderer for art (this is not realtime, this is designed for offline renders… and i don’t use it anymore becuase i godot now!) , no it isn’t feasible to achieve real time rendering with raycasts. (retroraster isn’t really a good solution, there is noticeable artifacting, and you’re stuck with rendering at an unintelligible resolution far lower than minimum resolution of the n64 or ps1)

raycasts are done in software, and is expensive. doing them too many times per frame will lead to poor performance, being more harshly on lower end devices. (when you’re developing roblox games, your first assumption should be that you’re developing for the low end)

fancy stuff such as lights, reflections, shadows and global illumination, requires more raycasts to be performed, lowering performance to something unplayable. even the most primitive implementations is enough to drag down fps by alot.

these problems wouldn’t matter if you’re doing this on a high end system. in fact this is probably what op is using, because i surely don’t expect my i5 7300u to render a huge magnitude of reflections at 1920x1146 pixels

1 Like

Understandable! I’m not a graphics programmer so im definitely not the most qualified to comment on the viability of these systems, but managing a fairly stable 60 fps is impressive to me considering the rendering hes doing and hox expensive it is.

Anyways, cool project is all I wanted to say! Thanks for the reply :blush:

This is just a demonstration of what the renderer is capable of! I rendered the pretty high-res high-reflective 1024x1024 image in 5 seconds using 1 thread. So it’s the same rendering system but because we are no longer required to provide fast response times for gameplay purposes, we can take as long as we like rendering this.

There are more optimisations to be added and soon I will be exploring texture mapping as that is also important in bringing an environment to life.

I’ve been hesitant to implement multi-threaded support for reasons of unfamiliarity but also I do not want to give myself an easy ‘out’ for what could end up becoming poorly optimised code.

The best way I could sum this up is that we are standing on the shoulders of giants. People were determined to create raytracing programs even all the way back in 1986, despite 1 frame taking 1 hour to render. That alone gives me inspiration to push forward :slight_smile:

3 Likes

Good job, and great mindset! I hope you continue this project.

2 Likes

The features you have on your renderer are very impressive! It’s cool hearing from other people who’ve dabbled in this.

I love RetroRaster, and appreciate what it has done for pushing boundaries with regards to realtime rendering on Roblox. The art style is subjective, but the performance and methods of optimisation they use is something that should not be slept on.

I appreciate how pretty the results your renderer can output, although I completely understand that the visual fidelity you strived for is something that has never been done before in realtime on this platform.

1 Like

This really cool to see! Glad to see more people trying stuff like this out! Very impressive results so far!

1 Like

Here’s today’s demo :slight_smile:

1 Like

That looks really good! I have a few questions about your system. How many reflection parts can you have without having performance issues? Can you have a part that is reflecting off of a part that is reflecting? Can you make a room of mirrors where each face in that room is a mirror? What would it look like inside?

In many rendering systems on roblox, I notice that when you move the camera, there is this “blur” effect. Is that on purpose, or is it intended?

1 Like

I was just thinking the same thing. I’m assuming it’s to help the rendering with performance, but it could be a stylistic choice too.

1 Like

It’s better to think about how many rays can be shot per frame before seeing any performance slowdown. In the video I’ve provided stats in the bottom left showing the amount of rays shot compared to the amount of pixels rendered in a frame.

When I turn on reflections in the video, you can see the ray count shoot up, and it no longer matches the amount of pixels rendered. I wouldn’t expect an environment where everything is completely reflective, but this serves as a proxy for how the system would respond if I added more checks with rays in the future, like shadows and lighting.

The blurring or lines that are left behind when quickly moving the camera helps reduce how many pixels are rendered per frame, allowing for more respectable frame-times.

Luau on the client is interpreted & doesn’t have access to the GPU, so it’s important to scrutinise every line of Luau while taking advantage of any C++ functions I can get my hands on [Faster, lower level language].

The blurring/lines is far from optimal, and in-fact shortly after uploading that previous demo I came across another method that dramatically increases performance in a way that it isn’t as jarring visually, which I will share in my next progress post.

For fun I tried out adding ‘CRT Scanlines’ to match the currently low-res aesthetic the renderer runs best at. Not only for visuals but it aided in further removing more lines to render per frame.

This is something that stylistically limits the renderer though, and for my new rendering method it may not yield any improvement due to upcoming architectural changes.

2 Likes

Ray tracing update in Flood Escape 2??? :pray: :pray:

5 Likes

Reminds me a lot of the style that the Atari series my dad and I used to play together used. It definitely has that retro style. Could be really cool for something similar to the Atari games, or the fnaf minigames. Honestly super impressed with how far and how fast this progressed!

1 Like

For a roblox run-time raytracer, it is a pretty good solution for a lot of devs and hobbyist.

And depending on the game, you can get a higher frame rate by adjusting some settings and tuning it to your liking. The videos shown on my forum post are highest graphics settings enabled, which ofc means it will run a bit slower and then you can down the settings a bit.

This still is a raytracer, so you’ll ofc run into performance issues just like with any raytracing attempt on roblox, as you’ve mentioned before. Trying to get much higher resolution with nice looking textures and stuff and a responsive renderer just isn’t feasible for roblox games via raytracing, especially on mobile.

This has never been the case. The renderer has tons of settings and are very customizable, including the resolution.

Can even get +60 FPS at 200x120 if we disable some of the more intensive settings.

You can completely disable that, and down some settings a bit and you can honestly get a very pleasing results.

RetroRaster was designed like a template, It can get higher resoltuions, but you can disable all kinds of rendering stuff, just like with a custom one. So it’s pretty well as good as a roblox raytracer can get.

I might even experiment with polygon rendering at some point honestly as I know you can definitely recreate PS1 or even Nintendo-like game engines via EditableImage.

Well, this just isn’t true. It’s up to the developer as It depends on the game. It could be a very nice and detailed game designed for PC and console only for example (or I guess you could call it a AAA title), or it could be a moderately detailed and a large open world game for an example (which would only be suitable for mid-end devices or higher)

I like to treat roblox similar to a platform like steam, a library of games with different variants of quality and performance requirements. There are markets for a high-end games, low-end games, etc, but generally, yes you do tend to aim more for mid-end / low-end devices, but this isn’t always the case

2 Likes

Honestly love that esthetic. Can’t wait to see what else you can do with this!

1 Like

Wow, what a fascinating use of editableimages. Is there currently support for objects that arent recorded by raycasts, such as decals or specialmeshes?

1 Like

If you add support with fog, and variable reflections, it will be amazing

What is the current specs of your computer to render this?

1 Like

There is currently no support for Decals or SpecialMeshes; only BaseParts.

Decals might be possible. As for SpecialMeshes, it seems like using InsertService:CreateMeshPartAsync() might be a viable path, raycasting depends on the collision logic of a BasePart in order to render it out correctly.

1 Like