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();
}
"
Monday, September 9, 2013
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:
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=lv0SqtSzBxcTutorial 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:
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.
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.
Subscribe to:
Posts (Atom)