Itoo Software Forum

Author Topic: Dumb basic - best mode to have offset objects of same width align perfectly?  (Read 590 times)

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
Heya Folks!

I've got a job coing up with a load of rows of identical houses. Railclone does a really handy job of letting me lay this all out and since all of the houses in the scene are identical it allows me the option of making each unit along the road have an identical width for it's curbside, path, garden and drive and finally the house itself.

I've made a small test where each type of object adds up to the same width of 600 cm. My house object is 600cm wide, the drive and garden objects combine to 600cm wide and each segment of the path or curb are each 100cm wide so 6 of each combined again adds up to the same 600cm. I've set up multiple railclone linear arrays in a single RC object and the idea would be to use offsets to set the depth of each object and set the same spacing whether using evenly or default with tile with the hope that each combined 600cm segment could line up crisply with each other. I'm find that the positioning of each object along the line is a little bit random in terms of it's starting point so I end up with slight offsets and sometimes scale differences. I can understand that as each row of objects is offset out in y from the splines (all of them are mirrored too) that the offset spline they are instanced along is longer than the inner one - is there a way to get railclone to almost look at the positioning of each object as a percentage so that the center of each object will always align on each row of things?

Which mode would you recommend for something like this?

Cheers!

John


Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Hi John!

Please take a look at the attached sample file for a possible solution. I've made the following changes to your style.

- Wired the house to the Defaut input instead of Evenly
- Change Default mode to Adaptive.
- Removed all the Y Offset values from the generator settings. Internally this creates a new spline of a different length which is better for reducing unwanted deformation but stops the rows from remaining in sync because they're different lengths.
- Add the offset back by creating Transform operators and exporting the Fixed Y Transform setting.
- Export the Y Size of each segment so that it can be used to calculate the offset of the adjacent row. This means you don't have to enter the values manually and you should be able to quickly swap the geometry without changing any settings
- Also in the transform operators, changed Alignment > Y to Bottom.

I hope that helps. Please let me know if you have any other questions about this.

Many thanks!

Paul
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
Much appreciated!

So it's mainly the Y-offset in the generator doing the damage? Makes perfect sense of course! I like the size export thing too, very sneaky :D

Last thing, if I wanted to get the house object to be non bendable but get some kind of path / side garden objects stretch to fill in the newly made gaps, is it possible to do this?

Thanks again!

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
No problem at all.

Yes, it's the Y offset in the generator that's causing some issues with alignment. Transforming the segments instead is a little trick to get around this limitation. Regarding non-bendy houses. How about separating the ground plot and the building? In that way the house can sit in the centre of a plot of any size. In the attached file I've added the house using a separate generator and then added an expression that automatically centres it in the plot by dynamically changing the padding values.

I've also changed the way the style works. Instead of just using adaptive I've reintroduced Evenly segments to allow you to put fences between the houses. Default mode is now set to Count with a value of 1 so that there's only one house/set of garden parts/set of curbs/pavemements between each house.

For a bit of fun I've also added another generator that adds some randomised cars to the drives!



(You might have to use your imagination for the cars :) )

Please let me know if you have any questions about this new style.

Thanks!

Paul
« Last Edit: August 08, 2016, 05:53:49 PM by Paul Roberts »
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
This is pretty damn awesome, will have renders of what it ends up being over the next few weeks :D

The dynamic bits seem great, I'll have a good look over the manual for each of the new nodes you're adding in here.

Thanks again Paul!

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
My pleasure, glad I could help out. :)
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
Actually any chance you could back save this to max 2016?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Oops, my apologies I thought I had. Here it is saved back to 2014 just to be safe.

Thanks!
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
I'd say this'd end up being a really handy preset for a lot of people - much appreciated!

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
I agree, I've added it to my list for tutorials and/or presets already ;)
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
Just as a clarification to that last setup.

You're using count mode set to a random value - from the help it mentions that count would just stretch the count number of segments along the spline unless an x-evenly input is set to divide the spline.

Am I to think that the x-evenly, if it had a model input, would calculate the width of the model in the evenly input and then fit the default input model in the gaps between them? So in our case, if our evenly input was 100cm wide and the distance was set to 600cm, this would shrink the gaps for the default to fit into to 500cm? Hence if you're using an evenly input that has no width, it'll just use the full 600cm for an individual copy of the default model?

Would this almost point to a missing mode for default - count is setting the width by the amount of times it can fit along the spline length, would it make sense to have a count by width mode too rather than needing to short circuit it with the sneaky zero width evenly trick?

Thanks again for this!

John

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Good morning!

Quote
Just as a clarification to that last setup.

You're using count mode set to a random value - from the help it mentions that count would just stretch the count number of segments along the spline unless an x-evenly input is set to divide the spline.

Am I to think that the x-evenly, if it had a model input, would calculate the width of the model in the evenly input and then fit the default input model in the gaps between them? So in our case, if our evenly input was 100cm wide and the distance was set to 600cm, this would shrink the gaps for the default to fit into to 500cm? Hence if you're using an evenly input that has no width, it'll just use the full 600cm for an individual copy of the default model?

Yep indeed, thats exactly how it works.

Quote
Would this almost point to a missing mode for default - count is setting the width by the amount of times it can fit along the spline length, would it make sense to have a count by width mode too rather than needing to short circuit it with the sneaky zero width evenly trick?

That's an interesting idea, though to a certain extent that's how Adaptive mode works. It finds the number of items that can fit into a spline and scales them equally so that none are sliced. The difference here though is that the width is taken from the size of the default segment instead of entered as a parameter, but this can be manipulated using Padding or the Fixed Size parameters.

Thanks!

Paul
Paul Roberts
iToo Software

Screenscene vfx

  • Newbie
  • *
  • Posts: 36
Great to know the thinking behind it, much appreciated again Paul.