Skip to main content

RailClone Tools

Overview

RailClone Tools, a Utility plugin, is used to access some tasks that cannot be done directly from the Modify panel of RailClone. Using RailClone tools you can create and organise instances from RailClone objects. This is useful if you need to use renderers not natively supported by the plugin or provide a file that can be used without the need for RailClone to be installed.

caution

This tool is available only in RailClone Pro.

Procedures

To install RailClone tools

RailClone tools can be found by going to Utilities and clicking More... alternatively to add it to your button sets, follow these steps:

  1. Go to Utilities and click on the Configure Button Sets Icon ().
  2. From the resulting dialog, choose the set you wish to add the tool to from the drop-down list.
  3. To replace an existing utility with RailClone Tools simply drag it onto an occupied button slot.
  4. To add a new button, increase the Total Buttons value and drag RailClone Tools to the newly created blank slot.

Creating instances from a RailClone object

  1. Select a RailClone Object

  2. Go to Utilities and open the RailClone Tools.

  3. Choose how to organise the new objects from the following options:

    Individual objects. creates new instances as standalone objects on the default layer.

    Create Group. groups all new instances in a group object. Should be used with caution, 3DS may be very slow handling a huge number of objects in a group, most times it is better to create them as non-grouped objects on a separate layer (next option).

    Move To Layer. creates a new layer containing the new instances.

    Freeze prevents accidental selection or changing of the resultant geometry.

    Boxes displays each instance as a wireframe box (same as right-clicking and selecting Object>Properties>Display As Box.)

  4. To hide the source RailClone object once instances have been generated, activate Disable at End. Press Insantiate.

  5. your new instances will be created with the above settings, replacing the original RailClone object.

Octane Render

When using Octane Render, instancing objects with Railclone Tools will automatically set their Octane Properties>Movable Proxy parameter to On. To further action is necessary.

Updating existing instances

If you wish to update a RailClone object you have already instanced, follow these steps.

  1. Select the original RailClone object. The geometry will be hidden but the icon will still be visible in the viewports.
  2. Open the RailClone Tools from the Utilities Panel.
  3. Press Objects>Delete to remove the existing instances
  4. Press RailClone Geometry>Enable to turn back on the original geometry.
  5. Make changes to the RailClone object and Instanciate is described above.

Alternatively if you do not need to see the changes to your original RailClone object before creating new instances:

  1. Select the RailClone object and make changes. You will not be able to see these in the viewport
  2. Open the RailClone Tools from the Utilities Panel.
  3. Ensure Auto Delete Old Items is enabled
  4. Press Instantiate the old instances will be deleted and replaced.

To export XML data

  1. Select a Forest Pack object

  2. Click on the RailClone Tools button from the toolbar

  3. Click Export Data.

  4. From the Forest Data Exporter utility set a save path by clicking

  5. Enable the IDs of the channels you want to export.

  6. Click Export.

Interface

Instantiate

Convert the geometry of the selected RailClone objects to stand-alone objects, automatically creating meshes and instances where needed. Usually this is much more efficient than converting RailClone to an editable mesh.

Objects

  • Individual objects. create instances as stand-alone objects.
  • Create group. group all new instances in a group object.
  • Move to layer. Create a new layer and move the new instances to it.
  • Freeze. New instances interactivity set to "Freeze"
  • Boxes. New instances display properties set to "Display as Box"
  • Auto delete old items then activated, RailClone Tools searches and deletes old instances before creating new objects.
  • Delete. removes existing instances manually. This only works if the objects have not been renamed (including the original RailClone object).

RailClone Geometry

  • Disable at end. this option disables the RailClone objects after creating the instances. It turns on the Display-> Disable object checkbox on each RailClone object.
  • Enable. turns off the Display>Disable object parameter of the selected RailClone objects.

RailClone Exporter

Open. click this button to open the XML exporter tool. Using this menu you can export most of the internal options in a standardised format for use in advanced pipelines and to aid interoperability between software.

IconFunction
Click to set the save path for the XML file.
Defines the format of the transformation matrices in the XML.
Exports the source geometry to an FBX file. Used to import an object into other applications.
Enables the data channels to be exported. By default all are selected.
Click to select all IDs.
Click to deselect all IDs.
Click to save the XML data to disk.
Click to close the XML export utility.
Accessing RailClone Exporter using Maxscript

To export all the RailClone objects in a scene to an XML file using maxscript, you use the following command:

RailClone_pro.RailClone.exportData <file> <list of fields separated by spaces>

For example:

RailClone_pro.RailClone.exportData "c:\\tmp\\data.xml" "geomID colorID size"

Maxscript Access

The Instantiate features of RailClone Tools can be accessed using Maxscript. To create instances for the selected RC objects you use the following syntax:

Railclone_Pro.global.Instantiate mode layerName autoDelete separatedMeshes forceInstances

The parameters for the above are as follows

  • mode (int) 0: individual, 1: group, 2: layer
  • layerName (string). Target layer (only for mode 2)
  • autoDelete (bool). If enabled, delete previous instances.
  • separatedMeshes (bool). If enabled, create separated meshes for non-instanced segments.
  • forceInstances (bool). If enabled, generates as many instances as possible, ignoring Material and UVW operators.
  • Example: Railclone_Pro.global.Instantiate 0 "railclone_instances" true true false true

To delete instances of selected RC objects (same as RailClone Tools>Delete button)

Railclone_Pro.global.InstantiateDelete()

To enable selected RC objects (same as RailClone Tools>Enable button)

Railclone_Pro.global.InstantiateEnable()

To export the selected RailClone objects in a scene to an XML file using Maxscript, you use the following command

RailClone_Pro.global.exportData <file name without extension> <list of fields> <format>

The parameters are as follows

  • <file name without extension> the name to be used for the XML and FBX files
  • <list of fields> A comma separated list of the fields included in the XML document
  • <format> The transformation matrix to be used, defined as 0: Standard, 1: Unity
  • Example: RailClone_Pro.global.exportData "c:\export\test" "" 0