I attempted to create a script in ReplicatedFirst that would preload all of the clothing as I intend to make a loading screen that I would think would fully solve this issue. The script can be found below:
local ContentProvider = game:GetService("ContentProvider")
local CollectionService = game:GetService("CollectionService")
local PRELOAD_CLASS_NAMES = {"Shirt", "ShirtGraphic", "Pants"}
local isLoaded = game:IsLoaded() or game.Loaded:Wait()
local Dummies = CollectionService:GetTagged("OutfitDisplay")
local assetsToPreload = {}
for _,dummy in ipairs(Dummies) do
for _,i in ipairs(dummy:GetChildren()) do
if table.find(PRELOAD_CLASS_NAMES, i.ClassName) then
table.insert(assetsToPreload, i)
end
end
end
ContentProvider:PreloadAsync(assetsToPreload)
print("Finished loading all assets.")
I tested the script in-game and verified it was loading over 800+ assets, when I saw āFinished loading all assetsā in the console I walked over to the clothing models and saw that some were still blurry.
Is this issue out of my control or is there something that can be done about it? Thanks.
800 assets is a lot to handle. Are you using StreamingEnabled? Either way, itās preventing a lot of lag definitely. Probably a loading screen is the best course of action for your situation.
I am not using StreamingEnabled but I am testing my script above before I add a loading screen and so far it doesnāt seem like it would solve my issue at all.
Iām pretty sure this is to do with roblox, because they have to make a request to their servers to get the images for graphics, and this is out of your control.
You should consider loading/unloading the dummies when needed. It will create low performance having them all loaded at once. In addition to that - Roblox also scales down textures whenever needed, to keep a stability in performance.
Itās easy to say this but what would you define as āwhen neededā
The shop itself is rather densely packed. Players need to be able to see a dummy from across the room, which could prompt their interest to buy an item they might see. I would say the map outside of the shop would have far more impact on performance.
I am also aware that Roblox scales down textures and gradually replaces them with higher-quality textures. I have a beefy rig and about 95% of the clothing appears to be fully loaded, itās usually the same offenders most of the time (the suits at the bottom floor.)
I donāt know if this would work or not, but this is a solution that would not be available to others unless they perform it, and also canāt work on mobile.
You cannot have that many outfits loaded in, without Roblox automatically downscaling the outfit textures.
I would suggest that you figure out a more performance friendly approach.
I really donāt think you can fix this issue unless maybe you take the approach this game did where they load the display models in each room of the mall, possibly limited to 10-20 displays at once.
That type of system does not work with my game (we donāt use small rooms.)
I think Iām concluding that this issue cannot be fixed.
Yeah, that ultimately is the issue. I did make a custom streaming system using GetPartBoundsInBox and it seems to fix the issue since itās limited to around 10-20 dummies at once.
Unsurprisingly the community does not want this change, so it seems utterly pointless to attempt to force this on anybody.
That type of system would probably work better in a game that uses small rooms to contain all of the dummies and not a giant building with several floors like the way we have it.