meta data for this page
  •  

Texture atlases

Texture atlases are very common in both the games and VFX world. Texture assets purchased online are often delivered in atlas form. Games very often need to use atlases to ensure geometry can be batched and drawn together, even though the source was made up of many different textures. The SpeedTree Modeler has many avenues to use texture atlases on both the input and output side.

Atlases in

Texture atlases can be imported into the SpeedTree Modeler just like any other material textures. Obviously, this material could be used with a custom mesh asset that you import, with UVs referencing the atlas. But you can also cut up the atlas yourself inside SpeedTree.

Mesh cutouts

The Mesh Cutout Editor is a quick and easy way not only to make meshes for a texture, but to make meshes for an atlas texture. Each mesh can cutout just a single object from an atlas, which can then be used on leaf and frond generators. Be sure to set the pivot correctly, as this affects how this mesh is placed. The “Show all meshes” option will come in handy, as well, to ensure you have cut out all of the objects you want, without duplication.

When cutting out multiple objects from an atlas, be sure to think about the “Unwrap” property on the material. You most likely do not want to cut out a shared uv area for all the meshes you cut out of the atlas. Set this to “Separate” and each mesh will be cut out into its own island when placed into the output atlas. Your texture usage and atlas packing should improve.

UV areas

In previous versions of SpeedTree, there was no way to do something similar to mesh cutouts for branches. Branches always used the whole material. But with SpeedTree 9, you now have the option of using a particular UV patch from an atlas which you can set up in the UV Area Editor.

Atlases out

Exporting, whether to a static mesh format or to a game format, can consolidate many textures into one larger texture atlas.

Unwrapping on export

VFX

To make an atlas during a VFX or static mesh export, enable the option to “Unwrap UVs”. When enabled, the Unwrap UVs dialog will show that allows you to control which things are stacked or completely unwrapped. Complete unwrapping is useful for sculpting a mesh in an external application, while stacking will allow you to save on texture resolution.

Games

Game exporting almost always creates an atlas, as it allows you to render things much more quickly. The game export dialog allows you some control over what gets placed into the atlas, depending on whether it needs wrapping texture coordinates or not. With SpeedTree 9, you can also edit the atlas directly if you do not like the algorithmic layout.

Better branch resolution

Putting branches into an atlas can affect the texture resolution dramatically. This is because branch textures most likely wrap in one or both directions. To place something in an atlas, the UVs have to be unwrapped, and this can cause either the much larger needed branch texture to be squished, or other things in the atlas to be squished, to make up for the resolution.

V-tiling

To combat this in games exporting, you have the option of using V-tiling. V-tiling places a branch texture in the atlas such that the top and bottom touch the sides of the atlas, allowing it to tile in V. You still have to be wary about how many U tiles it requires, but it solves the V-tiling case, which is often much worse.

UV seams

Another method to combat texture resolution loss is to use a new feature in SpeedTree 9 - UV Seams. When enabled on branch generators with the “UV Mapping:Create seams” property, the actual geometry will be computed differently to put real geometry cuts at each UV tile. This allows you to have the exact same mesh visually, but none of your UVs will be outside 0-1. These smaller textures can then be placed in either a static mesh or games mesh atlas more intelligently than a wrapping texture could.

Maintaining pre-made atlases

If you have a pre-made atlas that you used on a SpeedTree, and don't wish for it to be edited at output time, you can govern how it is exported.

You can use the “Atlas:Handling” property on the Material Asset Bar to control how a particular material is handled when atlases are being created. The “Force out” option will make sure that a material will never be cut apart or re-packed into an atlas. It will be copied instead. This goes for games exporting and for unwrapping UVs during static mesh export.

UDIMs

While SpeedTree does not currently import meshes with UDIM UV setup, you can export a tree mesh that uses them. You do this by unwrapping the UVs in the static mesh export dialog and selecting “UDIM” instead of “Atlas” in the Unwrap UVs dialog. Your output will no longer have a single unwrapped texture atlas, but each island that would have been placed into the atlas is saved in its own texture file with numbers starting at 1001 (UDIM-standard).