Render SurfaceGuis within ViewportFrames

As a Roblox developer, it is currently impossible to use SurfaceGuis inside ViewportFrames.

If such a feature were added, Roblox game developers would be able to properly use ViewportFrames to create 3D user interfaces. Without this feature, there is no way for devs to render labels and other UI elements within ViewportFrames.

Possible use cases include literally anything you would usually use in a GUI:

  • Text on a 3D button
  • Images using ImageLabels
  • 3D scrolling frames

Without this feature, ViewportFrames feel incomplete. Developers cannot properly build user interfaces if they can’t show text or images.


Here’s an example. I wanted to make a 3D tachometer and spedometer for a car. I would use Frames and TextLabels to procedurally create the necessary ticks and labels for the gauge:

Here’s the model with the SurfaceGui:
tachometer

And here’s the same model in the ViewportFrame. As you can see, the SurfaceGui does not render. Thus, the user is left with a blank gauge:
tachometer_car

128 Likes

I believe this was originally left out due to issues with viewportframes in surfaceguis in viewportframes, if I’m not mistaken. I still support this even if viewportframes wouldn’t work when it’s added; I doubt there’s too many use cases that depend on them being functional inside of another viewport frame.

As an alternative solution for the time being, have you considered using a decal with the markings and numbers on? Unless you’re looking to generate these gauges programmatically, this seems like the perfect use case for a decal.

9 Likes

I would still love for this to be available. I’m working on a plugin and want to be able to use a viewportframe with parts that have dynamically changing surfaceguis on them. The only other solution right now is to make a dynamically scaling ScreenGui that positions UI elements exactly where I want them.

14 Likes

I support this idea. It is definitely very essential as I find a huge part of something I’m working on dependent on displaying SurfaceGuis inside of ViewportFrames. I had to go with a hacky solution by make the entire SurfaceGui an image manually with some drawing software, insert it as a decal which gets rendered. This is tiresome, and it is not a solution if you want your SurfaceGui elements to be changed dynamically such as a TextLabel.

7 Likes

Can we get a bump on this? Spent a week of my life trying to create crazy work arouns, sizing UI based on a 3d models position in the viewport, putting model in the camera, etc. Nothing works, there’s no work arounds to this, and it’s such an important thing, that I imagine wouldn’t be too hard to implement. Considering they added WorldModels that allow animations and what not, I can’t see how this would be any harder.

19 Likes

Bumping, it’s a very useful feature

2 Likes