Itoo Software Forum

Author Topic: Making an procedural/animatable building crane in RailClone - Help needed!!!  (Read 386 times)

Lars Egerrup / LKE Design

  • Newbie
  • *
  • Posts: 20
    • LKE design website
Hi there,
I have given myself a little challenge, - making a RailClone setup of a building crane. I have come fairly far already, BUT there are still obstacles that I would hear your view on.

I have separated the crane into the following parts (see the image) ..:


Track
- track iron
- track end stop
- track concrete blocks

Crane
- Bottom part (up to the repeatable tower section)
- Tower section
- Top part - including man house and horizontal bridge/boom

Hook
- hook sledge
- hook wire
- hook

I have made the Railclone setup in 3 (4) main sections. Alle arrays are using the same path.

Tracks
The tracks are made of 5 Linear1S - nothing special, right after the book. Two arrays are set up for the tracks iron part  - a left and a right - so it is following the path in half of the tracks width (coming from the Numeric parameter). The end stop parts are doing the same - and sit on each end of the spline - mirrored to each other. The blocks use the evenly parameter to insert the blocks in the distance given by a numeric parameter.
All in all nothing special

Crane
See this was more tricky, as I wanted to be able to alter the height of the crane (by repeating the tower section) - and at the same time be able to turn the top part of the crane around the center of the tower - AND at the same time be able to move the whole crane along the track.
First I tried with a number of Linear1S’s - without luck. Then I figured out that maybe you could use an Array2S to do it. As it actually by default are divided into 3 parts - the top and bottom being fairly static ( however the top of the crane turns around its Z axis - the Y axis in the array). The middle section ( the repeatable tower section) more or less builds itself , handled by the Y size of the Array2S. Works great!

The Array2S are following path - and its position is handled by the Padding Start of the array, - getting the distance on the path by a numeric parameter.

So far, so good!!

Track
Now the problem arises when ambitiously also want the hook to slide along the boom of the crane - and at the same time (naturally) follow the cranes rotation. And here I have got stuck!!
I have tried putting the sledge, the wire and the hook into an Array2S (as a macro). The setup is more or less the same as the crane. But I can’t make it rotate with the top of the top section - and make it move relatively to the position of the tower and at the same time make if follow the tower on the path.

My dream would be, to make an Array2S, giving it a pivot point, so that it is kind of hooked to the towers center by its left side “column”, putting the hook in the right column, having the wire to be scaled in the center row of the that column - and to handle the movement of the whole hook setup by sizing the width of the middle column.

Although we now have macros, they miss an essential thing  - the pivot point and the translation of it. A little like a nested array - however a nested array doesn’t have the parameter piping - so if you have some variable in the nested part, you have to find that separately and adjust the paramter there. Not specially flexible.

I’m sure that this is not the only case where this would be useful  - I can imagine something like openable door and windows could use the same feature.

OK, back to the crane   - any ideas how to work around this?
Lars Egerrup
LKE Design

E: Lars@LKEdesign.dk
W: www.LKEdesign.dk

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1517
Hi,

Thanks for this interesting questions. I've attached a file with a possible solution. You can see a demo of it in the video below. Apologies for the basic geometry  :) it should work fine with your detailed models too.


This was achieved by using more or less the same A2S generator set up for both the crane and the hook. The import thing is that the pivots align so that the hook segments are aligned exactly with the pivot point of the crane segments.

Then you can use the Pivot Offset properties found in the Transform operator to move the geometry but retain the position of the pivot. When you rotate this object now it will revolve around it's original position.



Thanks for the suggestions too. A generator output is already on our wish list, but it will involve some deep changes to the way that RailClone works.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul

Paul Roberts
iToo Software

Lars Egerrup / LKE Design

  • Newbie
  • *
  • Posts: 20
    • LKE design website
Hi Paul,
Thanks for the attempt  - we are almost there, BUT there are a missing step to be taken.
The hook, going up and down by its wire, is attached to a sledge or carriage, that can go along the boom (the horizontal bridge). Right now, in your setup, this is static. To complete the challenge, the carriage need to slide along the boom like 2 meters from the tower and to 2 m before the tip of the boom.

