added proper texture docs

This commit is contained in:
Ell 2022-10-27 12:06:28 +02:00
parent 67054d1c4a
commit 0b84c11363
6 changed files with 32 additions and 3 deletions

View file

@ -1,6 +1,35 @@
# Creating Textures
When creating textures, either for custom mods or to change the game's default textures, there are several things that you will have to look out for. This article provides some guidelines and explanations.
When creating textures, either for custom mods or to change the game's default textures, there are several things that you will have to look out for. This article provides some guidelines and explanations. Note that this article is not exhaustive, so don't hesitate to [let us know](https://ellpeck.de/discord) if there's anything you're confused by!
![](~/media/art_guide.png)
## General notes
- Items that should be able to have color schemes applied to them in games should use a grayscale texture. The individual colors will then be applied to the grayscale texture when drawing.
- When making a mod, the layout, size or positioning of custom texture regions generally doesn't matter. There are some exceptions to this, which will be noted in this article.
- Items that should be able to have multiple distinct color schemes applied (like a table with a stone surface but wooden legs) need to be split up into multiple layers, with each layer being colored by its corresponding color scheme. These layers need to be laid out **horizontally**, with the `n`th layer of the item being placed `n * width` pixels to the right of the base layer's position.
*Note that this art guide is work in progress and will be turned into proper documentation soon.*
## Furniture
- Furniture items generally have four distinct directions they can be placed in if they're more complex, or just one or two if they have symmetry in one or both axes.
- Layers (see general notes) can also be used to determine which parts of a furniture item will be occluded by Tinies and which won't. This is useful, for example, for the backrests of chairs, which should be drawn above a Tiny when looking at them from behind.
Here are some examples of furniture items that use layers.
![](../media/beds.png)
![](../media/counters.png)
## Clothes
- Clothes have multiple poses that they have to be compatible with, some of which have multiple animation frames. The ordering and positioning of these frames cannot be changed, so it's best to use the reference textures below for creating news clothes and hairstyles.
- Clothes have four rotations, which are laid out in a Right-Down-Left-Up fashion.
- When layers are laid out for clothes, each layer should contain the Right-Down-Left-Up ordering before the next layer is started.
- Different clothing types use different sets of poses, since some of them can be reused in different cases. For example, since all working poses use the same arm animations, tops only need one working animation.
- Hair, facial hair, accessories, head accessories and face accessories only use the four walking frames as well as the laying pose.
- Tops and arm accessories only use the four walking frames, the laying pose, and the two working frames.
- Pants and shoes only use the four walking frames, the sitting pose, and the sitting on ground pose.
![](../media/person.png)
## Color Schemes
- A color scheme is essentially a set of colors, one of which can be chosen by the player to be assigned to a grayscale layer.
- The game stores all of its color schemes in a texture where each row is a set of colors, one pixel for each color, which can be selected for an object or layer.
- The most up-to-date version of the game's color schemes can be found in the [ColorScheme class](xref:TinyLife.Utilities.ColorScheme).
![](../media/color_schemes.png)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

BIN
docs/media/beds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

BIN
docs/media/counters.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
docs/media/person.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB