Endorphin:Руководство 16 - Использование физических эффектов

Материал из Tiarum
Перейти к: навигация, поиск
Руководство 16 - Использование физических эффектов
45px-Scroll.png
ориг.название: Tutorial 16. Using physical effects
вики-редакция: Garin
ссылка на сайт: NaturalMotion
обсудить на форуме: Обсудить на форуме
версия оригинала: 1.0
версия вики: 1.0
Переводить Этот материал нуждается в переводе или допереводе..
Вы можете помочь перевести его. Не забывайте предварительно добавлять строку {{Edit|--~~~~}} в материалы над которыми работаете, чтобы не создавать конфликта правок.
Пожалуйста, снимите шаблон этого сообщения, когда материал будет вычитан.


Endorphin: Руководство 16 - Использование физических эффектов


Содержание

Предисловие

In this tutorial we will introduce a range of physical effect behaviours. Unlike most behaviours—which act on characters internally by driving their joints—physical effect behaviours model environmental conditions that influence characters externally.

You will create a scene in which two simulation characters engage in aerial combat. Physical effects— such as pushing, twisting and damping behaviours—will be used to generate various types of motion.

Step 1: Creating a stylised jumping character

In this step we will add a character to a scene, and use physical effect behaviours to create a highly-stylised jump that will also involve a twist.

To position the character and start the jump:


  • Select File > New Scene, and select the Character01 using the Timeline Editor.
  • Use the Move tool to move the character back to the edge of the grid. This is a Z-position of approximately -10.5.
  • Right-click on the Simulation Character timeline and select Create Behaviour Event.
  • Set the new behaviour name to Jump And Dive 1.
  • Move the behaviour marker so it lies on the topmost timeline track.
  • Adjust the behaviour timing so that it begins at Frame 0 and ends at Frame 80.
  • Simulate the scene to obtain some visual feedback.

Endo Tut16 ITE 01.jpg

To create a long jump using the Push physical effect:


  • Right-click on the Simulation Character timeline and select Create Behaviour Event.
  • Set the new behaviour name to Physical Effect: Push 1.
  • Move the behaviour marker so that is on the middle timeline track. This ensures that this behaviour has lower priority than the Jump And Dive 1 behaviour.
  • Adjust the behaviour timing so that it begins at Frame 67, and ends at Frame 117.
  • The Force X, Force Y and Force Z properties define the direction and strength of the force applied by this behaviour. Set the Force Y property to 20. Set the Force Z property to 40.
  • The TargetMassObjects property defined the mass objects that have the force applied to them. Note that the usual Target Objects property is not used by this behaviour. Click the [Select] hotlink to edit the target mass objects.
  • Use box-selection to select the entire character in the viewport. Make sure that all its mass objects have been selected.
  • Right-click in the viewport to exit Selection mode.
  • Simulate the scene. The character should now be pushed forward rapidly by the Push behaviour. You should also notice a red arrow appearing in the viewport while the physical effect is simulated. This arrow represents the magnitude and direction of the push force.

Endo Tut16 ITE 02.jpg

To stabilise the jump with an active pose:


  • To make the jump more stable we will apply an active pose to the character in order to increase its stiffness. Move the Time Slider to Frame 83.
  • Right-click on the Simulation Character timeline, and select Create Active Pose Event.
  • Move the active pose marker to the bottom timeline track.
  • Adjust the active pose timing so that it begins at Frame 83 and ends at Frame 117.
  • In the Property Editor, set the active pose Strength property to 15.
  • Simulate the scene. You should now see a more stable jump.

Endo Tut16 ITE 03.jpg

To add a twist during the jump:


  • Right-click on the character name section of the Simulation Character timeline and select Add Event Track.
  • Right-click on the Simulation Character timeline and select Create Behaviour Event.
  • Set the new behaviour name to Physical Effect: Twist 1.
  • Move the behaviour marker so that is on the bottom timeline track. This ensures that this behaviour has lower priority than the active pose.
  • Adjust the behaviour timing so that it begins at Frame 70, and ends at Frame 117.
  • The Torque X, Torque Y and Torque Z properties define the axis about which the torque force is applied, and its strength. Set the Torque Z property to 15. This will ensure that objects are rotated about the Z-axis by the Twist force.
  • The TargetMetaBodies property defined the mass objects that have the torque applied to them. Note that the usual Target Objects property is not used by this behaviour. Click the [Select] hotlink to edit the target mass objects.
  • Zoom into the character torso, and select the four body parts formed by the pelvis and the three spine objects.
  • Right-click in the viewport to exit Selection mode.

