Itoo Software Forum

Author Topic: I need a simple, intuitive explanation of axis alignment  (Read 141 times)

tonyinseattle

  • Newbie
  • *
  • Posts: 1
I need a simple, intuitive explanation of axis alignment
« on: July 12, 2019, 12:41:21 AM »
I'm having the hardest time understanding exactly how axis alignment works in RailClone using the A2S generator. I've read the help, specifically these two pages:

https://docs.itoosoft.com/railclone/getting-started-with-railclone/8-create-your-first-1d-array
https://docs.itoosoft.com/railclone/getting-started-with-railclone/9-create-your-first-2d-array

But there's not much to go on there.

And I've followed along with the tutorials on the ItooSoft web page, especially this one:

https://www.itoosoft.com/tutorials/using-railclones-gradient-probability-macro?back=page%3D2

... which creates a tapered building using two lines and some segments. But I'm just not understanding axis alignment in order to get the segments aligned the right away.

For example, I downloaded the tutorial files linked above. They have a circle, a simple vertical curving line and a few segments flat on the "ground," as I understand they should be created. I create a RC object and hook everything up and you end up with a round building that curves and tapers in toward the top with vertical side elements. Perfect.

Now, I try creating my own circle and curving line. I create the circle in Top view, which gives me a circle oriented just like theirs in the local coordinate system. Then I create a line in Front view (how else do you create a vertical line?). In the local coordinate system, my axes are not aligned with those of their line. So I go into the hierarchy panel and rotate the pivot to match the orientation of the pivot of their curving line. Now I create an A2S generator, hook up my lines and one of their pieces of geometry and ... I get a wide flat fan. No pretty building.

I'm sure I'm missing something. I need to understand what it is so I can reach that AHA! moment when it all finally makes sense. I'm sure it's simple but I need a good explanation... are you the one to give it to me?

I'm attaching three screenshots to show you what I mean as well as the Exercise File from Itoosoft with my attempt at repeating what they did.

Thanks,

Tony

Rokas

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1749
    • iToo
Re: I need a simple, intuitive explanation of axis alignment
« Reply #1 on: July 12, 2019, 09:45:10 AM »
Hi Tony
I will try to explain.

1st, You can create splines in any viewport You want. If anything comes out wrong- we can always fix it. "Reset Xform" helps most of the times.


To understand it simply and logically I can state like this- You draw X spline in top viewport along x axis. Draw Y spline in top viewport along y axis:


Now let's swap straight X spline with circle:


Weird stuff happens, but do not worry- seems like Y just was too long to understand what is going on:


As You can see, we can also reverse Y spline to change starting direction. All is simple for now, right?

Let's increase curve steps for smoother segmentation and now we can lift End vertex of the Y spline too see the magic happen:



Then all is left just easy final tweaks:




Now let's see why Your spline does not work, and why Tutorial spline does work.
Let's start with iToo vertical spline. To see what RailClone "sees", please Add reset Xform modifier and delete it.

You can paste this line in MaxScript listener or do it manually as show in the top of the post and delete it:
Code: [Select]
resetxform $; deleteModifier $ 1


Now let's do the same on Your Y spline and reveal what RailClone "sees" as Y spline:


Good thing is- now we can understand how to fix it (in spline sub-object level):

« Last Edit: July 12, 2019, 09:54:08 AM by Rokas »
Rokas
iToo Software