Itoo Software Forum

Author Topic: get the length of specified mat id segment of a spline  (Read 4888 times)

hoshimiya@midasco.co.jp

  • Guest
get the length of specified mat id segment of a spline
« on: October 19, 2017, 07:50:20 AM »
Hi

Is it possible to get the length of a section of one spline specified by mat id?

I am trying to create a steel partition system with doors using series of 1S generators. I managed to put doors in position using material id on the spline and condition node. The door itself is RC object and I am using mat id 2 & 3 for generating doors.

The issue I have is that as I am using scale mode, when I move vertices to adjust the width of the door, it deforms the way I don't want. I assume I somehow need to feed the length of specified mat id segment of a spline back into the x size of the door RC object but I have no clue how to.

I realize there is expression in arithmetic node to find length of a spline and finding out mat id.
Can you combine those to finding out the length?

Thank you in advance.

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: get the length of specified mat id segment of a spline
« Reply #1 on: October 19, 2017, 12:54:45 PM »
Hi,

You can check it for example by a following condition:

if(XSplineMatID==1, XSectionLength,0)

Attaching a sample scene. Hope you'll find it useful.

Best regards,

hoshimiya@midasco.co.jp

  • Guest
Re: get the length of specified mat id segment of a spline
« Reply #2 on: October 20, 2017, 08:27:10 AM »
Hi Michal,

Thank you for your response. I always appreciate guys at itoo's timely response ever since we purchased the software! One of the best I ever experienced.

Now I looked at your sample and it does work finding the length of a section, but I cannot figure out how to connect back to the x size of nested RC object. As the length is found using arithmetic, I cannot find a way to wire the parameter back (no key frames?).

For the solid doors, there are only 2 size(width) variations so I made 2 separate RC object and put them through condition node so RC put correct one in place, but for me it is not really elegant solution.
Also there is a glass door type which width varies between 880 mm to 1000 mm which I would like to incorporate as well. Because the size is not really fixed, I cannot simply make no. of RC objects to be nested.

I encountered one more issue. Following one of the tutorials, I managed to wire parameter of Z sizes of nested RC object (doors) and partition (main RC object). After saving the style to library and loading from there, the wired connection seems to got lost between the main RC object and nested RC object and I can no longer manage the Z size parameter in one place.

As we are always dealing with awful lot of partitions of various types, it would save us a huge amount of time if we can save them as style library.

I have attached a file, it would be great if you can have a look.

Thanks again.

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2991
Re: get the length of specified mat id segment of a spline
« Reply #3 on: October 20, 2017, 06:26:08 PM »
Hi Midas,

Please see the attached file. There's not currently a way to read the parameters from inside a separate RailClone object, so instead I've combined your 3 RailClone objects into one super style!

For the most part this was a simple case of cutting and pasting the nodes from both the door objects into the main wall object. I made them into a macro along the way and added an adjustable door height it case it was needed.

I hope that helps, please let me know if you have any further questions.

Many Thanks,

Paul
Paul Roberts
iToo Software

hoshimiya@midasco.co.jp

  • Guest
Re: get the length of specified mat id segment of a spline
« Reply #4 on: October 23, 2017, 04:39:49 AM »
Hi Paul,

HUGE THANK YOU for your help!
That is exactly what I needed. I did not think of combining the door self into main RC style.
It always helps huge amount when I try to deconstruct and understand someone's style.

Now I can go back creating more partition variations...

hoshimiya@midasco.co.jp

  • Guest
Re: get the length of specified mat id segment of a spline
« Reply #5 on: October 31, 2017, 05:56:59 AM »
Hi,

After studying your style, I managed to make a style to create partition which has glass part, panel (solid) part and doors. Generation of each part is controlled by the id number.
The issue I now have is that when I try to render, I got the following error. Please see attached image.

The result I am expecting is the one rendered only on local machine. Through a quick test I guess the issue is how the rc object is transferred (or read) by render nodes. I have not come across this issue before probably because I have not used complex system to control object generation by the id.

The error goes if I instantiate RC object and renders as I expect. So it kind works for now, but I would like to know what I am doing wrong.

I am using 3ds max 2018 Update 20.0, RC3.0.9, and vray 3.60.03

Thanks in advance

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: get the length of specified mat id segment of a spline
« Reply #6 on: October 31, 2017, 11:32:16 AM »
Hi,

Please double check that you did install on all your render nodes the same release of the RailClone plug-in. When installing our plug-in, be sure you are not running any 3ds max or related (like the VRay Spawner) service during the installation process. Sometimes, even closed, 3ds max might not shut down correctly and its processes are still running in the background. To check this you can go to the Task Manager by pressing Ctrl+Shift+Esc and make sure they've both has shut down correctly.

I would suggest you to try the following:
  • Double check, that 3ds max and VRaySpawner are closed
  • Delete the Railclonepro.dlo from the "plugins" Max folder (<maxdir>\plugins\) and all RailcloneVRay??.dll files from the max root folder
  • Reinstall our plug-in
For render farms and large organizations where it is more efficient to update content silently, there are several options. You can find these under the "To use unattended installation" section.

Hope that helps and please let us know that's all working fine or you are still facing troubles with it.

Best regards,

hoshimiya@midasco.co.jp

  • Guest
Re: get the length of specified mat id segment of a spline
« Reply #7 on: November 08, 2017, 03:36:05 AM »
Thanks for answering my question and sorry for late reply. I was out of the office.
After re-installing plugin, it seems to be working as expected!

Thanks again.