Endo Tut16 ITE 04.jpg

  • Simulate the scene. You should now have obtained a Twist jump. Next we will add another character to the scene, and have this character jump towards our existing character and collide with it in midair.
Note You can turn off the display of behaviour helper graphics by right-clicking on the viewport, and turning off the Display > Events setting. Also, if the behaviour helper graphics are too large or small you can change their size by adjusting the Arrow Scale property of the Push and Twist behaviours.

Step 2: Creating an additional jumping character

In this step we will introduce a new character available from our custom character folder. We will try to make this character jump towards our first character from the opposite side while assuming a fighting pose.

To position a new character:


  • Add a new character by selecting Character > Add Character.
  • Browse to the Custom character folder ([install location]\Resources\Characters\Custom) and select the Muscular simulation character. Click OK.
  • Use the Move tool to position this new character at the opposite side of the grid to the previously created character.
  • While the new character is still selected, rotate it around the Y-axis by setting its Y Orientation property to 180 in the Property Editor. The two characters should now be facing each other.

To start a new jump:


  • Right-click on the Muscular character timeline, and select Create Behaviour Event. Set the behaviour name to Jump And Dive 1.
  • Adjust the new behaviour timing so that it begins at Frame 0 and ends at Frame 60.
  • Move the behaviour marker to the topmost timeline track.

To create a new long jump:


  • Right-click on the Muscular character timeline and select Create Behaviour Event. Set the behaviour name to Physical Effect: Push 1.
  • Adjust the new behaviour timing so that it begins at Frame 54 and ends at Frame 117.
  • Move the behaviour marker to the middle timeline track.
  • Set the behaviour Force Y property to 10 and the Force Z property to -30.
  • Click the [Select] hotlink of the TargetMetaBodies property, and select the mass objects that which will be affected by the Push behaviour. Use box-selection to select the entire character in the viewport. Make sure that all objects have been selected.
  • Right-click in the viewport to exit Selection mode.
  • Simulate the scene for visual feedback.

Файл:Endo Tut16 ITE 05.jpg

To specify a combat pose for the new character:


For this tutorial we have provided you with a pose file for you to use with the new character. This pose will be assigned to the character as an active pose.

  • Right-click on the Muscular character timeline and select Create Active Pose Event.
  • Move the active pose marker to the bottom timeline track.
  • Right-click on the active pose marker and select Load Pose.
  • Browse to the fighting_pose.nma file located in the resource folder for this tutorial. Double-click on the pose file to load it.
  • Adjust the active pose timing so that it begins at Frame 75 and ends at Frame 135.
  • Set the active pose Strength parameter to 5.
  • Set the active pose Blend Period to 0.7.
  • Simulate the scene for visual feedback. The characters should now collide in flight. In the next step we will concentrate on the collision between the characters.

Endo Tut16 ITE 06.jpg

Note At this stage, the characters are moving extremely fast. You may find that some intersections between collision objects are not detected at the standard simulation frame rate, resulting in undesirable penetration of collision objects. In later steps we will reduce the velocities of the characters to avoid this problem.

Step 3: Creating a dynamic collision between the characters

In this step we will try to obtain a spectacular impact between the two characters so that one of the characters—the standard simulation character—will try and grab the other character while in mid-air.

For this purpose we will modify some of the parameters for our jump events. We will also introduce the damping physical effect. The damping effect lets you slow down the motion of a character.

To make the characters collide centrally:


  • Select the Push event on the Muscular character timeline and adjust its Force Y property using the Property Editor. Experiment with slightly higher and lower values of Force Y. The goal is to have the simulation character narrowly miss the kick of the muscular character. Simulate the scene each time until you are satisfied with how the two characters intersect during the collision.
  • Use the Move and Rotate tools to slightly adjust the position and orientation of the characters in order to get the arms of the twisting character around the body of the other character. Experiment with increasing the distance between the two characters. Again, continue making small changes iteratively until you are satisfied with the collision of the two characters.

