# Builtin extra textures

**URL:** <https://forum.defold.com/t/builtin-extra-textures/66044>\
**Category:** Feature requests (USE GITHUB)\
**Created:** [August 12, 2020, 9:25pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044 "2020-08-12T21:25:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [August 12, 2020, 9:25pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044/1 "2020-08-12T21:25:39Z")

</div>

For the longest time the only texture included with builtins was the particle\_blob.png

This texture is useful but I think it would be more useful to add some more general shapes for general blank project prototyping. Like the addition of a simple solid square would help with certain quick prototyping.

Some thoughts for extra shapes:

- They should not dramatically increase the builtins size as a whole, the entire addition should be less than 100KB ideally more like 25KB
- They should all be white if a smaller texture size is used, larger would allow some variations
- They should all be 32x32 px
- They should be generally useful
- They should follow the naming convention of particle\_ if intended as a particle otherwise maybe shape\_ or just the name
- They should be included in a secondary included tilesource, not editing particle\_blob.tilesource but be maybe builtin\_particles.tilesource, which itself should include particle\_blob.png as the first space
- The new builtin\_particles.png should be 320x320 px so 10x10 grid (or smaller) this size would allow plenty of room to add a variety of useful default shapes (with possible non-solid-white variations) - over time new shapes could be suggested and added
- The new tilesource should have extrusion of 2 for shapes which touch the edge
- The art can be a mix of pixel art and soft edges but should favor soft edges
- The tiles should be generally useful as particles or building blocks - think like a variety of useful game designs from platformer to match 3

The 1-Bit Kenny path may have some useful inspiration / textures to grab, though these textures are 16x16 and not 32x32 and are also a bit too game specific.

> **[1-Bit Pack · Kenney](https://kenney.nl/assets/1-bit-pack)**
>
> Download this package (1078 assets) for free, CC0 licensed!

Here is a not super thought out example for a reference point, this results in a 8.77 KB PNG. A full 100 piece grid would likely be between 40 and 50KB at this rate, and there would be no rush to fill it unless people have good general use suggestions with a focus on what shapes would be useful for the kind of quick prototypes the blob is currently being used for since it’s the only shape that’s included.

 ![2020-08-12%2014_18_41-Window](https://forum-defold-uploads.b-cdn.net/original/3X/1/a/1a389d92e40362afd9bc8559e7b95993ebc0ee11.png)

In reference to this post

> [@Setting alpha of objects without adding lots of drawcalls](https://forum.defold.com/t/setting-alpha-of-objects-without-adding-lots-of-drawcalls/28149/3):
>
> I see that Defold generates vertex buffers every frame to batch the draw of sprites and meshes/models with materials of the “World” vertex space. The different values of uniform constants break these batches. I think that it will be useful to have material constants that Defold adds as attributes of vertices. Yes, the engine will generate a bit more data to draw sprites. But the different alpha values are not going to break batches anymore! So, those new material constants can have float and v…

If this was implemented, it would be useful to have tint be able to be set within the animations of a tile source (along with directly on sprite components as another way to set it / override it). That way from a white heart multiple heart colors can be included as animations like red or gold without increasing texture size.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 12, 2020, 9:35pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044/2 "2020-08-12T21:35:59Z")

</div>

Thank you for the feature request. I think this has come up a few times in the past, but it has never been given much priority. Or maybe another explanation is that someone needed to have an opinion about which shapes to include, and once they were in there we would have to live with them forever.

So let’s collect some ideas for the first couple of shapes here. I think your guidelines regarding hard and soft edges is good. I’m not sure about size yet of individual images, but 32x32 is probably a good size.

Should it be a tilesource or an atlas? With an atlas we could provide shapes of different sizes.

---

<div class="post-metadata">

**Author:** ![Pkeod](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/pkeod/32/606_2.png) [@Pkeod](https://forum.defold.com/u/Pkeod)\
**Post date:** [August 12, 2020, 9:38pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044/3 "2020-08-12T21:38:05Z")

</div>

Atlas would give more flexibility along with the ability to reduce overdraw, but if an atlas is used there should be some conformity of size for building block style shapes, as in ones useful for making a platformer or a match 3 for example.

An advantage tilesource has is it’s useful for gui/sprites and tile maps. So maybe there could be a tilesource for size conforming shapes, and an atlas for perhaps larger/more irregular but still useful shapes if people can come up with ones they would want.

---

<div class="post-metadata">

**Author:** ![totebo](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/totebo/32/36087_2.png) [@totebo](https://forum.defold.com/u/totebo)\
**Post date:** [August 13, 2020, 8:27am UTC](https://forum.defold.com/t/builtin-extra-textures/66044/4 "2020-08-13T08:27:25Z")

</div>

> [@britzl](#):
>
> Should it be a tilesource or an atlas?

Why not both? If they’re not included in the project, they don’t add weight to the bundled project, so it shouldn’t be a problem, right?

---

<div class="post-metadata">

**Author:** ![dapetcu21](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/dapetcu21/32/25120_2.png) [@dapetcu21](https://forum.defold.com/u/dapetcu21)\
**Post date:** [August 13, 2020, 12:04pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044/5 "2020-08-13T12:04:13Z")

</div>

The two assets that we always carry over are pixel.png (1x1 transparent pixel) and pixel\_solid.png (1x1 white pixel). Them being 1x1 means that scaling the sprite by WxH would result in a WxH rectangle.

We usually add them to any GUI atlas that we work with, as they’re great for container gui nodes.

---

<div class="post-metadata">

**Author:** ![britzl](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/britzl/32/23_2.png) [@britzl](https://forum.defold.com/u/britzl)\
**Post date:** [August 13, 2020, 12:27pm UTC](https://forum.defold.com/t/builtin-extra-textures/66044/6 "2020-08-13T12:27:45Z")

</div>

> [@dapetcu21](#):
>
> pixel.png (1x1 transparent pixel) and pixel\_solid.png (1x1 white pixel)

Yes, these are really useful!
