How to display a runtime image

One of my clients is interested in licensing one of my games:

https://www.miniplay.com/game/football-kickoff

and they’ve asked if it’s possible to dynamically upload and display an image on the stadium stands during runtime. Currently, we have a “RAVALMATIC” sign there.

The stadium model was imported from Blender, and I was thinking about positioning a sprite object over the existing area to show the new image.

Would that be the best approach?

Can you explain what you mean by “dynamically upload”? Theoretically you could render an image via a url, then just change whatever image is in the url.

Or were you wanting to have the images as textures as that makes it alot easier.

The game will be sponsored by different companies and should display a different company logo at specific intervals of days.

This should be exactly what you need Switching materials at runtime | PlayCanvas Developer Site

Although I must remind you that placing objects in front of other objects that are far away may result in z fighting.

What do they exactly mean by this?

But in terms of loading an image at runtime, I would do the following:

  1. Separate the materials (if it isn’t already) for the stadium mesh so that the logo is a separate material
  2. Assuming the logos from the company are always the same agreed size, you can create a texture asset at runtime with a URL (eg Load images from URL - #30 by yaustar)
  3. Replace the texture on the material with the texture you just created

If they aren’t guaranteed to be the same size, then you will have to create an offscreen canvas, do some image blitting to create a new image that is the right size and create a texture from the canvas

Or assuming that the billboard is flat, you can have it completely blank by default and put a sprite/plane in front of it and resize based on the image uploaded