"Reflectance" should be able to reflect Surrounding Areas and Environmental Instances

Howdy! :cowboy_hat_face:

As an average Roblox developer who works a lot inside studio, it is currently impossible to or creating some sort of reflect across workspace or parts/meshes around that particular part that is mirroring and reflecting thinks back on what it shows around it; if a part has the reflectance value of 1, then it would just reflect the sky and not any celestial bodies or models.

At the moment, you’ve might have seen some games or showcases that showcase reflecting baseplates and mirrors in Camping 2 which is fairly common when it was out, but what if something like reflecting instances around a reflected part? The reflectance for parts/meshes is something creative and used by many developers/users who put it into games to reflect some sort of mirror or a situation to use a part that needs to use the reflectance material to

The only way to replicate something that can mirror and reflect models often is using scripts or more instances and time to try and make something very similar to what real-world objects work or just mirrors; yes it is efficient to do do some scripting and time to try and replicate a reflecting masterpiece, but for some they might not have that time

Current reflectance as of now inside studio:

Image:

^ Another issue with this is that it doesn’t show or reflect the sun/moon at all, which isn’t very affecting the user experience but still would be a bit nice to do so.

An idea that I had for reflectance is having a checkmark to disable/enable it and have 2 ~ 3 settings to choose from such as the amount of reflecting it wants or environmental purposes to reflect off.

^ Putting it to perspective:

  • Amount of Reflectance: This will have a number or scrolling output to where or however much reflecting you would want for

  • Reflect Boundaries: Determine if the part shall reflect certain objects/instances inside workspace or lighting itself with sunrays

    • Instances: Everything inside workspace.
    • Celestial bodies: Sun/Moon in the skybox.
    • Environment: Determinating if it should reflect sunrays, Depth of Field, and maybe
      ColorCorrection?
  • Reflectance Color(s): Choose what color reflecting shall look like along with the skybox as well.

If Roblox is able to address this feature, it would improve my development workflow and experience a bit better because it would open up an easier and faster way to create mirrors or a weapon/model/building that can use the reflectance for more uses and not an alternative way to create things that can take a couple of minutes or seconds when fiddling with the settings.

Anywho, what are your thoughts/opinions on this?

24 Likes

Correct me if I’m wrong, but I thought dynamic reflections were one of those things so performance intensive that we developed an entire new hardware technology to do it.

Not sure if this would go well for lower end devices.

7 Likes

Like what @Autterfly said, this feature more known as Raytracing is very performance intensive. I can’t even run my computer at max graphics as of now in Roblox and raytracing will worsen it. But, there is an alternative called RayMarching, which is less performance intensive.

5 Likes

This has been spoken about before, the issue with the entire reflections is genuinely the amount of memory and processing required to have perfect reflections with the addition of the client having to do a large chunk of the work because it would be rendered based on perspective.

A giant issue as well with reflecting surfaces would be to what scale would you reflect the surface - should it recognise convex / concave shapes, should it reflect a part that is 1000 studs away that is visible.

So its possible, but how much stuff would have to be done by the client:

  • imagine the amount of maths the client would have to perform to recognise every single reflect instance.
  • imagine how much additional maths would have to be done by the client for all those reflect instances: the perspective changing based on your angle.
  • imagine adding additional properties to this which adds to the maths.
  • imagine then also making it so sunrays reflect or refract off a surface.

So what does this mean:
You have to remember this is going to be done by the client, not the server, as its going to be client based perspective. So to give true reflections of all instances is genuinely going to be too much for most modern day computers and as such no one could use it because as you add more reflect instances you’d essentially make the load for your GPU even bigger.

I mean valid alternatives exist such as:

  • Screen Space Reflection
  • Ray Marching

But they are still performance intensive and do not scale well as you add more instances.

Will it come? Eventually yes.
I can happily say I can run any game at max graphics (with few exceptions), but then I also forked out £2600 on a computer (for my career / personal use) which most people will not do or can’t afford to do. But even with my expensive computer I will struggle after you add tons of reflect instances because its going to be tons of maths constantly being run.

But luckily technology naturally scales up over time and my computer will not be the top of the line: Today on the 25/08/2020 I can say that I can run at max graphics but the chances are in 10 years time my computer will be way behind and I’ll have to replace its core parts because we’ll have bigger core CPU’s in less space or graphics cards that can do 30x more. Reflections isn’t going to be a thing until on the grand scheme of things it is a small load.

6 Likes

Real-time raytracing is so expensive it requires dedicated hardware, which currently means a top-of-the-line graphics card that fewer than 0.01% of Roblox players have, so don’t hold your breath waiting for this.

Raymarching isn’t a cheap alternative to raytracing, and it also requires significant GPU horsepower. Raymarching excels at rendering volumes you can describe with functions of position (x,y,z), not something you can do for an arbitary triangulated mesh, so not suitable for Roblox.

Game engines like Unreal and Unity generally do reflections two ways: Reflection Probes and Screen Space Reflection. Reflection Probes have the cost of having to render the scene from the PoV of the probe, typically to a cube map (like the Roblox skybox). If you want perfect moving, dynamic reflections, this is A LOT of extra rendering overhead every frame, way more than the main render pass done by the player’s camera, because the probe can see omnidirectionally (so no Frustum culling). This is more CPU and GPU load, and again, something that would only run well for the folks with top-end gaming PCs.

Screen space reflection is a post-processing trick that can only show you reflections of things that are already visible in the scene. It gets used for things like wet or polished floors, puddles, etc. It can’t do mirrors, because it can’t show you the sides of something you aren’t looking at, and it can’t show things that are outside the view of the camera. So, it’s kinda limited. Roblox uses it for smooth terrain water reflection.

4 Likes

Since terrain water already has screen-space reflections, I don’t see why parts couldn’t have it too. I can’t see actual reflections coming to Roblox, because they are so hard to calculate and because it can give players with better computers an advantage (since they could see something outside of their screen). But screen-space reflections are not nearly as hard to calulate, and won’t give anyone an advantage because it’s impossible to see anything in a reflection that you can’t already see on screen. Terrain water already does this, bu only on higher graphics quality, so I don’t see why they couldn’t add that to parts.

2 Likes

Water is handled by one singular shader with no significant parameterization. Just because it can do something is not a strong indication that other things can easily support the same.

8 Likes