Spaceship Starter Kit

starterKit
The Spaceship Starter Kit has the assets you need to get up and running with any space game idea you could have!

Get it from the Unity Asset Store here!

In addition to two spaceships (one, obviously, a paragon for all that is good, the other, well, let us just say could have been hugged a little more), we have included a number of background assets, effects and examples to get you on your way.

—–

The Spaceships:
– Triangle counts: ~12,000 / ~6,500 / ~3000 (for High, Mid and Low versions)
– Texture resolutions: 2048k maps (work with both the Unity Standard Shaders as well as our included physical ones)
– Rigs: Both ship sets are rigged allowing for movement of flaps, rotation of wings, engine adjustments, etc.

—–

Extras:
– Skybox
– Asteroids
– Various effects (dust clouds, tracers, hit models, etc.)
– 4 Example scenes (the screenshots are straight out of these scenes in Unity Free)

—–

—–

Below is our Physically Based Shader – use at your own risk

//Based on http://wiki.unity3d.com/index.php/Physically-inspired_Shader

Shader “TWLC/Physically Based Shading” {

Properties {

_Color (“Color”,Color) = (1,1,1,1)

_MainTex (“Base (RGB)”, 2D) = “white” {}

_Reflections (“Reflection Cubemap”, CUBE) = “black” {}

_BumpMap (“Normalmap”, 2D) = “bump” {}

_RoughnessMap (“Roughness Map”, 2D) = “white” {}

_SpecularPower (“Specular Power”, Range(1,255)) = 1

_Roughness (“Roughness”,Range(0.01,1)) = 0.01

_SpecularColor (“Specular Color”, Color) = (0,0,0,0)

}

SubShader {

Tags { “RenderType”=”Opaque” }

LOD 200

Fog {Mode Off}

CGPROGRAM

#pragma target 3.0

#pragma glsl

#pragma surface surf Physical

sampler2D _MainTex;

samplerCUBE _Reflections;

sampler2D _BumpMap;

sampler2D _RoughnessMap;

float4 _Color;

float _SpecularPower;

float4 _SpecularColor;

float _Roughness;

struct Input {

float2 uv_MainTex;

float3 worldRefl;

INTERNAL_DATA

};

half4 LightingPhysical( SurfaceOutput s, half3 lightDir, half3 viewDir, half atten )

{

float n_dot_l = saturate( dot( s.Normal, lightDir ) * atten );

float3 diffuse = n_dot_l * _LightColor0.rgb;

float3 h = normalize( lightDir + viewDir );

float n_dot_h = saturate( dot( s.Normal, h ) );

float normalization_term = ( ( _SpecularPower * _Roughness ) + 2.0 ) / 8.0;

float blinn_phong = pow( n_dot_h, _SpecularPower * _Roughness );

float specular_term = blinn_phong * normalization_term;

float cosine_term = n_dot_l;

float h_dot_l = dot( h, lightDir );

float base = 1.0 – h_dot_l;

float exponential = pow( base, 5.0 );

float3 specColor = _SpecularColor.rgb * s.Gloss;

float3 fresnel_term = specColor + ( 1.0 – specColor ) * exponential;

float3 specular = specular_term * cosine_term * fresnel_term * _LightColor0.rgb;

float3 final_output = s.Albedo * diffuse * ( 1 – fresnel_term ) + specular;

return float4( final_output, 1 );

}

void surf (Input IN, inout SurfaceOutput o) {

float roughness = _Roughness * tex2D(_RoughnessMap,IN.uv_MainTex).r;

float4 specularColor = _SpecularColor * tex2D(_RoughnessMap,IN.uv_MainTex);

half4 c = tex2D (_MainTex, IN.uv_MainTex);

o.Albedo = c.rgb * _Color;

o.Alpha = c.a;

o.Gloss = roughness;

o.Normal = UnpackNormal( tex2D(_BumpMap, IN.uv_MainTex) );

o.Emission = texCUBElod(_Reflections,float4(WorldReflectionVector(IN,o.Normal),(1-(roughness))*8)) * specularColor;

}

ENDCG

}

FallBack “Diffuse”

}

