PROCESS FOR DYEING
CODE
Each cosmetic on the player determines whether it should dye by checking if it has Niagara components with a tag marking it as dyeable. When the player applies a dye to the Emissive dye channel of their cosmetics, we apply that dye gradient texture to our VFX.
NIAGARA SYSTEMS
Each dyeable Niagara system has an exposed user parameter that keeps track of the applied dye texture set in code. Each emmitter in that system should have their renderer set up with a material parameter binding, linking the material texture parameter with the Niagara texture parameter. We don’t want a color gradient texture if no dye is applied by the player, so the default dye texture is fully transparent.
MATERIALS
The Niagara emitter materials interpolate between a particle’s original color and the dye texture colors we want to sample. If there is no dye applied, we simply maintain the original particle color. Particle materials each have custom logic for sampling the dye gradient and applying new color to the particle.
PROCESS FOR DYEING
CODE
Each cosmetic on the player determines whether it should dye by checking if it has Niagara components with a tag marking it as dyeable. When the player applies a dye to the Emissive dye channel of their cosmetics, we apply that dye gradient texture to our VFX.
NIAGARA SYSTEMS
Each dyeable Niagara system has an exposed user parameter that keeps track of the applied dye texture set in code. Each emmitter in that system should have their renderer set up with a material parameter binding, linking the material texture parameter with the Niagara texture parameter. We don’t want a color gradient texture if no dye is applied by the player, so the default dye texture is fully transparent.
MATERIALS
The Niagara emitter materials interpolate between a particle’s original color and the dye texture colors we want to sample. If there is no dye applied, we simply maintain the original particle color. Particle materials each have custom logic for sampling the dye gradient and applying new color to the particle.