It’s been almost 7 years since this feature request was created, and I would like to finally see this implemented, as this is a crucial feature of any game engine. Many games engines have this feature, here is some of them:
The ability to turn on, or turn off rendering for a “Model” would be greatly beneficial to development on the Roblox platform, as developers would be able to:
- Efficiently show, and hide complex or high instance count models, with little computation cost as most of it would be off-loaded to C++ API, where the process could be well optimized by the Roblox engineers responsible for the game engine.
- Easily show, and hide any model desired without writing their own helper methods, which often requires to save all the current transparencies, and restore them back later.
- Modify transparency of objects within a Model, as well add or remove children while it is hidden without unnecessary computation, and complexity.
I’m currently working on core feature for a large game that requires me to show another character, and hide the current character. This would’ve just been a simple script like this:
localPlayerCharacter.Visible = false
specialCharacter.Visible = true
But since the feature doesn’t exist, I have to waste a lot of development resources to write a complex function, to preserve character’s body parts, and accessory transparencies, which I have to make sure that won’t change while the character is not suppose to be visible, because, otherwise it will break the transparency preservation feature, and result in some character parts showing up due to the possibility of character controller overwriting them, while they are suppose to be hidden, and thus add additional complexity to ensure that it doesn’t occur, while the character is hidden.
Additionally, I know plenty of developers like to hide interiors of the buildings, when they are not needed to be visible in order to improve performance, but that comes at its own computation cost, especially for complex, and high instance count buildings as Luau code has to loop through all of them, check if they are a “BasePart”, and then finally set the transparency, which has to be saved to memory, and then restored back, and then also account for other code that might be changing transparencies for items in the buildings, such as furniture that is animated. As you may tell, this results in an increased computation, and memory usage, when it could’ve been a simple property switch.
In other words, we have to account for the following:
- “ChildAdded” event.
- “ChildRemoved” event.
- “Transparency”, “Enabled”, or “Visible” properties changing in one of the descendants of the model.
- “Enabled” property on many instances, such as lights, particle emitters, beams, trails, etc.
- “Visible” property on instances, such as “Explosion”.
- Account for instances like “SurfaceGui”, and their descendants.
While it is possible to parent a model to locations, such as “ReplicatedStorage”, to hide them, it may not always be a viable option, such when you need to keep the player character around for the replication radius, or when you want to preserve physical momentum, or also when you want to include a model for raycasting.
Whatever the reason might be, if it’s not already apparent, that’s a lot of work, both on developer side, and the hardware executing the code needed to account for all kinds of things, not to mention that it has to be kept up-to-date, with new features being added, or changed (both developer, and Roblox made), but it doesn’t have to be, therefore, please consider adding this valuable feature to the engine.