Los Angeles, U.S.A

IMG_4142

Santa Monica Beach

IMG_4145

Santa Monica Beach

IMG_4143

Santa Monica Beach

IMG_4148

Santa Monica Beach

IMG_4165

Mixed Reality Capture playing Racket: NX on Vive

IMG_4203

Visitor Pass for NASA’s Jet Propulsion Laboratory

IMG_4202

1.1 Scale Model of the Curiosity Rover

IMG_4201

1.1 Scale Model of the Curiosity Rover – It has a laser…

IMG_4200

LED light representation of data received from live Space Probes

IMG_4190

Antennas receiving live data

IMG_4188

Current live Space missions

IMG_4183

Inside JPL’s Space Flight Operations Facility

IMG_4180

JPL’s Space Flight Operations Facility

IMG_4179

NASA JPL’s DK1 with tracking balls

IMG_4196

Unity team photo at NASA JPL

IMG_4177

Aerogel is a silicon based solid which is 99.8 percent air. It is used on Stardust to trap fast-moving comet particles and also insulates the electronics on Mars rovers.

IMG_4176

A piece of Moon rock

IMG_4175

Substance Painter – Meet Mat 2017 Contest

I rarely get any spare time to allocate to other software packages outside of Unity, but every now and again my artistic nature gets the better of me and I’ll dabble into Photoshop or Modo etc.

Last week, I noticed my good friends at Allegorithmic launched a contest called Meet Mat, the contest is a 3D painting contest utilising Substance Painter. It seemed targeted to beginners as well as experts, so I decided to have ago. This is my first time using Substance Painter. I know I could do better but either way I wanted to share the iRay renders I submitted for the contest.

Meet Mat 2017

Meet Unity Mat – Final Render using iRay

 

Meet Mat 2017_1

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_2

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_3

Meet Unity Mat – Final Render using iRay

Meet Mat 2017_4

Meet Unity Mat – Final Render using iRay

I hope you like them! 🙂

Don’t be afraid…

Easier said than done, and I debated with myself tirelessly whether I should write this post or not. It’s not easy to open up when you have been going through mental health issues but I wanted to do this as part of my therapy and to help others to try and get through similar difficulties.

I have been dealing with a form of mental health called emotional distress, emotional distress can be caused by various reasons such as personal, family or work. For me, I have been dealing with a childhood trauma, which over the years up until May 2016 (last year) resurfaced in the most unexpected way, bereavement. It has led me to this position now where I’ll admit I am in need of some professional help.

At first, I was very hesitant I would need any professional support, uncertain whether it was something I thought was necessary. I thought I was coping well. Friends, colleagues and family all saw me in a good light, I guess it is easy to hide it when work is so busy and it actually helps with not thinking about my issues.

Looking at this retrospectively, I wish I took a more proactive approach and took a step or two back from work to work on myself. Not thinking about myself. Not putting myself as priority number 1 was not helping me get over my issues. I very much enjoy my job, i found it to be a pleasant distraction, but even in a job like that you still need to take a step back and dedicate some time to working on yourself.

I needed to try and channel my thoughts to the forefront. Not accepting them. Not dealing with them is potentially going to make things worse and it did.

How did I know the time was right to seek help?

For me, I started to feel unwell, to a point where I couldn’t work, tension headaches lasted more than a week, not ideal when you look at a computer screen for 10 hours a day. Energy levels depleting and tiredness caused by depression, at first I thought something physically was wrong so I got myself checked out at the Doctors. When something started to really effect my life physically, it dawned on me to get myself checked over.

Mentally, I think it was always apparent but I believe I was putting this to the back of my mind, not accepting it was happening, my body needed to let me know in a different way and it came out physically for me, to a point where working and home life was becoming a struggle.

When these symptons started to develop plus others such as anxiety, I knew it was time to face the fact that seeking professional help is something I have to try.

I have never had counselling before, I have found it hard to admit this is something I might of needed in the past, I am afraid people might see me in a bad light, think I’m weird, crazy even, and people won’t want to associate themselves with me, and as a professional in the software development industry it is even more important that I maintain a positive image.

How I was wrong:

So far everyone I have told have been super supportive, opening up has been the best decision I have made since deciding to propose to my now fiancĂ©. It has surprised me how supportive and understanding everyone has been, I didn’t expect this at all, not many people talk about mental health issues, it’s not a common subject, but it should be, so many of us will go through moments in our lives where mental health becomes an issue.

My message today is you are not alone. open up, acknowledge what you are going through, talk about your emotions, cry, seek the help you need and most important don’t be afraid.

Unity’s New Video Playback Component:

Disclaimer: I am writing this post about the video player in it’s current state within the current beta version Unity 5.6.0b9 which was released: February 17, 2017

The long awaited replacement for Unity’s now legacy Movie Texture is here and comes in the form of a newly written Video Playback solution. This post will tell you all about it, how to use it, what features it contains and some general tips and tricks. If you have any questions which aren’t answered in this post feel free to write in the comments section and I’ll get back to you asap.

