Browse Source

Merge pull request #85 from AtomicGameEngine/JME-ATOMIC-FEATUREEXAMPLES

Feature Examples
JoshEngebretson 9 years ago
parent
commit
0cfdab1a84
100 changed files with 926 additions and 0 deletions
  1. 5 0
      FeatureExamples/.gitignore
  2. 0 0
      FeatureExamples/CSharp/FeatureExamples.atomic
  3. 5 0
      FeatureExamples/CSharp/Resources/Components.asset
  4. 0 0
      FeatureExamples/CSharp/Resources/Components/.gitkeep
  5. 174 0
      FeatureExamples/CSharp/Resources/Components/Ragdoll.cs
  6. 5 0
      FeatureExamples/CSharp/Resources/Components/Ragdoll.cs.asset
  7. 196 0
      FeatureExamples/CSharp/Resources/Components/Vehicle.cs
  8. 5 0
      FeatureExamples/CSharp/Resources/Components/Vehicle.cs.asset
  9. 5 0
      FeatureExamples/CSharp/Resources/Materials.asset
  10. 5 0
      FeatureExamples/CSharp/Resources/Materials/GreenTransparent.xml
  11. 5 0
      FeatureExamples/CSharp/Resources/Materials/GreenTransparent.xml.asset
  12. 4 0
      FeatureExamples/CSharp/Resources/Materials/Jack.xml
  13. 5 0
      FeatureExamples/CSharp/Resources/Materials/Jack.xml.asset
  14. 6 0
      FeatureExamples/CSharp/Resources/Materials/JackEnvMap.xml
  15. 5 0
      FeatureExamples/CSharp/Resources/Materials/JackEnvMap.xml.asset
  16. 5 0
      FeatureExamples/CSharp/Resources/Materials/LitSmoke.xml
  17. 5 0
      FeatureExamples/CSharp/Resources/Materials/LitSmoke.xml.asset
  18. 5 0
      FeatureExamples/CSharp/Resources/Materials/Mushroom.xml
  19. 5 0
      FeatureExamples/CSharp/Resources/Materials/Mushroom.xml.asset
  20. 7 0
      FeatureExamples/CSharp/Resources/Materials/MushroomEnvMap.xml
  21. 5 0
      FeatureExamples/CSharp/Resources/Materials/MushroomEnvMap.xml.asset
  22. 9 0
      FeatureExamples/CSharp/Resources/Materials/MushroomWind.xml
  23. 5 0
      FeatureExamples/CSharp/Resources/Materials/MushroomWind.xml.asset
  24. 9 0
      FeatureExamples/CSharp/Resources/Materials/MushroomWindUnlit.xml
  25. 5 0
      FeatureExamples/CSharp/Resources/Materials/MushroomWindUnlit.xml.asset
  26. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar.asset
  27. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/CloudPlane.xml
  28. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/CloudPlane.xml.asset
  29. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Ninja.xml
  30. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Ninja.xml.asset
  31. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Potion.xml
  32. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Potion.xml.asset
  33. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Snow.xml
  34. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Snow.xml.asset
  35. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/SnowCrate.xml
  36. 5 0
      FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/SnowCrate.xml.asset
  37. 4 0
      FeatureExamples/CSharp/Resources/Materials/Particle.xml
  38. 5 0
      FeatureExamples/CSharp/Resources/Materials/Particle.xml.asset
  39. 14 0
      FeatureExamples/CSharp/Resources/Materials/RibbonTrail.xml
  40. 5 0
      FeatureExamples/CSharp/Resources/Materials/RibbonTrail.xml.asset
  41. 5 0
      FeatureExamples/CSharp/Resources/Materials/Skybox.xml
  42. 5 0
      FeatureExamples/CSharp/Resources/Materials/Skybox.xml.asset
  43. 14 0
      FeatureExamples/CSharp/Resources/Materials/SlashTrail.xml
  44. 5 0
      FeatureExamples/CSharp/Resources/Materials/SlashTrail.xml.asset
  45. 4 0
      FeatureExamples/CSharp/Resources/Materials/Smoke.xml
  46. 5 0
      FeatureExamples/CSharp/Resources/Materials/Smoke.xml.asset
  47. 8 0
      FeatureExamples/CSharp/Resources/Materials/Stone.xml
  48. 5 0
      FeatureExamples/CSharp/Resources/Materials/Stone.xml.asset
  49. 10 0
      FeatureExamples/CSharp/Resources/Materials/StoneEnvMap.xml
  50. 5 0
      FeatureExamples/CSharp/Resources/Materials/StoneEnvMap.xml.asset
  51. 12 0
      FeatureExamples/CSharp/Resources/Materials/StoneEnvMapSmall.xml
  52. 5 0
      FeatureExamples/CSharp/Resources/Materials/StoneEnvMapSmall.xml.asset
  53. 10 0
      FeatureExamples/CSharp/Resources/Materials/StoneSmall.xml
  54. 5 0
      FeatureExamples/CSharp/Resources/Materials/StoneSmall.xml.asset
  55. 10 0
      FeatureExamples/CSharp/Resources/Materials/StoneTiled.xml
  56. 5 0
      FeatureExamples/CSharp/Resources/Materials/StoneTiled.xml.asset
  57. 10 0
      FeatureExamples/CSharp/Resources/Materials/StoneTiledH.xml
  58. 5 0
      FeatureExamples/CSharp/Resources/Materials/StoneTiledH.xml.asset
  59. 9 0
      FeatureExamples/CSharp/Resources/Materials/Terrain.xml
  60. 5 0
      FeatureExamples/CSharp/Resources/Materials/Terrain.xml.asset
  61. 6 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecal.xml
  62. 5 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecal.xml.asset
  63. 6 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlpha.xml
  64. 5 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlpha.xml.asset
  65. 20 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlphaMaskTwoSided.xml
  66. 5 0
      FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlphaMaskTwoSided.xml.asset
  67. 3 0
      FeatureExamples/CSharp/Resources/Materials/VColUnlit.xml
  68. 5 0
      FeatureExamples/CSharp/Resources/Materials/VColUnlit.xml.asset
  69. 11 0
      FeatureExamples/CSharp/Resources/Materials/Water.xml
  70. 5 0
      FeatureExamples/CSharp/Resources/Materials/Water.xml.asset
  71. 5 0
      FeatureExamples/CSharp/Resources/Models.asset
  72. BIN
      FeatureExamples/CSharp/Resources/Models/Box.mdl
  73. 10 0
      FeatureExamples/CSharp/Resources/Models/Box.mdl.asset
  74. BIN
      FeatureExamples/CSharp/Resources/Models/Cone.mdl
  75. 10 0
      FeatureExamples/CSharp/Resources/Models/Cone.mdl.asset
  76. BIN
      FeatureExamples/CSharp/Resources/Models/Cylinder.mdl
  77. 10 0
      FeatureExamples/CSharp/Resources/Models/Cylinder.mdl.asset
  78. BIN
      FeatureExamples/CSharp/Resources/Models/Dome.mdl
  79. 10 0
      FeatureExamples/CSharp/Resources/Models/Dome.mdl.asset
  80. BIN
      FeatureExamples/CSharp/Resources/Models/Jack.mdl
  81. 10 0
      FeatureExamples/CSharp/Resources/Models/Jack.mdl.asset
  82. BIN
      FeatureExamples/CSharp/Resources/Models/Jack_Walk.ani
  83. BIN
      FeatureExamples/CSharp/Resources/Models/Mushroom.mdl
  84. 10 0
      FeatureExamples/CSharp/Resources/Models/Mushroom.mdl.asset
  85. 5 0
      FeatureExamples/CSharp/Resources/Models/Mutant.asset
  86. 5 0
      FeatureExamples/CSharp/Resources/Models/Mutant/Layer.asset
  87. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Block_LY.ani
  88. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_HitHead_LY.ani
  89. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Throw_LY.ani
  90. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Wave_LY.ani
  91. 36 0
      FeatureExamples/CSharp/Resources/Models/Mutant/License.txt
  92. 5 0
      FeatureExamples/CSharp/Resources/Models/Mutant/License.txt.asset
  93. 5 0
      FeatureExamples/CSharp/Resources/Models/Mutant/Materials.asset
  94. 9 0
      FeatureExamples/CSharp/Resources/Models/Mutant/Materials/mutant_M.xml
  95. 5 0
      FeatureExamples/CSharp/Resources/Models/Mutant/Materials/mutant_M.xml.asset
  96. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Mutant.mdl
  97. 10 0
      FeatureExamples/CSharp/Resources/Models/Mutant/Mutant.mdl.asset
  98. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_Death.ani
  99. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_HipHop1.ani
  100. BIN
      FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_Idle0.ani

