programming

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

Unity 3D – Cloth Simulation

Unity 3D – Cloth Simulation

Base

1. MAIN TOP MENU> GameObject> Create Other> Sphere

2. MAIN TOP MENU> GameObject> Create Other> Cloth, put the cloth over the Sphere

3. InteractiveCloth> Inspector> Interactive Cloth> Mesh> select a mesh

TOP BUTTON ‘Play’

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Cloth Simulation

Unity – Build – Web Player

Unity – Build – Web Player

0. MAIN TOP MENU> File> Buil Settings> Select Web Player

1. MAIN TOP MENU> File> Buil Settings> ‘Player Settings’> Inspector to setup

2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Scenes in Build> DRAG AND DROP the _Scenes> YourScene

3. 2. MAIN TOP MENU> File> Buil Settings> ‘Build’> Create Folder ‘Builds/space_shooter’> Save

Web Player Streaming

1. MAIN TOP MENU> File> Buil Settings> check ‘Streamed’
2. MAIN TOP MENU> File> Buil Settings>’Player Settings’> Inspector> Other Settings> First Streamed Level

Advantage:

1. If there is a fast download of the first level you will not see the loader progress bar
2. Not annoing download time improves web gaming experience for the end user

This is the best way:

50 KB display the logo and menu (4 seconds)
320 KB let the user play a tiny tutorial level or let him do some fun interaction in the menu (20 seconds)
800 KB let the user play the first small level (50 seconds)
Finish downloading the entire game within 1-5 MB (1-5 minutes)

There is no reason why all music must be available when the game starts. Externalize the music and load it via the WWW class

Reference:
http://docs.unity3d.com/Documentation/Manual/WebPlayerStreaming.html

By |Unity3D, Video Games Development|Commenti disabilitati su Unity – Build – Web Player

Unity 3D – Pathfinding – NavMesh Agent – Adventure – Point ‘n Click

Unity 3D – Pathfinding – NavMesh Agent – Adventure – Point ‘n Click

1. Create a NavMesh

2. Create a Sphere, Inspector> TOP RIGHT uncheck ‘Static’, name it ‘hero’

Hierarchy select ‘hero’> Inspector> ‘Add Component’> Navigation> NavMeshAgent, setup:

– Radius: l’ingombro dell’agente

– Speed: massima velocità dell’agente (utile per i giochi di corsa!)

– Acceleration: accelerazione massima dell’agente

– Angular Speed: velocità con la quale è in grado di girare

– Stopping Distance: distanza alla quale inizia a rallentare in prossimità di ‘targetNavigation’

– Auto Traverse Off Mesh Link:

– Auto Braking: se attivo l’agente si ferma automaticamento al raggiungimento di ‘targetNavigation’

– Auto Repath: se attivo l’agente ricalcola il percorso se quello precedente non è più valido

– Height: l’altezza dell’agente

– Base Offset: offset verticale del collider dell’agente

– Obstacle Aviodance Type: High Quality – Low Quality – precisione del calcolo per schivare gli ostacoli (meno è accurato, meno risorse occupa)

– Avoidance Priority: priorità nella navigazione, un personaggio con priorità 1 avrà la precedenza (passa prima) rispetto un personaggio con priorità 2

– NavMesh Walkable: quale ‘Navigation Layer’ può attraversare

4. Select the ‘hero’ and assign:

SimpleAgentScript.js


#pragma strict


        // Script to move a NavMeshAgent to the place where
        // the mouse is clicked.
	private var agent: NavMeshAgent;
	function Start () {
		agent = GetComponent.<NavMeshAgent>();
	}
	function Update () {
		var hit: RaycastHit;
		// When the mouse is clicked...	
		if (Input.GetMouseButtonDown(0)) {
			// If the click was on an object then set the agent's
			// destination to the point where the click occurred.
			var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
			
			if (Physics.Raycast(ray, hit)) {
				agent.SetDestination(hit.point);
			}
		}
	}

By |Unity3D, Video Games Development|Commenti disabilitati su Unity 3D – Pathfinding – NavMesh Agent – Adventure – Point ‘n Click