Once again I’m putting this in scripting support because it’s more technical and performance oriented than anything else.
I’ve recently stumbled on something that as far as I know roblox has never officially acknowledged, but I think they should. It’s regarding the difference in asset ID addresses regarding
http://www.roblox.com/asset/?id=
vs
rbxassetid://
For performance optimizations on cutting down texture resolution, I take my decals and download them directly using the first asset id format above. This directly downloads the images as raw files (which you need a special type of encoder to open; usually only ms.paint and web browsers can open these).
But naturally the second id format doesn’t work for this.
Upon further testing I found that assets in-game addressed using the second ID format are stored in memory ALL the time, and should roblox servers go down, these assets continue to exist and render just fine.
However, IDs using the first format seem to be streamed in every time they are rendered, and don’t exist in memory beyond that.
My theory is any asset addressed using the second method is only streamed in when it’s first rendered, and never beyond that. So for optimizing network performance developers should use the second ID format, but for optimizing memory usage they should be using the first method.
Does anyone know if my suspicions are correct? If so, they should have some official information about them in the wiki.
Actually renaming it to a .png does nothing because it’s still a raw file. You can try doing that and opening it, and you’ll receive an error along the lines of “unreadable format” .
Part of my testing was actually done during a roblox outage recently, which is where I noted that assets using the first address were not loading, while others using the second continued to be perfectly fine.
I’m not certain if I mentioned it above, yes both formats are equivalent, however, it is apparent that the game seems to handle them in different ways.
Sounds like you have “Hide extensions for known file types” enabled in Windows explorer. Disabling that will let you directly change the extension of files, which is what you need here.
How exactly does downloading the files you’ve already uploaded to Roblox help you? This doesn’t make much sense and I don’t understand how any of that relates to image resolution.
These are some very surprising findings and I would be interested in hearing you exactly you conducted your testing. The expected behavior is that an asset is loaded either when it is explicitly preloaded or when it is first visible to the user/needed by the user. At this point it would be cached. Assets are never “streamed in every time they are rendered” anyway.
So far in my testing the only things I have that can open those raw files properly are ms paint (which I use if it’s a jpeg) or google chrome, which I use if it’s a png. Then I save it as a REAL png to edit it.
I dont believe ms paint has support for PNGs, and I highly recommend using an editor like paint.net, photoshop or GIMP as they are much easier to use and more powerful.
I have photoshop, which I use after I convert the raw file to an actual PNG. Because as sirc mentioned above, one could just change the file extension name to .png, but as I already mentioned, that doesn’t make it editable by most programs.
Downloading the images is faster than going through my decals or drives trying to find the original files, usually the only images I need to optimize are old assets I uploaded years ago when I didn’t fully understand the balance between detail and performance.
My testing was very conclusive on my game Recoil. Most assets there are addressed as rbxassetid:// except for my hitmarker image and some others. During the recent outages I saw that the other assets were fine, but the hitmarkers were inivisble, which definitely had to be related to streaming because it just stopped being visible mid-game, it HAD actually loaded in the first place, but the second the outage began it was one of the few assets that stopped existing.
After changing it to rbxassetid:// like the other assets, it began working fine regardless of connection issues.
What does occur to me though, is it’s likely rbxassetid:// relies on internal/direct connections whereas the other address relies more on DNS to some degree.