Saturday, December 21, 2013

AFTER EFFECTS CS6: Time Remapping to Save on Renders

I'm not sure if it's a feature specifically to AE CS6, but let's say you need to render a sequence of 1800 frames, but it's basically a still frame.  You can enable Time-Remapping and delete the frame at the end and After Effects will know that it's a still frame.

You'll notice that the status above your timeline shows green.  AE now knows it's a static frame and will not redraw every frame.  :)

Thursday, December 12, 2013

FILM PRODUCTION: Calibrating a Broadcast Monitor

I always forget how to do this for my Marshall V-LCD70XP monitor after a long hiatus from shooting.  I am now immortalizing it with a link on my blog.

This is a wonderfully detailed yet concise tutorial by Guy Cochran:
https://vimeo.com/3723108#

Basic steps:
1. Adjust Brightness, 2. Adjust Contrast, 3. Adjust Color

Friday, November 22, 2013

ROLLING SHUTTER: Set Filtering to "Extreme"

Under the Advanced tab in the timeline in AE, set "Filtering" to "Extreme" instead of normal.  Previews will be excruciatingly slow, but you get the best results on output.

Thursday, November 21, 2013

MOCHA PRO: Localize Tracks

I've noticed that when tracking a shot, it's better to localize your tracks rather than trying to find a global solution.  This is probably due to lens distortion etc that throws off the solve, but in a pinch it's a great way to get the data you need and move on to the next shot.

Tuesday, November 12, 2013

MOCHA PRO: Angle and Zoom

For shots that have quite a bit of rotation and parallax, bumping up Angle to 5 degrees and Zoom to 5% solved the issue of the plane slipping for me.  Of course, mileage will vary depending on the shot.  Downside, it bumps up calculation time almost 2-3x.  Worth it though.

Friday, November 8, 2013

MOCHA PRO: Search Area

I was having wildly incorrect results tracking a grass surface for line removal work, until I unchecked the "Auto" search area feature and entered my own values.  The shot exhibited more horizontal movement than vertical, so dialed in 100 horizontal and 50 vertical.  Worked like a charm.

Friday, October 25, 2013

DSLR Video Metadata (For Camera Tracking, etc)

In order to read the metadata off of a DSLR video, go in Adobe Bridge and click on the corresponding THM file.  It should hold most of the relevant data for a camera track, not including physical height, etc.

Camera data includes:
  • Lens Type
  • Focal Length
  • Shutter Speed
  • ISO

Tuesday, October 22, 2013

UNFOLD 3D: Workflow and Notes

Tips:
- pan with LMB
- rotate with RMB
- zoom with MMB

- hold shift + click to select
- SPACE to deselect
- hold ALT to draw temp line on loop, then double click to select.

MAYA: Tips for Retopologizing with Maya Live

Set high resolution mesh on a different display layer and set it to "Template" mode.  Runs much faster than working with the high res mesh on the same layer and 100% visible.  Makes sense, since it's rendering only the wireframe instead of the actual mesh.

After laying down proper topology, the model might sit slightly inside the high res mesh after smoothing.  In order to get a slightly more accurate normal map bake, select all vertices and move them outward in the normal direction.  The exact amount differs depending on your topology and density, so play around until it looks right.

Friday, October 18, 2013

MOCHA PRO: Removing Tracking Markers

http://www.youtube.com/watch?v=dfGQ7jYcCDQ

