Blurry clothing in-game

I am developing a very large clothing store and in-game we have a collection of over 800+ clothing. This includes shirts, pants, t-shirts, etc.

The problem is that some players see clothing as very low-quality and can take several seconds before it fully loads the high-quality textures.

An example of this can be seen below:

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.

6 Likes

Additionally, I printed out RequestQueueSize to see if anything was still lingering around:

The result is 0 but the clothing is still burry for a long time (usually up to 10-20 seconds.)

1 Like

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.

1 Like

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.

2 Likes

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.)

Here’s your solution my goodman:

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.

This is not something I’d consider a solution.

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.

1 Like

I switched the game to use StreamingEnabled and put the streaming radius to the lowest possible 64 studs.

You can see the white suit on the right is still blurry:

The room itself is about this big:

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.

1 Like

Do the dummies have Humanoids in them?
If so that many Humanoids loading in may cause you some lag issues.

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.

3 Likes