MAXScript Extensions > MAXScript Extensions for Particle Flow > Particle Flow Classes > Particle Flow Helpers >

# Particle_Paint : Helper

    Particle_Paint- superclass: helper; super-superclass:node - 7:0 - classID:#(2097224847, 528423057)

Value > MAXWrapper > Node > Helper > Particle_Paint

| Particle Flow - Quick Navigation

Description:

The Particle_Paint helper enables you to paint particles with a specific pattern and timing onto the surface of one or more objects. You can access the Particle Paint helper by choosing Create panel > Helpers > Particle Flow > Particle Paint.

Particle seeds painted with the Particle Paint helper are not particles, but are seeds that can be turned into particles with the Birth_Paint or Placement_Paint operators in Particle Flow.

You can spray particle seeds with a freehand painting tool, or by using 3ds Max splines to define the pattern. Particle_Paint works in any orthogonal viewport such as a Front or Top view. It sprays perpendicular (into) the viewport and plants particle seeds on the surface of first object that it hits.

The Particle_Paint helper was first added to 3ds Max as part of the Creativity Extension to 3ds Max 2009 and became an integral part of 3ds Max 2010. It was previously available in the Particle Flow Tools Box #1.

Constructor:

    Particle_Paint...

Properties:

## Setup Rollout

    <Particle_Paint>.Spray_Radius (Brush_Radius) : worldUnits

Get/set the Brush Radius value.

### Paint Density

    <Particle_Paint>.Density_Center : percent

Get/set the Center percentage value.

    <Particle_Paint>.Density_Sides : percent

Get/set the Sides percentage value.

### Paint Flow Rate

    <Particle_Paint>.Per_Jet_Limit (Per_Stroke_Limit) : integer

Get/set the Stroke Limit value.

    <Particle_Paint>.Rate_Type : integer

Get/set the Type drop-down list selection index.

Possible values are:

0 - Time (default)

1 - Length

2 - Stroke

    <Particle_Paint>.Rate_Drops_Per_Second (Rate_Particles_Per_Second) : float

Get/set the Seeds Per Second value used when .Rate_Type is set to 0 (Time).

    <Particle_Paint>.Rate_Drops_Per_Length_Unit (Rate_Particles_Per_Length_Unit) : float

Get/set the Paint Step value used when .Rate_Type is set to 1 (Length).

    <Particle_Paint>.Rate_Drops_Per_Jet (Rate_Particles_Per_Jet) : integer

Get/set the Total Amount value used when .Rate_Type is set to 2 (Stroke).

### Brush Adjustment

    <Particle_Paint>.Use_Radius_Graph : boolean

Get/set the state of the Radius checkbox.

    <Particle_Paint>.Spray_Radius_Graph (Brush_Radius_Graph) : maxObject

Get/set the graph object controlling the Radius Graph.

    <Particle_Paint>.Use_Rate_Graph : boolean

Get/set the state of the Rate checkbox.

    <Particle_Paint>.Spray_Radius_Rate (Paint_Flow_Rate_Graph) : maxObject

Get/set the graph object controlling the Rate Graph.

    <Particle_Paint>.Display_Type : integer

Get/set the Display Type drop-down list selection index.

Possible values are:

0 - Ticks (default)

1 - Flags

    <Particle_Paint>.Display_Size : worldUnits

Get/set the Particle Size value.

### Stroke Start

    <Particle_Paint>.Jet_Start_Type (Stroke_Start_Type) : radiobtnIndex

Get/set the Stroke Start Type radio button selection index.

    <Particle_Paint>.Jet_Start_Time (Stroke_Start_Time) : integer

Get/set the Stroke Start Time value.

### Stroke Stop

    <Particle_Paint>.Jet_Stop_Type (Stroke_Stop_Type) : radiobtnIndex

Get/set the Stroke Stop Type radio buttons selection index.

Possible values are:

0 - Real-Time Offset (default)

1 - Fixed

