material.color attribute

Syntax

  • float material.color.{r|g|b}
  • string material.color.rgb

Description

The material.color attribute controls the diffuse color.

Related

Examples

Rainbow building

The split index is used to generate position dependent colors.

Lot-->
   extrude(20)
   set(material.color.g, 0) 
   split(x) { 
      2 : set(material.color.r, split.index/split.total) 
          set(material.color.b, 1.0 - split.index/split.total) 
          X 
   }*
Position dependent colors

In this topic