Computer
Graphics
Group 40
Documentation
B1: Navigation and Animation
Description: In this project, we focused on creating animated objects with the ability to navigate around a maze field.
In Part 1, you will notice a complex field in which there are multiple levels - including floating platforms, bridges, and stairs. You will also see a crowd of agents; each of which can be selected and navigated across multiple levels with our user provided input. The higher the level, the less the cost of going up the level is – forcing some of our agents to take the higher level paths rather than navigating on the ground. In our environment, we have also included two types of obstacles - stationary, dynamic and Nazgul. The stationary obstacles can be clicked on and moved around using arrow keys. The camera we have integrated works in the following way: click ‘c’ for angle change, click ‘x’ and the arrow keys to move, and lastly use the scroll pad to zoom. The same can be applied in Part 3. Click on the agents and click on the destination and watch them move, avoiding the obstacles! Control the Nazgul agents in the same way and watch the regular agents scatter!
In Part 2, we have simulated Robot Kyle, an animated character that can be controlled with different states (walk/jump/run), through the keyboard. The player can move around with W, A, S, and D. Holding down the shift key while moving will cause Robot Kyle to run and hitting spacebar will trigger a jumping animation. An animation controller is used to display different animations depending on the state of the character. Blend trees are used to provide smooth transitions while the player is turning.
Part 3 combines our first two parts into a clean, final demonstration. You will observe Robot Kyle has now duplicated and become part of the crowd simulator. These new animated characters can all move around with user inputs. Pressing "o" will allow the agents to walk and pressing "p" will allow the agents to run.
Extra Credit Attempts: Part 1: We implemented the moving obstacles and the Nazgul obstacles. With the moving obstacles, they move back and forth on either the x or z axis for a specified amount, and agents avoid them. They do not carve the ground because the agents would have to recalculate the path for each time that the obstacle moved and the path was carved.For the Nazgul agents, we encountered a problem in implemented both NavMeshAgent and NavMeshObstacle in the same object. So, when the Nazgul agent was moving we enabled Agent and disabled Obstacle, and vice versa for when Nazgul was stationary. Regular agents avoid the Nazgul objects as obstacles, and as agents it finds if the agent is in range and automatically avoids the moving agent.
Submission: We created a start menu from
which any of the parts can be selected. The demo includes all three parts in
one.
8. Carving carves a space in the NavMesh that makes the area unable to be navigated through for NavMeshAgents, used for obstacles. Not carving makes that area still navigable for agents. Carve should only be active if the obstacle is not moving regularly because when the mesh changes with the carve, the agents’ paths are recalculated each time.If all obstacles are carving, the agents will have to recalculate their paths for moving obstacles each time.If all obstacles are not carving, the agents might not find the shortest path.
9. To avoid noncarving obstacles, split up the entire map into smaller areas, and calculate the cost of travelling through each room before deciding the main path. Areas with moving obstacles will cost more to travel.
Online Web Demo Links: Try playing yourself!
**This Link includes a start
menu to choose from any of the parts!!!**
No comments:
Post a Comment