ClothMaterial

April 20, 2022 ยท View on GitHub

from tdw.obi_data.cloth.cloth_material import ClothMaterial

An Obi cloth material. For more information, read this.


Fields

  • visual_material The name of the visual material associated with this cloth material.

  • texture_scale The texture scale of the visual material.

  • visual_smoothness The smoothness value of the visual material.

  • stretching_scale The scale factor for the rest length of each constraint.

  • stretch_compliance Controls how much constraints will resist a change in length.

  • max_compression The percentage of compression allowed by the constraints before kicking in.

  • max_bending The amount of bending allowed before the constraints kick in, expressed in world units.

  • bend_compliance Controls how much constraints will resist a change in curvature, once they are past the maximum bending threshold.

  • drag How much drag affects the cloth. The value is multiplied by the air density value.

  • lift How much lift affects the cloth. The value is multiplied by the air density value.

  • mass_per_square_meter The mass in kg per square meter of cloth surface area.


Functions

__init__

ClothMaterial(visual_material, texture_scale)

ClothMaterial(visual_material, texture_scale, visual_smoothness=0, stretching_scale=1.0, stretch_compliance=0, max_compression=0, max_bending=0.05, bend_compliance=0, drag=0.05, lift=0.05, mass_per_square_meter=1)

ParameterTypeDefaultDescription
visual_materialstrThe name of the visual material associated with this cloth material.
texture_scaleDict[str, float]The texture scale of the visual material.
visual_smoothnessfloat0The smoothness value of the visual material.
stretching_scalefloat1.0The scale factor for the rest length of each constraint.
stretch_compliancefloat0Controls how much constraints will resist a change in length.
max_compressionfloat0The percentage of compression allowed by the constraints before kicking in.
max_bendingfloat0.05The amount of bending allowed before the constraints kick in, expressed in world units.
bend_compliancefloat0Controls how much constraints will resist a change in curvature, once they are past the maximum bending threshold.
dragfloat0.05How much drag affects the cloth. The value is multiplied by the air density value.
liftfloat0.05How much lift affects the cloth. The value is multiplied by the air density value.
mass_per_square_meterfloat1The mass in kg per square meter of cloth surface area.

to_dict

self.to_dict()

Returns: A JSON dictionary of this object.