Announcement

Collapse
No announcement yet.

How to adapt arithmetical formula to color

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to adapt arithmetical formula to color

    Hi to all
    How to adapt the arithmetical formula to colour with standard v-ray texture node?
    For example, I have some colour like middle grey(variable x)
    r=0,5
    g=0,5
    b=0,5
    How I can adapt these values to the next formula y=(1-x)*cos(x) where variable y is a new colour what I need to get.
    +STUDIO
    contacts@plus-studio.org

  • #2
    interesting question but i'm not sure what you're trying to do.

    if your x color variable is 3ds max color value (color r g b) your rgb values would be x.red, x.blue and x.green

    newR=(1-x)*cos(x.red)
    newG=(1-x)*cos(x.green)
    newB=(1-x)*cos(x.blue)

    new colour y would be y = (color newR newG newB)
    this is assuming you want color as floating point values 0 - 1.0 rather than 0-255 integers

    Comment

    Working...
    X