ResampleMode for Materials and Textures

As a Roblox developer, it is currently cumbersome to make pixel art and low-fidelity style games. Recently, ImageObjects such as ImageLabels and ImageButtons recieved the new property to set their resample mode to pixelated. Right now, the only way to have a similar effect on textures and materials is to upscale the pixel art up to 1024x1024 to get sharp edges. However, these are still not sharp when you zoom in on them, and they also take up much more memory.

For example, minecraft blocks use 16x16 textures. To get a similar effect in Roblox with as close as possible results, you would have to make them 1024x1024, using up to 4096x more data (not taking into account compression). This adds up very fast for pixel art games, reducing the performance and increasing load times.

If Roblox is able to address this issue, it would improve our development experience for pixel art and low fidelity games, as well as increase their performance on all platforms, reduce load times, and reduce data footprint and networking strain on Roblox.

94 Likes

If image labels and image buttons have it, I don’t understand why decals/textures don’t have such an option. This would really help with pixelarts and other low-resolution stuff as you mentioned.
Having resampling in general would be really helpful for games relying on pixel arts (we could also have 2x2 checker textures or other extremely small repetitive patterns that dont require much resolution to replicate)

9 Likes

Huge support. Memory is a huge limitation for Roblox in general. This has been a highly requested feature for years.

People are currently using work arounds that significantly impact memory, like adding hundreds of extra faces and using unnecessarily large textures like preacher_online mentioned.

Screenshot 2023-04-10 at 3.38.03 PM
What a waste!

Different texture sampling modes would allow for games that are very memory efficient, new game aesthetics, and easier modeling (using softwares like block bench).

7 Likes

List of all the classes I could think of that need the ResampleMode property:

  • Decal
  • Texture
  • MaterialVariant
  • Shirt*, Pants*, ShirtGraphic*
  • SurfaceAppearance
  • MeshPart
  • SpecialMesh*
  • CharacterMesh
  • Tool, HopperBin, and Flag (for the icon in your inventory)
  • VideoFrame
  • TextLabel and TextButton (if we get the option to set custom resolutions for them)
  • ParticleEmitter
  • Beam
  • Trail

*For avatar items, ResampleMode would either be set when uploading or in the avatar editor. Custom UV mapping for shirts and pants would be nice too.

(edited because I mistook MeshParts for SpecialMesh)

10 Likes

Considering there are so many instances in need of this, I wonder if it would be a good idea to add a dedicated image instance which consolidates all the image related properties into one (ResampleMode, ImageColor, ImageAssetId etc), that could then be used by other instances as a replacement for an image id.

1 Like

HopperBin and Flag instances are both deprecated and have been for a while, they won’t get any updates.

4 Likes

we also need an option to disable image compression on all the classes i listed, especially since images are sometimes compressed for no reason.

(left = imagelabel, right = decal)


here are 2 images i made. one is 16x16 and the other is 64x64, and they both use very few colors. theres no need to compress them at all, yet i have to use imagelabels (which dont wrap onto shapes) to fix the very bad compression.

5 Likes

Bump.


I can’t stand how Roblox keeps withholding these essential features for no apparent reason. Why do I need a 1024p texture just to somewhat resemble a 128p texture? It’s stupid. Because the geniuses at Roblox didn’t implement something like this earlier in development, we now have a situation where there are numerous instances supporting images such as decals, textures, tools, mesh parts, particle emitters, etc. I doubt there’s a universally good solution for all of these.

And given Roblox’s current approach of ignoring developers and focusing on investors, I doubt we’ll ever see something like this in a timely manner. :sad:

5 Likes

I wasn’t even aware that Roblox compresses images, damn.

They likely do this to reduce the amount of storage on their servers but if the image already is small then that seems pretty unnecessary.

2 Likes

i dont think it would reduce storage on their servers since imagelabels arent compressed which means their servers save the exact un-compressed image. idk why the client gets a compressed version of the image, since the textures are (i think) immediately deleted after leaving the game, so lowering the size of the image can’t be that beneficial, especially since the compression doesn’t look like it reduces file size that much

1 Like

Ohhh now you got me thinking.
Roblox may not be actually compresses the images that are uploaded but the images that are loaded in game.

So quick explanation, graphics cards have very small and limited amounts of memory and storing uncompressed data in their memory consumes lots of space.

So what a lotta game engines do is they use something whiiiiich I think is called… DXT compression?
(Because algorithms like PNG and JPEG compression are WAYYYYYYY too slow and can’t run on the GPU due to how GPUs are designed.)

It’s basically a way of compressing images that breaks them up into little chunks/blocks that are each individually compressed on the graphics card and the algorithm that is typically used is VERY fast and relatively efficient but comes at the cost of slightly lower image quality.

This makes it so games use less graphics memory and can load more complex textures and models.

image001

I think here you can see how different texture compression methods affect details in different ways.

1 Like