Texture Atlas Generator
This script generates a texture atlas out of the selected objects, and manipulates their UVs (and if necessary, their geometry as well). Currently only Multimaterials and/or Standardmaterials (with bitmaps in diffuse channel!) supported.
Texture atlasses especially are important for real time applications and game development. Check http://developer.nvidia.com/object/texture_atlas_tools.html to see performance comparisons.
- geometry slicing
- simple packing algorithm
- editing many objects at once, thus creating only one atlas for all of them
If feedback is positive, 3d-io would consider transforming this script into a much faster and better plugin, developed in C++.
Example for a generated texture atlas:
This script adds a single button to your Interface. When you click it, a rollout appears. Usage:
- Disable Undo: Should be checked, especially when working with big meshes.
- Generate Messages: Produces some interesting statistical data in the MAXScript Listener.
- Ignore Warnings: If you check this option, you won't be asked to stop or continue when there are errors in the UVs and/or in the meshes
- Slice Geometry and Generate UVs: This option will manipulate the UV coordinates of all selected models, so they fit to the texture atlas that will be generated. Meshes with texture coordinates lower than 0 or bigger than 1 are not really suitable for producing a texture atlas, because texture atlasses don't support tiled textures. Thus, this option will slice those meshes and move the texture chunks in such way that the coords are all in the range 0...1.
- Break all Edges: Normally, TexAtlasGen tries to keep texture chunks together where possible, which is very slow, as it tests every edge's position. With this option, you can break all edges, which is faster, but will increase KB size of the mapchannel. This option has no impact on UV mapped models, like characters.
- Create: If you don't want to create an atlas, disable this option
- No padding: This checkbox is only available if you don't generate the UVs (see above). It will prevent TexAtlasGen to add any padding for the individual textures in the atlas and thus will be much faster. If you want to have a fast overview of the textures, use this option.
- Choose Path & Filename: Where you want to have your texture atlas saved.
- Padding: The amount of padding around any tiled texture. Won't have any effect on UV maps.
- Shrink in Atlas: When checked, any texture in the atlas with padding will be resized so the original texture size persists. For example, if you have a 64x64 texture and set padding to 2, the texture will be resized to 60x60, with a padding border of 2 on every side. If you deactivate this option, the size of this texture in the atlas would be 68x68.
- Generate Texture Atlas: Let the magic begin.