Max needs a system for applying decals easily. Exactly what this should include can be debated, but here are some basic ideas:
Decal Map:
A decal map should have these controls, settings and methods:
- Texture Array (textureMapTab) that includes the textures to use. Each texture should have a weight value for how common it is, transformation ranges (min/max scaling, rotation for decal). The textures should allow any texture type (so a Composite map or Mask Map will work, as well as BitmapTextures, etc. For bitmaptextures, alpha source of bitmap should be honored).*
- Density control.
- Exclude Volumes (nodeTab) that will exclude creating decals within the volumes of the nodes in list.
- Point Helper Support: List of Point Helpers that can be used to add specific decals at specific locations, orientations, scale of decals. Point Helpers should be properties of the Texture array such that a set of points belongs to a specific decal texture. It could be that instead of a Point Helper, this should use the Decal Primitive (below). The UI should include a "Create Decal" button that will allow picking a surface in scene to create a decal of current texture at the picked point.
- Exportable: Boolean value that says this texture represents data to be exported to another source (such as a game engine). When off, is considered a texturing component for rendering.
*Ideally the Decal Map should be able to have multiple outputs such with a Substance map so that it can represent an entire material (Posters, Spray Paint, crumbling stucco, bolts, etc all have different materials so being able to make complex decal systems as independent materials would be ideal.)
Decal Primitive
The decal primitive should be a node that will either bind to surfaces or float about surfaces depending on modes.
- Offset: Amount the decal floats above it's pivot.
- Size Setting: Choose Manual, Texture Dimension or Transform. Manual lets user set height/width. Texture Dimension uses pixel dimension of Bitmaps; Transform uses Real World Scale setting of incoming texture.
- Height/Width: Set size of decal. Allow manipulators to drag dimensions in viewport. Only available with Size Setting of Manual.
- Mode: Float, Project, Auto. Float just has the decal floating above the pivot; Project will tessellate and project the decal onto the surface of the object list; auto will project to any surface within a given radius and below decal pivot.
- Surfaces: List of node onto which to project if mode is set to Project.
- Texture: Texture used for this specific decal.
Utilities and Scripting
All functions and properties should be exposed to MAXScript. Specific utilities that should be created/exposed:
- New decalStruct struct with data about a decal that should include these properties: id, texture, worldSpaceTransformation, height, width, exportable, nodesUsedOn (nodeTab) , facesUsedOn (IntTab mapping to nodesUsedOn)
- int GetDecalCount (): return total number of decals in scene
- decalStruct getDecal(decalID): returns the nth decal data.
Further Discussion
While writing this I was torn between a Decal Map and a Decal Material. It might actually make more sense to create a Decal Material. But this is just something to be discussed/debated. Also, I'm sure there are other ideas to add to this.