2 - Duration

    <Particle_Paint>.Time_Scale : percent

Get/set the Time Scale percentage value.

    <Particle_Paint>.Jet_Stop_Time (Stroke_Stop_Time) : integer

Get/set the Fixed value.

    <Particle_Paint>.Jet_Duration (Stroke_Duration) : integer

Get/set the Duration value.

    <Particle_Paint>.AutoAdjust_Current_Frame : boolean

Get/set the state of the Auto-Adjust Current Frame checkbox.

    <Particle_Paint>.Adjust_Global_Timing : boolean

Get/set the state of the Auto-Adjust Global Timing checkbox.

    <Particle_Paint>.Icon_Size : worldUnits

Get/set the Icon Size value.

### Paint Spread Uniqueness

    <Particle_Paint>.Random_Seed : integer

Get/set the Random Seed value.

## Layout Rollout

### Paint Objects:

    <Particle_Paint>.Spray_At_Type (Paint_At_Type) : radiobtnIndex

Get/set the Paint At radio button selection.

Possible values are:

0 - Paint on All Objects (default)

1 - Paint on Objects Listed

    <Particle_Paint>.Spray_At_Objects (Paint_At_Objects) : node array

Get/set the array of nodes to paint on.

    <Particle_Paint>.Objects_Animated_Surface (Animated_Objects) : boolean

Get/set the state of the Animated Objects checkbox.

    <Particle_Paint>.Include_Spray_Children (Include_Paint_At_Children) : boolean

Get/set the state of the Include Children checkbox.

    <Particle_Paint>.Include_Spray_Group_Members (Include_Paint_At_Group_Member) : boolean

Get/set the state of the Include Group Members checkbox.

### Mask Objects:

    <Particle_Paint>.Use_Mask_Objects : boolean

Get/set the state of the Use Mask Objects checkbox.

    <Particle_Paint>.Masks : node array

Get/set the Mask objects node array.

    <Particle_Paint>.Include_Mask_Children : boolean

Get/set the state of the Include Children checkbox.

    <Particle_Paint>.Include_Mask_Group_Members : boolean

Get/set the state of the Include Group Members checkbox.

### Selection Filter:

    <Particle_Paint>.Selection_Filter_Type (Animation_Offset_Painting) : integer

Get/set the Selection Filter type drop-down list selection index.

Possible values are:

0 - None (default)

1 - Selected Faces Only

2 - Soft Selection

### Particle Seed Location:

    <Particle_Paint>.Location_Type : integer

Get/set the selection index of the Location Type drop-down list.

Possible values are:

0 - At Surface (default) - Particle seeds will reside on the surface of any objects on which they are painted.

1 - Above Surface -Particle seeds will be placed above the surface of any objects on which they are painted. The distance above the surface is set with the Distance parameter.

2 - Below Surface - Particle seeds will be placed below the surface of any objects on which they are painted. The distance below the surface is set with the Distance property.

3 - Above And Below Surface - Particle seeds will be placed both above and below the surface of any objects on which they are painted. The distance from the surface is set with the Distance property.

    <Particle_Paint>.Distance : worldUnits

Get/set the distance above and/or below the surface the particle seeds are placed at.

    <Particle_Paint>.Distance_Variation : percent

Get/set the random variation of the Distance value as percentage.

    <Particle_Paint>.Use_Separation : boolean

Get/set the state of the Separation checkbox.

When set to true,Particle Paint attempts to separate particles by generating seeds repetitively until the desired separation is achieved. The Max Attempts parameter sets the number of times Particle Paint will generate seeds to attempt separation. If Distance is low and Separation is high, the desired separation might not be achieved even after many attempts. In this case, enable Stack Up For Separation.

    <Particle_Paint>.Separation_Distance : worldUnits

Get/set the Separation Distance value.

    <Particle_Paint>.Maximum_Number_Of_Attempts : integer

