Friday, May 13, 2016

May 2016 Status Update


   Okay here's a quick one with some pretty pictures.
The crunch continues as we're doing a maintenance round for all the levels. What does that entail?

   Well, there's always some minor visual glitches here and there with overlapping objects and some broken functionality due to last big changes to some prefabs. Adding dialogues, tutorials and cinematic events has been surprisingly time consuming! It's a tough job but it's getting there.

Shot from a cinematic event
 
   We've also been doing some optimization to reduce draw calls further. This required some weird solutions due to how things were done originally. A "wall combiner" was programmed which basically looks for the material of the wall, then assigns a new atlas material (with all the different wall textures in it), re-scales the object's UV's and offsets them accordingly on Awake().

   It's one of those mandatory last minute optimizations to go around the original design flaw of having different materials for different walls - and we need to keep our workflow intact for the rest of the project. But hey, it works!


   Some fill-rate related issues seem to remain with iPad 3. The issue becomes apparent with big UI elements. There's not much we can do about it except simplify the UI which sucks, but maybe we'll figure out something before it comes to that. Push comes to shove, this iPad model will have a simplified UI for certain parts.



   We recently added an xray shader type-of-a-deal to help with picking up objects that go behind walls and such. It just renders the object normally (mobile diffuse) but parts of it that get clipped by another object in front of it, gets rendered with a solid color (masked by alpha channel of the texture for some neat effects). Here's the shader for fun's sake (use it as you wish):

Shader "Custom/Xray" {
 Properties {
  _MainTex ("Base (RGB)", 2D) = "white" {}
  _XRayColor ("XRay Color", Color) = (0,0,0,1)
 }

 SubShader { 
  Tags { "Queue" = "AlphaTest" "RenderType" = "Opaque" }
  Pass
  {
   ZWrite Off
   ZTest GEqual
   Blend One One
 
   SetTexture [_MainTex] {
    constantColor [_XRayColor]
    combine constant * texture alpha DOUBLE
   }
  }
 
  ZWrite On
  ZTest LEqual
  ColorMask RGB
  Blend Off

  CGPROGRAM
  #pragma surface surf Lambert noforwardadd

  sampler2D _MainTex;

  struct Input {
   float2 uv_MainTex;
  };

  void surf (Input IN, inout SurfaceOutput o) {
   fixed4 c = tex2D(_MainTex, IN.uv_MainTex);
   o.Albedo = c.rgb;
  }
  ENDCG
 }
}



   The work on the intro has begun with a simple animatic which the musician uses to compose the music to. It was created in After Effects, using quickly made mockup screenshots from Blender.

   The next step is to create the real thing in Unity, matching the timing to the video. It's going to be sort of a motion cartoon in the spirit of the legendary UFO Enemy Unknown, blending some moving elements to static imagery. It's a huge final art task and there will be a blog post about the technical execution when the intro is actually done.

   But now it's time to get back to bug squashing, polishing and testing. It'll take time, but soon we'll be able to wrap this project up production-wise. Until then, thanks for reading and come back for more posts!

Spread the word!