Unity3D – Lights Flares

Unity3D – Lights Flares

Assign Light Flare to a light

Lens Flares simulate the effect of lights refracting inside camera lens

0. MAIN TOP MENU> GameObject> Create Other> Pointlight

1. MAIN TOP MENU> Assets> Import Package> Light Flares

2. Project> Standard Assets> Light Flares> 50mm Zoom DRAG AND DROP over Pointlight> Hierarchy> Light> Flare

Assign Light Flare to a Empty Object

1. MAIN TOP MENU> GameObject> Create Empty (GameObject)

2. Hierarchy> GameObject> ‘Add Component’> Effects> Lens Flare

2. Project> Standard Assets> Light Flares> 50mm Zoom DRAG AND DROP over GameObject> Hierarchy> Lens Flare

By |Unity3D, Video Games Development|Commenti disabilitati su Unity3D – Lights Flares

Unity3D – Lights Cookies

Unity3D – Lights Cookies

Assign Light Cookie

Light Cookies are grayscale textures you use to control the precise look of in-game lighting.

0. MAIN TOP MENU> GameObject> Create Other> Spotlight, project the light over a plane

1. MAIN TOP MENU> Assets> Import Package> Light Cookies

2. Project> Standard Assets> Light Cookies> FlashLight DRAG AND DROP over Spotlight> Hierarchy> Light> Cookie

Create Light Cookie

To create a light cookie for a spot light:

Paint a cookie texture in Photoshop. The image should be greyscale. White pixels means full lighting intensity, black pixels mean no lighting. The borders of the texture need to be completely black, otherwise the light will appear to leak outside of the spotlight.
In the Texture Inspector change the Texture Type to Cookie
Enable Alpha From Grayscale (this way you can make a grayscale cookie and Unity converts it to an alpha map automatically)

By |Unity3D, Video Games Development|Commenti disabilitati su Unity3D – Lights Cookies

Unity 3D – Camera – Third Person Control

Unity 3D – Camera – Third Person Control

1. Create a ball that rolls over a plane

2. Creare a Camera with:
– CameraController.js

#pragma strict

public var player : GameObject;
private var offset :  Vector3;

function Start () {
offset = transform.position;
}

function LateUpdate () {
//LateUpdate is called after all Update functions have been called. 
// This is useful to order script execution. For example a follow camera should always be implemented in LateUpdate because it tracks objects that might have moved inside Update.
transform.position = player.transform.position + offset;
}

2. Hierarchy DRAG AND DROP ‘ball’ GameObject over Inspector> CameraController.js ‘player’ variable slot.

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Camera – Third Person Control

Unity – Image Effects

Unity – Image Effects

They are Render Texture-based fullscreen image postprocessing effects.

MAIN TOP MENU> Assets> Import Package> Image Effects

Project> Standard Assets> Image Effects (Pro Only)> DRAG AND DROP the scripts over the Hierarchy> Camera

NOTICE: You can apply multiple Image Effects to the same camera.

Complete List:

Antialiasing (PostEffect)

Bloom
FastBloom
Bloom and Lens Flares

Blur Effect
Blur
Camera Motion Blur

Color Correction Curves
Color Correction
Color Correction Lookup Texture

Contrast Enhance
Contrast Stretch

Crease

Depth of Field 3.4
Depth of Field

Edge Detection
Edge Detect Effect Normals

Fisheye

Global Fog

Glow

Grayscale

Motion Blur

Noise And Grain
Noise

Screen Overlay

Sepia Tone

Sun Shafts

Screen Space Ambient Obscurance
Screen Space Ambient Occlusion (SSAO)

Tilt Shift
Tilt Shift

Tonemapping

Twirl

Vignetting (and Chromatic Aberration)

Vortex

By |Unity3D, Video Games Development|Commenti disabilitati su Unity – Image Effects

Unity 3D – Get Axis – rigidbody.velocity

Unity 3D – Get Axis – rigidbody.velocity

1. Create a Plane (Ground) with:
– Mesh Collider

2. Create over the plane a Sphere with:
– Mesh Collider
– Rigid Body
– PlayerController.JS:

#pragma strict
 
function Start () {
 
}
// Theese variables are public to make the code easy-reusable
// You can setup theese variables from Inspector
var speed : float;

function FixedUpdate () {
     // Get User Input START
     var moveHorizontal : float= Input.GetAxis ("Horizontal");
     var moveVertical : float= Input.GetAxis ("Vertical");
     // Get User Input END

     var movement : Vector3= new Vector3 (moveHorizontal, 0.0f, moveVertical);
    rigidbody.velocity = movement * speed;
}
By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Get Axis – rigidbody.velocity