Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: Paul Roberts on May 08, 2015, 03:20:18 PM

Title: Scripts for RailClone
Post by: Paul Roberts on May 08, 2015, 03:20:18 PM
In this sticky topic we encourage you to share any intersting scripts or tools that you've created to make working with RailClone even easier.

If you'd like to share your work with the community, just feel free to upload or link to your script with a a brief description below.

Many thanks!

Paul

Disclaimer: Any scripts uploaded to this thread by the iToo Software team are not supported officially by iToo, please use at your own risk.
Title: Re: Scripts for RailClone
Post by: Paul Roberts on May 08, 2015, 03:24:07 PM
Reverse Spline

(http://lonelymonk.com/forum_images/6450ee7b2a644d958449682d7c76fcc7.jpg)

I'll kick this off with a small script that allows you to reverse the direction of a spline without losing the placement of the material IDs.

Normally the material IDs on a apline are allocated according the the vertex number so if a spline is reversed, the IDs are too. This can be a problem if you are using a RailClone object that uses the IDs to place segments. This script allows you to apply a standard reverse operation, reverse the spline maintaining the ID placement, or just reverse the IDs on their own.

To use it:



I hope you find it useful.

Many thanks,

Paul
Title: Re: Scripts for RailClone
Post by: Paul Roberts on May 08, 2015, 04:02:24 PM
RailClone Slicer

(http://content.screencast.com/users/Paul-Roberts/folders/Snagit/media/790f5d6c-95a9-428c-8160-e43395019433/05.08.2015-14.29.png)

This script allows you to slice an existing mesh into segments ready to be used by RailClone's 1D or 2D Arrays. It does this by adding and controlling a number of slice modifiers, then automatically cloning and splitting the mesh to create a number of segments.  To use it:



The script resets the pivots by adding an XForm operator to the geometry when it is picked, so you need to ensure it is aligned correctly in relation to the world coords. Remember the L1S generator uses the X Axis to build the Array and A2S use the X and Y. Even if your final style will be oriented differently, for example a vertical wall style, the segment's pivots will still need to be oriented to these axes.

(http://docs.itoosoft.com/download/attachments/16744475/image2015-3-22%2015%3A27%3A53.png?version=1&modificationDate=1428487024904&api=v2)

You can read more about this here (http://docs.itoosoft.com/download/attachments/16744475/image2015-3-22%2015%3A27%3A53.png?version=1&modificationDate=1428487024904&api=v2).

I have included a global size parameter for the Row's height. If you turn this off you can adjust the size of each row independently but be aware of the fact that the height of each row will always be determined by its largest segment (http://docs.itoosoft.com/display/RAILCLONE/9+-+Create+your+first+2D+array). 

If you would rather position the slice planes manually, just pick and adjust them from the modifier stack, the segments should still be created correctly when you click Slice Geometry.

Hope someone finds it handy!

Many thanks,

Paul
Title: Re: Scripts for RailClone
Post by: KN1988 on May 17, 2015, 12:36:13 AM
Hi,

Sorry if this is the wrong topic.
My first try for a simple script (never done this before). Got some code from other scripts and changed an combined it.

I wanted to animate Railclone object visibility. Therefore in the Railclone object display setting, the instance engine had to be turned off.
I had to go trough a lot of files and each file had a lot of grouped railclone objects.Therefore this simple script:
- A button to open all groups and sub-groups
- A button to sellect all railclone objects
- A button to turn the instance engine off and a button to turn it off.

Please use at own risk. I'm no experienced scripter....
Last line of code can be deleted by the way.
Title: Re: Scripts for RailClone
Post by: Shawn Olson on May 18, 2015, 02:07:40 AM
This script does interact with RC directly, but I added support for RC Pro in Wall Worm's (http://dev.wallworm.com/) VMF Exporter for the Source Engine. In essence, it allows level designers to build complex world geometry for the game level layout. I'm working on a way to utilize RC for prop distribution as well... not sure if the functions/parameters I need have all been exposed to MAXScript yet, which is part of what is holding that aspect back.
Title: Re: Scripts for RailClone
Post by: Paul Roberts on August 11, 2015, 12:51:59 PM
V-Ray Proxy Cloner
A little Maxscript to help create proxies with offset times for use in RailClone. Set the number of Clones to create using the Count parameter and the time between them using Frames Offset.

(http://i.imgur.com/IaXbG2t.png)
Title: Re: Scripts for RailClone
Post by: Paul Roberts on August 25, 2015, 10:12:19 PM
For an explanation of when this might be useful, see this thread (http://forum.itoosoft.com/index.php?topic=3065.0).

I realised it's a bit tedious to instance multi-texture materials into a large number of mult-sub slots so here's a little script to automate it.

Multi-Sub Instancer
(http://i.imgur.com/dh7vxdc.png)

This will instance the Material in the ID slot specified in ID of Mat to Copy to the IDs between the range defined by ID Range Start and ID Range End. Just set the values, make sure the multi-sub material is the active slot in the material editor and hit Instance to ID Slots

Be careful though, the script will overwrite any existing materials in the specified ID range, and once you've run the script you can't undo.

Hope it helps someone.

Cheers!

Paul
Title: Re: Scripts for RailClone
Post by: Paul Roberts on January 04, 2016, 06:30:47 PM
RCquickApply

A quick script to speed up applying simple library styles to a spline. Using it you should be able to create a new RC object, select a Library style and apply it to a selected spline in just a few clicks:

(http://i.imgur.com/7YowOjJ.png)

To use:


If no spline was selected it'll create a RC object and open the library browser, but the option to apply to spline will not be available.

Obviously this will only work for styles that require a single spline input - for more complex styles with multiple inputs you may find it's easier to just use the first button and apply the spline from the Base Objects rollout.


Paul
Title: Re: Scripts for RailClone
Post by: RobH2 on January 10, 2016, 09:13:15 PM
I can't figure out how to see '.ms' scripts in 'Customize' so I made the 'RailCloneSlicer v01' into an '.mcr'

Now, just drag the '.mcr' into Max then go to 'Customize' and in the 'Category' named 'RC Scripts' you'll see 'railCloneSlicer_RH' . Drag that to a toolbar or use 'Menus' to add it to a menu.

Title: Re: Scripts for RailClone
Post by: Paul Roberts on January 14, 2016, 11:17:30 AM
Apply RC to Poly


This script allows you to apply a RailClone object automatically to selected polygons, it's useful for cquickly creating walls and cladding. Here's a quick demo:



The script works by automatically extracting a closed spline from each polygon. It then duplicates the selected RC object, orientates it so that it is aligned with the polygon's surface normal and finally assigns the spline to the RailClone object's Clipping path. In most cases you should find this means you don't need a surface if the spline is flat, if not you may still need to add a surface to get the correct shape.

To use it:



I hope it might be helpful. Please let me know if you have any questions.

Many thanks!

Paul
Title: Re: Scripts for RailClone
Post by: Macker on January 26, 2016, 10:30:44 AM
Wow, these are some great scripts! Thanks!

If only everyone knew how to code. But then I suppose we wouldn't need you chaps to produce such great plugins if that were the case!
Title: Re: Scripts for RailClone
Post by: antmarch on January 29, 2016, 05:11:38 PM
Apply to poly script  is a timesaver indeed!

 Thanks very much for these guys!
Title: Re: Scripts for RailClone
Post by: Macker on March 03, 2016, 08:36:06 PM
I've been using the script to create a railclone object on a surface, but I'm having problems with a roof - it's got holes for rooflights, and it doesn't like it.
Title: Re: Scripts for RailClone
Post by: Paul Roberts on March 03, 2016, 11:27:58 PM
Could you upload your roof surface?  I'll check it out.

 Thanks !

Paul
Title: Re: Scripts for RailClone
Post by: Macker on March 04, 2016, 10:04:15 AM
Sure, here it is. Maybe I've just built the style wrong?
Title: Re: Scripts for RailClone
Post by: Paul Roberts on March 04, 2016, 10:54:03 AM
Hi!,

It look as though you haven't turned on Extend X/Y Size to area in the generator's setting.

(http://i.imgur.com/vU1nGLS.png)

This option automatically derives the size of the array from the Clipping spline, ensuring it is large enough to fill the whole area.

I hope that helps,

Thanks!

Paul

Title: Re: Scripts for RailClone
Post by: Bobby Parker on April 01, 2016, 03:57:10 PM
Yes, awesome. Can you post the lap siding, too?
Title: Re: Scripts for RailClone
Post by: Bobby Parker on April 01, 2016, 04:05:08 PM
Can you share the lap siding model that was used in the script?
Title: Re: Scripts for RailClone
Post by: Paul Roberts on April 01, 2016, 07:05:19 PM
Hi!

I can't find that particular file right now but here's a different one. Actually this one is more flexible with a few more controls and works with Clipping areas or if you prefer you can use an X Spline for the path and a parameter for the height instead.

I hope that helps.

Cheers!

Paul
Title: Re: Scripts for RailClone
Post by: raistlin on April 04, 2016, 12:24:01 PM
Many thanks for all that cool stuff, the roof one is a must and should be a nightmare for A-Tiles tools owner like-me :s.

Now, there is just the need to have a picker tool to be perfect :D.


If i have a request, it's maybe a global panel wich grabb all railclone objects too manage them in one panel.

Title: Re: Scripts for RailClone
Post by: Rokas on April 04, 2016, 02:16:45 PM
If i have a request, it's maybe a global panel wich grabb all railclone objects too manage them in one panel.

What do you mean by "manage" ?

I currently use near done script for managing RC objecs. I could add features You want for a public release:
(http://i.imgur.com/Gv46bUt.png)
Title: Re: Scripts for RailClone
Post by: Paul Roberts on April 04, 2016, 02:57:53 PM
Nice looking script Rokas! We actually have a RailClone lister in the current beta

You can read more about it here: http://docs.itoosoft.com/display/RAILCLONE/RailClone+Lister

(http://docs.itoosoft.com/download/attachments/20938766/image2016-4-1%2011%3A22%3A24.png?version=1&modificationDate=1459525486000&api=v2)

The final release is due in the next few days.

Thanks!

Paul
Title: Re: Scripts for RailClone slicer question
Post by: TL1895 on July 08, 2016, 04:27:00 PM
I am stuck making a style of double hung windows.
I get to the slicing of the default row.  It seems this type of window may need a second segment "default row"
because the upper and lower sashes are in different planes...please see image.
Thanks a lot,
TL1895
Title: Re: Scripts for RailClone
Post by: Paul Roberts on July 08, 2016, 04:37:35 PM
You're right, In this case you'd need different segments for each side of the window. There will inevitably be some slicing operations that the script can't handle, especially for more complex styles, In which case I'd probably duplicate the window and slice the two versions using different settings to get all the segments that you need. That said, I wonder in this case if it might be better to create the frame and the sashes separately? That way you would also have the potential to open and close them if you like. To do this you'd probably need two additional generators, so you'd end up with one for each sash, and one for the frame.

Cheers,

Paul
Title: Re: Scripts for RailClone
Post by: TL1895 on July 08, 2016, 04:46:37 PM
Hi Paul, that was fast!  Opening is not a priority as we do stills 99.9%
I'm going to try just using no x-evenly row, and make the default row include upper and lower sashes.
I'll update in a few...
Thanks
Title: Re: Scripts for RailClone
Post by: Paul Roberts on July 08, 2016, 04:53:46 PM
No problem at all.

I forgot to mention there's a thread here about windows in response to the tutorial that has some other questions and sample files for more complex setups. Some of them might be useful for your needs.

http://forum.itoosoft.com/index.php?topic=3320.0

Many thanks!

Paul
Title: Re: Scripts for RailClone
Post by: TL1895 on July 08, 2016, 05:38:13 PM
I've been reading those, and had previously made a good style, but cannot make this double hung work :(
Well, I've been at it an hour and that's the limit I have ATM.  I emailed a file to support, in case you have a chance to look?

Thanks again,
TL1895
Title: Re: Scripts for RailClone
Post by: Paul Roberts on July 08, 2016, 06:18:15 PM
No problem,

I've just sent you an amended file so you can see how I tackled this and the segments needed. It's basically a modified version of the file shown in the tutorial but with segments added to the sequence operators so that the geometry above the central Y evenly bar account for the change in sash position. I hope that helps.

(http://i.imgur.com/CrhOUAF.gif)

Cheers!

Paul
Title: Re: Scripts for RailClone
Post by: TL1895 on July 08, 2016, 07:05:00 PM
Hi Paul,

I know I've said it before, but that's incredible and you're so helpful!
I'm back in the file later this afternoon, but will check it out first :)

Thanks again,
TL1895
Title: Re: Scripts for RailClone
Post by: QM3423 on July 11, 2016, 02:06:59 PM
Can you please post this file for others to learn from and use?

No problem,

I've just sent you an amended file so you can see how I tackled this and the segments needed. It's basically a modified version of the file shown in the tutorial but with segments added to the sequence operators so that the geometry above the central Y evenly bar account for the change in sash position. I hope that helps.

(http://i.imgur.com/CrhOUAF.gif)

Cheers!

Paul
Title: Re: Scripts for RailClone
Post by: antmarch on August 16, 2016, 12:12:21 PM
for some reason the reverse spline script doesn't work anymore.  I have it as a button on my menu. 
I click the reverse spline only, and it messes up the ID's, never used to do this.  Happens on very simple splines even with only 2 id's.
Title: Re: Scripts for RailClone
Post by: Paul Roberts on August 16, 2016, 12:27:23 PM
Hi,

That's odd. Are you using a different version of Max?

Thanks,

Paul
Title: Re: Scripts for RailClone
Post by: KD2696 on August 23, 2016, 11:55:49 AM
Hi,
Is it possible to make the script, when multiple face are selected, to name the created Roofspline like Roofspline_001, Roofspline_002, ...etc ... and, when created if Roospline_x exists, create Roofspline_x+1
Thx.
Title: Re: Scripts for RailClone
Post by: Michal Karmazín on November 21, 2016, 03:38:46 PM
rcRandomSeed

(http://i.imgur.com/CZaznBV.jpg)

This script will automatically change the Random Seed value for selected RC object(s). Select desired object(s) or use the Select All RC Objects button to pick all RC objects in your scene. Than by clicking the reSeed button, it'll randomly assign new "Random Seed" values to those RC objects.
Title: Re: Scripts for RailClone
Post by: o_wal on January 30, 2017, 10:26:40 AM
Hi there!
Is it possible to make the script which will select base spline of RailClone object?
I think it will be useful for all RC users.
Thank you in advance
Title: Re: Scripts for RailClone
Post by: Michal Karmazín on January 30, 2017, 10:49:52 AM
Hi,

You can easily select any spline / surface used via 3ds max's quad menu (right click) - Select RailClone Base Object. Hope that helps.

Best regards,
Title: Re: Scripts for RailClone
Post by: o_wal on January 30, 2017, 11:03:08 AM
It, great! Thanks
Title: Re: Scripts for RailClone
Post by: Alex.S on March 22, 2017, 10:37:10 AM
If anyone needs a script to bulk disable use instancing engine to selected objects (sure it can be done better, i usually just evaluate all for script editor)...

Code: [Select]
sel = selection as array
count = 1

undo on "Disable Instancing Engine"
(
if sel.count > 0 then
(
while count <= sel.count do
(
obj = sel[count]
count += 1

obj.rendermode = off
)
)
)
Title: Re: Scripts for RailClone
Post by: MF1030 on August 10, 2017, 10:40:25 PM
Hello

I have difficulties with the apply RC to poly script and railclone 3

It happens especially when I have a hole in a surface, like a wall with a window.

The spline generated often appears to be invalid and the same as when I select the face, Ctrl click the edges and then create shape from selection.
Instead of creating two independent rectangles it makes a diagonal that connect the rectangles like on this video https://youtu.be/5w5s3hbfrVc?t=139 (https://youtu.be/5w5s3hbfrVc?t=139).

If I clean up the diagonal, it will work but I have the inside not hollow (like https://forum.itoosoft.com/index.php?topic=4585.0 (https://forum.itoosoft.com/index.php?topic=4585.0) ), the solution I found is to put the first vertice on the bottom left corner, and ask RC to realign

I am not super happy with my solution as it is a bit tedious and quite a few manual steps.

Do you have any advice or suggestions ?

Thank you
Title: Re: Scripts for RailClone
Post by: Paul Roberts on August 11, 2017, 11:38:53 AM
Hi,

RailClone 3 includes new features that should mean that you no longer need to use the script. In RailClone 3 a single RailClone object can populate multiple splines and automatically align them. For these sorts of uses  you may need to change your Auto Align mode (in the generator's clipping properties) to X-XY, and for complex shapes with apertures you can change the hierarchy checking mode to By Material ID and then assign material IDs to the splines to tell RailClone which ones belong to a single face. You can read more about these different modes in our documentation here: https://docs.itoosoft.com/railclone/style-editor/2d-arrays-generator-a2s#id-2Darrays-GeneratorA2S-clippingClippingArea

I hope that helps,

Paul
Title: Re: Scripts for RailClone
Post by: MF1030 on August 11, 2017, 06:45:17 PM
Hello Paul

Thank you for your answer, indeed it helps a lot as it saves the duplication for each spline + alignment of the Railclone object.

I have still an issue concerning the spline creation. If I use the script or Ctrl+edge I have spline as the one attached.

When I run this in railclone it does not see the hole and cover the whole surface.

Do you have a not too manual solution to fix this kind of issues ?

Thank you
Title: Re: Scripts for RailClone
Post by: FC1888 on September 24, 2017, 08:31:31 PM
If I read it right, you have converted the edges of a polygon, with a hole, to crate a spline, for RC, however you would need to remove the diagonal spline which is causing the error. Basically it will be a single spline but have two disconnected parts, the outer one and the inner one, having a spline connecting the outer and inner, means RC sees only the one spline and fills the areas. Hope that cures your problem.
Title: Re: Scripts for RailClone
Post by: yanosh HRDY on January 05, 2018, 11:08:16 AM
Hello,
Can anyone tell me where to find this plugin that is mentioned in this tutorial? thanks in advance.
https://www.youtube.com/watch?v=XhZE0ui55lI
at 14:40 min
named : RC_CreateBoundarySplines

(see attached screenshot)

thank you!!
yanosh
Title: Re: Scripts for RailClone
Post by: Paul Roberts on January 05, 2018, 11:30:46 AM
Hi Yanosh,

That script is available in the downloads for the tutorial. You can find the link in the top-right corner of this page: https://www.itoosoft.com/tutorials/creating-roofs-with-railclone

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

All the best,

Paul
Title: Re: Scripts for RailClone
Post by: yanosh HRDY on January 05, 2018, 12:28:40 PM
perfect!!
thank you Paul...
I actually have a lot of questions that come to me about Rail clone, not necessarily about the plug in ... I'll sort, condense all that and ask questions in the section dedicated ... ;)
Title: Re: Scripts for RailClone
Post by: arch3d on February 19, 2019, 03:27:03 AM
http://www.splinedynamics.com/product/subspline/

This script is a must. And now its 50% off
Title: Re: Scripts for RailClone
Post by: Dragan on February 19, 2019, 11:26:58 PM
Thank you.
Just purchased. I found it very useful.
Need some improvements but overall it is a great tool.

Dragan
Title: Re: Scripts for RailClone
Post by: raistlin on May 19, 2019, 07:37:22 PM
Is there a script to select all RC splines and clipping splines? Or select each splines dependance from a selction of railclones objects?
Title: Re: Scripts for RailClone
Post by: Rokas on May 20, 2019, 09:46:53 AM
Is there a script to select all RC splines and clipping splines? Or select each splines dependance from a selction of railclones objects?

Hi. Here You are.
It has no User Interface but You can place it as a button in max UI Yourself. Let me know if You need anything else.
Title: Re: Scripts for RailClone
Post by: raistlin on May 20, 2019, 09:31:18 PM
Is there a script to select all RC splines and clipping splines? Or select each splines dependance from a selction of railclones objects?

Hi. Here You are.
It has no User Interface but You can place it as a button in max UI Yourself. Let me know if You need anything else.

Many thanks !!
Title: Re: Scripts for RailClone
Post by: Rokas on October 24, 2019, 10:35:46 AM
Select Dependent objects.

Usage:
Select Your ForestPack Pro / RailClone Pro objects(can be mixed among other items) and running this script will add dependent objects to Your selection:
(https://i.imgur.com/69MPBrM.gif)
Title: Re: Scripts for RailClone
Post by: damien11235 on November 01, 2019, 08:15:40 PM
Hi,

Would it be possible to create a script to load multiple textures into the texture slots in railclone color map. As right now we have to manually add bitmaps to each slot. Or if possible integrate something like where we can just select multiple bitmaps and they populate the rc color slots
Title: Re: Scripts for RailClone
Post by: Uwe Kreuzahler on July 13, 2020, 11:27:48 PM
I noticed that some user have trouble creating a button for a ms script. So i'm attaching a script i use for years to help with this issue


Simply run the create_macro.ms, attached to this post, fill in the fields, select the ms script you want to create a button for and execute
Afterwards go to customize and drag and drop the button to your window
Title: Re: Scripts for RailClone
Post by: RB2300 on November 22, 2020, 04:00:58 AM
guys please can someone create some simple script that will not destruct object and create multimaterial for that railclone? i am able little bit pay/support

Note: that rappatool just will destruct everything.... it will either not help if I add "edit poly" modifier where he can easily scan all faces :( I am happy pay some friendly fee is someone will create some solution for this where i do not need destruct my stuff.

best regards Pablo
Title: Re: Scripts for RailClone
Post by: Rokas on November 22, 2020, 11:03:39 AM
Hi Pablo

Can you please illustrate how rappa tools destruct your objects?
Title: Re: Scripts for RailClone
Post by: RB2300 on November 22, 2020, 11:37:25 PM
Thank you Rokas for your replay, i am sorry i wasnt so clear...
"Some of the selected objects are not collapsed editable poly objects, Collapse them? Yes to proceed, no to exit"

On screenshot you can see there is also editable poly modifier and the script it ignore it... I do not  want to collapse/"destruct" my object.

Sorry for unclear statement.
Best regards P.

NOTE: I tested forestpack 7 and it is really great update regard performance,.... in my case i can see big improvement regard performance... my laptop is now more smooth in viewpoint and i don't see lags that i had before in similar scenes... I also really much appreciate rendering performance that i am getting, i can see that laptop can handle "main rendering" and "real time IRendering" more easy then before with older version. Thanks guys so much for last update. I am sending my testing render... really great job, i hope that you will get more more new customers base on your last update.
Title: Re: Scripts for RailClone
Post by: Rokas on November 23, 2020, 07:27:22 AM
Thanks for Your kind words about FP7.

Regarding Primitive object not collapsing and modifying their Material IDs - why do You need this? Why collapsing to editable poly is bad for You?
Title: Re: Scripts for RailClone
Post by: RB2300 on November 24, 2020, 12:24:29 AM
Good evening Mr. Rokas and everyone around,
It is really simple answer.

I am creating my assets and railclone can handle everything also slice it and etc (Nice perfect, soooo happy)...
Then when it goes to material / textures then I am forced to collapsing it... it means impossible modify it in future.
Ok solution is that, i am creating some copy that will be collapsed... and used in railclone

... Ok cool i can survive this but how you know,...... in later stages ....

you will adjust/modify pivot point or size or anything adjusting to final scene... and unfortunately you are working on collapsed object that has zero value for you.... and when you go to update your original object because that one is unfortunately collapsed then you see that you wasting your time because you need to do many changes to original object that you will be on same model that is collapsed (basically you will need take it out and mirror collapsed object regard original object).....  it means resizing orig model, pivot point fix, copy new updated orig model as a copy that will be collapsed for railclone, assign new copied ver. to railclone in railclone editor and assign into correct "segments" folders and etc... and then still do some minor fixes that will sit perfectly) We talking at least regards 15+ minutes of work and can go easily to 30+min if you face other problems that is not fit properly 

Then it forced me try go around this and either try use modifier "editable_poly" that it not helps you save against collapsing..

I am happy pay someone for simple script or sort this stuff... I can imagine that everyone facing issues regarding this texturing and then need/or be forced to collapse your work. BUT on opposite side,,,, collapsing is better then manually assign all textures and manually editing all mat_ID :D... but still I am happy pay someone and save my time with problem described above.

Best regard P. and thanks guys for great job... i really appreciate FP7 after my own quick testing. ... and railclone is also great piece of sw
Title: Re: Scripts for RailClone
Post by: Dragan on November 24, 2020, 06:30:16 AM
Maybe `Use Segment Material` option can help you.
https://www.youtube.com/watch?v=hcM7NaOQlxE
Title: Re: Scripts for RailClone
Post by: RB2300 on November 24, 2020, 08:31:48 AM
Dragan thanks sooo so much, you sorted this real nightmare

this should be enabled in default...
here is for others video how it works
https://www.youtube.com/watch?v=hcM7NaOQlxE
Thanks Dragan
Title: Re: Scripts for RailClone
Post by: DBowker3D on March 09, 2021, 07:11:13 PM
Also just purchased this one and another on the site! Super useful tools, all of which (grumble) all seem like they should already be integrated into Max as standard features. There are all these simple and obvious spline operations that were part of AutoCAD, like 20 years ago, that still aren't in Max... Anyway- glad someone is offering a solution to a few of them.
Title: Re: Scripts for RailClone
Post by: TL1895 on May 07, 2021, 02:47:38 PM

this should be enabled in default...


+1
Title: RC Spline - Script for adding Markers
Post by: Dragan on July 13, 2021, 08:05:34 PM
Hi,
I need a Script that will add one Marker at the start of every Subspline (It can also add RC Spline modifier itself, so one button script will solve all).
I know about the "All" check box but I need to have individual Markers at the start of the each Subspline so I can make a selection in Viewport and then make adjustments.
If someone can make this happen I`ll be very grateful  ;D ;)

Best Regards
Dragan
Title: Re: RC Spline - Script for adding Markers
Post by: Rokas on July 13, 2021, 09:01:41 PM
Hi,
I need a Script that will add one Marker at the start of every Subspline (It can also add RC Spline modifier itself, so one button script will solve all).
I know about the "All" check box but I need to have individual Markers at the start of the each Subspline so I can make a selection in Viewport and then make adjustments.
If someone can make this happen I`ll be very grateful  ;D ;)

Best Regards
Dragan

Happy to help You, Dragan.
Let me know if it works as You expected or need anything tweaked?
Title: Re: Scripts for RailClone
Post by: Dragan on July 13, 2021, 09:08:45 PM
GREAT!!!
Thank you Rokas!  ;)
Best Regards!
Title: Re: Scripts for RailClone
Post by: Dragan on July 18, 2021, 10:18:24 AM
 ;D ;D ;D
Not sure if this is even possible.
The script should find a distance between SubSpline and the next Z-axis point of the "wall" and apply this value as Subspline ID.
This value can be later used for Door/Window Height when L1S is used as a master generator.
Any ideas?
Title: Re: Scripts for RailClone
Post by: Dragan on July 19, 2021, 11:01:57 PM
... adding one more tweak to the previous idea...
Besides applying distance value to the SubSpline IDs it will be great to also apply it on the Marker_UserData[_] (considering that Marker already exist on the Start position)


 
Title: Re: Scripts for RailClone
Post by: Paul Roberts on July 20, 2021, 10:33:13 AM
Hi Dragan,

Thanks for these ideas. It all looks rather complex to me and goes a bit beyond providing scripting support for RailClone functions. I'm afraid I don't think we have the time to be able to write a custom script like this, though I'll add the idea to our wish list.

Cheers,
Paul
Title: Re: Scripts for RailClone
Post by: Dragan on July 20, 2021, 10:43:53 AM
Hi Paul.
You guys already have a ton of work working on the new RC5   ;D and already helped me a lot over time  ;)  so my hopes are towards the community. Maybe someone else is good at scripting that can help.
Title: Re: Scripts for RailClone
Post by: Rio on January 06, 2022, 01:21:55 PM
Sorry if I've missed it, and this may be asking a bit too much. But is there a script that will place markers on a basespline based on the proximity to the pivot of a set of other scene objects?

I want to recreate this facade with Railclone,there are about 5 different window types an no overall pattern, so I'll place them with markers. Just looking to spped up the conversion process a bit (this could help me a lot in future too)

Title: Re: RC Spline - Script for adding Markers
Post by: Rio on January 28, 2022, 10:18:50 AM
I don't suppose anyone knows how to amend this script to add a random spline ID or one of the data channels within a certain range (1-6 for example) per marker / subspline?

Hi,
I need a Script that will add one Marker at the start of every Subspline (It can also add RC Spline modifier itself, so one button script will solve all).
I know about the "All" check box but I need to have individual Markers at the start of the each Subspline so I can make a selection in Viewport and then make adjustments.
If someone can make this happen I`ll be very grateful  ;D ;)

Best Regards
Dragan

Happy to help You, Dragan.
Let me know if it works as You expected or need anything tweaked?
Title: Re: RC Spline - Script for adding Markers
Post by: Paul Roberts on January 28, 2022, 02:21:34 PM
I don't suppose anyone knows how to amend this script to add a random spline ID or one of the data channels within a certain range (1-6 for example) per marker / subspline?

Here's an amended version of the script. There are two new lines that should be easy to edit for your needs as follows

Code: [Select]
-- Randomises the ID value of new markers
-- change random range using random [start range] [end range]
each.modifiers[#RC_Spline].mkuserid[i] = random 1 6

-- Randomise the Data value of new markers
-- change marker using mkuserdata0/mkuserdata1/mkuserdata2/mkuserdata3 etc
-- change random range using random [start range] [end range]
each.modifiers[#RC_Spline].mkuserdata0[i] = random 1 6

Title: Re: Scripts for RailClone
Post by: Rio on January 28, 2022, 08:48:45 PM
Fantastic! thanks a lot!
Title: Re: Scripts for RailClone
Post by: Dragan on April 07, 2022, 10:02:56 AM
Please, can somebody help me with a script for automatically extracting a closed spline from multiple selected polygons?
I know how to extract an outline from a single selected poligon (Paul explained in tut: https://www.itoosoft.com/tutorials/creating-roofs-with-railclone?back=page%3D8),
but I need to speed up the process by selecting multiple polygons and getting Closed splines from each individual polygon.
I`m aware of the "Apply RC to Poly" script from page 1, but this one will duplicate RC objects and I need to have it all in one RC Object/Clipping Spline.
Hope that makes sense. Tnx

Title: Re: Scripts for RailClone
Post by: Paul Roberts on April 07, 2022, 02:08:22 PM
Hi Dragan, is the CreateBoundarySplines script any use to you. Its default mode creates a spline for each selected polygon.
Title: Re: Scripts for RailClone
Post by: Dragan on April 07, 2022, 02:24:25 PM
Yeeesssss!!! Thank you mate!  ;)
Title: Re: Scripts for RailClone
Post by: Paul Roberts on April 07, 2022, 02:27:45 PM
You're very welcome!
Title: Re: Scripts for RailClone
Post by: Dragan on April 07, 2022, 02:49:38 PM
 :-[ :-[ :-[ :-[
When I saw the prefix "RC_" I had to check it again....
I have to revisit all the tutorials from start to finish.
Sorry for wasting your precious time.
Title: Re: Scripts for RailClone
Post by: Paul Roberts on April 07, 2022, 02:54:09 PM
Never a problem, always happy to help out!  ;D
Title: Re: Scripts for RailClone
Post by: Alex.S on June 16, 2022, 01:06:04 PM
is there a way to "pause" global regeneration of meshes, and then re-enable it. Every time I change a param in RC Spline or Object it really slows down. It'd be nice to make 10 changes then regen with a handy pause / resume RC button.
Title: Re: Scripts for RailClone
Post by: Dragan on June 16, 2022, 01:11:33 PM
Well, you could open the RC Lister and temporarily disable it. I don`t think there is any way to keep the geometry visible and pause regeneration.
Title: Re: Scripts for RailClone
Post by: Alex.S on June 16, 2022, 02:51:49 PM
may as well just hide the object for that case.
Title: Re: Scripts for RailClone
Post by: Alex.S on June 22, 2022, 12:36:15 PM
I figured out how to do that btw,

for each rc object in the scene obj.autoUpdate = off / on etc

It will be quite slow when re-enabling all though! I could make it more clever to only disable it on those related to the selected spline etc
Title: Re: Scripts for RailClone
Post by: Dragan on July 08, 2022, 09:00:22 AM
I was looking for a similar script but had no luck.
I have a lot of closed Subsplines for Windows/Doors and I want to select/detach some of those within the specific range looking as RC X-->XY workflow.

I know it is an easy task just to set some Conditionals and filter them within Style Editor but usually, I`m preparing RC Presets for end-users so often time I`m requested to create a "Single-Spline Type" preset.

Hope that makes sense.
I think the script could look like img attached. Inputs for the range and small +/- Threshold to make sure to catch small deviations in size.
tnx

Title: Re: Scripts for RailClone
Post by: arch3d on August 06, 2022, 10:14:19 AM
Hi,

Looking for a piece of code to automatically inset n-Markers evenly divided on spline

Cheers
Title: Re: Scripts for RailClone
Post by: p.hubert on March 24, 2023, 01:35:37 PM
Hello everyone, I have several questions about the RailClone script.

Firstly, I would like to know if it is possible to load a custom preset via Maxscript, without having to go through the library, just with one command.

Lastly, a question about RC Splines. I am currently working on a script that adds markers to my RC Spline. Through an interface, I have a list of all my markers. I would like that when I click on an item in my list, it automatically selects the corresponding marker (so that I can move it manually and not with "distance" or "percentage"). I have found how to access the array of the RC Spline and how to activate marker selection via the "subobjectLevel = 1" command, but once there, I do not see how to tell it to select the corresponding marker.

Many thanks!

Pierre
Title: Re: Scripts for RailClone
Post by: arch3d on March 12, 2024, 07:07:14 AM
Paul,
How about some script to merge RC Splines.
E.g. I have one spline with RC Spline modifier (with markers ) Same situation on second spline. I would like to merge them togegther and keep both RC Spline modifiers ( or mege markers into one modifer - it doesnt matter ) with correct markers position and marker data.

Many thanks
Michal
Title: Re: Scripts for RailClone
Post by: Dragan on March 12, 2024, 07:41:07 AM
Paul,
How about some script to merge RC Splines.
E.g. I have one spline with RC Spline modifier (with markers ) Same situation on second spline. I would like to merge them togegther and keep both RC Spline modifiers ( or mege markers into one modifer - it doesnt matter ) with correct markers position and marker data.

Many thanks
Michal

+1
Title: Re: Scripts for RailClone
Post by: Mannii RC on March 25, 2024, 10:49:41 AM
I have an issue with Railclone Tools and maxscript.

Let say I run

Code: [Select]
Railclone_Pro.global.Instantiate 2 "aaa" false false false true
It does what it suppose to by instantiating railclone, but somehow 3Ds Max movement goes weird.
Even if I try to reset to empty file after that, I create a box, I try to move that box, it'll go really far.

All I can do is to close that Max and reopen to gain the normal movement again. It's like the Instantiate process somehow trigger something with the axis.
This however, does not happen with the Instantiate button in Railclone Tools. Only happens when I try to run the Instantiate via maxscript.

Another question.
In the doc, (https://docs.itoosoft.com/railclone/railclone-tools)

Code: [Select]
Railclone_Pro.global.Instantiate (1)mode (2)layerName (3)autoDelete (4)separatedMeshes (5)forceInstances 
and then

Code: [Select]
Example: Railclone_Pro.global.Instantiate (1)0 (2)"railclone_instances" (3)true (4)true (5)false (6)true
How come there's an extra argument needed? What does it do exactly?