Itoo Software Forum

Author Topic: Gradient random material ID  (Read 375 times)

PixelJockey

  • Newbie
  • *
  • Posts: 16
Gradient random material ID
« on: March 09, 2022, 12:21:58 AM »
I'm scratching my head on this one. I have a facade that has stacked bond of panels. The panels have 3 values (Light, medium, dark). The middle chunk of the facade has a region where the colors have a random mix of colors, but also have a gradient percentage. At the bottom Dark color is 100% and at the top 0%. And the Light color is the opposite, with 0% at the bottom and 100% at the top. The medium color is 0% at the top and bottom and 33% in the middle. At the midpoint, there is an equal mix of the three colors. I think the material IDs can be randomized by using the Y distance of the array and a fancy pants formula to change the percentage of three material ID's per level. It's the fancy pants formula that I have no idea what to do. Attached is an image illustrating the percentage changes. I'm only concerned about the gradient section, not the solid sections at the top and bottom. Thanks in advance for any help.


Dragan

  • Hero Member
  • *****
  • Posts: 1298

PixelJockey

  • Newbie
  • *
  • Posts: 16
Re: Gradient random material ID
« Reply #2 on: March 09, 2022, 02:25:57 AM »
Oh. So close. Unfortunately, I have 3 ID's in the gradient, not just 2. If I had only 2 IDs, that would have done the trick.

Dragan

  • Hero Member
  • *****
  • Posts: 1298
Re: Gradient random material ID
« Reply #3 on: March 09, 2022, 07:58:00 AM »
Well, you can use separate macros, set "value 2" on 3, and just play with values.

PixelJockey

  • Newbie
  • *
  • Posts: 16
Re: Gradient random material ID
« Reply #4 on: March 10, 2022, 01:49:46 AM »
I stand corrected. I didn't understand that the two values represented a range. This should do the trick. Thanks so much!