Plugin NewtonPhysics

Installation

After downloading the plugin, simple copy the file NewtonPhysics.hxt into the HXT directory your A:M installation . The plugin was originally designed as a working relief for me, and therefor raises far no claim to completeness or accuracy, however it is freeware .

Description

First I have searched for a possibility to giving the explode plugin physicly characteristics. This can not be done with the Rigid Body constraint from A:M for two reasons . First, no access from the sdk to this constraint, second the constraint can only handle the model as a whole model . But the explode plugin need the physics assigned to all bones from a model . After playing with the Newton Game Dynamics engine , I had seen, there is a big potential to improve the physics in A:M , not only for the explode plugin .The main work in this plugin comes from the Newton Games Dynamic engine (collissiondetection and physics) .Some samples for this plugin , you can view here .

Usage

The plugin is now controlled in the general with plugin properties , they are on several locations in a projectfile , but at every time in the tree from "Plugin Properties -> Newton dynamics" . The only thing outside is the simulation start. The simulation process is started from a selected choreography "Plug-ins -> Simulate Newton" , after you have setup the properties. The properties are situation-dependent, means only if they are usable ,you can see it.
With this plugin you can use models, nullobject and forces .

Now to the properties in the special

- Properties for a model (all properties are avaible from within a choreography and only some from the Objects tree)
Propertie name Description
Use in simulation control, if the model is used in the simulation . You need at minimum two objects for starting the simulation
Use as Which type has the model . At htis time the following types avaible
  • Static Object
  • Static with Action
  • Dynamic Object
  • Dynamic Boxobject
  • Dynamic Sphereobject
  • Dynamic Explodeobject
  • Dynamic Breakable Explodeobject
  • Static Fluidsurface
For a detailed descriptions look here
Create model for bounding hull If on from the properties in the category is set to on , a new model from the bounding hull for this model will be created . It is usefull for looking, if the bounding hull matches the model . The new model is created at the position from the original model at the start or endtime in the choreography . To check if the hulls are matching , simply drop the new created model into the choreography (example project) .
Material settings In this category you can change the physical characteristics for the object . The plugin has now two different material systems a normal and a extended materialsystem . If you use the extended materialsystem the settings for Softness,Elasticity, Static and Dynamic Friction in this category are ignored .
- Softness
The softness of the object. This value has influence on the correcting factor with the recognition of penetrations of objects Als rule of thumb can apply here, if penetrations in the simulation occur, a higher value for the softnessfactor should be used.
- Elasticity
The elasticity of the Models. Thus it is specified, like flexibly the material of the model behaves,i.e. around how much the model springs back.
- Static Friction
The force that keeps an object from moving initially
- Kinetic Friction
The force that slows down an object after it gets moving
- Extented Material
Only usable if "Use extended material" is ON in the projectsettings. The difference between the normal material system and the extended material system (and using the extended materialsystem) is explained here.
To select a material , double click on the right side from this propertie . Now a dialog is opened , where you can select the material .
- Material
This propertie is only for viewing , which extended material is selected and a workaround for the problem , that the button above is not updated correct after loading a projectfile
Dynamic Object settings In this category are the settings for dynamic objects . Not avaible for Static Object, Static with Action and Static Fluidsurface
- Subdivision for collision hulls
With this propertie you can steer the resolution for the created collision hull .
For a detailed description look here.
- Freeze object
With this propertie the model can be frozen and released again. This propertie is animatable over the time. If Freeze is ON , then keyframes, they are exists for this time, are not overwritten by the plugin.
This propertie is animatable over time . This setting is overrided, if another dynamic object collides with this object. (example project)
- High velocity object
Setting this propertie to ON prevents objects with a very high speed from tunneling other models . Should only be used, if you have really high velocity objects like this example. (example)
- Use group density
Only for models with "Newton_" or "Explode_" groups . Then the density from this groups is used and the center of mass for this model is calculated based on this groups, instead of the center from the whole model.
Look at this projectfile , how to use this feature .
- Density
The density for this object. The weight for the model are calculated from this value and the volume from the model. Normally the values between 1 (water at 20 Degrees) and 20 (wolfram) .More information about density you can find at Wikipedia . This is a physiksimulation and can be breaked with to high density values . In the real world the highest known density has Iridium with a density value from 22.42.
- Gravity
Gravitation , they can be for each model different . Default is the gravitation of earth
- Damping
The absorption value for the direction/speed. Thus e.g. air resistance is simulated. With a higher value, the model loses more energy per simulated Frame. With the preset value and a gravitation of 9.807, the model will simulate a realistic free case. A lower value accelerates the speed for the model, a higher value slows down these.
- Joint with other objects
Not avaible for Dynamic Explodeobject
A joint can be created between this object and another static or null object . Be sure that both objects must have "Use in simulation" set to ON.
- Jointtype
- None
all other joint options ignored , there is no joint
- Fixed
this type of joint can be used to drag a model with a nullobject or hold a dynamic object at a determined position with the possibility to rotate around the joint
this joint is the Ball and Socket joint from the newton library, and his center is in the mid between the two objects they are joined
example for fixed joint
- Breakable
this joint can be breaked , can only be created with a static object and should be used as example for a picture that hangs on a wall ,hitted by another dynamic object , when then the hitting force is higher the "Force to break the joint" the picture are then affected from the gravity and falling down
example for breakable joint
- Joint with
Here you can select the static or null object for this joint . Only possible objects are displayed in the dialog , they is opened after double click in the right side from this propertie
- Angular Limits
only avaible if the Jointtype is Fixed .
With this properties you can limited the rotation around the connection center for the fixed joint
- Force to break the joint
only avaible if the Jointtype is Breakable
Here you can control the force , they is needed to break this joint
Explode Object settings Only avaible for Dynamic Explodeobject (example project)
- Explosion center
the point from which the moving direction for the explode pieces is calculated
- Modelcenter
the center from the bounding box for this model
- User defined center
a free defined point. This point is defined in the global space and can be controlled with thy X,Y,Z values in the Center propertie
- Center from other object
the center from the bounding box from another model , which can selected from the dialog , they will appear after double click in the right side of the "Center from" propertie
- Explosion speed
the initial speed for the explosion pieces
- Additional rotation
here you can insert a rotation velocity, they will be added at the simulation starting time to each explosion piece
Breakable Explode Object Settings Only avaible for Dynamic Breakable Explodeobject
- Force to break the joints
the force they is needed to break the inner object joints
Fluid Seetings Only avaible for Static Fluidsurface, the default settings are the values for water at 20 degree Celsius
- Density
the density for the fluid or gas
- Viscosity (linear motion)
the viscosity from the fluid or gas
- Viscosity (angular motion)
the same as above , only a extra propertie for tweaking
- Fluid deep
the deep for the fluid (or high for gas)

