Itoo Software Forum

Author Topic: Stone Wall revisited  (Read 6185 times)

NO4657

  • Newbie
  • *
  • Posts: 9
Stone Wall revisited
« on: June 04, 2015, 05:58:07 PM »
Using the existing stone construct, stones nearly the same height fit fine, when I add a taller stone the gap grows. How do I fill in the gaps... need gravity operator...

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Stone Wall revisited
« Reply #1 on: June 05, 2015, 10:12:50 AM »
Hi

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.

Many thanks,

Paul
« Last Edit: June 05, 2015, 10:21:13 AM by Paul Roberts »
Paul Roberts
iToo Software

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: Stone Wall revisited
« Reply #2 on: June 05, 2015, 10:20:34 AM »
You might also find this post interesting which uses the same idea of pre-composing several stones to create a much more randomised effect.

Many thanks,

Paul
Paul Roberts
iToo Software

NO4657

  • Newbie
  • *
  • Posts: 9
Re: Stone Wall revisited
« Reply #3 on: June 05, 2015, 02:28:32 PM »
This works, but I don't think I did the materials your way (wasn't sure how to attach materials to operator). Attached Multi sub to RC wall, and got stone wall 1. Then selected individual stones in each group and gave each its own material. And got stone wall 2...

IT1371

  • Full Member
  • ***
  • Posts: 187
Re: Stone Wall revisited
« Reply #4 on: June 25, 2015, 10:50:11 AM »
I had exactly the same task today.
Thank you!  ;)

zules

  • Jr. Member
  • **
  • Posts: 53
Re: Stone Wall revisited
« Reply #5 on: January 13, 2018, 07:07:56 PM »
Hello there, and Happy New Year !

Any tips to have this result, but with an unique heigh size Z by line ? But random size Y ?

Thank you !