The Video Player is a new component that you add to game objects for movie playback in your scene. The Video Player will use the native video hardware capabilities of both the editor and target platforms.

VideoPlayer Component.PNG

Playback Source:

The first thing you might notice from the screenshot above is the Source is currently set to Video Clip, you can define the clip by dragging and dropping the clip into the property. The Video Player can play movies that were imported with the new Video Clip importer or it can read movies from Streaming Assets, local files or http sources using progressive streaming:

source-switch

Render Mode:

The component also contains a Render Mode property where currently there are five options, but perhaps some of the more exciting options is the ability to render a video through a Material Override option as well as a Render Texture.

rendermode

Material Override:

This option allows for a texture parameter in the current object renderer’s material to be used for receiving the video. If we take a 360 video example as a use case, you would use Material Override to ensure the video is being wrapped around a spheres mesh, I use a shader to invert the normals:

Shader "Custom/Mobile/Invert Normals"
{
	Properties
	{
		[NoScaleOffset]_MainTex ("Texture (RGB)", 2D) = "white" {}
	}
	SubShader
	{
		Tags { "RenderType"="Opaque" }
		Cull Front

		Pass
		{
			CGPROGRAM
			#pragma vertex vert
			#pragma fragment frag
			#include "UnityCG.cginc"

			struct appdata
			{
				float4 vertex : POSITION;
				float2 uv : TEXCOORD0;
				float3 normal : NORMAL;
			};

			struct v2f
			{
				float4 vertex : SV_POSITION;
				float2 uv : TEXCOORD0;
			};
			sampler2D _MainTex;

			v2f vert (appdata v)
			{
				v2f o;
				o.vertex = UnityObjectToClipPos(v.vertex);
				o.uv = float2(v.uv.x, v.uv.y);
				v.normal = v.normal * -1;
				return o;
			}

			fixed4 frag (v2f i) : SV_Target
			{
				return tex2D(_MainTex, i.uv);
			}
			ENDCG
		}
	}
}

360-video

If we were to use Unity’s Standard shader as a Material Override option, we then gain access to the available texture slots for that shader:

material-override-texture-slots

Just think about those possibilities for a second; do you now have the idea of animating a bump map with a movie? You could write a custom shader that deforms a mesh using one of the texture inputs. My example below is using a custom Holographic shader to render the movie clip in an interesting way:

hologram-video-shader_1

Shaders are incredibly powerful scripts and empower us to render things in interesting ways, it’s awesome we can apply custom shaders to the Video Player, opens up for some interesting possibilities.

Video Codecs:

The Video Player component aims at using h.264 and VP8 for hardware which are supported on a wide variety of platforms. On the audio side we have AAC and Vorbis. If you are looking for the alpha channel to be respected within a movie clip you need to utilise ProRes 4444 which is a lossy video compression format developed by Apple Inc.

Audio:

A slight complication comes with Audio here which I felt was worth mentioning; On OS X which has the most desirable workflow at present (arguably), you can chose the Audio Output Mode to be Direct, what this does is play back the Audio which is already embedded from within the movie clip. On Windows Direct Audio Output Mode does not work as it is only supported on Apple platforms, for OS X and iOS you are okay but non-Apple platforms you need to revert to the Audio Source option, this allows you to define the Audio file you want to have play back with the video. Since both the Movie clip and Audio clip are decoded from the same stream we shouldn’t see any issues with synchronisation.

audio-output-mode

Scripting:

The Video Player class can be found within its own namespace UnityEngine.Video. The documentation for this is extensive but I did want to highlight a specific API which I think is a very useful feature. video.IsPrepared; This API checks whether the player has successfully prepared the content to be played back. When the content is prepared the player can start playing back the associated content instantly, the API is especially important when you are using the Streaming Assets, local files or http sources, this short scripting example will demonstrate the video.prepareCompleted; function to ensure the content is ready to playback from a HTTP source:

using UnityEngine;
using UnityEngine.Video;

public class HTTPVideoScript : MonoBehaviour {

    // Use this for initialization
    void Start ()
    {
        var vPlayer = gameObject.AddComponent<UnityEngine.Video.VideoPlayer>();
        vPlayer.url = "http://www.quirksmode.org/html5/videos/big_buck_bunny.mp4";
        vPlayer.renderMode = UnityEngine.Video.VideoRenderMode.CameraFarPlane;
        vPlayer.targetCameraAlpha = 0.5f;
        vPlayer.prepareCompleted += Prepared;
        vPlayer.Prepare();
    }

    void Prepared(UnityEngine.Video.VideoPlayer vPlayer) {
        Debug.Log("End reached!");
        vPlayer.Play();
    }
}

That’s it folks, I hope this proves useful in your adoption of Unity 5.6 and importantly the new Video Player component, I’ll leave this with you as a thanks for scrolling all the way to the bottom 🙂

weirdness