Amplify: Increase the volume, the amplitude, … using an amplifier. Enlarge upon or add detail to (a story or statement). (https://www.merriam-webster.com/dictionary/amplify)
Topics
Simulations
Primitive colliders
Compound colliders
Mesh colliders
Particle emitter
Kinematic motion
Instructions
Follow the tutorial Video tutorial together with the instructions below.
- Explore the motion of objects created in “Record” virtually, using a video game engine.
AMPLIFY 1 of 3
This week we will learn how to apply the textures and 3D models generated in this workshop to create an interactive virtual ‘ecology’
Please complete the tasks in this tutorial before the next session. There is a lot of very exciting material to cover!
Setup
Complete before 1st Class
Installation and Introduction
- Download and Install Unity3D https://unity3d.com/
- Open Unity3D
- Create a new project folder in your desired directory
- Follow along the introduction to Unity3D tutorial
Understanding the UI
- Familiarize yourself with the Unity 3D Interface:
Lab 1 Game Objects
Prior to starting this lab you must
- Download and install Unity3D
- Have a basic idea of what a Game Engine does
- Open Unity3D and familiarize yourself with the UI
Let’s Get Started!
1 START A NEW PROJECT
- Open Unity 3D
- The following options menu will come up
- Click on NEW to create a new project.
- Specify a project name – for now, call it “Ecology of Forms Amplify”
- Under location, make a special folder in your computer called “Ecology of Forms”
- Click the “create project” button
- Once you have created the project, in the Hierarchy section to the left, click on your scene and select ‘save scene as’, and call it “Amplify 1”
- A project can have many scenes, which each share the same assets.
2 Scene View Navigation
- Review this page https://docs.unity3d.com/Manual/SceneViewNavigation.html
3 DEFAULT GAME OBJECTS
- On the top toolbar, click on “GameObject”. From the dropdown, select “3D”, THEN cube
- A white cube will be placed at the center of your screen
- Press play and observe the scene. What happened?
- Reset the scene by clicking on the play button again
- Let’s make our cube a Rigid Body.
- Navigate to the scene tab. Select the cube
- One the right hand side, you will see options appear under the inspector tab/
- Click on the add component button, and search and select “rigid body”
- Press play and observe the scene.
- What changed? What is a rigid body?
- you should have observed your cube affected by a simulated gravitational force. This results in a downward motion.
- Change parameters such as mass, gravity and drag. Observe what happens
3 Simple Collisions and Transformation
- Let’s now see what happens when that cube collides with another object
- Let’s create a simple plane by again navigating to the “game-object” tab at the top of the UI, and now selecting “3D”, then “plane”
- A white plane will be created at the center of the scene.
- Move the cube above the plane, by clicking on it and dragging the green arrow up
- Press play. What happens?
- Reset the scene by pressing the play button again.
- Similar to how you moved the cube. rotate the plane so its on an angle on the z-axis.
- You can do this two ways, the first is to click on the ‘rotate’ button on the top left hand side. When you click on a geometry, instead of having an option to move the object, you will be able to rotate it.
- The other way to change the rotation of the plane is to modify the rotation using the transformation options on the left hand side. For more details read this
- Now that you have rotated the plane so that it is a slope, press Play.
- What happens?
- Reset the scene by pressing the play button again.
- Select the plane, and uncheck the “mesh collider” option on the right hand side
- Press play. What happens? What does a collider do?
- Check ‘mesh’ collider again.
- Let’s add some more objects to the scene. Go to the game object->3D option and try adding a sphere, capsule, cylinder to your scene.
- Play with their rotation, position and scale of the new objects.
- Don’t forget to add the “rigid body” as well! Use the approach described earlier
4 Applying Materials
- Because all of the objects are white, it is hard to observe the collisions. Lets change the object colors by applying materials
- To do this navigate to the ‘asset’ tab and select ‘create’, then ‘material’
- An icon will pop up in the ‘assets’ window at the button of the screen. Rename the material
- Lets change the color. To do this click on the material icon, and then on the right hand side, click on the “albedo” option. Choose your favorite color
- To apply the material to your objects simply click and drag the material icon from the “assets” toolbar on top of an object in the scene viewport.
- The same material can be applied to multiple objects. If you want to adjust the material, simply click on it in the assets tool bar and modify its properties. All objects with this material will automatically update
5 Physics Materials
- How do we make an object bouncy, or a surface slippery? We can alter how an object behaves when it collides with another object by applying a “Physics Material” which gives special properties.
- To create a physics material the process is similar to creating a material.
- Navigate to “assets” -> “create” -> “Physics Material”
- Name the new physics material “ICE”
- A physical material is based on ‘bounciness’, which is how springy a material is, and ‘friction’ values between 0 and 1. To make a material act like ice it will have low friction. Try changing the settings of the physic material to the ones below.
- Apply the physics material to the plane by clicking and dragging the icon on top of of the plane in the 3D viewport.
- Press play. What happens?
- Create a new physics material and play with its properties. How can you make the plane act like a trampoline?
6 Bonus: Create a Composite Game Objects
Make a Blackberry 
- Want to have something more complex than the primitive objects. You can create a prefab object which combines multiple primitive objects
- Create an empty GameObject, GameObject -> create empty game object
- Add a rigid body component to the empty game object
- Add a capsule. Go to GameObject → 3D → Capsule
- Add a 2nd capsule. Go to GameObject → 3D → Capsule
- Set the X rotation of capsule 2 to 90
- Add a 3rd capsule. Go to GameObject → 3D → Capsule
- Set the Z rotation of capsule 2 to 90
- On the left hand toolbar click and drag the capsule objects under the empty game object you created
- To save the shape, click and drag it to the assets toolbar
- Repeat this technique to create other prefabs. You can combine any objects you like
Homework (5% of grade)
In Unity3D, model a simple rube goldberg machine, whereby the collision of one object initiates the motion of the next.
Deliverables on Moodle and Blog
- Sketch hand drawn sketch of your system indicating forces, gameobjects, and interactions
- 1 Video of your final result and tests (once your scene is ready you can go to File > Build and Run > video record your screen) (make sure the video is not too long and max 10mb). Also include the video of the exercise you did during the tutorial.
- 4 Screenshots of different tests
Deliver at 23:59 Before the next session.
Hint
- Use all the concepts we covered today – planes, 3D objects, transformations, rigid bodies, forces, drag, gravity, friction, bounciness
- Try to have at least 3 different steps
- Have fun and experiment. Focus on practicing and not necessarily the final result