Itoo Software Forum

Author Topic: Autoscale based on Objects Above  (Read 381 times)

JM2145

  • Jr. Member
  • **
  • Posts: 79
Autoscale based on Objects Above
« on: January 08, 2023, 02:22:37 PM »
I'm trying to fill an area under some stairs, is there anyway to have Forest auto scale it's height based on objects above it?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2993
Re: Autoscale based on Objects Above
« Reply #1 on: January 09, 2023, 11:18:07 AM »
That's an interesting question, and although there's not a built in way to do that with Forest Pack, there might be a workaround that'll be suitable for your needs that uses a Forest Effect.



Please take a look at the attached file. In it, I've actually scattered the items on the stairs rather than the ground. A forest Effect then finds the distance between an items position on the stairs and the FP pivot (which is placed at ground level). It then divides that by the height of the geometry to find a scale multiplier and then uses that to adjust the object's size on the Z Axis. In order for that to work you'd have to create the Forest Object in a particular way:

- Scatter the objects on the stairs rather than the ground
- Move the Forest Object so that it's pivot is on your ground plane.
- In the Distribution rollout, set the Collisions Height to 100%. You may need to temporarily enable collisions to edit that parameter. This makes the size available to effects, but you don't actually need collisions to be enabled for effects to get the value.
- In the effects rollout, load the attached Forest Effect. It has two parameters for adding min and max scale variation. If you don't want variation, set them to the same value.

That's it. I hope that helps.

Paul
Paul Roberts
iToo Software

JM2145

  • Jr. Member
  • **
  • Posts: 79
Re: Autoscale based on Objects Above
« Reply #2 on: January 09, 2023, 11:31:40 AM »
Thanks Paul I'll give it a shot.

I was also thinking of creating a mask based on the stairs geometry from a top down view.  So the bottom step would be dark grey, the next step slightly lighter, the next step slightly lighter and so on and so on.  And then using that mask in conjuction with UV mode on the surface rather than XY.  Similar to the attached.  Although it seems more cumbersome to adjust than yours.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2993
Re: Autoscale based on Objects Above
« Reply #3 on: January 09, 2023, 11:42:53 AM »
That'd certainly work too - nice idea!

Best,

Paul.
Paul Roberts
iToo Software

JM2145

  • Jr. Member
  • **
  • Posts: 79
Re: Autoscale based on Objects Above
« Reply #4 on: January 09, 2023, 11:44:36 AM »
Not as glamorous as yours :)

JM2145

  • Jr. Member
  • **
  • Posts: 79
Re: Autoscale based on Objects Above
« Reply #5 on: January 09, 2023, 08:57:50 PM »
Ended up just using the map method I described which works well.  I can keep it as a live PSD too to adjust the different colours and really control the heights under each step. My map doesn't go from 0,0,0 to 255,255,255 at the minute either, so I'm not getting the full range of scale.  I'll test your method soon though Paul as it seems handy, I appreciate the out of the box thinking.