Generating Thumbnails for User Creations?

I’m working on a project that lets players explore user-created levels, and I want the catalog to show some kind of image alongside each level, ideally a picture of the level itself, but I don’t know of a good way to do this. I considered rendering the level in a viewport frame, but given the complexity of each level that would have major performance issues. I suppose I could let players upload custom decals as thumbnails, but that would be a pretty long and annoying process for them (plus they could also upload misleading thumbnails).

I do remember reading about someone who figured out a semi-reasonable way to display custom images by using a frame on each horizontal line with a UIGradient that would determine the color of each pixel. Perhaps I could combine this with an extremely basic ray-tracer that generated an image at the time of publishing the level and saved the image with the rest of the level’s metadata. The problem is, this would take a ton of work to implement and might not even work/look good/be performant enough to genuinely consider.

Is there a better method of creating thumbnails at runtime that I’m missing?

1 Like

That would be me! I open sourced it here:

For static images like thumbnails though, I made an alternative that uses BaseParts inside ViewportFrames for higher resolution and color accuracy, and this avoids hitting the UI render limit since it isn’t making lots of Frames.


With that out of the way, I must say I don’t think a custom render is the way to go. You can lazy load the ViewportFrames holding creations to avoid lots of overhead, and you can compress the hell out of the storage of user creations with bitbuffers and limited color palettes. Additionally, you can frustrum cull build data that’s outside of the thumbnail camera position.

@ScriptOn uses this to good effect in Roverse, for thumbnails of user created worlds.

2 Likes