Itoo Software Forum

Author Topic: Tint by scale Effect problem  (Read 898 times)

P.Kuczynski

  • Newbie
  • *
  • Posts: 2
Tint by scale Effect problem
« on: April 12, 2019, 04:44:31 PM »
Hi,
I'm trying to generate a ForestPack Effect that will tint the colour of the objects depending on their random scale value: the bigger the object - the more tint strength it should get.
So far I came up with something like this:
Code: [Select]
vector Scale = fpItem.scale;
vector minScale = fpItem.randScaleMin/100;
vector maxScale = fpItem.randScaleMax/100;

fpItem.tintMult = easeinout(comp(Scale,0),comp(minScale,0),comp(maxScale,0),0,1);
But the result is that the tint only affects the biggest objects and their tint has 100% strength.
I want the tint strength to be softening gradually in corelation to scale.
The result is attached.
It acts as "fpItem.tintMult" was a boolean type attribute...

Regards,
Przemyslaw

Rokas

  • Hero Member
  • *****
  • Posts: 3324
Re: Tint by scale Effect problem
« Reply #1 on: April 12, 2019, 09:01:59 PM »
Hi. Thanks for the question.
There seems to be some problems with fpItem.tintMult . We will check it.
Meanwhile You can use similarly fpItem.tintColor for the same effect.
Full effect code:
Code: [Select]
vector Scale = fpItem.scale;
vector minScale = fpItem.randScaleMin/100;
vector maxScale = fpItem.randScaleMax/100;
real clr = easeinout(comp(Scale,0),comp(minScale,0),comp(maxScale,0),0,1);
fpItem.tintColor = [clr, clr, clr];


Demo scene attached.

Hope this helps. And thanks again for reporting any issues You find.
« Last Edit: April 12, 2019, 10:57:48 PM by Rokas »
Rokas

P.Kuczynski

  • Newbie
  • *
  • Posts: 2
Re: Tint by scale Effect problem
« Reply #2 on: April 16, 2019, 01:55:43 PM »
Thanks Rokas! :)

That's a great workaround! I never thought of using ForestColor map to control mix amount of mixmaps.

Best regards!