unreal.RigPhysicsSolverSettings¶
- class unreal.RigPhysicsSolverSettings(simulation_space: RigPhysicsSimulationSpace = Ellipsis, collision_space: RigPhysicsSimulationSpace = Ellipsis, space_bone: RigElementKey = Ellipsis, collision: RigPhysicsCollision = [])¶
Bases:
StructBaseConfiguration/settings for the physics solver
C++ Source:
Plugin: ControlRigPhysics
Module: ControlRigPhysics
File: RigPhysicsData.h
Editor Properties: (see get_editor_property/set_editor_property)
automatically_add_physics_components(bool): [Read-Write] If true, then any physics component below (the element owning this one) will be automatically added to this solver, if its UseAutomaticSolver flag is set.bounds_velocity_multiplier(float): [Read-Write] Expands the shape bounds to detect potentially active contacts when moving. Increasing this (typically up to 1) will increase the number of inactive contacts, which will reduce the likelihood of penetration, but will also increase solver cost.collision(RigPhysicsCollision): [Read-Write] The collision shapes defined in the collision space - e.g. for representing a ground etccollision_bounds_expansion(float): [Read-Write] This is the distance margin around shapes used to detect collisions. Increasing this will increase the number of inactive contacts, which will reduce the likelihood of penetration, but will also increase solver cost.collision_space(RigPhysicsSimulationSpace): [Read-Write] The space in which collision shapes are definedfixed_time_step(float): [Read-Write] The recommended fixed timestep for the RBAN solver. Set to 0 to run with variable timestep. NOTE: If this value is non-zero and less than the current frame time, the simulation will step multiple times which increases the cost.gravity(Vector): [Read-Write]kinematic_acceleration_threshold_for_reset(float): [Read-Write] If any kinematic object in the simulation exceeds this acceleration, we will reset the velocities of all objects in the simulation.This is to detect problems - for example if the target animation has teleports etc. Disabled when the value is zero. A value of around 100000 will typically be a good place to start.kinematic_speed_threshold_for_reset(float): [Read-Write] If any kinematic object in the simulation exceeds this speed, we will reset the velocities of all objects in the simulation.This is to detect problems - for example if the target animation has teleports etc. Disabled when the value is zero.max_delta_time(float): [Read-Write] If a variable timestep is in use, this is the maximum delta time that can be used. If this is smaller than the requested total delta time then multiple steps will be used.max_depenetration_velocity(float): [Read-Write] When bodies are penetrating, this is the maximum velocity delta that can be applied in one frame.max_num_rolling_average_step_times(int32): [Read-Write] This sets how or if the step size should be smoothed. A value of one will disable smoothing, so that the physics simulation will match the Control Rig delta time.max_time_steps(int32): [Read-Write] The maximum number of solver steps that can be mademax_velocity_bounds_expansion(float): [Read-Write] The maximum margin added due to movement. Reducing this can prevent excessive numbers of inactive contacts being generated.position_iterations(int32): [Read-Write] The number of position iterations to run. The position solve is responsible for de-penetration. Increasing this will improve simulation stability, but increase the cost.position_threshold_for_reset(float): [Read-Write] If any object in the simulation exceeds this distance from the simulation origin, we will reset the pose and velocity of the entire simulation. This is to detect problems/explosions. Disabled when the value is zero.projection_iterations(int32): [Read-Write] The number of projection iterations to run. The projection phase is a final pass over the constraints, applying a semi-physical correction to any joint errors remaining after the position and velocity solves. It can be very helpful to stabilize joint chains, but can cause issues with collision response. The projection magnitude can be controlled per-constraint in the constraint settings (assuming ProjectionIteration is not zero). This should be left as 1 in almost all cases.simulation_space(RigPhysicsSimulationSpace): [Read-Write]solve_joint_positions_last(bool): [Read-Write] When solving joints, whether to solve the positions last (as opposed to the orientations)space_bone(RigElementKey): [Read-Write] The bone to use for the collision or simulation space (only relevant if one is set to BoneSpace)use_linear_joint_solver(bool): [Read-Write] Whether to use the linear or non-linear solver for RBAN Joints. The linear solver is significantly cheaper than the non-linear solver when you are running multiple iterations, but is more likely to suffer from jitter. In general you should try to use the linear solver and increase the PositionIterations to improve stability if possible, only using the non-linear solver as a last resort.use_manifolds(bool): [Read-Write] It enables the use of multi-point contact manifolds, which are created only once at the start of each tick. When disabled, a single-point contact is generated in each solver iteration which is more expensive.velocity_iterations(int32): [Read-Write] The number of velocity iterations to run. The velocity solve is responsible for restitution (bounce) and friction. This should usually be a low value (even 1), but could be 0 if you don’t care about friction and restitution.world_collision_bounds_expansion(float): [Read-Write] Scales up the volume used to collect world objects for collisionworld_collision_expiry_frames(int32): [Read-Write] Keeps world objects for a few frames even if they go out of bounds, to avoid rapid creation/destruction.world_collision_type(RigPhysicsWorldCollisionType): [Read-Write] Overlap type used to collect world objects. If set to None then there will be no world collisions.
- property collision: RigPhysicsCollision¶
[Read-Only] The collision shapes defined in the collision space - e.g. for representing a ground etc
- Type:
- property collision_space: RigPhysicsSimulationSpace¶
[Read-Only] The space in which collision shapes are defined
- Type:
- property simulation_space: RigPhysicsSimulationSpace¶
[Read-Only]
- Type:
- property space_bone: RigElementKey¶
[Read-Only] The bone to use for the collision or simulation space (only relevant if one is set to BoneSpace)
- Type: