MAXScript Extensions > MAXScript Extensions for Particle Flow > Particle Flow Classes > Operators > Material and Mapping >

# Material_Dynamic : Helper

    Material_Dynamic - superclass: helper super-superclass:node - classID: #(1962490663, 515064320)

Value > MAXWrapper > Node > Helper >Material_Dynamic

| Particle Flow - Quick Navigation

Description:

The Material_Dynamic operator lets you give particles material IDs that can vary during the event. It also lets you assign a different material to each particle based on its material ID. When used with an animated texture, this lets you assign a different frame or map to each particle based on its total age or the amount of time it has spent in the current event.

Constructor:

    Material_Dynamic...

Properties:

    <Material_Dynamic>.Assign_Material Boolean default:true

When set to True, the operator assigns a material to the particles.

    <Material_Dynamic>.Material Material default:undefined

Get/set the Material to assign to the particles.

    <Material_Dynamic>.Assign_Material_ID Boolean default:false

When set to True, the operator assigns a material ID to the particles.

    <Material_Dynamic>.Show_In_Viewport Boolean default:false

When set to True, the material is shown applied to the particles in the viewports.

    <Material_Dynamic>.Type Integer default:0

Get/set the Animated Texture

Possible values are:

0: Same As Particle ID - Choose this when using a material containing an animated texture, such as Particle Bitmap, Particle Age, or Particle MBlur.

1: Material ID - Assigns the same material ID to all particles. Use the numeric field to set the ID value.

2: Cycle - Assigns each particle a material ID in the range 1 to N, where N=# Sub-Materials, in increasing sequential order. The first ID assigned is 1, then 2, continuing to increment each by 1 until N; then 1 again, and so on.

3: Random - Assigns each particle a random material ID in the range 1 to N, where N=# Sub-Materials.

    <Material_Dynamic>.Reset_Particle_Age Boolean default:false

When set to True, sets each particle's age to 0 when it enters the event

    <Material_Dynamic>.Randomize_Age Boolean default:false

When set to True, the software varies the difference between the particle age and the starting material ID at random.

The maximum difference is determined by the Max Offset parameter.

    <Material_Dynamic>.Max_Age_Offset Time default:30f

The maximum number of frames by which the software can randomly vary particle age.

    <Material_Dynamic>.Material_ID Integer default:1

Assigns the same material ID to all particles.

Use the numeric field to set the ID value.

    <Material_Dynamic>.Number_of_Sub_Materials Integer default:0

The highest ID number assigned to particles using the Cycle or Random option.

    <Material_Dynamic>.Sub_Materials_Rate Float default:30.0 alias: SubMtls_Rate

Sets the number of times per second that the assigned material ID is incremented.

If this value is the same as the rate at which particles enter the event, then one ID is assigned per particle.

If it's lower, then multiple particles are given the same ID, or if it's higher, then the software increments the assigned ID faster than 1 per particle.

    <Material_Dynamic>.Loop Boolean default:true

Assigns each particle a material ID in the range 1 to N, where N=# Sub-Materials, in increasing sequential order.

The first ID assigned is 1, then 2, then..., then N, then 1 again, and so on.

    <Material_Dynamic>.Sync_Type Integer default:0

Specifies the time frame for applying animated parameters.

Used only when .Assign_Material_ID and Loop properties are set to True.

Possible values are:

0: Absolute Time - Any keys set for parameters are applied at the actual frames for which they're set.

1: Particle Age - Any keys set for parameters are applied at the corresponding frames of each particle's existence.

2: Event Duration - Any keys set for parameters are applied to each particle starting when it first enters the event.

    <Material_Dynamic>.Add_Random_Offset Boolean default:false

When set to True, the software varies the difference between the particle age and the assigned material ID at random based on the .Random_Offset value.

Used only when .Assign_Material_ID and .Loop properties are set to True.

    <Material_Dynamic>.Random_Offset Integer default:4800

Specifies the variation of the difference between the particle age and the assigned material ID at random.

The maximum difference is determined by the numeric parameter.

Used only when .Assign_Material_ID and .Loop properties are set to True.

    <Material_Dynamic>.Random_Seed Integer default:12345

Specifies the randomization value.

## Material_Dynamic Interfaces:

The following Interfaces are exposed by the Material_Dynamic Class:

Interface: action

Interface: operator

Interface: PViewItem

#### See Also

- Particle Flow Classes