Thanks for contacting us with this question. Unfortunately, there is no automatic way to randomly pack stones with different heights. Each row in an A2S array is calculated independently and the height is governed by the largest segment in that row.
To solve this in the past we've had some success with combining blocks to make collections that share the same height. These can either be modelled before adding to RailClone as a single segment or alternatively with a little effort it is possible to construct sets from individual stones directly in RailClone using the Compose operator. In the attached example I've demonstrated the latter technique using 3 composed block sets.
This has the benefit of enabling you to still randomise the translation and material IDS of each individual stone. Please see the attached Ledge Wall Example.max
file for this example.However this works by slicing the ends so of you need corners you can tackle it slightly differently -
When using the Compose operator with the negative padding values needed to assemble the parts, there can be a problem when reaching a corner of end of a spline where some of the parts will be missing.
This is caused by the fact that these missing parts should be generated after the end of the spline, and then moved back into position. Unfortunately, at present, RailClone disregards all segments that appear after the end of the spline, irrespective if their padding values. This is a known limitation and we are working to solve it for a future release.
The attached file - Ledge Wall Example.max
- not have that problem because it's using a clipping spline which allows you to extend the boundaries of the array to include the missing parts, but if want to use corners we can't use that feature. I propose two possible methods. 1 - Nested Arrays
Using this solution you pre-compose each block of stones in a separate RailClone object. This should include all the transform and material randomisation operators too. These are then added to the wall RailClone object as segments. To ensure that any randomisation in the nested RC object is re-seeded each time the segment is used, turn on Properties > Deform > Nest
This has the advantage of retaining the transform randomisation but disables instancing
, so can be more memory intensive depending on the complexity of the geometry.2 - Model the blocks and randomise material IDs
Alternatively, in this technique you model the blocks manually and assign each stone in a block a different material ID, in this example each has been given a material ID between 1 and 4.
These are then added to RailClone as segments in the usual way. To randomise the materials you then create a material Node for each of the 4 material IDs. Connect these together in a chain, then attach the segments to the input of the material operator at the beginning of the chain, and connect the output of the final Material Operator in the chain to the Generator's Default and Corner inputs:
This technique has the benefit of retaining the instancing and randomised material IDs, but cannot randomise the translation of each individual stone.
In the attached files ledge wall without clipping.max
illustrated both these examples, if you have any further questions about this please let me know and I'll be happy to help out.