Roblox doesn’t allow graphics programming which is a pity, but it looks like there’s some hackish ways to alter render order.
Anyone want to try and fully document the behaviour?
Here’s what I’ve got so far, after a few hours of testing.
These rules apply from top to bottom, the top rules overriding bottom rules.
Transparent Glass parts that aren’t meshes completely hide anything transparent behind them.
Transparent Glass meshes render behind all transparent objects. When two of these are layered, the one behind appears in front.
Anything transparent and non-glass that has a humanoid as a sibling layers with other transparent objects such that screen Z position does not matter at all. It will render in front of all transparent parts, except for those that also have a humanoid sibling, in which case the layering is unpredictable. This weird layering even applies to how lone meshes render, for example RainbowWings are transparent and the mesh has two pairs of wings, but the bigger pair always renders in front no matter what angle you view from.
Transparent meshes sometimes render in front of transparent parts, depending on camera angle, part sizes, and positions.
It should be noted that wherever I mention “Mesh”, it only applies to meshes of type “Head” and “FileMesh”.
There may be more behaviours I haven’t found.
I’m hoping to eventually make a really well-working see-through portal, but the current layering behaviours aren’t enough.
Everything glass related Roblox is already aware of. This is something for #bug-reports:client-bugs. As a new member, you’ll want to message the Post_Approval group as per rule 15.1.
And now that I’ve compiled what is probably all known layering behaviours, it’s documented.
It really should be put in the Wiki though, as a separate page about render layers, since there’s probably a fair number of people trying to learn tricks to layer things.
I’m sorry, but I’m pretty sure that twitter account is controlled by PR, not one of the devs. I’m going to trust what the devs say on this one, which is not to rely on this behavior.
Retweeting clever uses of bugs is not the same as supporting the bug. All we’re encouraging is creative solutions to problems.
As previously stated, do not rely on this behavior. Complexo, thanks for at least assembling a list for people to play around with until it’s fixed though!
Well since it’s implemented currently as a bug, couldn’t it be added later on as it’s own material? Just like, a solid transparent block that eliminates the rendering of anything transparent behind it.
You still wouldn’t rely on existing bugs because they could still break if the glass material is patched after a dedicated material is potentially added.
I learned a new trick for render layer manipulation: Inside-out meshes.
They’re occluded by things inside of them since the back face renders instead of the front face, which I assume is how Databrawl is able to create outlines around parts.
The outline portion of it is, at least according to the wiki article - by inverting back-face culling and having a separate object slightly larger than the object you want an outline around.