Add method to enable Wireframe/Grid Material Rendering on client

As a Roblox developer, it is currently too hard to create stylized visual effects for certain visual situations (such as those seen in games including Scanner Sombre and the Watch Dogs franchise) involving limited vision or alternative methods of an individual ‘seeing’ their environments (such as through sound, through light, or through a different method).

This is, in no small part, due to it being impossible to enable two separate features already present in Roblox Studio - the ability to enable wireframe rendering and the ability to enable grid material rendering. In Studio, with the use of wireframe or grid material rendering, in conjunction with Highlight instances, these effects can be somewhat faithfully replicated - rendering the environment partially visible instead of either without any or with far too much distinguishable depth.

When this combination is used in Studio, it looks something like this (Image provided by @Kyverntis):

When used, this effect is a stunning contrast from what the player regularly sees - and allows for the player to be limited in vision in a manner that enables many gameplay design possibilities - such as making a player-controlled character that can only ‘see’ through sound or through some other medium aside from just standard vision.

Existing alternatives do exist - such as using forcefield material’s visuals when intersecting other parts - but aren’t able to replicate the full sense of sensory deprivation that this effect does - especially not without the risk of giving someone with photosensitive epilepsy a seizure as a result of excessive movement.


If Roblox is able to address this issue, it would improve my development experience because it would allow for me to more closely portray what is already easily portrayed in other game engines and in Studio - and allow for new, unique visual concepts to be brought into reality on this platform.

Although I am well aware that this is far more niche of a feature request than many others which are desperately needed or would significantly improve what we as developers can depict visually on Roblox (Such as the need for Skyboxes to finally support HDR in order to not actively hinder developers), I feel that making these particular features from Studio be available to enable/disable in-experience are likely relatively simple changes to make.

9 Likes

Is there a reason you can’t use WireframeHandleAdornments?

I will be honest, @BizzarBlitz - I didn’t actually realize before you made that response that the WirframeHandleAdornment instance class even existed! So, after reading the available documentation, I went ahead and attempted a few quick experiments in Roblox Studio to ascertain how effective an approach using the instance class would be in comparison to the Wireframe render functionality already present in Roblox Studio.

Unfortunately, as I found in my relatively quick experiments in Studio that I performed, there’s a few issues that seem to render (heh) using WirframeHandleAdornments for this use case impossible as of the time of writing:

  • To begin with, WirframeHandleAdornments are a sub-class of HandleAdornment instances, which themselves are a sub-class of the the abstract PVAdornment instance class.

    • This results in instances that are not PVInstances (instances that have a physical location) being unaffected, removing the ability to apply the effect to game.Workspace - and preventing certain positionless objects from being drawn as wireframes (Most notably, attachments and constraints are impacted by this). This results in a break in feature parity from the theoretically attainable results of using WirframeHandleAdornments for this use-case.
  • WirframeHandleAdornments, from my limited testing, do not offer the ability to hide the faces of an object if rendering a wireframe. This prevents most of the use cases described in my initial post, as being able to see full geometry would preclude ‘vision’ based on non-standard methods of input.

  • WirframeHandleAdornments appear to be unable to render at all in Roblox Studio - however, this being the case in my testing may simply be a result of me having an insufficient understanding of the instance class’s functionality as a result of the lack of documentation provided by Roblox regarding it.

    • I attempted tweaking every property, in addition to attempting to have it adorn Part, UnionOperation, MeshPart, Model, and Workspace instances. None showed any visible result regardless of input.
  • Were the instance to function, it may still have a prohibitively large performance impact for many use cases - given an inability to apply it to all of Workspace at once, it is likely that a sizable number of instances may be required to obtain a similar effect to what can be done in a far more efficient manner by simply disabling the section of the rendering pipeline that displaces faces on geometry.

Although this is not an exhaustive list of the issues I found with possible approaches using WirframeHandleAdornments, I feel that the above issues that appeared with a cursory experimentation would each on their own justify this change - but combined, they render the current desired results shown within the example screenshot in my original post unattainable outside of Roblox Studio (outside of directly injecting into the rendering pipeline, an action both not controllable by the developer and extraordinarily likely to trigger Byfron/Hyperion’s script injection detection resulting in an immediate forced crash of the client).

However, if you happen to have some information on the WirframeHandleAdornment instance class that I’m not aware of, please feel free to share it - I’d love to be able to use this technique in at least two of my current projects if there’s any way of making it possible on the client at runtime.

WireframeHandleAdornments only render if you put them under PlayerGui and adorn them, so that’s probably why you can’t see them.

Unless you have lots of moving parts (which would each require one additional instance) you really technically only need one WireframeHandleAdornment to render the entire static map, including different colors. Though I haven’t tested anything on a large-scale, rendering wireframes themselves seems pretty cheap. I doubt performance would be a huge issue, since Studio does pretty alright with them.

I do agree that this should be a feature though, as rendering it right now individual parts are indistinguishable if you try to render the faces.
Left is clearly a box, while the right is just messy lines

Though, looking at the screenshot you provided, you could probably just use vantablack parts and render wireframes around those (with AlwaysOnTop = false).