Pipes Generator


In doing this is the previous pipe is pointing way off in a bad direction it will know to pick a piece of pipe that has a bend on it to help reach the targeted point much quicker than it randomly choosing (the wrong piece…a straight pipe) when it really needs a bent one.


i’m not sure that we have to pick the best piece every round… i’m talking about a little tweaking of random before every play based on how the last one helped well.


Alright, yea i can see that being a very cool idea and worth implementing.

I’ll get this last round of bits which we just wrapped up on with the rotation/direction implemented and then from there we can then add the probability part. I think that will be very clever and cool.


here is a simplest solution that i see…
if last picked piece played good - add it to the play-list as new instance, if the piece played bad - remove it from the list… if the list becomes empty - reset the list as origin (all pieces with equal probability)


no… it’s not a right solution.
we have to know what type a piece we use. there might be the types:

fast move (long straight piece)

slow move (short)

default move

fast turn (90?)

slow turn (15?)

default turn (45?)


no… it’s not a right solution. we have to know what type a piece we use. there might be the types:

fast move (long straight piece)

slow move (short)

default move

fast turn (90?)

slow turn (15?)

default turn (45?)

Yeah we can help categorize the types of pipes by making those names part of the pipe rig (start helper)


Install as described in instructions file located in zip.

Things done:

  • Added some bug checks when creating template rigs
  • Added Build type options ‘Free flow’ and ‘To target’
  • Added Smart rotation function (contributed by Denis) for rotating objects
  • Pick Object for target
  • Updated icons (not final ones)

Things to add/wishlist:

  • Denis ‘Probability Geo Selection’
  • Intersection detection system or bounding box collision
  • In addition with the sentence above I’d like to add a checkbox which enables/disables intersection detection.
  • Along with the two mentioned above, I’d like to add the option for the system to find the ‘endCap’ piece of geo, if available in the pipe list, and use that as the end piece to the pipes if they no longer can grow from their ends.


Does anyone have methods of implementing an undo? I noticed the pipes gen doesn’t seem to handle them to nicely.


I’ve gone ahead and here is the latest one along with a few bug fixes.

Got some new avenues here. Check out this latest zip file. Open the max file and once you run pipes gen…changes the rotate range to: 90 - 180 then steps to 90.
Create the first piece and then rotate it to lay it flat.

Then generate. You’ve got yourself a roadway system! Check out the file and let me know your thoughts. If users created the roadway on a grid like system it may be possible to replace intersections with the appropriate piece.

Just a cool idea i figured I would share.


it doesn’t make sense for a mapped or recursive function…


what’s wrong with undo? does it crash on undo?


I have emitted that in the newest one I have hear. I needed a function to select the nodes but I have changed that.

Yeah it seems to crash when I undo more than 2 times.


it’s maxops.clonenodes for sure… see the mxs help for thehold. it might help. actually anyone who wants to write powerful scripts has to know and be able to use theHold.


Alright. I’ll check it out Monday and see hoe to implement it


Don’t know if this is the correct place for this but…
I was playing/testing the script a bit, made a couple of models and added them as rigs.
When i added all the point helpers to the pipes list it became pretty hard to distinquish which piece was named what. So i took them off the list tried renaming some pieces but after renaming they didn’t wanted to be added again.

made a fast clip of what i mean:

And yeah iam trying the script to be able to make a setup to be able to create radiators in a lot of common shapes, sizes and forms quickly :slight_smile:
Never to old to use sort of lego building blocks to build things :slight_smile:

edit: i did a post on jokermartini.com with some extra thingy’s because it took a week for this posting finally showed up :slight_smile:


becomes a very interesting tool…


JokerMartini thanks for the great tool!
I Would like to share parts ready to generate roads.


Wow afpavlov,
Impressive work. I showed my collueges at work what you had done with the tool and they were all pleased with your creation. I enjoy seeing what people do with these tools. Thank you very much for sharing as well.

Keep up the great work. You should make a video showing how you created this road setup.



Roads generator in action

JokerMartini Thank you! But I thank you so much more!
How would I do that the process was fully automatic, which would be part of the correct orientation?
Сan include in the original geometry lights, road signs and more.
Make a model in detail + UV, a set of textures
And received a full-featured tool!


This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.