Dashed lines generator v1.0 | Raffaeleschiavullo
Dashed lines generator is a tool to automate, in few and easy steps, the generation of all types of dashed lines: it can be used to simulate the traffic signs standards; with the SKIN MODIFIER option it is extremely easy to manipulate the dashed lines created, changing their placement and orientation. With this script the user can have an interactive creation process of the dashed line, with a real time preview into the 3DS Max viewports.
How to install
- Drag the file from the folder where it is located directly into one of the 3DS Max viewports; the script will automatically create a category named “S Scripts”
- Go to CUSTOMIZE > CUSTOMIZE USER INTERFACE > TOOLBARS and into the sub menu CATEGORY from the related drop down list select “S Scripts”
- Fom the list ACTION select the item named “Dashed Lines Generator” and drag it directly to 3DS Max Main Tool Bar and a button withthe label “DLG” will be added to it.
For more detailed instructions on how to install a script click here.
For more detailed instruction on how to create a new tool bar click here.
How it works – Main window
To generate a dashed line, the user simply needs to select a spline or an editable spline into the scene to be used as path, applying the roll outs parameters.
With this script the user can have an interactive creation process of the dashed line, with a real time preview into the 3DS Max viewports; please refer to the option INTERACTIVE UPDATE to learn how to activate this feature.
The following features are excluded from the interactive creation process, but will be applied when the button “Create Dashed Line” is pressed: Skin modifier, Freeze, Display as box, Frozen in Gray, Cast shadows, Receive Shadows, Gen GI, Receive GI.
Into the “Above” roll out there is a direct link to the pdf file “UK Traffic Signs Manual chapter 5”.
- Select line or editable spline object: click to select a compatible object into the scene (only line or editable splines are accepted) to use as path to generate the dashed line
- New dashed line name: these text filed is editable; if no changes are made, the new dashed line will be automatically renamed (ex. if the name of the selected shape is Line001, the new dashed line will have this name Line001__dashed_linexxx; each new dashed line will have a unique name into the scene)
- Selected line length: after the user has selected a compatible object into the scene, this label will indicate the length of the element in word units (Meters, inch, etc.)
- Statistics new dashed line: it will indicate the number of lines and polygons generated by script
- Dashed lines segments: this value defines the number of segments that each line element contains (ex. if in the Statistics Group “lines=5” and “dashed lines segments=3”, then the dashed line will contain 5*3= 15 segments)
- Dashed lines length: the length of each element of the dashed line
- Distance between lines: the distance between the end of a segment and the beginning of the next one
- Z offset: this parameter is available only when the Clone option is on; it will indicate the translation (positive or negative) along the Z axis of the cloned line or spline
- Lines wire colour: the wire frame colour of the dashed line created by the script
- Vertex type: set the vertex type for each dash of the line created by the script
- Skin modifier:when on, the script will create the dashed line and then will apply to it the SKIN MODIFIER to easily manipulate it, changing its placement and orientation: the modifier will be applied only after that the user has pressed the “CREATE DASHED LINE” button and not during the set up process.This “skin modifier” option is available only if the selected line or editable spline is made by 1 sub-object spline, if not the following warning message will be prompted:
“The selected shape has more than 1 spline sub-object: the script will work properly, but it won’t be possible to apply the skin modifier to the dashed line created. To apply the skin modifier, the selected line or editable spline must have only 1 spline as sub-object.”
To apply the skin modifier, the script works in two different ways, depending on the Clone section.
When skin modifier is on and Clone section is off, the script will automatically rename the selected spline (ex. if the name of the selected shape is Line001, it will be renamed as Line001__control_spline and will create a new dashed line named Line001_ dashed_line001)
When skin modifier is on and Clone section is on, the script will automatically rename the selected spline (ex. if the name of the selected shape is Line001 and Clone option is set to “reference”, the script will generate the following splines: Line001_reference_control_spline001, Line001_reference_dashed_line001).
- Clone: when this section is on, the script will generate a clone of the selected shape and will rename it (ex. if the name of the selected shape is Line001, the cloned line will have one of the following names depending from the option chosen: Line001_copy_dashed_linexxx, Line001_istance_dashed_linexxx, Line001_reference_dashed_linexxx; each cloned element will have a unique name into the scene).
- Lines rendering: this group contain all the standard parameters included into the roll out “Rendering” for a line or editable spline object (click here for a detailed description).
- Freeze: if on, after that the user has pressed the “Create Dashed Line” button, the new dashed line created will be frozen.
- Display as box: when on, after the user has pressed the “Create Dashed Line” button, the new dashed line will be displayed as a box
- Frozen in gray: when on, after the user has pressed the “Create Dashed Line” button, the new dashed line will be displayed in gray colour if the option “Freeze” is on
- Cast shadows: when on, the new dashed line cast shadows.
- TIP: leave it off and the dashed geometry will not casts shadows, as a real painted dashed line
- Receive shadows: when on, the new dashed line receive shadows.
- TIP: leave it on and the dashed geometry will receive shadows, as a real painted dashed line
- Object ID: Setting Object ID to a nonzero value means that the object will receive the rendering effects associated with that channel in Render Effects and the post-processing effects associated with that channel in Video Post
- Material: when on, a material will be applied to the new dashed line; if VRay is not installed or it is not assigned as default renderer, a warning message will be prompt. For a detailed overview about “standard material” click here.
- Gen GI: (available only with VRay material) when on the new geometry will generate GI
- TIP: leave it off, to avoid rendering problems when the dashed line created is too near the ground.
- Rec GI: (available only with VRay material) when on the new geometry will receive GI
- when the button “INTERACTIVE UPDATE” is pressed, the user will have a real time preview of the dashed line he is creating into the 3DS Max viewports; it is possible to switch on or off this button in each moment of the creation process. If on, the button will be automatically switched off when the button “Create Dashed Line” is pressed.
- TIP: activate this button during the creation process to understand if the set up of the parameters for the new dashed line is correct
- Create Dashed Line: when pressed the script will create the dashed line basing on user set up.