Browse files

texture_packs.txt: Add information for leaves texturing (#7637)

Explain texture requirements due to the leaves rendering options.
  • Loading branch information...
paramat committed Aug 13, 2018
1 parent 6bd4cb9 commit 03f89e8ffca84e2ff2f6cea8dcee49b067280cc4
Showing with 41 additions and 0 deletions.
  1. +41 −0 doc/texture_packs.txt
@@ -168,3 +168,44 @@ Here are face selectors you can choose from:
| bottom | y- |
| sides | x-, x+, z-, z+ |
| all | All faces. You can also use '*' instead of 'all'. |

Designing leaves textures for the leaves rendering options

Minetest has three modes for rendering leaves nodes if the node has the
`allfaces_optional` drawtype.

### Fancy

Uses the texture specified in the `tiles` nodedef field.
The texture should have some transparent pixels and be in the RGBA format so
that the transparent pixels can have color information.
Faces of every leaves node are rendered even if they are inside a solid volume
of leaves; this gives a dense appearance.

### Opaque

Uses the texture specified in `tiles` but makes it opaque by converting each
transparent pixel into an opaque pixel that uses the color information of that
transparent pixel.
Due to this the `tiles` texture format must be RGBA not 'indexed alpha' to allow
each transparent pixel to have color information.

The colors of the transparent pixels should be set for a good appearance in
`opaque` mode. This can be done by painting the pixels the desired colors then
erasing them. Then when saving the texture, use the 'save color information from
transparent pixels' option (or equivalent).

### Simple

Uses the texture specified in the `special_tiles` nodedef field if it exists, if
not, the `tiles` texture.
The `special_tiles` texture should have fewer transparent pixels than the
`tiles` texture and be in the 'indexed alpha' format.

This mode is between the other two in terms of appearance and rendering load.
The nodes are rendered using the `glasslike` drawtype, only showing the surface
faces for any solid volume of leaves, not the internal faces.
Due to this the `tiles` texture might appear lacking in density, so optionally a
`special_tiles` texture can be used to provide a texture with fewer transparent
pixels for a denser appearance.

0 comments on commit 03f89e8

Please sign in to comment.