To slow down the standard character:


  • Right-click on the Simulation Character standard character timeline, and select Create Behaviour Event.
  • Set the behaviour name to Physical Effect: Damping 2.
  • Move the behaviour marker to the bottom timeline track. If necessary, create an additional timeline marker track.
  • Adjust the behaviour timing so that it begins two frames before the collision between the two characters. Resize the event so that its duration is 10 frames.
  • With the event still selected, use the Property Editor to set the LinearVelocityDamping property to 0, and set the AngularVelocityDamping property to 30. These parameters define the magnitudes at which the linear and angular velocities should be reduced.
  • Click the [Select] hotlink in the MassObjects section.
  • Adjust the viewport camera so that it focuses on the standard character.
  • Select the pelvis mass object together with the three mass objects that form the spine of the character.
  • Right-click in the viewport to exit Selection mode.

Endo Tut16 ITE 07.jpg

  • Adjust the End Frame properties for both the Twist and Push physical effects and the active pose present on the standard character timeline so that they match the Start Frame property of the damping physical effect.

To slow down the muscular character:


  • Right-click on the muscular character timeline, and select Create Behaviour Event.
  • Set the behaviour name to Physical Effect: Damping 2, and move the behaviour marker to the bottom timeline track. If necessary, create an additional timeline marker track.
  • Adjust the behaviour timing so that it begins two frames before the collision between the two characters. Resize the event so that its duration is 6 frames.
  • With the event still selected, use the Property Editor to set the LinearVelocityDamping property to 40. Leave the AngularVelocityDamping property at its default value.
  • Click the [Select] hotlink in the MassObjects section.
  • Adjust the viewport camera so that it focuses on the muscular character.
  • Select the entire character, excluding its shoulders, arms and head.
  • Right-click in the viewport to exit Selection mode.

Endo Tut16 ITE 08.jpg

  • Simulate the scene. Note that the two characters suddenly decrease their speed when the damping physical effects are triggered.

To make the standard character grab the muscular character:


  • Right-click on the standard character timeline and select Create Behaviour Event.
  • Set the behaviour name to Tackle 5.
  • Adjust the timing of the behaviour so that it begins the same time as the damping physical effect.
  • With the event selected, set its Arms Strength and Arms Speed properties both to 1.
  • Click the [Select] hotlink in the TargetUpSpine section. While in Selection mode, select the UpperSpineMass object of the Muscular character. Right-click in the viewport to exit Selection mode.
  • Click the [Select] hotlink in the TargetPelvis section. While in Selection mode, select the PelvisMass object of the Muscular character. Right-click in the viewport to exit Selection mode.
  • Simulate the scene. The standard character should now be able to grab the muscular character while it is in mid-air. If this is not the case, continue to adjust the parameters of the damping physical effect for both characters until their velocities are slow enough to allow the activation of the tackle behaviour.

Endo Tut16 ITE 09.jpg

Hint Check that the standard character active pose event does not extend into the timeframe of the tackle behaviour, as the active pose stiffness can override the behaviour and prevent it from simulating correctly.

Further experiments


  • Try changing the poses used by the active pose events, as well as the attack angles, to obtain different attack results.
  • Try experimenting with the various physical effects by applying them to different body parts and modifying their related parameters.

Conclusion

In this tutorial we have looked at how to work with the Push and Twist physical effect behaviours to create linear and rotational forces that apply to characters over multiple frames. We have also used the damping behaviour to slow down to motion of various body parts.

We have also looked at how behaviours and active poses can be used in conjunction with the physical effect behaviours to create more compelling animation.

If you have any problems with this tutorial, open the corresponding scene Resources\Tutorials\Tutorial 16 - Using Physical Effects\Tutorial 16 – Using Physical Effects - Complete.ens . This scene is an example of how your scene should look if you have successfully followed all the steps in this tutorial.

Личные инструменты
Пространства имён
Варианты
Действия
Навигация
Разделы TES
Разделы Fallout
Модмейкерам
Инструменты