HairColumnMap

Overview

HairColumnMap is a utility that helps create random variation in hair strands via textures.

This map creates a new set of UVs to pass into an ImageMap. Each individual strand is assigned a random column of pixels on the texture (random U) with V corresponding to root-to-tip position on the fiber.


Attribute Reference


Examples

hairColumnMap = HairColumnMap("/Scene/surfacing/columnMap") {
    --intentionally empty
}

ImageMap("/Scene/surfacing/furDif") {
    ["texture"] = "myTexture.tx",
    ["texture coordinates"] = 2, --input texture coordinates
    ["input texture coordinates"] = bind(hairColumnMap),
    ["wrap around"] = false,
}

hairMapWithHairColumnMap = HairMap("/Scene/surfacing/hair_color_map_with_hair_column_map") {
    ["base color"] = Rgb(1.0, 1.0, 1.0),
    ["tip color"] = Rgb(1.0, 1.0, 1.0),
    ["column uv color"] = bind(ImageMap("/Scene/surfacing/furDif")),
}

hairColorMtlWithHairColumnMap = HairMaterial_v3("/Scene/surfacing/hairColorMtlWithHairColumnMap") {
    ["hair color"] = bind(hairMapWithHairColumnMap),
    ["primary specular tint"] = bind(hairMapWithHairColumnMap),
    ["transmission tint"] = bind(hairMapWithHairColumnMap),
    ["primary specular roughness"] = 1.0
}