Node Texture Project - anticto/Mutable-Documentation GitHub Wiki

image


Function

Projects one or more textures onto a mesh. Transforms a flat texture to a laid out version usable as texture for the input mesh. This node does not modify the mesh section or material.


Use Cases

Put a logo customized by the player on a jacket back. Give the character a tattoo that can be placed anywhere, but no matter how the player moves it, won't affect the eyes or the nails.


Node Properties

image

Layout: Index of the mesh layout to use for the projection operation. Beginning at 0, and should be left as 0 for meshes with a single layout.

Textures: Amount of textures that the node offers to modify using the same projection parameters. Among other uses, it's handy for modifying flat color projectors and the masks that define their shape in a single node. Having more channels performs better than having multiple texture projections.

EnableTextureSeamCorrection: When this is enabled, additional operations will happen to correct projections that go over a texture UV seam to prevent interpolation artifacts. This is not necessary if the projection is guaranteed to not go over a seam.

TextureSizeX: Set the width of the output Texture. If greater than zero, it overrides the Reference Texture width.

TextureSizeY: Set the height of the output Texture. If greater than zero, it overrides the Reference Texture width.

ReferenceTexture: Reference Texture used to decide the texture properties of the mutable-generated textures connected to this material (e.g. LODBias, Size X,...). If not connected, mutable default texture properties will be applied.


Input Pins

Texture (index): Texture to be projected on top of the mesh. As many input texture pins as textures defined in the node properties.

Mesh: Mesh that will be used in the projection.

Mesh Mask: Texture that defines what part of the mesh can receive the projector. White for full effect, black for no effect, and grayscale for partial projector application. This is not intended as a projector shape, but as to detail where the projector can apply. As an example, it would be useful to leave the visor of a helmet black and the hard surface white, to allow the player to project on any solid surface of the helmet but not obstruct the character visual field.

Fade Start Angle: Maximum angle in degrees that a face can have and still receive the full effect of a planar projection. Angles larger than this will receive a faded effect up to the Fade End Angle defined below. The angle is calculated from the face normal to the projector normal. It has no effect on projector types other than planar.

Fade End Angle: Maximum angle in degrees that a face can have and still receive any effect of a planar projection. Angles larger than this will receive no projection at all. The angle is calculated from the face normal to the projector normal. It has no effect on projector types other than planar.

Projector: Projector input, defines the location, orientation and size of the projector. The texture will be stretched and rotated to fit this projector, and the projector will have no impact on the texture outside this bounds. It's important that the projector intersects the mesh to get a projection effect.


Output Pins

Texture (index): Result texture from projecting the input texture on top of the mesh, according to the layout selected in the node properties, and limiting its printable area as defined by the mesh mask. This contains as many output texture pins as textures defined in the node properties, each output index corresponding to the same index in the input textures.


Examples

Illustration of fade angles, with texture results at the bottom. Left side has start at 25º and end at 45º. Right side has start at 45º and end at 90º. The red planar projector is directly in front, covers the whole body, but only the faces that have a normal with an angle to the projector normal lower than the start angle receive the full effect of the projector. And those faces with an angle higher than the end angle receive no projection at all, including back faces.

image


Illustration of the mask input pin, the texture used as mask is on the right screenshot. The red projector is directly in front, covers the whole body, and has large fade angles that allow it to paint faces in all directions. But can only affect the hands and forearm, as defined in the mask.

image