
A complete development environment usually allows the internal management of the Atlas there are also many external tools that provide a lot of additional options. There are different ways to create an Atlas. However, many of the concepts explained here can also be applied to 3D models and their textures.Ī Texture Atlas, we said, is a collection of textures inside a single image.Īn Atlas is usually associated with a file descriptor, which indicates to the game where a texture is (in certain x and y coordinates), in order to retrieve it.ĭepending on the system that you will use to generate and manage the Atlas, you will have more or less options, such as the distance between the images that compose it (reducing the risk of artifacts on the edges of the texture, caused by an overlap of two elements), or the ability to rotate the elements to optimize the space inside the Atlas (more optimized space means more images inside the same Atlas). Note: As mentioned in the previous paragraph, this article will discuss the Texture Atlas applied to the UI. One of the means used to reduce the duration of the rendering process is a Texture Atlas: it’s nothing more than an image that contains many textures. if you reach the 60 fps you can render the image twice and then think of developing your game also for VR), or more screen elements (and then a richer game, more animated, more beautiful). Then, any expedient to reduce the time taken by this process is welcome less time spent in the rendering phase means a higher frame rate (i.e. It’s among the most complex and expensive processes that occur in a real-time 3D game. We mentioned before the rendering process: it’s the operation by which the elements in memory are physically drawn on the screen. In a 3D game, the UI is usually made of 3D elements (such as planes or boxes) with textures.

Writing this is definitely making me feel old.īack to us (indeed, to you) and to the important things, today we'll talk about the textures of the user interface (UI hereinafter) and, by extension, about all textures in the game. They were composed only of lines that formed objects or elements in 3D wireframe. If you are approaching the development of a 3D video game for the first time, you’ll begin to discover that 3D graphics are composed of several parts: 3D meshes, textures, particle systems, and many other elements that are usually drawn on the screen 30 times per second (in slang: 30 fps) during the rendering process, making the game’s world varied and lively.īelieve it or not, the first 3D video games I saw in my life had none of these elements. Thank you so much! What's a Texture Atlas? * If you become rich thanks to this article, please remember me. And you have no idea how.ĭon't panic: there is a simple trick that can help you. And that means only one thing: you need to find a way to fix it. The issue: the frame rate of your game is low. Your game.īut there is one last issue that you must resolve before the release. It's perfect: the art is good, and you are very proud of your idea inside the game. It's your game, and now you want to share it with the whole world-and maybe become famous and rich*. You have spent your time (a lot of time) in order to create your game. OK, so I call UpdateLookupTables() on my Sprite Asset after adding them, which is mentioned in the docs, however now, the text is only rendered up to the first sprite! at which point it stops, no text or sprites rendered after this point, nothing in the Log or Error log.Time. If at this point I attempt to use the sprites, they appear in the inspector and all values are correct as well as their bitmaps, co-ordinates and names, but TMPro cannot find them by name, and renders the unknown sprite question mark.

I then add the Character and then Glyph to spriteCharacterTable and spriteGlyphTable.

I am creating a TMP_SpriteGlyph setting the properties, and then creating a TMP_SpriteCharacter with the unicode 0xFFFE and the glyph created previously.Īssigning a name to the character after it is created. To do this I am creating an empty TMP_SpriteAsset, along with empty texture and placing the sprites into the sheet as required.

It is not possible to build the SpriteSheet at compile time, it has to be dynamic for this project. I am generating (or at least attempting to) a TMP_SpriteAsset at run time, and adding this to the list of fallbacks on the default SpriteAsset.
