Itoo Software Forum

Author Topic: Alignment for Segments with Different Z Thickness & Strange Geometry  (Read 652 times)

duncan_h

  • Newbie
  • *
  • Posts: 16
I'm building a RailClone object to create a window but am having difficulty aligning the segments correctly as they have different thicknesses on the Z axis. RC lines them up from the front but I need them aligned to the back. I've tried moving the pivots and selecting different alignment options in the segment nodes but no luck. This is the first really "complicated" array I've built so I've probably done something wrong! You can see the issue highlighted by the blue circle in the attached image.

Also, something strage is going on with the geometry at the start and end of the rows... the faces on the source objects line up perfectly but in the RC array its almost as if they are at a different angle. The red circles on the image show this problem (and the source objects)

Any help would be very welcome! Thanks.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #1 on: December 30, 2021, 02:43:35 PM »
This does seem like a pivots issue. Please try the following.

While the geometry is in the correct position, move the pivots on all of the segments so that they share a common point on the Z-axis. This should be at the back.

With the pivots changed, reset the XForm for all source objects

Then in the style, for each segment change the Alignment > Z option to use Pivot. That should fix it.

If that doesn't help, please feel free to send the scene to helpdesk@itoosoft.com and we'll take a closer look.

Many thanks,
Paul
« Last Edit: December 30, 2021, 03:03:57 PM by Paul Roberts »
Paul Roberts
iToo Software

duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #2 on: December 30, 2021, 03:27:46 PM »
Hi Paul,

Thanks for taking the time to reply... The reset xform worked on everything but the transom so I'll send it to the helpdesk as suggested.

I don't suppose you have any idea on what's going wrong with the segment geometry do you?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2828
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #3 on: December 30, 2021, 05:09:26 PM »
Thanks for the scene file, it's very helpful (and a nice style I might add)

What's happening is that you are using the Z Pivot to align the segments inside the nested generator which is correct, but the output of a nested generator always reverts back to using automatic mode. To fix it, you can simply add a new Transform node after the nested generator and set the Z Alignment back to using pivot.



I hope that helps.

Paul
Paul Roberts
iToo Software

duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #4 on: January 01, 2022, 12:55:14 PM »
Adding a transform node after the linear1S node to reset the z axis to align pivot worked perfectly... however when I rebuilt my RC graph to incorporate everything I've learned, and new geometry, I seem to have introduced a new issue for the transom alignment.

Now, when I use the transform node it moves the transom a long way forward of the rest of the window (in fact, I think its moving the window a long way back). I can manually correct by using the adjustment field with a value of 132.624cm but that seems a bit of a hack(!) and I'd really like to learn what I've done wrong... I checked the pivots and reset the Xform but still the isue persists.

I ported the new geometry and relevant section of my new graph back to the original one, and replaced the original geometry in the first graph to compare - the issue remains in the new graph but not in the old (see screenshot). I've also attached the .max file for the comparison so if anyone has any tips they'd be much appreciated. I've driven myself mad over the last day or so!

Dragan

  • Hero Member
  • *****
  • Posts: 1296
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #5 on: January 02, 2022, 08:55:13 PM »
Hi
I don`t know your future workflow so I cant help you a lot at this point.
Also not sure why are you nesting. If you can provide some more info about your goal maybe we can help you more.
I`m attaching the file that can point you to solve some issues you are having now.
Regards and Happy New Year! :D
 
« Last Edit: January 04, 2022, 02:18:58 PM by Dragan »

duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #6 on: January 03, 2022, 12:10:13 PM »
Hi Dragan,

Thanks for taking the time to answer and offer suggested solutions.

I'm trying to write a RC object that will create different configurations of windows based on markers on the splines. I'm using nested array2s to create each type of pane then bring them together via a selector linked to the x spline markers. I use a marker on the Y spline to indicate the height of any top opening windows, and only use that on the array2s which have top openers (otherwise all window panes do!). I am also using the X & Y evenly's to add the handles via nested linear1s

The file I posted only had the code for top opening window panes as the fie size was too large (even if zipped) to post to the forum.

I tried the suggestion from your file but could only get it to work if I used the marker on the main array2s which as I mentioned causes the other windows to have unwanted transoms. I did consider consider changing the other panes to have selectors which would just insert 'normal' default pieces in at the section breaks rather than top/bottom ones but that would still leave me with the problem of how to use the X & Y evenly's to add the handles.

I just can't work out why the nested approach worked correctly in the 'original' railclone object in my example file but not in the 'new' one when to me they both look the same. The nesting L1S > A2S > A2S is exactly the same... If you turn the 'overide padding' after the L1S in both objects the alignment issue is exactly the same in both object (the front of the transom is lining up with the back of the window) but as soon as you switch the padding back on the 'new' one goes haywire but the original one is aligned correctly! I'm sure it's something I've done during my incremental development/learning but for the life of me I just can't see it!!

Dragan

  • Hero Member
  • *****
  • Posts: 1296
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #7 on: January 03, 2022, 03:01:04 PM »
As I can see now your intention is to use X/Y Base splines so you can have only one height driven by Y Spline.
I have created a quite number of different Windows/Doors generators for different clients but never used Y spline since I`m stuck with only one "value".
I`m just curious how are you gonna control the height of windows on a global scale when you have hundreds of windows with different heights?
I usually get requests to create a generator based on Clipping Spline (rectangulars) or Linear X_Spline+Height Parameter based on MatID, MarkerUserData, or some other sort of method but never Y_Spline.
Regards.

duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #8 on: January 03, 2022, 03:27:18 PM »
It's probably a function of my lack of knowledge, and small scale thinking!

I've used the downtime over the Christmas & New Year break to teach myself RailClone. Previously it was only used to generate roofs before the viz work was done in Lumion. Late last year started using 3DS Max for the visuals as I prefer the look of Vray compared to Lumion but in the past had never quite got the workflow sorted from my CAD package (Lumion had a direct link).

Having worked out the simple things like patios, decks, baseboards with furniture, and curtains I wanted to try something more complicated and the windows from my CAD package are shocking but would take too long to replace manually so it seemed the perfect next step. I started with an X spline and incrementally went from there and the Y spline just seemed natural. I was only thinking about 1 window at a time so the limitation of 1 height wasnt an issue... I imagined I would just draw X & Y splines on the window opening and use multiple RC objects (my projects are small residential with a handful of windows), although having read your post I realise I could use 1 RC object for all the windows if I built it correctly. Still coming to terms with the power of RC!

I had originally thought of using a clipping spline but couldnt get markers to work - how would you deal with a window had 3 panes and only 1 of them required a transom?


Dragan

  • Hero Member
  • *****
  • Posts: 1296
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #9 on: January 03, 2022, 03:45:55 PM »
If you use Clipping spline then you can use only one(first) Xmarker to get values from (introduced in RC5).
However, this is good enough to determine a lot of different window styles and parameters.
Windows/Doors are always on the top of the list for every new client and all of them have different workflow/parameters. Then again the styles/parameter list can be long too  :D:
- fixed/random opening
- fixed/calculated/random panel creation
- fixed/calculated/random subpanel size/position
- size based on MatID, MainParameters, MarkerUserData
- width/length/depth sizes
- speed vs parameters ratio
etc. etc.

Not an easy answer to your question  ;)


duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #10 on: January 04, 2022, 01:47:09 PM »
Ok... thanks to Paul & Dragan's help and advice I think I have almost got it!

I reworked things to do away with the Y spline and settled on using an X spline with marker data for the window details - I think this will suit my workflow best as it offers more flexibility on window dimensions and configuration. (I tend do deal with a lot of as-built rather than nice new buildings where the new windows can all be the same!).

The transom for pane with top openers was still tricky but I managed to get that by building the two parts separately and then using a compose node to stack them. (I learnt more about pivot alignment here!).

Now I have a couple of issues remaining... For the top opener I had to compose two pieces of geometry together to form the start (and end) piece. When the windo is scaled one of the pieces grows correctly but the other is stuck at is original size leaving holes in my window frame. (The red circles on the image "window 1")

The second problem is adding the handle to the centre of the bottom of the top opener (blue circle). I tried doing this with X evenly & an arithmetic node to find SegmentYRole but it either doesnt appear (blue circle) because the SegmentYRole returns 0 (for undefined), or it works partially (image window 2) but thinks the default segment is actually another bottom. Not sure why it is different on different configurations.

Even zipped the max file is a little too large for uploading to this site but if anyone is interested it can be found here...https://escapedesign.sharefile.com/d-s2978529c240f42f998267a9650010f16

Any tips would be greatly appreciated as it feels like I'm almost there now!

(in case you're wondering about the black squares in the corner of the glass this seems to be an issue with RC mirror messing with the normals in some way... it does'nt happen every time a piece is mirrored and I've solved it by mirroring the piece in Max itself then using that version in the 'broken' corners)

Dragan

  • Hero Member
  • *****
  • Posts: 1296
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #11 on: January 04, 2022, 07:49:44 PM »
Hi, no images to see what is wrong, but I worked on Railclone009
Sorry but I don`t have more time to look it deeply in the style but I have noted what is changed.
note:
Please try to upload your Max file to some lower version so more people could open it. (I could not open it at my work since I have only max2020 so you need to wait until I come home  ;D ;D ;D )
« Last Edit: January 04, 2022, 08:17:43 PM by Dragan »

duncan_h

  • Newbie
  • *
  • Posts: 16
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #12 on: January 04, 2022, 08:34:43 PM »
Can't believe I forgot to attach the images!

Thanks so much for taking the time to look at the max file and fix the broken parts of my code, (and for the explanatory notes). Can I ask if there is a reason you use a macro for SegmentYRole - is it just to save time when reusing it on different projects?

Thanks for the tip about saving the max files in an older version - what program do you use for zipping the files by the way as its obviously much better than mine as it only got the file down to 6meg as opposed to your 1?

Thanks again for your help - I'll leave the forum in piece for a few days now as I really should do something chargeable ;) (although building RailClone objects is strangely addictive!)

Dragan

  • Hero Member
  • *****
  • Posts: 1296
Re: Alignment for Segments with Different Z Thickness & Strange Geometry
« Reply #13 on: January 04, 2022, 08:44:06 PM »
I'll leave the forum in piece for a few days now as I really should do something chargeable ;) (although building RailClone objects is strangely addictive!)
I hear you brother :D That is why I`m doing 50% of my working time on the arch. viz projects and 50% on creating RC Object for clients.

Quote
Can I ask if there is a reason you use a macro for SegmentYRole - is it just to save time when reusing it on different projects?
I think your expression was wrong but I`m not sure, I just take a second to look.
My workflow is usually based on using Macros a lot. It is a quick way to reuse some of the functions and it is easier to expand Style based on macros.

Quote
what program do you use for zipping the files
WinRAR or 7-ZIP

Glad to help  ;)


 
 
« Last Edit: January 04, 2022, 09:12:29 PM by Dragan »