Notes:

  • layer order matters.
    • closest to lens, highest in stack.
  • track from most detail to least detail.
  • can add and subtract points on the fly, tracking data is independent.
  • Join Layers Tool: using the little "vampire teeth / ladybug head"
    • you can attach layers to other layers (and enables point snapping between the two layers.
  • can interpolate between clean plates.
  • Box-Blur in AE is computationally cheap.
  • clip layers when you no longer need them.
  • make sure to be on the first frame in AE before pasting data from Mocha.
For shots that require removing markers behind wet glass with beats of water in front, use a color key and garbage mattes.  Mocha can be used for matte generation, but not necessary.

Tuesday, October 15, 2013

PHOTOSHOP: Expanding Canvas Using Crop Tool

You can manually expand a canvas by using the crop tool and enlarging the crop area.  Sure beats going to Image > Canvas Size and trying to tweak to fit.

Saw the instructor in this video doing it:
http://www.youtube.com/watch?v=KOSy1RLxUt4&feature=em-subs_digest-vrecs

Wednesday, October 9, 2013

Z-BRUSH: Partial Visibility + Clip Brushes

Select Selection or Clip Brush - hold Shift+Ctrl while selecting brush from popup
Show mesh portion – Shift+Ctrl+Click, release keys & drag (green selection area)
Hide mesh portion - Shift+Ctrl+Click, release keys & drag - press Alt (red selection area)
Move selection or clip area - 'press Spacebar without releasing mouse/pen
Show entire mesh - Shift+Ctrl+Click Background
Show only selected Polygroup (on fully visible mesh) - Shift+Ctrl+Click
Hide selected Polygroup (on fully visible mesh) - Shift+Ctrl+Click twice
Hide selected Polygroup (on partially visible mesh) - Shift+Ctrl+Click
Reverse visibility - Shift+Ctrl+Click & drag Background
Hide edge loop - with Lasso option selected, Shift+Ctrl+click on edge that crosses loop
ClipCurve add soft direction change - click Alt once
ClipCurve add sharp direction change - click Alt twice
reverse clip area - Alt (hold down)

Monday, October 7, 2013

Z-BRUSH: SpotLight

General Z-Brush Shortcuts

SHIFT+Z = show / hide Spotlight
z = enable / disable paint mode

" , " (comma) = show / hide Lightbox

In order for Spotlight painting to work, you have to double click on the texture in Lightbox to load the texture into the texture editor.  From there, you have to 'Add To Spotlight' in the texture panel.

Wednesday, October 2, 2013

MAYA: UV Mapping Workflow with Transfer Maps

Part of the ongoing Maya-to-Unity studies, today's exercise was to transfer UV maps to and from objects with identical vertices, that were offset to facilitate faster UV mapping.  Use:

Polygon > Mesh > Transfer Attributes (option)

Select the SOURCE first, then TARGET second.  Usually Maya tools are "Target first".
Make sure "UV Sets" are toggled on, and to use sample space: "Topology".  Transfers UV's like a charm.

Monday, September 16, 2013

UNITY: Digital Tutors: Introduction to Unity 4



CH11: Working with Physics

Mesh Collider:

  • Mass: no more than 100x other 
  • Is Kinematic: Not affected by forces or gravity, until acted upon by another rigidbody (best for doors, etc).
  • Interpolate: (change if there's glitches and twitches)
    • > None
    • > Interpolate
    • > Extrapolate 
  • Collision Detection:
    •  collision checks are done on certain frames, if object moves so fast that it misses collision check, it could pass through objects.
      • > Discreet (sparse checking)
      • > Continuous (medium checking)
      • > Continuous Dynamics (most/fast checking)
  • Constraints: Can be used to restrict rigidbody movement in specific axis
    • Freeze Position XYZ
    • Freeze Rotation XYZ
  • Rigidbodies should not intersect

CH 12: Getting Started with Scripting

A game is essentially a set of rules and systems set in place for the player to follow, which creates gameplay.
  • Before scripting, create SCRIPTS folder.
  • Three different available scripting languages:
    • JavaScript
    • C#
    • Boo
  • Use whichever language you're most comfortable with (this tutorial series uses C#)
  • Name the file using some kind of naming convention for your own sanity.
  • Unity uses MonoDevelop, but you can use Visual Studio etc. as well.

C#:

  • "using" statements allow for use of pre-made code already present in the UNITY game engine.
  • CLASS is a script in C#
    • public class HelloWorld : MonoBehavior
      • in this instance, HelloWorld is the class name
      • in this instance, MonoBehavior is the type
        • MonoBehavior inside of UNITY is a script object
  • two default functions:
    • void Start()
      • runs once for initialization
    • void Update()
      • runs once per frame
  • Debug.Log(); // basically a 'print to console' command
    • every "statement" should end with semi-colons.
  • Create a GameObject called "MessageMachine" and drop message related scripts onto this object. (or drop on to MainCamera)
    • All scripts need to be attached to an object in the hierarchy.
    • Once attached, it becomes a "component" of the GameObject
  • void Start();
    • good for initialization
  • void Update();
    • good for updating stats
      • game state win/lose conditions
      • player health, ammo, etc
      • boss health

CH 13: Creating the Player Spawn Controller

Goal: to have the player randomly spawn at one of the many designated spawn points.

Steps:

  • Create new Empty GameObject
  • Name it "PlayerSpawn_01"
  • Position "PlayerSpawn_01" into the scene
  • Duplicate and rename to "PlayerSpawn_02"
  • Position "PlayerSpawn_02" to your liking
  • Duplicate and rename to "PlayerSpawn_03" and position
  • Duplicate and rename to "PlayerSpawn_04" and position
  • Group all objects into a "TAG"
    • add TAG
    • name it "PlayerSpawn"
    • this allows us access to these objects via code
  • Make sure "First Person Controller" object is tagged as "Player"
  • Create C# Script "PlayerSpawnController"
    • Talk out what you want do first, which will give you a hint as to what you're going to need to script.
    • Will be needing arrays (lists)
    • Align the curly brackets first { }
    • Use void Awake()
      • gather all of player spawn objects:
Example:
void Awake()
{
    playerSpawnArray = GameObject.FindGameObjectsWithTag("PlayerSpawn");
}

Must declare a public variable before it can be used.


EX:
public GameObject[] playerSpawnArray;

CH14: Finishing the Player Spawn Controller

An array is basically a list to hold multiple pieces of data for a single variable.  What the above script is doing is looking for any GameObject in the scene with the tag "PlayerSpawn" until there are no more.

To get random player spawn, we need to create a new function to handle that.  We only want it to run whenever it's called, which is also another reason to embed into a function.

EX:
public GameObject GetRandomPlayerSpawn(int randNum)
{
    randNum = Random.Range( 0 ,  (playerSpawnArray.Length) );    
// set range to max playerSpawns found.

    if (playerSpawnArray.Length > 0 )
    {
        return playerSpawnArray[randNum];
    }
    // need to put something as a failsafe, in case the IF statement isn't met.
    else
    {
        return null;
    }
}

Need to initialize the "randNum" variable at the beginning, so under the main class, declare a private variable:

EX:
private int randNum;


Create an empty game object and call it "Controllers", then create another empty game object and call it "PlayerSpawnController".  Freeze both transforms, then parent "PlayerSpawnController" to "Controllers".

Add appropriate script to "PlayerSpawnController" object.

Exposing variables in Unity editor is crucial for gameplay creation.  Once you hit play, this script will populate the exposed variable with items that it has found.

CH15: Creating the GameState Script

In this tutorial, we're going to create the GameState script.  This script handles the core rules of the game.  All other scripts connect to this script, and communicates through.  Handles Player spawn, enemy spawn, placing objects, etc.

Create another C# script, and name it "GameState".  What do we want the GameState script to do?

  • find the player
  • find the playerSpawnController script
  • take the player and move the player object to one of the random spawn points
Note: Scripting is an iterative process.  Don't expect everything to work the first try.  It's a process of bug hunting + refinement.  

First step: create variables that we'll need.

Example script:

public class GameState : MonoBehavior
{
private GameObject player;
private PlayerSpawnController playerSpawnCTRL;  
// creates an object of this script class so we can access it through this script.
private GameObject randPlayerSpawn;
// create a variable to hold data created by the random player spawn script.

void Awake ()
{
     player = GameObject.FindWithTag ("Player");
     playerSpawnCTRL = GameObject.FindGameObjectWithTag("PlayerSpawnControl").GetComponent ();
     // make sure PlayerSpawnController is properly tagged
}

void Start ()
{  // we need to initialize our randNum value in this script
     int randNum = 0;
     randPlayerSpawn = playerSpawnCTRL.GetRandomPlayerSpawn(randNum);

    // actually spawn the player
     SpawnPlayer();
}

void SpawnPlayer()
{
     // take player object and move to random player spawn transform.position.
     player.transform.position = randPlayerSpawn.transform.position;
     Debug.Log("You have spawned at " + randPlayerSpawn.name );
}

}

Variable declaration tip:  " scope type name = initialValue "

Add another empty game object into the scene and rename it "GameState", then drop this script into it.



CH 16: Scripting the HUD

This chapter teaches you how to create a HUD to display feedback to the player.  I'll be doing this script in Unity, so only important notes will be put here.  Refer to project script ( available at request ) for details.

- you have to let Unity know what type of textures these are, so under "Texture Type" in the inspector, switch them over to "GUI".
- add "GUITexture" component to "HUD" object.
- you can manipulate the position of the "lantern" texture by changing the transform of the HUD object.
- Set SCALE to 0,0 and use PIXEL INSET (in pixels)
- Set Width and Height to half of what the icon size should be.

Creating a feedback C# script: " Inventory ", but it could be named anything (weapons, ammo, lantern fuel, etc)

- STATIC what is it?  Simply means "global"
- create "Texture2D" array variable to hold the textures to be used by lantern.
- Declaring Arrays requires the "[ ]" after the type of variable to indicate that it's that type, but an array.  Example:

public Texture2D[] hudFuelAmount;

- we only need updates when items are picked up, so don't use "Update()".
- create a "FuelPickup" function instead.

- Apply script to PlayerObject
- assign texture2D array elements in Unity UI (can probably use this technique for texture swapping too, for different zombie skins)

- clicking on the GEAR icon will bring up available options, rather than dragging and dropping

CH17: Creating Items in Unity

Create an item pickup that'll update our HUD.  Again, like the last chapter, this will only be notes and not a summary.  Refer to the scripts and the training videos for the actual lesson.

- import LanternFuel object
- create LanternFuel prefab
- create C# script "LanternFuel"

- use "OnTriggerEnter" event

"player.gameObject.SendMessage("FuelPickUp"); " is a form of running the function "FuelPickup". Great way of communication between scripts.  NAME HAS TO MATCH.

- " Destroy(this.gameObject); " refers to the object the script is currently on, and destroys the gameObject.

 - make sure to add a BoxCollider to your prefab, and select "Is Trigger".

Adding sound to Inventory.cs:
Add a public AudioClip variable "fuelCollectedSound"

then in your function add:
AudioSource.PlayClipAtPoint(fuelCollectedSound, transform.position);


CH18: Creating Lantern Functionality

CH19: Loading Levels

Application.LoadLevel("MainMenu"); //use this to go back to main menu
http://docs.unity3d.com/Documentation/ScriptReference/Application.LoadLevel.html

CH20: Publishing Our Game






Thursday, September 12, 2013

MAYA | UNITY: Character Joint Hierarchy

Hierarchy based off of the Official Unity Mecanim Tutorial Robot:

ROBOT (model):

  • Robot2 (geometry)
  • Root (joints)
    • Neck
      • Head
    • Ribs
      • Left_Shoulder_Joint_01
        • Left_Arm_Joint_01
          • Left_Wrist_Joint_01
            • Left_Thumb_Joint_01
              • Left_Thumb_Joint_01b
            • Left_Index_Finger_Joint_01a
              • Left_Index_Finger_Joint_01b
                • Left_Index_Finger_Joint_01c
            • Left_Middle_Finger_Joint_01a
              • Left_Middle_Finger_Joint_01b
                • Left_Middle_Finger_Joint_01c
            • Left_Ring_Finger_Joint_01a
              • Left_Ring_Finger_Joint_01b
                • Left_Ring_Finger_Joint_01c
            • Left_Pinky_Finger_Joint_01a
              • Left_Pinky_Finger_Joint_01b
                • Left_Pinky_Finger_Joint_01c
      • Right_Shoulder_Joint_01
        • Right_Arm_Joint_01
          • Right_Wrist_Joint_01
            • Right_Thumb_Joint_01
              • Right_Thumb_Joint_01b
            • Right_Index_Finger_Joint_01a
              • Right_Index_Finger_Joint_01b
                • Right_Index_Finger_Joint_01c
            • Right_Middle_Finger_Joint_01a
              • Right_Middle_Finger_Joint_01b
                • Right_Middle_Finger_Joint_01c
            • Right_Ring_Finger_Joint_01a
              • Right_Ring_Finger_Joint_01b
                • Right_Ring_Finger_Joint_01c
            • Right_Pinky_Finger_Joint_01a
              • Right_Pinky_Finger_Joint_01b
                • Right_Pinky_Finger_Joint_01c
    • Hip 
      • Left_Thigh_Joint_01
        • Left_Knee_Joint_01
          • Left_Ankle_Joint_01
            • Left_Toe_Joint_01
      • Right_Thigh_Joint_01
        • Right_Knee_Joint_01
          • Right_Ankle_Joint_01
            • Right_Toe_Joint_01

Monday, September 9, 2013

UNITY: DAN Cannon Prototype

Personal Game Dev Note:

I wasn't allowed to drag my instance of the "_GameScoreKeeper" that was in the Hierarchy into the public "Game_Commander" type object slot on the "Target", but once I turned it into a prefab I was able to drop it in no problem.

Also, didn't declare it as a "GameObject", but as a "Game_Commander" after giving the object a Game_Commander Class script.

Also(2), don't forget to declare the method as "public", otherwise it's inaccessible to other scripts.


UPDATE (2013.SEP.18):

STATIC:
Use "Static" variables, methods, classes, etc. to declare something to be part of the CLASS itself, and not the INSTANCE of the class.

Statics

You can just use the dot operator "." to access the method, and don't need to instantiate an object of that class to use it's members.

Entire classes can be static.  However, STATIC classes can not be instantiated.

NON-STATIC:
Non static variables and methods belong to the instance of the class.


ENABLE / DISABLE USING IF-STATEMENTS
Use this technique to disable GUI Buttons, etc.

PROPERTIES:


UNITY: Adding Vector Data

Figured out Vector data can be added together as variables.  Example:

"      private Vector2 offset = new Vector2(200, 200);
private Vector2 screenDim = new Vector2( Screen.width, Screen.height );
private Vector2 textLocation = new Vector2( (Screen.width / -2), (Screen.height / -2));

         void WriteCountText()
{
countText.pixelOffset = textLocation + offset;
countText.text = "Count: " + count2.ToString();
}
"

Sunday, September 8, 2013

PHOTOSHOP: Laggy Path Selection

If your interface is lagging (namely the path tools), disable Open GL draw under "Preferences" and everything is fixed.

Thursday, September 5, 2013

Scott Robertson: Rendering Form with Value

http://www.youtube.com/watch?v=OZlpcrpA5u0

Notes:

  • drop in a gradient background (dark grey on top, medium grey on bottom) to start.
    • gradient value opposite of light direction
  • Brain interprets "form" change through "value" change, not color change.
  • If you have a nice line drawing, you can put it on a top layer and set it to "Multiply" and leave it across the top.
  • Whenever you want to introduce a form change, introduce a value change.
  • Use simple top lighting.
  • Opposite value gradient to main light will ensure the silhouette is always visible.
  • Put object on a layer on it's own and check 'preserve transparency' for masking out the background.
  • Quick and dirty:
    • Use Burn and Dodge tools after setting a medium grey fill on object.
    • Dodge on any surfaces where light will hit.
      • Perpendicular to the light will be the brightest.
      • Tangent to light you get "Core Shadow", aka "Terminator"
  • Better way:
    • Make a new layer on top.
    • Click division line between base and top layer while holding "Alt", and you get a clipping path layer.
    • Set to "Multiply" so as to not lose any of the line work.
  • Look to the outside of your silhouette, and if it's an undercut, wrap the shadows around to the front surface.
  • Again, Tangent to your light source is your "Core Shadow"
  • Fill in the "Lights", Fill in the "Darks", then come back and paint in-between the values.
  • Since it's on another layer, you can tweak layer opacity to your liking.
  • Create "Cleanup" layer on top and add refinement and details.
  • Duplicate canopy section and put it on Multiply.
  • Paint in the small details inside the canopy.
    • paint in driver to show scale.
    • paint on specular.
      • soft overall
      • sharp point highlight
Refinement:
  • Take value below from background, and start painting in the bounce light on to the vehicle.
  • It's okay to airbrush over the top of line art.
  • Make sure bounce light doesn't overpower main light.
  • Any forms in the shadow side can be shown using the bounce light.
  • Begin switching from line work to "Surface"
    • To show nice lines, you need nice Surfaces.
    • Two surfaces form an Edge.
  • Put "Radius" on the flat panel edges, as well as 'hard' edges.
  • Work quickly without zooming in, "Just to make things go bump."
  • Form Change = Value Change
  • Side profile drawings are a good practice for rendering because you have to work your values.
  • Also good to work in grayscale because you can concentrate on form.
  • Tutorial currently uses a simple airbrush, but you can use a more textured brush if needed.
    • Could use a flattened elliptical brush for more of a 'painterly' look.
  • Once you get your base forms working, everything looks 3D, you can go in and start "Sculpting" the form.
  • A technique from traditional media, clean up your silhouette with colors from your background. 
That's basically it, other than adding in some color and texture on top.  More to do:
  • Noodle time!:
    • keep refining the:
      • forms
      • volumes
      • cut lines
      • radii
      • fillets
      • planes
      • adding graphics
  • Tip for graphics:
    • Marquee areas to be decals
    • Duplicate layer with marquee info
    • Darken
    • Go back and erase to clean up
  • Can also continue adding details, like mechanical bits, etc.
  • Other render tips:
    • Cool to Warm (outdoor rendering)
    • "Color Dodge" mode gives very metallic surfaces
      • have to go into layer settings and disable:
        • Blend Clipped Layers as Group
        • Transparency Shape Layers
    • CTRL + SHIFT + V: Paste back into place.
    • Incorporate value change into reflections.


Sunday, September 1, 2013

UNITY: Roll-A-Ball Tutorial

Official Roll-A-Ball Tutorial by Unity3D

http://www.youtube.com/watch?v=lv0SqtSzBxc

Tutorial 01: Setting Up the Game

  • Unity primitives are all either 1x1x1 or 1x2x1 in size when created
  • Empty Game Objects are used as directories in the Hierarchy

Tutorial 02: Moving the Player

  • Rigidbody
    • required for physics interaction
    • can be created and added directly via "Add Component" in the inspector.
  • void Update();
    • used for controller inputs, etc.
  • void FixedUpdate();
    • used for anything physics related
  • CTRL + ' when highlighting an object in MonoDevelop will bring up the reference page
  • Store "Input.GetAxis" calls in a float variable
  • use "rigidbody.Addforce" for physics based movement
  • create new Vector3 type variable to store movement
    • " Vector3 movement = new Vector3(x, y, z); "
    • " rigidbody.AddForce (movement); "
  • use " Time.DeltaTime " as frames per second

Tutorial 03: Moving the Camera

  • Tying the camera to the Player game object
    • not as simple as parenting the camera to the Player object
    • add a new script to the Camera object via Add Component
    • scripts always get added to the root assets directory, so move it to " scripts "
    • create a " GameObject " type public variable called "player" so a field will open up for drag and drop inside of Unity.
    • create a Vector3 type private variable called "offset" that the script can alter under the Start() function.
    • void LateUpdate();
      • follow cameras, procedural animations, gathering last known states
    • create reference to player GameObject by dragging in to previously created "player" slot

Tutorial 04: Play Area and Pickup Objects

  • Creating environment
    • create empty game object as a holder / folder
    • reset position back to origin
    • create geometry and put it under empty game object for organization
  • Creating Pickup items
    • create new cube
    • lift it, shrink it, and rotate 45 degrees on all axis
    • add component: script (for rotating animation)
    • not using forces, so we can use " void Update() "
    • use lower case "t", " transform.Rotate(new Vector3(15, 30, 45) * Time.DeltaTime); "
    • make into Prefab:
      • Create "Prefab" Folder
      • Drag "Pickup" item from Hierarchy into Prefab folder
        • When this is done, a Prefab Item is created
        • Item in Hierarchy now shows BLUE
    • Create empty GameObject named "Pickups" to hold our pickups in the Hierarchy view
      • Reset position to 0,0,0
    • Spread Pickup items around
      • make sure the blue prefab item itself is selected for duplication, not the group node
      • change move to "Global" instead of "Local" 

Tutorial 05: Collecting and Counting

  • In order to count items, we have to create collision detections
  • collisions have to be detected to trigger new behaviors
  • collisions have to be "tested" to see which object has been pinged
  • edit "PlayerController" script
    • but before that, let's inspect the player object
      • We're interested in the "Sphere Collider"
      • In object header:
        • turn down arrow (reveals more info)
        • icon
        • enable/disable checkbox
        • types of component
        • object sensitive gear gizmo
        • icon of little book with question mark (help)
      • Use book icon to go to offline Reference
        • Offline Reference (PC)
        • Component Help
        • Switch to Scripting Help
        • we want to use "OnTriggerEnter" function
          • can be used for detecting object collision, without actual physical collision occuring
        • "void OnTriggerEnter(Collider other)"
          • references the "other" item we collide with
        • "Destroy(other.gameObject);" 
          • destroys referenced game object that we collided with
          • destroyed game objects and all their children are removed from the scene
        • In this tutorial, we'll deactivate gameObject instead of destroying it
          • Remove the "Destroy" code
          • look up "Tag" under "GameObject"
            • Tags can be assigned to objects for identification
            • Tags must be declared in the "Tag Manager" before using
          • look up "SetActive"
            • method used to activate or disable objects
        • example code:
          • if(other.gameObject.tag == "Pickup")
          • {
            • other.gameObject.SetActive(false);
          • }
        • Basically checks if other object collided with has a Tag called "Pickup, and if it does, executes the code. In this instance, it tells the other game object to execute "SetActive" method to false.
        • In UNITY, select Pickup object and under the inspector, check the TAG list
          • add TAG
          • under the first element (0), add "Pickup"
            • name has to match exactly to the script
          • apply tag to prefab
        • Turn colliders into "Triggers"
          • static objects don't get recalculated
          • dynamic objects get recalculated
          • must add RigidBody objects
            • turn off Use Gravity
            • activate "Is Kinematic"
        • performane Tidbit:
          • UNITY calculates all Static items and holds it in memory cache
          • if we rotate a static collider, the cache gets rebuilt globally
          • adding RigidBody and turning on "Is Kinematic" excludes items from Static collider cache
          • "Is Kinematic" allows for animation through transforms (IE: elevators and moving platforms)

Tutorial 06: Displaying Text

  • We need a tool to store collection count, and tool to add on top
  • Add these tools to "PlayerController" script
    • add private variable "count"
    • initialize to zero under Start();
      • count = 0;
    • under "void OnTriggerEnter(Collider other)"
      • add: " count = count + 1 "
  • Displaying Info via GUI Text:
    • Add new empty GameObject: " Display_Text", transform 0,0,0
    • Create "GUI Text" gameObject
      • Parent to "Display_Text" game object
    • Move to " Upper Left "
      • 0,0 = lower left
      • 1,1 = upper right\
    • Set Transform to 0,1,0
    • Then use "Pixel Offset" setting in the GUIText
      • X = 10, Y = -10
    • Under "PlayerController" script:
      • add new public "GUIText" variable called "countText"
        • this opens up another slot in Unity that allows for drag and drop
      • initialize "countText" to: 
        • "Count: " + count.ToString(); 
          • count.ToString(); must be after "count" has an initialized value
      • update "countText" everytime an object is picked up
        • under "void OnTriggerEnter(Collider other)"
          • add "countText.text = "Count: " + count.ToString();
      • create new function instead of typing "countText.text = ....." repeatedly
        • void SetCountText()
        • {
          • countText.text = "Count: " + count.ToString();
        • }
      • add function call to respective locations of the script
      • drag GuiText object into new "PlayerController" script slot
      • VOILA!
  • Displaying WIN condition:
    • create new GUIText object "WinText"
    • parent to DisplayText game object
    • add reference to PlayerController script:
      • create new public GUIText variable: " winText "
      • initialize winText.text = ""; // empty text
      • under " SetCountText()" function:
        • add:
          • if (count >= 12)
          • {
            • winText.text = "YOU WIN!";
          • }
      • save and return to unity
      • drag-associate WinText object to the PlayerSphere reference call (drop it into the field)

Tutorial 07: Publishing the Game

  • Unity can build to all to all target platforms
  • Open Build Settings
  • Current build settings are denoted by the UNITY icon
  • Switch build platform by highlighting target platform, and hitting "Switch Platform"
  • Add current scene to build by clicking "Add Current", or drag and drop any scenes from Project folder to the "Scenes to Build" field
    • include only the scenes needed
  • Hit "Build" button
  • Create new folder under main project root folder called "Builds"
  • Name the build, and Save

Thursday, August 29, 2013

Kiwinuptuo's Color Palette Tutorial

http://kiwinuptuo.deviantart.com/art/Pixel-Art-Tutorial-Colors-184802567

Notes:

  • Base: Pick based on Marc Brunet's Color Theory (http://bluefley.blogspot.com/)
  • Shadows:
    • Hue: Move away from center
    • Saturation: More Saturated
    • Value: Darker value
  • Highlights:
    • Hue: Move toward center
    • Saturation: Less saturated
    • Value: Lighter value

Wednesday, August 28, 2013

MAYA: Creating Layered Mia_Material Shaders Tutorial

http://vimeo.com/23032246

In order to use a LayeredTexture with Mia_Materials, use a SurfaceShader and manually connect the "Result" from the Mia_Material, to the "outColor" of the SurfaceShader.  Then plug the SurfaceShader into the LayeredTexture.

BAM. Layered Mia_Materials textures.

Thursday, August 22, 2013

Drawing: Art Marker Tips & Techniques

Tips:
  • When lines show up during fills, stroke the opposite direction to get rid of them.
  • Colorless Blender markers are great for erasing and blending on tracing paper.
    • can also load multiple colors on the clear nib and do strips.
    • can use plastic palette to mix colors.
    • just remember to clean off blender.
  • put acetate or plain white paper to modify bleed characteristics.
  • can use Prismacolor color pencil to correct overly darkened values.
  • Vehicles:
    • always have a ground shadow
    • find your dark areas (optional technique)
    • otherwise, render from light to dark (since there's no UNDO) aka. "Sneak Up" on the values.
    • ground colors bounce off and show in areas close by.

Wednesday, August 21, 2013

UNITY: General Unity Notes

This will be an on-going post with all the little small tidbits I've found while working with Unity.

UPDATE: Each section of the manual will now be broken into sub-categories, starting with " Creating Gameplay "

2013.SEP.11:

Robust C# language feature to prevent clashes between scripts. " Enemy.Controller1 "

Scripts in a later phase can utilize variables and functions in an earlier phase, but not vice versa.  Compile order:
  • Phase 1: Standard Assets, Pro Standard Assets, Plugins
  • Phase 2: Standard Assets/Editor, Pro Standard Assets/Editor, Plugins/Editor
  • Phase 3: All other scripts not inside a folder called Editor
  • Phase 4: All remaining scripts (example: ones inside the Editor folder)
Anything inside a folder called WebPlayerTemplates will not be compiled.

Event Functions:
Update events, Initialization events, GUI events, Physics events:
Awake(), Start(), Update(), FixedUpdate(), LateUpdate(), OnGUI(), etc.

"Transform.Find" Function:
This can be useful when an object has a child that can be added or removed during gameplay. A weapon that can be picked up and put down is one example.

Direct Component Access:
If a public variable of a "Component Type" is declared, you can drag any GameObject that has the component attached to it. This will access the component directly, rather than the GameObject itself.

Unity uses industry standard "Substance" shaders.  Procedural shaders take a much smaller storage footprint than a bitmap image.

Unity Built-In Shaders Guide
Extensive guide regarding Unity's built-in shader models.

Alpha Maps Guide
Guide to creating Alpha maps in photoshop.

Detail Meshes:
Use for any static terrain decorations that are not Trees or Grass.

Grass:
Same as Trees, but doesn't require a mesh.  Just need a texture.

Create:
  • Create > GameObject > Create Other > Wind Zone 
Use Unity's built in TREE BUILDER utility.  
  • add Branch Group
  • tweak
  • add Leaf Group
  • tweak
  • import "Tree Creator" asset package
  • add Materials
    • Nature > Tree Creator Bark
    • Nature > Tree Creator Leaves
  • select Nodes in NodeTree
    • apply Bark shader
    • apply Trees shader

Textures:
Use the "RGBS" format: Store "Specular" information in the Alpha channel, and save with TIFF.  Doesn't work with PNGs.

In order to paint normal map "Splat maps", you have to make sure the Terrain has a normal-map-capable shader applied to it.

If you have 2 or more Terrain textures applied, you can begin to 'Blend' them together using a method similar to Photoshop layer masks.

Using Camera Depth, a variety of effects can be done. One example would be to have Depth 0 render the environment, then Depth 2 render the player's UI and the FPS weapon. That way the UI and weapon is always drawn on top, regardless of penetration etc between gun object and environment.

Prefabs:
Prefabs and Assets are different.  Assets have certain limitations that Prefabs do not when working in the project.

You can assign an icon to an object by clicking on the icon next to the name in the Inspector, then selecting one of the default icons, or a custom icon of choice.  Name of object will be displayed as well.

Object Labels:
Items in the Project view can be labeled by clicking the little blue "..." in the object's preview.  Custom labels can be created by just typing in a name.

Component View:
There are two main types of Properties: Values and References.

2013.SEP.03:

Unity Effects!

Easily put a trail on bullets this way.


2013.SEP.0C.D: Unity Beginner Scripting (Unity Official)

" Classes "
Use classes to to store and organize your information, and how to create constructors to work with your class.

Analogy:

  • Classes : Factory
  • Functions : Machines
  • Variables : Boxes
Example scripts: (basic movement, inventory, and shooting):

Name of classes should be the same as the script.  Avoid changing it unless absolutely necessary.  A class is a container for variables and functions, an organizational tool for "object oriented programming".  The idea is to split the script into multiple scripts, each handling one task.

A PlayerControl script that has all "movement", "inventory", and "shooting" all in the same script should be spit into individual scripts.  Each script handling a task makes it easier to read and more efficient to write.

Sub-Classes can be created within the script/class, and can be instantiated within the same script. 

Example:

//declare sub-class
public class Stuff
{
    public int bullets;
    public int grenades;
    public int rockets;
}
//creating an Instance (an object) of the "Stuff" class
public Stuff myStuff = new Stuff();

Data type: name of the class,  Name: "myStuff",  new,  end with name of class again.  Using " () " at the end means that a "constructor" is being used.

A " Constructor " is a function that can give default values to the variables in your class.

Example 01:
// Constructor, this goes inside sub-class
public Stuff ()
{
    bullets = 1;
    grenades = 1;
    rockets = 1;
}

Example 02:
// Constructor example 2, using parameters
public Stuff (int bul, int gre, int roc)
{
     bullets = bul;
     grenades = gre;
     rockets = roc;
}

Then instantiate using:
" public Stuff myStuff = new Stuff(50,5,5); "
This will instantiate a "new" instance of "Stuff", a "Stuff" type variable, with 50 bullets, 5 grenades, and 5 rockets.

Notes about Constructors:
  • name of the Constructor is always the name of the Class
  • Constructors never have a return type, not even "void"
  • a Class can have multiple different Constructors, but only one is called when an object is initialized
  • different instances of the Constructor will be used depending on their parameters

" Instantiate " 

Create clones of Prefabs during run time.

One example is firing a Rocket from a bazooka.  Each Rocket would have to be instantiated into the game world so that it could be fired.

Example:
(inside instantiate script class)
public Rigidbody rocketPrefab;
public Transform barrelEnd;

void Update()
{
   if(Input.GetButtonDown ("Fire1"))
   {
      Instantiate(rocketPrefab);
   }
}

Drag and drop Prefab item into the public field.  Unfortunately, this setup will only instantiate the object at origin (0,0,0).  Instead, create an empty GameObject and position it at the barrel.  Drag this object into the Transform variable field "barrelEnd".  Then use:

" Instantiate (Prefab to clone, Position, Rotation to use); ", which would be:

" Instantiate ( rocketPrefab, barrelEnd.position, barrelEnd.rotation ); "

Rocket should be created at barrel tip, but falls down. To remedy this, define a new "Rigidbody" types variable called "rocketInstance", then define rocket instance:

Rigidbody rocketInstance;
rocketInstance = Instantiate(rocketPrefab, barrleEnd.position, barrelEnd.rotation) as Rigidbody;

At this point, you can use anything in the Rigidbody class, such as:

Rigidbody.AddForce (Transform.forward * amount);
or
" rocketInstance.Addforce (barrelEnd.forward * 5000); "

All is well, except that these objects need to be destroyed or else they'll eat up memory.  Create a new script that destroys the object over time.

script:
public class RocketDestruction : MonoBehavior
{
   void Start ()
   {
      Destroy (gameObject, 1.5f);
   }
}


2013.SEP.02.C: Unity Beginner Scripting (Unity Official)

" Delta Time "
Can be used in games to smooth and interpret values.  "Delta" means difference, and Time.DeltaTime is the time between each Update() or FixedUpdate().  Can be used to smooth out movement inputs, or other values.  It changes movement values to "per second" rather than "per frame".

Use: Multiply variable by " Time.DeltaTime "



" GetComponent "
Use this function to address properties of other scripts or components.

A script in Unity is considered a custom component.  "GetComponent" is used to modify other scripts on the same GameObject, or even other objects.  The function is very expensive, and should only be called on the "Awake()" function or "Start()" function.

Use:
" GetComponent(); "
" otherGameObject.GetComponent(); " (after declaring a proper variable)


" OnMouseDown "
Can detect clicks on Colliders or GUI Text elements.

Use:
void OnMouseDown()
{
    (Do something) ;
}

example things that can go between the curlies:

  • rigidbody.AddForce( transform.forward * 500 );
  • rigidbody.useGravity = true; 

2013.SEP.02.B: Unity Beginner Scripting (Unity Official)

" Destroy "
  • Use:
    • " Destroy(GameObject/Component, optional delay); "
  • by default, this destroys the current game object, along with its attached script, but a public GameObject variable "other" can be created, so another object can be referenced within Unity.
  • "GetComponent" function
    • Use: " Destroy (GetComponent(); "
  • a timed delay can be employed as the optional 2nd argument
    • Use: " Destroy(gameObject, 3f); " (floats only)
" GetButton and GetKey "

Part of Unity's "Input" Class.  Buttons return a Boolean.
  • when nothing is pressed:
    • GetButtonDown: FALSE
    • GetButton: FALSE
    • GetButtonUp: FALSE
  • when button is pressed:
    • GetButtonDown: TRUE
    • GetButton: TRUE
    • GetButtonUp: FALSE
  • when button is released:
    • GetButtonDown: FALSE
    • GetButton: FALSE
    • GetButtonUp: TRUE
It's recommended to use "GetButton" over "GetKey" because players can configure them before game launches.  You can configure buttons via "Input Manager" under the Edit menu.

Examples:
  • GetButton Syntax: " bool var = Input.GetButton("string"); "
  • GetKey Syntax: " bool var = Input.GetKey(Keycode.key); "

" GetAxis "

Unlike GetButton and GetKey, "GetAxis" returns a float value between -1 and 1.  Axis are setup in the Input Manager under the Edit menu.  Also unlike a button which only is a positive button value, GetAxis also needs a negative button value.  Other settings required for setting up an Axis:
  • Gravity:
    • speed of return to zero. Higher values snap, lower values float.
  • Sensitivity:
    • opposite of Gravity, speed of getting to 1 or -1. Higher value the more responsive, lower the value the more smooth.
  • Dead:
    • if using a joystick, controls the deadzone.
  • Snap:
    • returns to zero if both positive and negative buttons are held (for buttons)
To use: 
  • " float h = Input.GetAxis("Horizontal"); "
  • " float v = Input.GetAxis("Vertical"); "
" Input.GetAxisRaw "
Only returns whole values, useful for 2D that requires precise controls rather than smooth values (JWX NOTE: For menu navigations, etc).

2013.SEP.02:

" Translate and Rotate "
  • transform.Translate(new Vector3(0,0,1));
    • takes new vector3
    • inside the Update();, it'll be updated by every frame
    • multiplying by "Time.DeltaTime" will convert this from a frame by frame operation to a X-per-frame operation.
    • can use shortcuts, Vector3.forward, Vector3.up, etc.
    • multiply "moveSpeed" variable 
    • only use when RigidBody "Is Kinematic"
" Look At "
  • can be used to point and object's FORWARD vector to another object's transform location
  • " transform.LookAt(target); "
  • add public Transform type variable called "target"
  • drag gameObject from Hierarchy into the "target" field in Unity UI
" Lerping "

Vector3.Lerp:
  • used to smooth a transition between two Vector3 values
  • short for "Linear Interpolate"
  • use: " Vector3.Lerp(from Vector3. to Vector3. time float) "
    • Lerp(from, to, time);
      • Lerp(transform.position, newPosition, Time.DeltaTime);
        • can multiply Time.DeltaTime with a float
Mathf.Lerp:
  • used to smooth out two float values
  • use " Mathf.Lerp(from float, to float, time float) "
  • encapsulate in function that runs every frame (Update(), etc)
Color.Lerp:
  • used for Lerping color values
  • use " Color.Lerp(from Color, to Color, time float) "
  • encapsulate in function that runs every frame (Update(), etc)
Use "void Awake () " function for defining new Lerp Variables.

2013.AUG.30:

  • "object.enabled = true" to enable objects
  • "object.enabled = false" to disable objects
  • "object.enabled = !object.enabled" to toggle
    • "!" exclamations are used to denote "not"
  • "gameObject.SetActive(true)" 
  • " Debug.Log("Active Self: " + myObject.activeSelf); "
    • returns a boolean of whether or not the object itself is active
  • " Debug.Log("Active Hierarchy: " + myObject.activeHierarchy); "
    • returns a boolean of whether or not the object Hierarchy is active
  • void Update ();
    • frame rate dependent, and frame rate fluctuates depending on load
    • for things like controllers
  • void FixedUpdate ();
    • refresh is fixed, update is consistent
    • used for things requiring physics
  • void LateUpdate();
    • follow cameras, procedural animations, gathering last known states

2013.AUG.29:

  • .ToString();
    • method used to cast a result to a string.

2013.AUG.20:

  • Negative Z-Axis is "Forward"
  • Use Mathf.Ceil to set a ceiling and cast to integer displays
  • Use Mathf.Lerp and Mathf.LerpAngle for smoothing operations

Tuesday, August 20, 2013

UNITY: Creating a Driveable Vehicle in Unity 3D (youtube)

http://www.youtube.com/watch?v=21zuMIsy2GM&feature=youtube_gdata_player

Notes:

MAYA:

  • make sure units are set to METERS so that units are 1:1 with Unity.
  • Length and Width: 5.0 units
  • Grid Lines every: 1.0 units

  • Average car is about 4m long, 1.5m wide.
  • label your body and wheels.
  • Delete History and Freeze Transformations.
  • Move model to properly sit on ground plane in Maya (keep transform)
  • export FBX (to Unity folder if you'd like)

    • mesh
    • units: meters, scale factor of 1.0
UNITY:
  • import FBX model into "ASSETS" folder.
  • enter scale factor of 1.0 under model's inspector panel.
  • turn off keyframe reduction.
  • hit APPLY to save information (important!)
  • drag icon into Unity scene.
  • FBX Export automatically creates group node, but in this case we don't need it so pull the assets out of the group node.
  • directly parent wheels under CHASSIS of car
    • chassis >
      • wheel_frontLeft
      • wheel_frontRight
      • wheel_rearLeft
      • wheel_rearRight
  • insert ground plane
  • zero out ground plane transforms (0,0,0)
  • (optional) add texture to ground plane
  • create empty GameObject and name it "WheelColliders"
  • zero out node to (0,0,0)
  • duplicate and name "FL_WheelCollider", which will be a template for the rest of the wheels.
  • Add GameObject>WheelCollider to "FL_WheelCollider"
  • Duplicate to the following structure:
    • WheelColliders>
      • FL_WheelCollider
      • FR_WheelCollider
      • RL_WheelCollider
      • RR_WheelCollider
  • line up all WheelColliders with actual wheel art assets
    • move CENTER xyz via INSPECTOR, not through the Scene View.[ !! ]
    • size using RADIUS
    • rinse + repeat for other wheels, with given information (size, position)
  • Add Rigidbody to CHASSIS of car object (top group)
    • change mass to 2000 (Unity units are metric, mass in KG)
    • interpolate set to "interpolate" (smooths out collisions)
  • Add BoxCollider to CHASSIS
    • (from different tutorial)
      • rough out the collision shape of your vehicle
  • Add CarScript to CHASSIS
    • configure front Left and Right wheels for steering (script dependent)
    • configure GEARS
      • number of gears
      • gear ratios
        • 4.31, 2.71, 1.80, 1.41, 1.13, 0.93 (basic 6 speed)
      • engine torque: 90
  • Add WheelAlignment Script to each of the wheel geometry
    • input corresponding Wheel Collider per wheel
  • Add Audio source (Car script calls for it)
BAM. Car.

Friday, August 16, 2013

UNITY: 3D-Motive C# Vol1 Notes

Notes: 

04: Creating Hello World Application
  • - print ("hello world");   prints "hello world" to console
  • - every script has to be attached to a game object to run
  • - USE THIS INSTEAD OF PRINT COMMAND:
    • Debug.Log("hello world");
05: Variables
  • are most important in programming
  • storing information for health, ammo, money etc.
  • the way computers remember data
  • "public" variables show up in the inspector, and also can be accessed by other scripts.
06: Writing Expressions with Variables
  • use "instantiate" for shooting objects
  • variable = variable -1;  // equivalent to decrement --
07: Enumerations
  • enumerations are lists of things
  • "enum" instead of "int", "float", etc
    • public enum Weapons {Pistol=0, Rifle=1, ChainGun=2, Plasma=3};
    • public Weapons WeaponWeAreCarrying;
  • inspector only shows variables, not enumerations
  • once "Weapons" is turned into a variable, it shows up as the variable name and appears in the inspector as a LIST.
08: Constants
  • consider constants (const) as shortcuts.
  • cannot change over time or be manipulated (just like Arduino CONST)
  • label constants in UPPER_CASE, to delineate difference between it and variables.
09: Conditional Statements and IF
  • for "out of ammo" scenarios 

10: For Loop
  • weapon modes (shotgun vs handgun)
  • for doing similar repetitive tasks
    • example:
    • for (int = i; i < 3; i++){
      • does something
    • }
  • "i" is very popular to use because it stands for "iterator"
11: While Loop
  • can be used to dump all ammo available
    • example:
    • while(ammo > 0){
      • does something
    • }
12: Functions Introduction
  • void = return data type for things that don't return anything
  • encapsulated set of instructions
13: Events Introduction
14: Function with Arguments and Returns
  • Create a weaponFire function instead of calling the code directly.
    • EXAMPLE in "PlayerControl" of Project
  • Functions can have a string output in it as a return so it can be dumped to Debug.Log();
  • Using functions can save an enormous amount of work
15: Classes Introduction
  • a class is a way to organize a collective of all sorts of behaviors
  • can contain variables, functions, etc.
  • Usually, classes are contained in one script each
16: Rotating Objects with the Transform Class
  • put instructions under "Update()" because it's redrawn every frame
    • allows for illusion of 'continuous motion'
  • Check Unity reference manual routinely to see what functions inside classes do
  • " Time.deltaTime " is equivalent to "per second"
    • tranform.Rotate (0, 90 * Time.deltaTime, 0, Space.Self);
      • calls the transform class function "Rotate", and rotates 90 degrees per second.
17:  Unity Class Documentation (navigating the site)
18: Derived Classes Introduction
  • not used ALL the time, but can be handy if objects share behavioral functionality.
19: Extending a Class
  • useful as a class modifier
    • Example: "Enemy" and "SuperEnemy" modifier
  • change from:
    • public class SuperEnemy : MonoBehaviour {
  • change to:
    • public class SuperEnemy : Enemy {
  • instructions are inherited from "Enemy" class, along with the "SuperEnemy" instructions
  • extends functionality
20: MonoBehaviour
  • by default, all Unity scripts derive from "MonoBehaviour"
  • Javascript automatically derives from MonoBehavior, but C# and Boo you have to explicitly derive from MonoBehaviour
  • explore MonoBehaviour


Tuesday, August 13, 2013

DRAWING: ProkoTV: Gesture Drawing

http://www.youtube.com/watch?v=74HR59yFZ7Y

Gesture Drawing Important Concepts:
- The Longest Axis: looking at a form's gesture, look to this first
- CSI: Simplified, look for and use only C-curve, S-curve, and straight line (I)

  • can use combinations of these curves down the figure
  • use as few lines as possible
- Line of Action:
  • start by finding longest action line, a line that connects head to toes
  • always a directional flow if line doesn't connect from head to toe
- Relaxed and Tense curves:
  • 'bendiness' of the curve changes how it feels
    • long fluid curve feels relaxed
    • compress curve adds more energy and tension
    • compress curves far enough and you can use a 'zig zag'
      • tension
      • sharp corners
      • fast movement
    • Use ZIGZAG for tension 
    • Use FLOWING CURVE for smooth relaxed
- Asymmetry of Body
  • alternates:
    • head
    • neck
    • torso
    • pelvis
    • upper leg
    • lower leg
  • alternating C-curves that lead eye down body
  • tendency to draw symmetrically leads to stiffness
- PRACTICE: Draw MOTION, not CONTOUR

Monday, August 12, 2013

UNITY: Unity Strategy Games[2]: Mouse Click Feedback (tutorial)


  1. - Raycast information only stores the hit on the first thing it collides with.
  2. - can put object in 'ignore raycast layer'
  3. - nest animations under hierarchy layer: raycast hit to point item group to ground, then use script to animate item position itself for an animated object indicator.
  4. - Input.GetMouseButton(1); // mouse buttons:
    1. button 1 = 0 (Left)
    2. button 2 = 1 (Right)
    3. button 3 = 2 (scrollwheel)
  5. use animation panel to create animations within Unity.
  6. Animation system: can add keyframes and EVENTS.  Events can call for functions like in actionscripting.
  7. Destroy(this.gameObject);
    1. Destroys this game object.
//------------ code bit --------------
void DestroyObject()
{
     Destroy(this.gameObject);
}
//------- end code bit --------------

to destroy parent:


//------------ code bit --------------
void DestroyObject()
{
     Destroy(this.gameObject.transform.parent.gameObject);
}
//------- end code bit --------------



UNITY: Unity Strategy Games[1] Core Mouse Control (tutorial)

I've decided that the only way I'll remember any of the tutorials I've watched is to write notes.  Guess what I'll be using this blog for.

Unity: RTS Mouse Control (by Unity Chat):
http://www.youtube.com/watch?v=g1P2Q9xKCAs

Notes:
- Camera.ScreenPointToRay: draws a line from where you click on screen, to where it lands in 3D space.

- Debug.DrawRay(ray.origin, ray.direction*rayCastLength, Color.yellow);: Draws a yellow indicator of raycast hit.  Can only be seen in the 'SCENE' view.

- to put an item at the mouse location, tell the GameObject (whatever item you want at your mouse point) to make it's transform the position of the ray hit.

5 Fundamental Skills Every Artist Should Master

1. COMPOSITION
2. PERSPECTIVE
3. VALUE
4. COLOR
5. LIGHTING

http://psd.tutsplus.com/articles/theory/fundamental-skills/