Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 488/588 Bruce R. Maxim UM-Dearborn

Similar presentations


Presentation on theme: "CIS 488/588 Bruce R. Maxim UM-Dearborn"— Presentation transcript:

1 CIS 488/588 Bruce R. Maxim UM-Dearborn
Unreal Karma Actors CIS 488/588 Bruce R. Maxim UM-Dearborn 12/9/2018

2 Karma Unreal Physics Engine
Used to make objects in your scene react to physical forces (gravity, explosions, collisions) Many aspects of the Karma engine can only be exploited using Unreal Script To build rag doll characters requires the use of Maya or other external 3D packages and the Karma Authoring tool known as KAT There are some things that can be done with Karma objects inside UnrealEd 12/9/2018

3 Karma Theory - 1 The Karma engine make use of a special type actor known as a KActor KActors have the Physics property (found under the Movement category) set to PHYS_Karma This setting passes control of an object’s movement to the Karma physics engine How the object reacts is determined by the setting KParams property under the Karam category in the object’s Properties window 12/9/2018

4 Karma Theory - 2 If you keep drilling down you will find lots of properties that are editable (mass, buoyancy, friction) The bBlockKarma property (under the Collision category) determines whether a KActor will react to placeable item found in the current map Setting bBlockKarma to True makes collisions with Karma objects and Actor surfaces possible and reactable 12/9/2018

5 Creating Simple Karma Actor Tutorial 11.1
Use the map file Tutorial11_01_Start.ut2 Open the StaticMesh browser and locate the package AWHardware, find the Decorations category, and select sh_barrel_M_JM Use the RMB and add the barrel to the level using the “add Karma Actor” item from the context menu You will need to adjust the position of the barrel Rebuild the level, save, and test the level 12/9/2018

6 Creating Simple Karma Actor Tutorial 11.2
To see anything happen with the barrel you will need to shoot it with something big, like the RocketLauncher (this is even true if the barrel started the level hovering in the air) To make the barrel come alive when you first enter the level, open the Properties window, and drill down Karam>Kprams>KarmaParams myLevel>KaramPrarams Set the property KStartEnabled to True Rebuild, save, and test the level 12/9/2018

7 KBS Joints - 1 Tutorial 11.2 Use the map file Tutorial11_02_Start.ut2
Use the StaticMesh browser to open the package Chapter11.utx, in the LightSystem group select ShortChain Use the RMB button to open the context menu, select Add Karma Actor, and add the chain to the middle of the ceiling Use Crtl-W to duplicate the chain and put a copy of the chain beneath the first chiain 12/9/2018

8 KBS Joints - 2 Tutorial 11.2 Open the Static Mesh browser and select Light inside the Chapte11 package LightSystem group Use the RMB and add the Light as a Karma Actor from the context menu to the end of the chain If we run the level now, shooting the light just causes it to fall to the floor Open the Actor class browser, expand Kactor>Kconstraint and select KBSJoint 12/9/2018

9 KBS Joints - 3 Tutorial 11.2 Use the RMB to add a KBSJoint near the lamp Position the KBSJoint so that it connects the chain to the ceiling Use Ctrl-W duplicate the KBSJoint and place it between the chain pieces Use Ctrl-W duplicate the KBSJoint and place it between the chain and the light Open the Properties window for the KBSJoint on the ceiling and expand the KarmaConstraint category 12/9/2018

10 KBS Joints - 4 Tutorial 11.2 Set the value of KConstraintActor1 to the name of the top chain piece Open the Properties window for the KBSJoint between the two chain pieces Set the value of KConstraintActor1 to the name of the top chain piece and set the value of KConstraintActor2 to the name of the bottom chain piece Open the Properties window for the KBSJoint between the chain and the light 12/9/2018

11 KBS Joints - 5 Tutorial 11.2 Set the value of KConstraintActor1 to the name of the bottom chain piece and set the value of KConstraintActor2 to the name of the light It is possible that you may need to go into the Properties window for each of the Karma actors and set the value of bHighDetailOnly to False in the KaraParams dialog (otherwise they may not react to speed up game play) 12/9/2018

12 KConeLimit Tutorial 11.3 Use the map file Tutorial11_03_Start.ut2
Open the Actor class browser, expand KActor>Kconstraint, and select KConeLimit Use the RB and choose Add KConeLimit from the context menu to add the actor near the Light Rotate the KConeLimit so the red arrow points down the z-axis You can adjust values of KConstraintActor1 and 2 to point the two chain pieces and adjust the value of KHalfAngle to get the right effect 12/9/2018

13 Dynamic Bridge - 1 Tutorial 11.4
Use the map file Tutorial11_04_Start.ut2 If we run the level and shoot the bridge it will simply collapse We can add KHinge actors to make it bouncy instead Open the Actor class browser, exapnd Kactor>Kconstraint, and select Khinge Use the RMB to add the Khinge to connect the first bridge piece and the wall 12/9/2018

