Option to toggle 3D rendering off

It is currently too hard to achieve performant, 2D-only games. I want Roblox game engine to have a switch that disables rendering of workspace, lighting, shadows, post effects and skybox. Internally, this should deactivate any 3D-related internal commands, buffers, uniforms and etc., which are always sent regardless of anything, wasting the compute and power to send data from CPU to GPU.

A simple toggle property would suffice for now, without introducing more complicated systems like 2D/3D edit modes.

I also noticed that we already have RunService.Set3dRenderingEnabled (since 2017), but it is locked behind roblox core scripts. This could be unlocked.

This new feature will give benefit to everybody - players and developers, by allowing more performant and native GUI-based 2D games.

12 Likes

Unfortunately right now even internally roblox doesn’t even reference it anymore. unlocking studios internal mode via a patcher lets u test the function and rn it does nothing.

2 Likes

A better option would be if CurrentCamera == nil then turn off rendering, this would be a much better solution and give us more control over CurrentCamera.

2 Likes

What if instead of an API it was more like a heuristic? If the entire 3D viewport is covered by a solid color frame (and there are no ViewportFrames), we’d turn off 3D rendering

6 Likes

That sucks, just make it so if no CurrentCamera property exists, it just doesn’t render anything just like how old Roblox used to handle it.

1 Like

Darn, OK! :sweat_smile:

Not sure about camera options though, its a bit out of my area.

4 Likes

his comment was a lil rude :sob:

better way to put it is, if done your proposed way it feels like an unintended workaround rather than a feature, also there may be performance issues with toggling rendering on and off constantly if a game has transition screens for example that black out the entire screen constantly but im not too sure since i dont work on the engine.

imo the best idea would be a workspace property since its a service closest to the camera, as having it on a camera instance doesnt make much sense.

i appreciate u replying to feature requests tho pls keep reading them :folded_hands:

1 Like

This, I think there would be unnecessary calculations made and it feels a bit overboard even if done correctly.
The other comment with CurrentCamera being set to nil would be very unclear, compared to a property that states its purpose

How don’t you understand that if there’s no camera, there’s nothing to render. This is exactly how old Roblox used to handle it if you accidentally deleted the camera instance before they added the immediate recreation of one after deletion.

I don’t know where you pulled the “unecessary calculations made” because turning off rendering is the opposite of that. There’s no calculations needing to be done after rendering is turned off except for the normal physics and animations.

Reread my sentence, I am referring to the solution proposed by the Roblox employee, not yours.

Honestly, no. But if not already, an interesting idea, you could make occlusion culling unified with 3D world, by culling out geometry behind solid interface. This however does not answer the complete option for 3D blackout.

Logically, to completely turn rendering off (not just a switch, but wires plugged out; e.g. no internal buffers and commands), we want (no, we need) an explicit toggle for 3D rendering. You should understand that real and mature developers need control over their creation.

And like any other standard engine, Roblox game engine needs native 2D/3D modes. Then we could expand it to separate 2D and 3D studio templates…

Give other engineers a shot. Invite em’ here :sweat_smile: :folded_hands:.