+ 5 - 0
FeatureExamples/.gitignore

@@ -0,0 +1,5 @@
+UserPrefs.json
+BuildSettings.json
+Cache/*
+AtomicNET/*
+Resources/FeatureExamples.dll*

+ 0 - 0
FeatureExamples/CSharp/FeatureExamples.atomic


+ 5 - 0
FeatureExamples/CSharp/Resources/Components.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "5ae3ea71f8763866f08ee2a78ecd821e",
+	"FolderImporter": {}
+}

+ 0 - 0
FeatureExamples/CSharp/Resources/Components/.gitkeep


+ 174 - 0
FeatureExamples/CSharp/Resources/Components/Ragdoll.cs

@@ -0,0 +1,174 @@
+//
+// Copyright (c) 2008-2015 the Urho3D project.
+// Copyright (c) 2015 Xamarin Inc
+// Copyright (c) 2016 THUNDERBEAST GAMES LLC
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using AtomicEngine;
+
+namespace FeatureExamples
+{
+    class Ragdoll : CSComponent
+    {
+        public void Start()
+        {
+            SubscribeToEvent<NodeCollisionEvent>(Node, HandleNodeCollision);
+            
+        }
+
+        void HandleNodeCollision(NodeCollisionEvent e)
+        {
+            // Get the other colliding body, make sure it is moving (has nonzero mass)
+            RigidBody otherBody = e.OtherBody;
+
+            if (otherBody.Mass > 0.0f)
+            {
+                // We do not need the physics components in the AnimatedModel's root scene node anymore
+                Node.RemoveComponent<RigidBody>();
+                Node.RemoveComponent<CollisionShape>();
+
+                // Create RigidBody & CollisionShape components to bones
+                CreateRagdollBone("Bip01_Pelvis", ShapeType.SHAPE_BOX, new Vector3(0.3f, 0.2f, 0.25f), new Vector3(0.0f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 0.0f));
+                CreateRagdollBone("Bip01_Spine1", ShapeType.SHAPE_BOX, new Vector3(0.35f, 0.2f, 0.3f), new Vector3(0.15f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 0.0f));
+                CreateRagdollBone("Bip01_L_Thigh", ShapeType.SHAPE_CAPSULE, new Vector3(0.175f, 0.45f, 0.175f), new Vector3(0.25f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_R_Thigh", ShapeType.SHAPE_CAPSULE, new Vector3(0.175f, 0.45f, 0.175f), new Vector3(0.25f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_L_Calf", ShapeType.SHAPE_CAPSULE, new Vector3(0.15f, 0.55f, 0.15f), new Vector3(0.25f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_R_Calf", ShapeType.SHAPE_CAPSULE, new Vector3(0.15f, 0.55f, 0.15f), new Vector3(0.25f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_Head", ShapeType.SHAPE_BOX, new Vector3(0.2f, 0.2f, 0.2f), new Vector3(0.1f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 0.0f));
+                CreateRagdollBone("Bip01_L_UpperArm", ShapeType.SHAPE_CAPSULE, new Vector3(0.15f, 0.35f, 0.15f), new Vector3(0.1f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_R_UpperArm", ShapeType.SHAPE_CAPSULE, new Vector3(0.15f, 0.35f, 0.15f), new Vector3(0.1f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_L_Forearm", ShapeType.SHAPE_CAPSULE, new Vector3(0.125f, 0.4f, 0.125f), new Vector3(0.2f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+                CreateRagdollBone("Bip01_R_Forearm", ShapeType.SHAPE_CAPSULE, new Vector3(0.125f, 0.4f, 0.125f), new Vector3(0.2f, 0.0f, 0.0f),
+                    new Quaternion(0.0f, 0.0f, 90.0f));
+
+                Vector3 back = new Vector3(0f, 0f, -1f);
+                Vector3 forward = new Vector3(0f, 0f, 1f);
+                Vector3 left = new Vector3(-1f, 0f, 0f);
+                Vector3 down = new Vector3(0f, -1f, 0f);
+                Vector3 up = new Vector3(0f, 1f, 0f);
+
+                // Create Constraints between bones
+                CreateRagdollConstraint("Bip01_L_Thigh", "Bip01_Pelvis", ConstraintType.CONSTRAINT_CONETWIST, back, forward,
+                    new Vector2(45.0f, 45.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_R_Thigh", "Bip01_Pelvis", ConstraintType.CONSTRAINT_CONETWIST, back, forward,
+                    new Vector2(45.0f, 45.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_L_Calf", "Bip01_L_Thigh", ConstraintType.CONSTRAINT_HINGE, back, back,
+                    new Vector2(90.0f, 0.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_R_Calf", "Bip01_R_Thigh", ConstraintType.CONSTRAINT_HINGE, back, back,
+                    new Vector2(90.0f, 0.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_Spine1", "Bip01_Pelvis", ConstraintType.CONSTRAINT_HINGE, forward, forward,
+                    new Vector2(45.0f, 0.0f), new Vector2(-10.0f, 0.0f));
+                CreateRagdollConstraint("Bip01_Head", "Bip01_Spine1", ConstraintType.CONSTRAINT_CONETWIST, left, left,
+                    new Vector2(0.0f, 30.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_L_UpperArm", "Bip01_Spine1", ConstraintType.CONSTRAINT_CONETWIST, down, up,
+                    new Vector2(45.0f, 45.0f), Vector2.Zero, false);
+                CreateRagdollConstraint("Bip01_R_UpperArm", "Bip01_Spine1", ConstraintType.CONSTRAINT_CONETWIST, down, up,
+                    new Vector2(45.0f, 45.0f), Vector2.Zero, false);
+                CreateRagdollConstraint("Bip01_L_Forearm", "Bip01_L_UpperArm", ConstraintType.CONSTRAINT_HINGE, back, back,
+                    new Vector2(90.0f, 0.0f), Vector2.Zero);
+                CreateRagdollConstraint("Bip01_R_Forearm", "Bip01_R_UpperArm", ConstraintType.CONSTRAINT_HINGE, back, back,
+                    new Vector2(90.0f, 0.0f), Vector2.Zero);
+
+                // Disable keyframe animation from all bones so that they will not interfere with the ragdoll
+                AnimatedModel model = GetComponent<AnimatedModel>();
+
+                Skeleton skeleton = model.Skeleton;
+                for (uint i = 0; i < skeleton.GetNumBones(); ++i)
+                {
+                    skeleton.GetBone(i).Animated = false;
+                }
+
+                // Finally remove self from the scene node. Note that this must be the last operation performed in the function
+                Remove();
+            }
+        }
+
+        void CreateRagdollBone(string boneName, ShapeType type, Vector3 size, Vector3 position, Quaternion rotation)
+        {
+            // Find the correct child scene node recursively
+            Node boneNode = Node.GetChild(boneName, true);
+            if (boneNode == null)
+            {
+                Log.Warn($"Could not find bone {boneName} for creating ragdoll physics components");
+                return;
+            }
+
+            RigidBody body = boneNode.CreateComponent<RigidBody>();
+            // Set mass to make movable
+            body.Mass = 1.0f;
+            // Set damping parameters to smooth out the motion
+            body.LinearDamping = 0.05f;
+            body.AngularDamping = 0.85f;
+            // Set rest thresholds to ensure the ragdoll rigid bodies come to rest to not consume CPU endlessly
+            body.LinearRestThreshold = 1.5f;
+            body.AngularRestThreshold = 2.5f;
+
+            CollisionShape shape = boneNode.CreateComponent<CollisionShape>();
+            // We use either a box or a capsule shape for all of the bones
+            if (type == ShapeType.SHAPE_BOX)
+                shape.SetBox(size, position, rotation);
+            else
+                shape.SetCapsule(size.X, size.Y, position, rotation);
+        }
+
+        void CreateRagdollConstraint(string boneName, string parentName, ConstraintType type,
+            Vector3 axis, Vector3 parentAxis, Vector2 highLimit, Vector2 lowLimit, bool disableCollision = true)
+        {
+            Node boneNode = Node.GetChild(boneName, true);
+            Node parentNode = Node.GetChild(parentName, true);
+            if (boneNode == null)
+            {
+                Log.Warn($"Could not find bone {boneName} for creating ragdoll constraint");
+                return;
+            }
+            if (parentNode == null)
+            {
+                Log.Warn($"Could not find bone {parentName} for creating ragdoll constraint");
+                return;
+            }
+
+            Constraint constraint = boneNode.CreateComponent<Constraint>();
+            constraint.ConstraintType = type;
+            // Most of the constraints in the ragdoll will work better when the connected bodies don't collide against each other
+            constraint.DisableCollision = disableCollision;
+            // The connected body must be specified before setting the world position
+            constraint.OtherBody = parentNode.GetComponent<RigidBody>();
+            // Position the constraint at the child bone we are connecting
+            constraint.SetWorldPosition(boneNode.WorldPosition);
+            // Configure axes and limits
+            constraint.SetAxis(axis);
+            constraint.SetOtherAxis(parentAxis);
+            constraint.HighLimit = highLimit;
+            constraint.LowLimit = lowLimit;
+        }
+    }
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Components/Ragdoll.cs.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "5edd82b3a8b98fcb1bb75b9a2860a4af",
+	"CSharpImporter": null
+}

+ 196 - 0
FeatureExamples/CSharp/Resources/Components/Vehicle.cs

@@ -0,0 +1,196 @@
+//
+// Copyright (c) 2008-2015 the Urho3D project.
+// Copyright (c) 2015 Xamarin Inc
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+
+using System;
+using AtomicEngine;
+
+namespace FeatureExamples
+{
+    /// <summary>
+    /// Vehicle component, responsible for physical movement according to controls.
+    /// </summary>
+    public class Vehicle : CSComponent
+    {
+        public const int CtrlForward = 1;
+        public const int CtrlBack = 2;
+        public const int CtrlLeft = 4;
+        public const int CtrlRight = 8;
+
+        public const float YawSensitivity = 0.1f;
+        public const float EnginePower = 10.0f;
+        public const float DownForce = 10.0f;
+        public const float MaxWheelAngle = 22.5f;
+
+        // Movement controls.
+        public Controls Controls { get; set; } = new Controls();
+
+        // Wheel scene nodes.
+        Node frontLeft;
+        Node frontRight;
+        Node rearLeft;
+        Node rearRight;
+
+        // Steering axle constraints.
+        Constraint frontLeftAxis;
+        Constraint frontRightAxis;
+
+        // Hull and wheel rigid bodies.
+        RigidBody hullBody;
+        RigidBody frontLeftBody;
+        RigidBody frontRightBody;
+        RigidBody rearLeftBody;
+        RigidBody rearRightBody;
+
+        // IDs of the wheel scene nodes for serialization.
+        uint frontLeftId;
+        uint frontRightId;
+        uint rearLeftId;
+        uint rearRightId;
+
+        /// Current left/right steering amount (-1 to 1.)
+        float steering;
+
+
+        public void PhysicsPreStep(float timeStep)
+        {
+            float newSteering = 0.0f;
+            float accelerator = 0.0f;
+
+            // Read controls
+            if (Controls.IsDown(CtrlLeft))
+                newSteering = -1.0f;
+            if (Controls.IsDown(CtrlRight))
+                newSteering = 1.0f;
+            if (Controls.IsDown(CtrlForward))
+                accelerator = 1.0f;
+            if (Controls.IsDown(CtrlBack))
+                accelerator = -0.5f;
+
+            // When steering, wake up the wheel rigidbodies so that their orientation is updated
+            if (newSteering != 0.0f)
+            {
+                frontLeftBody.Activate();
+                frontRightBody.Activate();
+                steering = steering * 0.95f + newSteering * 0.05f;
+            }
+            else
+                steering = steering * 0.8f + newSteering * 0.2f;
+
+            // Set front wheel angles
+            Quaternion steeringRot = new Quaternion(0, steering * MaxWheelAngle, 0);
+            frontLeftAxis.SetOtherAxis(steeringRot * new Vector3(-1f, 0f, 0f));
+            frontRightAxis.SetOtherAxis(steeringRot * Vector3.UnitX);
+
+            Quaternion hullRot = hullBody.Rotation;
+            if (accelerator != 0.0f)
+            {
+                // Torques are applied in world space, so need to take the vehicle & wheel rotation into account
+                Vector3 torqueVec = new Vector3(EnginePower * accelerator, 0.0f, 0.0f);
+
+                frontLeftBody.ApplyTorque(hullRot * steeringRot * torqueVec);
+                frontRightBody.ApplyTorque(hullRot * steeringRot * torqueVec);
+                rearLeftBody.ApplyTorque(hullRot * torqueVec);
+                rearRightBody.ApplyTorque(hullRot * torqueVec);
+            }
+
+            // Apply downforce proportional to velocity
+            Vector3 localVelocity = Quaternion.Invert(hullRot) * hullBody.LinearVelocity;
+            hullBody.ApplyForce(hullRot * new Vector3(0f, -1f, 0f) * Math.Abs(localVelocity.Z) * DownForce);
+        }
+
+        public void Init()
+        {
+            var cache = GetSubsystem<ResourceCache>();
+
+            // This function is called only from the main program when initially creating the vehicle, not on scene load
+            var node = Node;
+            StaticModel hullObject = node.CreateComponent<StaticModel>();
+            hullBody = node.CreateComponent<RigidBody>();
+            CollisionShape hullShape = node.CreateComponent<CollisionShape>();
+
+            node.Scale = new Vector3(1.5f, 1.0f, 3.0f);
+            hullObject.Model = cache.Get<Model>("Models/Box.mdl");
+            hullObject.SetMaterial(cache.Get<Material>("Materials/Stone.xml"));
+            hullObject.CastShadows = true;
+            hullShape.SetBox(Vector3.One, Vector3.Zero, Quaternion.Identity);
+            hullBody.Mass = 4.0f;
+            hullBody.LinearDamping = 0.2f; // Some air resistance
+            hullBody.AngularDamping = 0.5f;
+            hullBody.CollisionLayer = 1;
+
+            InitWheel("FrontLeft", new Vector3(-0.6f, -0.4f, 0.3f), out frontLeft, out frontLeftId);
+            InitWheel("FrontRight", new Vector3(0.6f, -0.4f, 0.3f), out frontRight, out frontRightId);
+            InitWheel("RearLeft", new Vector3(-0.6f, -0.4f, -0.3f), out rearLeft, out rearLeftId);
+            InitWheel("RearRight", new Vector3(0.6f, -0.4f, -0.3f), out rearRight, out rearRightId);
+
+            GetWheelComponents();
+        }
+
+        void InitWheel(string name, Vector3 offset, out Node wheelNode, out uint wheelNodeId)
+        {
+            var cache = GetSubsystem<ResourceCache>();
+
+            // Note: do not parent the wheel to the hull scene node. Instead create it on the root level and let the physics
+            // constraint keep it together
+            wheelNode = Scene.CreateChild(name);
+            wheelNode.Position = Node.LocalToWorld(offset);
+            wheelNode.Rotation = Node.Rotation * (offset.X >= 0.0 ? new Quaternion(0.0f, 0.0f, -90.0f) : new Quaternion(0.0f, 0.0f, 90.0f));
+            wheelNode.Scale = new Vector3(0.8f, 0.5f, 0.8f);
+            // Remember the ID for serialization
+            wheelNodeId = wheelNode.ID;
+
+            StaticModel wheelObject = wheelNode.CreateComponent<StaticModel>();
+            RigidBody wheelBody = wheelNode.CreateComponent<RigidBody>();
+            CollisionShape wheelShape = wheelNode.CreateComponent<CollisionShape>();
+            Constraint wheelConstraint = wheelNode.CreateComponent<Constraint>();
+
+            wheelObject.Model = (cache.Get<Model>("Models/Cylinder.mdl"));
+            wheelObject.SetMaterial(cache.Get<Material>("Materials/Stone.xml"));
+            wheelObject.CastShadows = true;
+            wheelShape.SetSphere(1.0f, Vector3.Zero, Quaternion.Identity);
+            wheelBody.Friction = (1.0f);
+            wheelBody.Mass = 1.0f;
+            wheelBody.LinearDamping = 0.2f; // Some air resistance
+            wheelBody.AngularDamping = 0.75f; // Could also use rolling friction
+            wheelBody.CollisionLayer = 1;
+            wheelConstraint.ConstraintType = ConstraintType.CONSTRAINT_HINGE;
+            wheelConstraint.OtherBody = GetComponent<RigidBody>(); // Connect to the hull body
+            wheelConstraint.SetWorldPosition(wheelNode.Position); // Set constraint's both ends at wheel's location
+            wheelConstraint.SetAxis(Vector3.UnitY); // Wheel rotates around its local Y-axis
+            wheelConstraint.SetOtherAxis(offset.X >= 0.0 ? Vector3.UnitX : new Vector3(-1f, 0f, 0f)); // Wheel's hull axis points either left or right
+            wheelConstraint.LowLimit = new Vector2(-180.0f, 0.0f); // Let the wheel rotate freely around the axis
+            wheelConstraint.HighLimit = new Vector2(180.0f, 0.0f);
+            wheelConstraint.DisableCollision = true; // Let the wheel intersect the vehicle hull
+        }
+
+        void GetWheelComponents()
+        {
+            frontLeftAxis = frontLeft.GetComponent<Constraint>();
+            frontRightAxis = frontRight.GetComponent<Constraint>();
+            frontLeftBody = frontLeft.GetComponent<RigidBody>();
+            frontRightBody = frontRight.GetComponent<RigidBody>();
+            rearLeftBody = rearLeft.GetComponent<RigidBody>();
+            rearRightBody = rearRight.GetComponent<RigidBody>();
+        }
+    }
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Components/Vehicle.cs.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "7b057ce92d73e2f39ccd024348bf0025",
+	"CSharpImporter": null
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "480eac2a1f9fc8b60a3e0cbe3374b304",
+	"FolderImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/GreenTransparent.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/NoTextureAlpha.xml" />
+    <parameter name="MatDiffColor" value="0 1 0 0.25" />
+    <parameter name="MatSpecColor" value="1 1 1 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/GreenTransparent.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "9b55d5aa04e5ac3a20b54f22d6a69c17",
+	"TextImporter": {}
+}

+ 4 - 0
FeatureExamples/CSharp/Resources/Materials/Jack.xml

@@ -0,0 +1,4 @@
+<material>
+    <technique name="Techniques/NoTexture.xml" />
+    <parameter name="MatSpecColor" value="0.5 0.5 0.5 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Jack.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "b16fbc2322adec68569ffe2679467549",
+	"TextImporter": {}
+}

+ 6 - 0
FeatureExamples/CSharp/Resources/Materials/JackEnvMap.xml

@@ -0,0 +1,6 @@
+<material>
+    <technique name="Techniques/NoTextureEnvCube.xml" />
+    <texture unit="environment" name="Textures/Skybox.xml" />
+    <parameter name="MatSpecColor" value="0.5 0.5 0.5 16" />
+    <parameter name="MatEnvMapColor" value="0.2 0.2 0.2" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/JackEnvMap.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "21256bafdaf2f07bc4c2c7fd2ebe6b43",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/LitSmoke.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/DiffLitParticleAlpha.xml" />
+    <parameter name="MatDiffColor" value="0.5 0.5 0.5 0.5" />    
+    <texture unit="diffuse" name="Textures/Smoke.dds" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/LitSmoke.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "2d3dd9b21a9355405fffa7c715fe0c1f",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Mushroom.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/Diff.xml" />
+    <texture unit="diffuse" name="Textures/Mushroom.dds" />
+    <parameter name="MatSpecColor" value="0.1 0.1 0.1 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Mushroom.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "fbd611fb982fb9d8d3747f7170174ab1",
+	"TextImporter": {}
+}

+ 7 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomEnvMap.xml

@@ -0,0 +1,7 @@
+<material>
+    <technique name="Techniques/DiffEnvCube.xml" />
+    <texture unit="diffuse" name="Textures/Mushroom.dds" />
+    <texture unit="environment" name="Textures/Skybox.xml" />
+    <parameter name="MatSpecColor" value="0.1 0.1 0.1 16" />
+    <parameter name="MatEnvMapColor" value="0.2 0.1 0.1" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomEnvMap.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "60865755b74d109f80f756f54c2657de",
+	"TextImporter": {}
+}

+ 9 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomWind.xml

@@ -0,0 +1,9 @@
+<material>
+    <technique name="Techniques/VegetationDiff.xml" />
+    <texture unit="diffuse" name="Textures/Mushroom.dds" />
+    <parameter name="MatSpecColor" value="0.1 0.1 0.1 16" />
+    <parameter name="WindPeriod" value="1" />
+    <parameter name="WindHeightFactor" value="0.2" />
+    <parameter name="WindHeightPivot" value="0.2" />
+    <parameter name="WindWorldSpacing" value="0.1 0.1" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomWind.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "f9569bdb9fe17b86ba365451b5261ce4",
+	"TextImporter": {}
+}

+ 9 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomWindUnlit.xml

@@ -0,0 +1,9 @@
+<material>
+    <technique name="Techniques/VegetationDiffUnlit.xml" />
+    <texture unit="diffuse" name="Textures/Mushroom.dds" />
+    <parameter name="MatSpecColor" value="0.1 0.1 0.1 16" />
+    <parameter name="WindPeriod" value="1" />
+    <parameter name="WindHeightFactor" value="0.2" />
+    <parameter name="WindHeightPivot" value="0.2" />
+    <parameter name="WindWorldSpacing" value="0.1 0.1" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/MushroomWindUnlit.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "227e4c3fdd2362cd5a2552f2c5734da2",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "d13295a1a3aac5859a687b95b8dbee33",
+	"FolderImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/CloudPlane.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/DiffSkyplane.xml" />
+    <texture unit="diffuse" name="Textures/NinjaSnowWar/CloudPlane.dds" />
+    <cull value="none" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/CloudPlane.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "5e22745bfdf79d5200ced2f51dd369f4",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Ninja.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/Diff.xml" />
+    <texture unit="diffuse" name="Textures/NinjaSnowWar/Ninja.dds" />
+    <parameter name="MatSpecColor" value="0 0 0 1" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Ninja.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "2b9a066dbe1ac4827a33bea8548bc755",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Potion.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/NoTexture.xml" />
+    <parameter name="MatDiffColor" value="1 0 0 1" />
+    <parameter name="MatSpecColor" value="0.25 0.25 0.25 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Potion.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6c261084246836341f81bb992bd17a32",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Snow.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/Diff.xml" />
+    <texture unit="diffuse" name="Textures/NinjaSnowWar/Snow.dds" />
+    <parameter name="MatSpecColor" value="0.25 0.25 0.25 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/Snow.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "5db4a3ba5ccc54679f949116224e8acd",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/SnowCrate.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/Diff.xml" />
+    <texture unit="diffuse" name="Textures/NinjaSnowWar/SnowCrate.dds" />
+    <parameter name="MatSpecColor" value="0.15 0.15 0.15 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/NinjaSnowWar/SnowCrate.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "0dd864ea4c27bbf064bde9e028aef584",
+	"TextImporter": {}
+}

+ 4 - 0
FeatureExamples/CSharp/Resources/Materials/Particle.xml

@@ -0,0 +1,4 @@
+<material>
+    <technique name="Techniques/DiffVColAdd.xml" />
+    <texture unit="diffuse" name="Textures/Flare.dds" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Particle.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "46ad08141315a3a28bc87572e249fd5e",
+	"TextImporter": {}
+}

+ 14 - 0
FeatureExamples/CSharp/Resources/Materials/RibbonTrail.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<material>
+    <technique name="Techniques/DiffVColUnlitAlpha.xml" quality="1" loddistance="0" />
+    <texture unit="diffuse" name="Textures/RibbonTrail.png" />
+	<parameter name="UOffset" value="1 0 0 0" />
+	<parameter name="VOffset" value="0 1 0 0" />
+	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0" />
+	<parameter name="MatEnvMapColor" value="1 1 1" />
+	<parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+	<cull value="ccw" />
+	<shadowcull value="ccw" />
+	<depthbias constant="0" slopescaled="0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/RibbonTrail.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "ad3e94274634dc72e41271d2dc978e2a",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Skybox.xml

@@ -0,0 +1,5 @@
+<material>
+    <technique name="Techniques/DiffSkybox.xml" />
+    <texture unit="diffuse" name="Textures/Skybox.xml" />
+    <cull value="none" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Skybox.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "d002bee77dafcbcb4c61291f3da3c8b9",
+	"TextImporter": {}
+}

+ 14 - 0
FeatureExamples/CSharp/Resources/Materials/SlashTrail.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<material>
+    <technique name="Techniques/DiffVColUnlitAlpha.xml" quality="1" loddistance="0" />
+    <texture unit="diffuse" name="Textures/SlashTrail.png" />
+	<parameter name="UOffset" value="1 0 0 0" />
+	<parameter name="VOffset" value="0 1 0 0" />
+	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0" />
+	<parameter name="MatEnvMapColor" value="1 1 1" />
+	<parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+	<cull value="none" />
+	<shadowcull value="ccw" />
+	<depthbias constant="0" slopescaled="0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/SlashTrail.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "980387e5d0fec2ddb6ef5052eb1cfb2b",
+	"TextImporter": {}
+}

+ 4 - 0
FeatureExamples/CSharp/Resources/Materials/Smoke.xml

@@ -0,0 +1,4 @@
+<material>
+    <technique name="Techniques/DiffVColUnlitAlpha.xml" />
+    <texture unit="diffuse" name="Textures/Smoke.dds" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Smoke.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "16bc852596e69dc9ece9a55c1a4d34e1",
+	"TextImporter": {}
+}

+ 8 - 0
FeatureExamples/CSharp/Resources/Materials/Stone.xml

@@ -0,0 +1,8 @@
+<material>
+    <technique name="Techniques/DiffNormal.xml" quality="1" />
+    <technique name="Techniques/Diff.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Stone.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "fbdd680ecea6c215bcdd3845aba30d01",
+	"TextImporter": {}
+}

+ 10 - 0
FeatureExamples/CSharp/Resources/Materials/StoneEnvMap.xml

@@ -0,0 +1,10 @@
+<material>
+    <technique name="Techniques/DiffNormalEnvCube.xml" quality="1" />
+    <technique name="Techniques/DiffEnvCube.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <texture unit="environment" name="Textures/Skybox.xml" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+    <parameter name="MatEnvMapColor" value="0.1 0.1 0.2" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/StoneEnvMap.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "06a53c644ad764ac299acc097e6fc229",
+	"TextImporter": {}
+}

+ 12 - 0
FeatureExamples/CSharp/Resources/Materials/StoneEnvMapSmall.xml

@@ -0,0 +1,12 @@
+<material>
+    <technique name="Techniques/DiffNormalEnvCube.xml" quality="1" />
+    <technique name="Techniques/DiffEnvCube.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <texture unit="environment" name="Textures/Skybox.xml" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+    <parameter name="MatEnvMapColor" value="0.1 0.1 0.2" />
+    <parameter name="UOffset" value="0.125 0 0 0" />
+    <parameter name="VOffset" value="0 0.125 0 0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/StoneEnvMapSmall.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "6a06e5e22fb197dc92a666714d8d5aff",
+	"TextImporter": {}
+}

+ 10 - 0
FeatureExamples/CSharp/Resources/Materials/StoneSmall.xml

@@ -0,0 +1,10 @@
+<material>
+    <technique name="Techniques/DiffNormal.xml" quality="1" />
+    <technique name="Techniques/Diff.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+    <parameter name="UOffset" value="0.125 0 0 0" />
+    <parameter name="VOffset" value="0 0.125 0 0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/StoneSmall.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "ae55ae70dc4aff36b46d2a3c321d0983",
+	"TextImporter": {}
+}

+ 10 - 0
FeatureExamples/CSharp/Resources/Materials/StoneTiled.xml

@@ -0,0 +1,10 @@
+<material>
+    <technique name="Techniques/DiffNormal.xml" quality="1" />
+    <technique name="Techniques/Diff.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+    <parameter name="UOffset" value="4 0 0 0" />
+    <parameter name="VOffset" value="0 4 0 0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/StoneTiled.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "a5c547f09790c09b2f5c61c92f6fd3a5",
+	"TextImporter": {}
+}

+ 10 - 0
FeatureExamples/CSharp/Resources/Materials/StoneTiledH.xml

@@ -0,0 +1,10 @@
+<material>
+    <technique name="Techniques/DiffNormal.xml" quality="1" />
+    <technique name="Techniques/Diff.xml" quality="0" />
+    <texture unit="diffuse" name="Textures/StoneDiffuse.dds" />
+    <texture unit="normal" name="Textures/StoneNormal.dds" />
+    <shader psdefines="PACKEDNORMAL" />
+    <parameter name="MatSpecColor" value="0.3 0.3 0.3 16" />
+    <parameter name="UOffset" value="10 0 0 0" />
+    <parameter name="VOffset" value="0 0.5 0 0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/StoneTiledH.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "34ec2b70002c5f8ae071f3041fb8d936",
+	"TextImporter": {}
+}

+ 9 - 0
FeatureExamples/CSharp/Resources/Materials/Terrain.xml

@@ -0,0 +1,9 @@
+<material>
+    <technique name="Techniques/TerrainBlend.xml" />
+    <texture unit="0" name="Textures/TerrainWeights.dds" />
+    <texture unit="1" name="Textures/TerrainDetail1.dds" />
+    <texture unit="2" name="Textures/TerrainDetail2.dds" />
+    <texture unit="3" name="Textures/TerrainDetail3.dds" />
+    <parameter name="MatSpecColor" value="0.5 0.5 0.5 16" />
+    <parameter name="DetailTiling" value="32 32" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Terrain.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "65cec42cd966197f9fcc101e1c7c2bb5",
+	"TextImporter": {}
+}

+ 6 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecal.xml

@@ -0,0 +1,6 @@
+<material>
+    <technique name="Techniques/DiffAdd.xml" />
+    <texture unit="diffuse" name="Textures/UrhoDecal.dds" />
+    <parameter name="MatDiffColor" value="1 1 0 1" />
+    <depthbias constant="-0.00001" slopescaled="0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecal.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "b3e92ecdd53013b385c2bd58fe39eb59",
+	"TextImporter": {}
+}

+ 6 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlpha.xml

@@ -0,0 +1,6 @@
+<material>
+    <technique name="Techniques/DiffAlpha.xml" />
+    <texture unit="diffuse" name="Textures/UrhoDecalAlpha.dds" />
+    <parameter name="MatDiffColor" value="1 1 0 1" />
+    <depthbias constant="-0.00001" slopescaled="0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlpha.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "438f5a35b9387b53a2b226c2cd5b685a",
+	"TextImporter": {}
+}

+ 20 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlphaMaskTwoSided.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<material>
+	<technique name="Techniques/Diff.xml" quality="0" loddistance="0" />
+	<texture unit="diffuse" name="Textures/UrhoDecalAlpha.dds" />
+	<shader psdefines="ALPHAMASK" />
+	<parameter name="UOffset" value="1 0 0 0" />
+	<parameter name="VOffset" value="0 1 0 0" />
+	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatEmissiveColor" value="0 0 0" />
+	<parameter name="MatEnvMapColor" value="1 1 1" />
+	<parameter name="MatSpecColor" value="0 0 0 1" />
+	<parameter name="Roughness" value="0.5" />
+	<parameter name="Metallic" value="0" />
+	<cull value="none" />
+	<shadowcull value="none" />
+	<fill value="solid" />
+	<depthbias constant="0" slopescaled="0" />
+	<renderorder value="129" />
+	<occlusion enable="false" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/UrhoDecalAlphaMaskTwoSided.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "e0c0f6d88d1447d745c84c3bb7a54e37",
+	"TextImporter": {}
+}

+ 3 - 0
FeatureExamples/CSharp/Resources/Materials/VColUnlit.xml

@@ -0,0 +1,3 @@
+<material>
+    <technique name="Techniques/NoTextureUnlitVCol.xml" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/VColUnlit.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "9dee2122b21ce5a143b17dd0b6280fa0",
+	"TextImporter": {}
+}

+ 11 - 0
FeatureExamples/CSharp/Resources/Materials/Water.xml

@@ -0,0 +1,11 @@
+<material>
+    <!-- The water example will assign the reflection texture to the diffuse unit -->
+    <!-- The engine will automatically assign the refraction (viewport) texture to the environment unit during refract pass -->
+    <technique name="Techniques/Water.xml" />
+    <texture unit="normal" name="Textures/WaterNoise.dds" />
+    <parameter name="NoiseSpeed" value="0.05 0.05" />
+    <parameter name="NoiseTiling" value="50" />
+    <parameter name="NoiseStrength" value="0.02" />
+    <parameter name="FresnelPower" value="8" />
+    <parameter name="WaterTint" value="0.8 0.8 1.0" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Materials/Water.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "d4e000569ba02a3bd01cbccb68563fbe",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Models.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "0feee9ffd6eae72275fd9458b226aeab",
+	"FolderImporter": {}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Box.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Box.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "23c5e86bf5176a9ebced168a251a0af3",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Cone.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Cone.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "47d2b20dc040775d534e0ee0fe80fc1f",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Cylinder.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Cylinder.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "ae59e6c0e1dee34babe325ebbb37a646",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Dome.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Dome.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "3ffc06b7bbfd0dc8eb95f16ac366ee27",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Jack.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Jack.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "7f19d18477fb286eadc22136ef1da83b",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Jack_Walk.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mushroom.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Mushroom.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "31be0028f02c452cb0afb4d7db679cb7",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Models/Mutant.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "1f7fdad40eef0ae3182ecc44704f35bd",
+	"FolderImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/Layer.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "c07dd061cb933ad76131e9e8318af837",
+	"FolderImporter": {}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Block_LY.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_HitHead_LY.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Throw_LY.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Layer/Mutant_Wave_LY.ani


+ 36 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/License.txt

@@ -0,0 +1,36 @@
+--------------------------
+note:
+--------------------------
+There is no requirement in the Mixamo License to provide any license information with any content.  
+However, for the purpose of learning, I have provided some pertinent information below.
+
+--------------------------
+info:
+--------------------------
+website: https://www.mixamo.com/
+model: Mutant
+license: http://www.adobe.com/legal/terms.html
+
+--------------------------
+license short explanation (from the forum):
+--------------------------
+Jeanette Mathews
+May 31, 2016 07:24
+
+Thanks for the feedback, and glad to hear the tutorial was useful getting you started.  :)
+
+Yes, all Fuse and Mixamo content is available for commercial and non commercial use, royalty free.  
+You can edit them to your hearts content!
+
+The only requirement we have is that the final product you are creating must have our content in an 'embedded', non-editable format.  
+So you can't edit the characters and sell them directly, because then other people have access to the character 3d data files.  
+Games, movies, 3d prints, 2D illustrations, or any other file format where the character/animation files are not-editable is fine.  
+Selling characters/animations directly is against the TOS/EULA.
+
+Hope that helps clarify!
+
+reference: https://community.mixamo.com/hc/en-us/community/posts/211496987-Mixamo-Store-Characters-Licence
+
+--------------------------
+
+

+ 5 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/License.txt.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "221d1a4e335021d91426f9bf8b592bfc",
+	"TextImporter": {}
+}

+ 5 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/Materials.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "42c32750686a7ee663a54f8fa62d057a",
+	"FolderImporter": {}
+}

+ 9 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/Materials/mutant_M.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<material>
+	<technique name="Techniques/DiffNormal.xml" />
+	<texture unit="diffuse" name="Models/Mutant/Textures/Mutant_diffuse.jpg" />
+	<texture unit="normal" name="Models/Mutant/Textures/Mutant_normal.jpg" />
+	<parameter name="MatDiffColor" value="1 1 1 1" />
+	<parameter name="MatSpecColor" value="0.2 0.2 0.2 6.15385" />
+	<parameter name="MatEmissiveColor" value="0 0 0 1" />
+</material>

+ 5 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/Materials/mutant_M.xml.asset

@@ -0,0 +1,5 @@
+{
+	"version": 1,
+	"guid": "445c86c17bcdd074123c4de4a208952f",
+	"TextImporter": {}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Mutant.mdl


+ 10 - 0
FeatureExamples/CSharp/Resources/Models/Mutant/Mutant.mdl.asset

@@ -0,0 +1,10 @@
+{
+	"version": 1,
+	"guid": "b70f3629125b34792ec0d8d93cf33449",
+	"ModelImporter": {
+		"scale": 1,
+		"importAnimations": false,
+		"importMaterials": true,
+		"animInfo": []
+	}
+}

BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_Death.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_HipHop1.ani


BIN
FeatureExamples/CSharp/Resources/Models/Mutant/Mutant_Idle0.ani


Some files were not shown because too many files changed in this diff