14 Dynamic Bridge - 2 Tutorial 11.4
Rotate the KHinge so that the arrow points towards the wall Use Ctrl-W to duplicate the KHinge and place the copy to connect the first and second bridge pieces Continue the process until you reach the far end of the bridge Open the Properties window for the first Khinge and expand the KarmaConstraint category 12/9/2018

15 Dynamic Bridge - 3 Tutorial 11.4
Select the KarmaConstraintActor1 property, click the Find button and then click the first bridge piece For the KHinges connecting to bridge pieces you will need to do this for bridge pieces on both sides of KHinge to set KarmaConstraintActor1 and KarmaConstraintActor2 You may need to set bHighDetailOnly to False Rebuild, save, and test 12/9/2018

16 Working Fan - 1 Tutorial 11.5 Use the map file Tutorial11_05_Start.ut2
To get the fan do more that fall off the wall when shot, you need to use a KHinge Open the Actor class browser, expand KActor>Kconstraint, and select KHinge Use the RMB to add the Khinge near the fan, move the KHinge to the center of the fan, and rotate it to ensure its axis matches the fan Open the Properties window for the KHinge 12/9/2018

17 Working Fan - 2 Tutorial 11.5 Set the value of KConstraintActor1 property to point to the fan Change the KHingeType property to HT_Motor to give the fan constant motion Change the value of KDesiredAngVel to and the value of KMaxTorque to 100 Rebuild the map, save, and test (when you shoot the fan with the RocketLauncher it will run continuously) 12/9/2018

18 Creating Catapult – 1 Tutorial 11.6
Use the map file Tutorial11_06_Start.ut2 Open the Actor class browser, expand Kactor>Kconstraint, and select KHinge Use the RMB and place a KHinge near the fromt of the catapult facing the bridge Rotate the KHinge so that it points down the y-axis Set the KConstraintAcor1 property to point to the catapult 12/9/2018

19 Creating Catapult – 2 Tutorial 11.6
Change the KHingeType to HT_Springy Change KStiffness to 5000 Change Kdampening to 250 (so the catapult will not swing back and forth too much) To add a trigger, open the Actor class browser, exapnd Triggers, select UseTrigger Use the RMB to add a UseTrigger near the catapult 12/9/2018

20 Creating Catapult – 3 Tutorial 11.6
Open the Properties window for UseTrigger, expand he Advanced category, and set bHidden to False Expand the Events category and set the Event property to TriggerCatapult Open the Properties window for the KHinge, expand the Object category, change value of InitialState to ToggleDesired Expand the KarmaConstraint category and set KAltDesiredAngle to (90 degrees) 12/9/2018

21 Creating Catapult – 4 Tutorial 11.6
To associate the UseTrigger with the KHinge, expand the Events category, and set the Tag property to TriggerCatapult To test the catapult place a copy of the Karma barrel on top of the catapult (remember to use add Karma Actor) Open the barrel Properties window, set bHighDetailed to False, bKStartEnabled to True, and set Kmass to 0.5 Rebuild the level, save, and test it 12/9/2018

22 Using Ragdolls - 1 Tutorial11.7
Use the map file Tutotial11_07_Start.ut2 You need an actor to serve as a template for your ragdoll, any KActor will do (so start with the barrel) – remember to use “add KActor” Open the Properties window for the new KActor, expand the Display category, change the DrawType property to DT_Mesh To set the Mesh property, open Animation browser, open the HumanMaleA package and select the MercMaleA mesh, and click Use button 12/9/2018

23 Using Ragdolls - 2 Tutorial11.7
Move the new model so that the ragdoll right hand is placed inside the KBSJpoint at the bottom of the chain Open the Properties window of the KBSJoint, expand the KarmaConstraint category, and set the KConstraintActor2 to point to the MercMaleA mesh The correct mesh is displayed, but behavior is not right 12/9/2018

24 Using Ragdolls - 3 Tutorial11.7
Open the Property window for the ragdoll, expand the Movement category, and change the Physics property value to PHYS_KarmaRagDoll Expand the Karma category, drill down to the KParams property, click the Clear button Select the KarmaParamsSkel and click the New button 12/9/2018

25 Using Ragdolls - 4 Tutorial11.7
Expand the KParams category and drill down so that you can set the Kskeleton property to Male You may also need to set bHighDetailOnly to False Rebuild, save, test, and fiddle with parameters to get the right effects 12/9/2018

26 KAT There is a Karma authoring tool that let’s you build your own KActors This requires the use of a 3D model exported from Maya or similar tool Using KAT you can create your own rag dolls and other reactive devices 12/9/2018


Download ppt "CIS 488/588 Bruce R. Maxim UM-Dearborn"

Similar presentations


Ads by Google