Itoo Software Forum

Author Topic: Gradually increase scale of object per Y counter?  (Read 2301 times)

MN4869

  • Jr. Member
  • **
  • Posts: 79
Gradually increase scale of object per Y counter?
« on: November 04, 2015, 06:11:47 AM »
I'd like to create a cladding system using the Array 2S. The source geo will be a simple plane or a box.

Cladding sheets are stacked, but the sheets get progressively wider as they are high up the facade.

Is there a way to do this? Ideally the size increase won't be linear - so throwing some kind of curve into the mix would be awesome.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Gradually increase scale of object per Y counter?
« Reply #1 on: November 04, 2015, 11:05:14 AM »
Hi,

You should be able to achieve this using a custom expression in the Arithmetic Operator. In the attached file you set a minimum and maximum scale size from the parameters rollout and the segment will scale between them as it increases on the Y axis. To achieve this the following graph is used.


 This graph works as follows:
  • Exported Parameters control the range using minimum and maximum sizes .
  • An Expression controls the scale by taking the minimum size and adding a proportion of the range. The proportion is calculated by multiplying the range by a value from 0.0 to 1.0 depending on the segments position on the Y axis in the array (0.0 at the bottom, 1.0 at the top)
  • The segment's position on the Y Axis is found using YSplinePosition expression. This outputs 0.0 at the start of the array to 1.0 at the end and so can be used to increase the size of the segments based on their position. Also in this section is an expression that converts YSplinePosition'slinear output into an ease-in and ease-out curve. This has an additional Curve Adjust parameter that allows you to control the strength of the easing effect
  • Finally the results of these expressions are wired to a Transform node's Y Fixed Size parameter to control the segment's height. In the image  below I've also created a version that Scales the X Size to better illustrate the easing function



I've attached a sample file of this setup for you to take a look at. Please let me know if you have any further questions.

Many thanks!

Paul
Paul Roberts
iToo Software

MN4869

  • Jr. Member
  • **
  • Posts: 79
Re: Gradually increase scale of object per Y counter?
« Reply #2 on: November 04, 2015, 11:16:31 AM »
Hi

I found a solution but yours is way more elegant. Thanks very much!

MN4869

  • Jr. Member
  • **
  • Posts: 79
Re: Gradually increase scale of object per Y counter?
« Reply #3 on: November 08, 2015, 08:46:49 AM »
Are there any good tutorials for familiarizing myself with using expressions in RC? I can follow through what you've done but still not sure how to adapt this to gain more control. For example if I wanted to specify the heights of each y counter row specifically?

This is an eye opener. Thanks again.

Edit - I attached a screenshot - am I doing something wrong?

I would expect that the resulting RC objects would scale from 1mm on the LHS of the x spline, up to 1000mm at the end of the X spline as the multiplier is between 0 and 1 for the x spline.
« Last Edit: November 08, 2015, 09:24:11 AM by MN4869 »

MN4869

  • Jr. Member
  • **
  • Posts: 79
Re: Gradually increase scale of object per Y counter?
« Reply #4 on: November 08, 2015, 09:32:57 AM »
Changed my numeric node to scene units and that fixed the problem.