Below is our Physically Based Shader with bells and whistles (glows and rim lighting) – use at your own risk

//Based on http://wiki.unity3d.com/index.php/Physically-inspired_Shader

Shader “TWLC/Physically Based Shading Glow” {

Properties {

_Color (“Color”,Color) = (1,1,1,1)

_MainTex (“Base (RGB)”, 2D) = “white” {}

_GlowTex (“Glow (RGB)”, 2D) = “white” {}

_Reflections (“Reflection Cubemap”, CUBE) = “black” {}

_BumpMap (“Normalmap”, 2D) = “bump” {}

_RoughnessMap (“Roughness Map”, 2D) = “white” {}

_SpecularPower (“Specular Power”, Range(1,255)) = 1

_Roughness (“Roughness”,Range(0.01,1)) = 0.01

_SpecularColor (“Specular Color”, Color) = (0,0,0,0)

_RimColor (“Rim Color”, Color) = (0.26,0.19,0.16,0.0)

_RimPower (“Rim Power”, Range(0.5,8.0)) = 3.0

}

SubShader {

Tags { “RenderType”=”Opaque” }

LOD 200

Fog {Mode Off}

CGPROGRAM

#pragma target 3.0

#pragma glsl

#pragma surface surf Physical

sampler2D _MainTex;

sampler2D _GlowTex;

samplerCUBE _Reflections;

sampler2D _BumpMap;

sampler2D _RoughnessMap;

float4 _Color;

float _SpecularPower;

float4 _SpecularColor;

float _Roughness;

float4 _RimColor;

float _RimPower;

struct Input {

float2 uv_MainTex;

float2 uv_GlowTex;

float3 worldRefl;

float3 viewDir;

INTERNAL_DATA

};

half4 LightingPhysical( SurfaceOutput s, half3 lightDir, half3 viewDir, half atten )

{

float n_dot_l = saturate( dot( s.Normal, lightDir ) * atten );

float3 diffuse = n_dot_l * _LightColor0.rgb;

float3 h = normalize( lightDir + viewDir );

float n_dot_h = saturate( dot( s.Normal, h ) );

float normalization_term = ( ( _SpecularPower * _Roughness ) + 2.0 ) / 8.0;

float blinn_phong = pow( n_dot_h, _SpecularPower * _Roughness );

float specular_term = blinn_phong * normalization_term;

float cosine_term = n_dot_l;

float h_dot_l = dot( h, lightDir );

float base = 1.0 – h_dot_l;

float exponential = pow( base, 5.0 );

float3 specColor = _SpecularColor.rgb * s.Gloss;

float3 fresnel_term = specColor + ( 1.0 – specColor ) * exponential;

float3 specular = specular_term * cosine_term * fresnel_term * _LightColor0.rgb;

float3 final_output = s.Albedo * diffuse * ( 1 – fresnel_term ) + specular;

return float4( final_output, 1 );

}

void surf (Input IN, inout SurfaceOutput o) {

float roughness = _Roughness * tex2D(_RoughnessMap,IN.uv_MainTex).r;

float4 specularColor = _SpecularColor * tex2D(_RoughnessMap,IN.uv_MainTex);

half4 c = tex2D (_MainTex, IN.uv_MainTex);

half4 g = tex2D (_GlowTex, IN.uv_GlowTex);

o.Albedo = c.rgb * _Color;

o.Alpha = c.a;

o.Gloss = roughness;

o.Normal = UnpackNormal( tex2D(_BumpMap, IN.uv_MainTex) );

half rim = 1.0 – saturate(dot (normalize(IN.viewDir), o.Normal));

o.Emission = texCUBElod(_Reflections,float4(WorldReflectionVector(IN,o.Normal),(1-(roughness))*8)) * specularColor + g.rgb + (_RimColor.rgb * pow (rim, _RimPower));

}

ENDCG

}

FallBack “Diffuse”

}

 

Leave a Reply