- Home /
Is there a recommended workflow or list of considerations for using regular photos for an in-game slideshow for WebGL?
I have a client that wants to display a lot of images from a class he teaches in a game to be published on WebGL. There are a lot of interactive features in the game, which is why we aren't going for just some generic online presentation. These images will be displayed alongside a character that is speaking on a topic. Imagine any classroom where you have a teacher giving a presentation to students. That is what the vision is.
The problem is that there are about 80 images planned to show, all of which seem to be of random sizes and file types, also none of them are Power of Two. I need to be able to show these images with the highest possible quality, but I have to keep memory in mind as we are targeting WebGL and we don't want to burden our users with long downloads. I still have to account for the memory burden of other assets (audio, meshes, textures) so having just this slideshow kill my resources is a big problem.
I'm aware of asset bundles and downloading them at runtime, but the pictures will never change, so I feel like just including them in the build is appropriate. Perhaps I'm wrong about this.
What I'm looking for is what I can do to minimize the file size impact of these photos, while retaining the highest possible quality. I have access to photoshop and can resize the images to be Power of Two, but it will take some time and I wanted to get some feedback here before starting that process. Also, since some of the photos are 16:9 ratio, how can I resize them to be Power of Two and maintain the quality and correct aspect ratio when displaying them using Unity UI?
Any help is appreciated.
Updated to note that these images are being set to sprites in the inspector settings.