I have tried to change the transform values of the various axis in the transforms of the hook array but the hook still moves along the world axis'es  - as it is not an embedded object with its local coordinate system. I suppose the only solution at this point is to calculate the X and Y position trigonometrically based on the rotation and the position of the crane.
It would be a whole lot easier if the hook setup was embedded as a subject with its own local coordinate system, or?

My theory is that if I could have one A2S standing vertically, always following the rotation of the boom, having it aligned so one side of this array, fx. left side,  aligned with the axis of the tower, and the opposite side, the right column, doing all the ups and downs of the hook, AND by scaling the width of the middle column, controlling the position of the hook along the boom.
Lars Egerrup
LKE Design

E: Lars@LKEdesign.dk
W: www.LKEdesign.dk

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1517
Hi,

Sorry about that, I forgot to include controls for the hook and sledge. This can be done quite easily with that setup just by wiring a Numeric node to the Pivot Offset parameters. Please see the revised file attached for an example.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Paul Roberts
iToo Software

Lars Egerrup / LKE Design

  • Newbie
  • *
  • Posts: 20
    • LKE design website
Super!! Mission Accomplished!
 - strange, I tried to alter exactly these values but with a whole other result  - Paul, you must have a magical touch ;o)
Thanks a lot!


Just some side question - or rather suggestion. Sometimes it occur that you will need to restrict the movement of an item, - BUT the restriction might be dependant of other parameters - and can not thereby be a static value.

Take the crane hook vertical movement - to make the setup 100 % perfect, it would be great if I could restrict the numeric node min and max value - so the hook would never go further than the ground and the bottom of the sledge. But as the distance from the ground up to the boom are variable, it is not possible - as the numeric node min and max values are static. If you were adding an export parameter to the min and max values it would be great. I am aware however that the max and min values on the numeric node won't change already set values - and and some compensational measures must be taken to check and correct this if you change ie the height of the crane.

Just sopme thoughts :)

Best, Lars
« Last Edit: November 24, 2017, 10:15:59 AM by Lars Egerrup / LKE Design »
Lars Egerrup
LKE Design

E: Lars@LKEdesign.dk
W: www.LKEdesign.dk

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1517
Thanks for the suggestions, glad we (mostly) solved it. I've added exporting numeric limits to the wish list. We'll see what can be done.

Until then you could create an expression using the Min() and Max() functions to limit the values which would accept inputs and stop the number once it was greater or less than these values. There's some information here about expressions should you need it: https://docs.itoosoft.com/railclone/style-editor/operators#Operators-ExpressionsSyntax

Cheers,

Paul
Paul Roberts
iToo Software

Lars Egerrup / LKE Design

  • Newbie
  • *
  • Posts: 20
    • LKE design website
Just to finish off this thread, I want to show the end result of  - (unforutunately for me ;) ) -  mostely Pauls work. So this is tribute to you!

I have done a small animation showing that all moving parts actually works - and its all done by animating parameters values on the RailClone setup.

You can see the animation here: https://youtu.be/5ZbBVCg46hM
« Last Edit: November 24, 2017, 04:18:23 PM by Lars Egerrup / LKE Design »
Lars Egerrup
LKE Design

E: Lars@LKEdesign.dk
W: www.LKEdesign.dk

JTP Vis

  • Full Member
  • ***
  • Posts: 107
Love the idea and the project, but I can't see much on the video... it's too burnt out in the middle of the image.

Cheers,

Bill

Lars Egerrup / LKE Design

  • Newbie
  • *
  • Posts: 20
    • LKE design website
Quote
Love the idea and the project, but I can't see much on the video... it's too burnt out in the middle of the image.

Thanks Bill, this was only a fast test - I might make a better version later.
Lars Egerrup
LKE Design

E: Lars@LKEdesign.dk
W: www.LKEdesign.dk

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1517
Thanks for sharing your results. I'm really pleased we were able to help create that style.

All the best,

Paul
Paul Roberts
iToo Software