RailClone > RailClone Pro (*)

Scripts for RailClone

(1/18) > >>

Paul Roberts:
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.

Paul Roberts:
Reverse Spline



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:

* Select an editable spline
* Switch to the spline sub-object level
* Select 1 or more splines
* Click a reverse option


I hope you find it useful.

Many thanks,

Paul

Paul Roberts:
RailClone Slicer



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:

* Run the script and then pick the object from the scene.
* Activate the checkboxes to turn on the segments you wish to create and adjust the slice points using the position parameters. If you're using an L1S generator you only need to use the settings in the L1S/Columns group. If you're using an A2S generator you'll need at least one option checked in each of the Columns and Rows groups. It's not possible to use the Rows group on its own.
* To get an idea of what is being slice, you'll need edged faces on, as it only shows one slice plane at the top of the modifier stack. (I had an idea about temporarily adding spline rectangles to mark the slices, but I haven't got around to it yet)
* When your cuts are in the right places, press Slice Geometry to create the segments
* Finally, if you'd like to remove the Slice modifiers from the original geometry, press the C button.


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.



You can read more about this here.

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. 

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

KN1988:
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.

Shawn Olson:
This script does interact with RC directly, but I added support for RC Pro in Wall Worm's 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.

Navigation

[0] Message Index

[#] Next page

Go to full version