Itoo Software Forum

Author Topic: RC Cylinder alignement problem  (Read 450 times)

NHimages

  • Newbie
  • *
  • Posts: 16
RC Cylinder alignement problem
« on: June 30, 2022, 12:32:29 PM »
Hi there,

I'm trying to fullfill a surface with a cylinder with a random radius (or 3 different radius for example)

I linked my .max file where I tested something, but didn't work.

Can someone explain me how to achieve this effect ?
Here is what I would like to do, each cylinder takes the empty place :


I also tried with Forest and the collision part but didn't worked as expected.

Thanks

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: RC Cylinder alignement problem
« Reply #1 on: June 30, 2022, 02:01:26 PM »
Hi,

Neither Forest Pack or RailClone have a circle packing algorithm which is what you'd require to do this really well, however you might be able to get close enough in Forest Pack. I've attached a sample file to illustrate a possible approach.

- In this file I'm using just one cylinder with randomised scale.
- Collisions are enabled and left at their defaults. Preview in Viewport is enabled to see the results.
- Scale is randomised, but I've edited the probability to reduce the number of large cylinders which otherwise tend to dominate.

- Distribution map is set to solid. You can play with the size of the map to get the desired results.


I hope that helps.

Paul
Paul Roberts
iToo Software

NHimages

  • Newbie
  • *
  • Posts: 16
Re: RC Cylinder alignement problem
« Reply #2 on: June 30, 2022, 02:27:48 PM »
Thnaks Paul,

I'll check this. I'm afraid it's not enough to solve my problem because if there i too much space between the circles it will give the impression that they can fall (it would be like stumps circle cuts on a wall) but I'll try to play with the parameters to find a solution, thanks !

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: RC Cylinder alignement problem
« Reply #3 on: June 30, 2022, 02:36:20 PM »
I see, I doubt you will get this effect quite right with Forest Pack because as I say it doesn't really have a packing algorithm. Maybe this circle packing MCG could help? http://www.scriptspot.com/3ds-max/mcg/mcg-circle-packing

Best,
Paul
Paul Roberts
iToo Software

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: RC Cylinder alignement problem
« Reply #4 on: June 30, 2022, 04:20:29 PM »
Attached is a RC style that can place a scaled segment onto the circles produced by that packing script.

Best,
Paul
Paul Roberts
iToo Software

NHimages

  • Newbie
  • *
  • Posts: 16
Re: RC Cylinder alignement problem
« Reply #5 on: July 01, 2022, 09:38:49 AM »
Thanks Paul,

I might resolve my problem with this script for this time.

Maybe it could be an improvment for the next RC versions, to have the possibility to check collisions and/or neighbors parameters ? Like a smarter-padding fonction :)

Regards,
Hervé