Viewport frame shadows?

Hello, everyone.

Is there any ways to implement shadows on viewport frames?
Like, any workarounds that are efficient?

Sincerely,
-coolguyweir

2 Likes
  1. I don’t think this goes in Dev Discussion, maybe game design support or scripting support?
  2. No there isn’t, I have been wishing for a viewport frame update for about a year now. I really want stuff like shadows and the ability to choose the render parent (instead of it being just the viewport frame).

Putting aside the category of this post as it has been mentioned above multiple times, I’ll go ahead and answer the original question.

Given how Roblox renders shadows and ViewportFrames, I find it highly unlikely that they will directly implement shadows directly into them. As is, ViewportFrames functionally act as unshaded 3D environments, showing only textures loaded from memory rather than rasterizing shadows for it - this is why you can’t use EnvMap within them - because of this, they are able to get away with a far smaller performance impact on the client, freeing up memory and CPU/GPU clock cycles for more important tasks, and giving extra headroom for games which are unoptimized to work within.

At the moment, there are a few potential ways around this I can think of:

  • Offset at least one darker part beneath and to the side of your initial target in order to provide a drop-shadow-Esque effect to your scene.
  • If you’re using shadows to differentiate verticality of some form, you may be served well by using darker shades for lower sections of a scene and lighter shades for higher sections of a scene.
  • Use some form of additional GUI element to try to imitate shadowing - this might work if your scene is static, but is likely the least viable option available to you.

Hope this helps!

1 Like

I would think “simple” way to do this is to raycast a lot. Get the vertices and raycast from there later on adding som dark triangles on where the shadow ray hit.

Here’s a problem though… LAAAAGGGG


Here’s what the results look like, although I haven’t put it in a viewport frame

2 Likes

cool, hope u finish recreating the roblox shadow viewport, i’d use it for my works