Goto top

-Properties for nullobject
There is only the propertie "Use in simulation" avaible for this type of object .

-Properties for forceobjects
There is no propertie avaible for this type of object . It means , if you have a force in the choreography ,the force is always used and affects the Dynamic objects in the simulation. Use forces with caution, they can slow down the simulation speed dramatically (in the special, when you have many Dynamic objects) .Another restriction at this time is , that the forces are tested (and affected) only against the center and the eight corners for the bounding box from the dynamic objects, this simplification is used to increase the simulation speed . Here you find example for using forces .

-Properties for the choreography
Propertie name Description
Description for this plugin Click on the right corner , and you are here :-)
Use Chor Time Range If this propertie is set to ON , the simulation starts at time 0 and runs the choreography length. If you set it to OFF you can select the start and endtime for the simulation manually.
Display while simulate If this propertie is set to ON, than the plugin writes the keyframes after each frame is calculated and update the screen , so you can view in realtime , what the plugin does . This has also a side effect for canceling the calculation with the Escape key .If this propertie is set to ON , they keyframes are written , and if Reduce Keyframe is one the written keyframes are also reduced. If this propertie is set to OFF, pressing the Escape key during the calculation , preverse the plugin from saving and reducing (if Reduce Keyframes is on) the keyframes .
If you have many Dynamic Objects in the chor and high framecount to calculate, it is recommended to set this propertie to OFF, otherwise you can get a memoryproblem and it increases also the simulationspeed .
Use calculated worldsize If this propertie is set to ON, the world size for the simulation is computed to the point of starting time. Otherwise a world size of 1000 meters in all axis is considered used (X+ of 1000 meters, x of -1000 meters, similar for all other axles), "Dynamic Objects", they are leave this worldbox would be frozen
Scale world If this property is set to "On" , the world is scaled up with the factor 10 . It is helpfull , if you have very small models .
Be carefully with this option , the behavior of the simulated objects are in some cases different to unscaled world . (example)
Reduce Keyframes Thus the number of keyframes per channel can be reduced. Works similar to the Reduce existing in A:M, protects you however to have to accomplish the Reduce for each channel individually and reduces at the same time the file size considerably.
Write Logfile If this propertie is set to ON , a logfile in the project directory is created ("newtonlog_(projectname).txt"). In this logfile are some informations about the objects, they are used in the simulation .
Resolution for Static with Action With this setting you can control , how often for a single frame a collissioncheck for the objecttype "Static with Action" with all dynamic objects is done . In most situations the standardsettings is good enough. Should only be changed, if you have a "Static with Action" that have "Newton_" groups , like a actor (as example Howie in the vase example) . Higher values for this properties growing the time needed for simulation exponential . (example)

-Properties for the entirely project
Propertie name Description
Use extended material If this propertie is set to ON , for all choregraphies for this project the extended material system is used instead of the simplified material system.
Materialfile With a double click in the right side , you can select the materialfile, that is used for the extended materialsystem .

Goto top


History

Back to the pluginindex