Get/set the Max. Attempts value.

    <Particle_Paint>.Stack_Up_For_Separation : boolean

Get/set the state of the Stack Up For Separation checkbox.

When set to true, instead of using repetitive seed generation to attempt to separate particles, the separation conflict is resolved by moving the conflicting seed away in the direction of the surface's normal.

## Orientation Rollout

    <Particle_Paint>.Generate_Rotation : boolean

Get/set the state of the Generate Rotation Comp. checkbox.

    <Particle_Paint>.Priority_Axis : radiobtnIndex

Get/set the selection index of the Priority Axis radio button.

Possible values are:

0 - X-Axis (default)

1 - Z-Axis

When the X-Axis is selected as the Priority Axis, particles are first aligned by their local X axes in the manner specified in the drop down list, then the local Z axes are used.

If Z-Axis is selected, particles are aligned first by their local X axes, then their Z axes.

### X-Axis:

    <Particle_Paint>.Reverse_X_Axis : boolean

Get/set the state of the Reverse checkbox when the X Axis is selected.

This has the effect of rotating particles by 180 degrees so they point in the opposite direction.

    <Particle_Paint>.Orientation_Type_For_X_Axis : integer

Get/set the selection index of the Orientation Type drop-down list used when the X Axis is selected as the Primary Axis.

Possible values are:

0 - Random- Randomly orients the particles on the surface, according to the selected axis.

1 - Aligned To Surface Normal- Aligns particles to the surface normal of the object upon which they were painted. For example, if X is selected as the Priority Axis, the local X-axis for a particle is aligned with the surface normal. This option is suitable for placing instanced grass or hair objects on a surface.

2 - Align to World X/Y/Z-Axis- Aligns the particles along the World X/Y/Z-Axis.

3 - Look at Viewport- Forces all particles to align with the active viewport.

4 - Look at Particle Paint Icon- Forces all particles to face the Particle Paint Icon.

5 - Follow Stroke- Aligns particles along the spray path in the direction in which the stroke was drawn.

6 - Align to U/V/W Map Vector- Aligns particles along the U/V/W mapping direction on the surface of the painted object.

    <Particle_Paint>.Divergence_For_X_Axis : angle

Get/set the Divergence value for the X Axis.

### Z-Axis:

    <Particle_Paint>.Reverse_Z_Axis : boolean

Get/set the state of the Reverse checkbox when the Z Axis is selected.

This has the effect of rotating particles by 180 degrees so they point in the opposite direction.

    <Particle_Paint>.Orientation_Type_For_Z_Axis : integer

Get/set the selection index of the Orientation Type drop-down list used when the Z Axis is selected as the Primary Axis.

Possible values are:

0 - Random- Randomly orients the particles on the surface, according to the selected axis.

1 - Aligned To Surface Normal- Aligns particles to the surface normal of the object upon which they were painted. For example, if X is selected as the Priority Axis, the local X-axis for a particle is aligned with the surface normal. This option is suitable for placing instanced grass or hair objects on a surface.

2 - Align to World X/Y/Z-Axis- Aligns the particles along the World X/Y/Z-Axis.

3 - Look at Viewport- Forces all particles to align with the active viewport.

4 - Look at Particle Paint Icon- Forces all particles to face the Particle Paint Icon.

5 - Follow Stroke- Aligns particles along the spray path in the direction in which the stroke was drawn.

6 - Align to U/V/W Map Vector- Aligns particles along the U/V/W mapping direction on the surface of the painted object.

    <Particle_Paint>.Divergence_For_Z_Axis : angle

Get/set the Divergence value for the Z Axis.

## Mapping Rollout

    <Particle_Paint>.Acquire_Sub_Material_Index : boolean

Causes each particle seed to acquire the sub-material index (Material ID) at the nearest point of the surface painted.

    <Particle_Paint>.Generate_Mapping : boolean

Creates mapping coordinates for each particle seed according to the Type selection. If you use this option, do not use a Mapping operator with the Birth Paint or Placement Paint operator as this will override the mapping generated by the Particle Paint helper.

    <Particle_Paint>.Assign_To_Mapping_Channels : boolean array

Defines the mapping channels to which mapping values are assigned. You can choose more than one channel for assignment. Mapping channels are available for selection only if Generate Mapping Coords is turned on.

    <Particle_Paint>.Mapping_Type : integer

Get/set the selection index of the Mapping Type drop-down list.

Possible values are:

0 - Stroke Dependent - Spreads mapping values from the Start Value to the End Value over the course of the stroke. The first particle in the stroke is given the Start Value, and the last particle of the stroke is given the End Value. All particles in between interpolate between the Start and End values. The same value is assigned to U, V, and W.

1 - Time Dependent - Assigns mapping values according to time. The first particle in the stroke is given the Start Value, and the timing of each successive particle (in relation to the first particle) receives an incremented value according to the Offset p/Secparameter and the number of seconds elapsed. For example, if Offset p/Sec is 0.25 (the default value), then a 4-second stroke covers the 0-1 range of UV mapping values.

2 - Index Dependent - Assigns mapping values incrementally regardless of the stroke time. The first particle in the stroke is given the Start Value, and each successive mapping value increments by the Offset p/Particle value. If Offset p/Particle is equal to 0.01 (the default value), and a stroke has 101 particles, then particles in the stroke receive the incremental mapping values 0.0, 0.01, 0.02, 0.03,..., 0.98, 0.99, 1.0.

3 - From Object Painted - Particle seeds taking their mapping from their placement on the painted object. A particle acquires the mapping values at the nearest point of the object’s surface. To acquire mapping values from several mapping channels of the object, use multiple selections of the buttons in the Assign To Mapping Channels group.

These mapping types work with numeric parameters to set mapping on particle seeds. For a planar map, for example, the lower left corner has UVW values of 0,0,0, while the upper right corner has UVW values of 1,1,0. These mapping types correlate these values to the stroke.

    <Particle_Paint>.Mapping_Start_Value : float

Get/set the Start Value used when .Mapping_Type is set to 0, 1 or 2.

    <Particle_Paint>.Mapping_End_Value : float

Get/set the End Value used when .Mapping_Type is set to 0.

    <Particle_Paint>.Mapping_Offset_Value_Per_Second : float

Get/set the Offset Value Per Second used when .Mapping_Type is set to 1.

    <Particle_Paint>.Mapping_Offset_Value_Per_Drop (Mapping_Offset_Value_Per_Particle) : float

Get/set the Offset Value Per Particle used when .Mapping_Type is set to 2.

## Editing Rollout

    <Particle_Paint>.Show_Particle_Timing : boolean

Get/set the state of the Show Particle Timing checkbox.

    <Particle_Paint>.Late_Color : RGB color

Get/set the color of the Colorpicker.

    <Particle_Paint>.Auto_Sync_Timing_By_Selected_Stroke : boolean

Get/set the state of the Auto Sync Timing By Sel. checkbox.

    <Particle_Paint>.Editing_Start_At : integer

Get/set the Start At: value.

    <Particle_Paint>.Editing_Stop_Type : radiobtnIndex

Get/set the selection index of the Stop Type radio buttons.

Possible values are:

0 - Stop At

1 - Duration (default)

    <Particle_Paint>.Editing_Stop_At : integer

Get/set the Stop At: value.

    <Particle_Paint>.Editing_Duration : integer

Get/set the Dutation value.

    <Particle_Paint>.Editing_Adjust_Global_Timing (Editing_Auto_Adjust_Global_Timing) : boolean

Get/set the state of the Auto Adjust Global Timing checkbox.

    <Particle_Paint>.Selected_Strokes : boolean array

Get/set the strokes selection as an array of Booleans.

#### See Also

- Birth_Paint : Helper

- Placement_Paint : Helper

- Particle Flow Classes