Thursday 5 February 2015

Media Specialist Practice - Research

Deciding on a Specialization
As my next module, Media Specialist Practice, is in full swing I started looking into a specialization that I would like to use in this modules project.

Due to my current employment, and after looking through work related criteria (in terms of skill sets employers are currently looking for in developers) I came to the conclusion that I would like to get some experience in graphics programming.

Having only briefly heard about graphics programming, I had no knowledge about what it really entailed, only that it was an important facet in the games industry and specifically in development. Most of the games I have developed were not in-depth enough to require any custom graphics programming. I tended to rely on ready made shaders available with off-the-shelf game engines.

I started reading up on it and saw that graphics programming was used to draw object in 3d space. Rather than use a machines CPU the GPU on graphics cards could be used to draw elements or visual effects to the screen.

There were two main lines of graphics technologies. OpenGL and DirectX. I started reading into these to see which would be best to look into as I would not be able to cover both. After reading up on the internet there were pro's and cons for both sides. DirectX was better maintained but only worked for Windows, for example. Where as OpenGL was platform independent, but followed more of an open source route and as such could be disorganized and chaotic at times. The deciding factor for me as asking developers at my job and seeing what they used in their day-to-day. This was how I landed on OpenGL as my implementation of choice.

Research into OpenGL
Having absolutely no experience in OpenGL or graphics programming I started research into subject. Starting with the basics. I found a lecture (Youtube, 2014) on Youtube posted by SIGGRAPH University titled "An Introduction to OpenGL Programming". This was a three hour lecture, and I expected it to be quite in depth. 

However I was surprised to find that the 3 hours were jammed full with a basic overview of the OpenGL pipeline, including examples. This lecture gave me a good, basic, general overview of OpenGL, but quite a bit of it went over my head. This was due to three problems as I saw it:

  • My basic knowledge of C++ could make understanding the code a bit more of a challenge but not impossible
  • My lack of knowledge with 3D maths, specifically linear algebra and matrices made it difficult for me to understand the methodologies
  • My basic experience with using shaders meant I did not know what polygons, vertices and fragment shaders were


Now that I knew where I was failing in terms of understanding OpenGL I set out to improve on it. During the lecture above, one of the lecturers made mention of a book called the OpenGL Red Book. I made note of this and looked it up. It is freely available on the net and is quite comprehensive. I made a start at reading up on this. Thus far I have made it through the first chapter.

Additionally I googled around for more 3D math based tutorials. I found the following tutorial which seemed prefect for what I required, titled "Learning Modern 3D Graphics Programming" (McKesson, 2012).

With regards to improving my C++ knowledge I looked into buying a book on the language. Personally I find myself better capable of learning when approaching a problem or field from the top and working my way down. This is opposed to the 'starting at the basics and working your way to the top'. It is due to this fact that I was super happy to have found a book titled "Accelerated C++ Practical Programming by Example". I grabbed a copy off Amazon and have been working my way through it. It makes heavy use of the standard library before working its way down into the details. I find it easier to learn the details once I have a solid understanding on the overall structure and how all the components fit together.

Finally, I realized that I was getting lost in the OpenGL field. The graphics programming field was much bigger than I had first expected. I thought I'd start looking at practical ways to implement some of the OpenGL stuff I was reading up on, when the time came. I knew that I would be using Unity to some extent, as the coursework theme covered Unity. Also my line of thought was that if I was going to use a game engine I wanted to make use of one I knew well and understood. Especially since I'd have my hands full with the graphics stuff.

I did some quick research on wether or not Unity could use OpenGL in the creation of shaders and I saw that it was a possibility. I do need to do more research into this currently as I know windows systems use D3D and not OpenGL. But unless I am mistaken I can force my program to make use of OpenGL. I will need to look into this some more.

After I knew I had a good chance of making use of Unity with OpenGL I started reading up on shaders in Unity. I did this by making use of the Unity tutorials and scripting reference. This is currently on going but I have thus far read up on all of Unity's Built-in Shader's making use of the Built-in Shader Guide (Unity, 2015). I learnt about Normal, Transparent, Cutout, Reflective and self illuminating shaders in detail.

In this guide I learnt a lot about what you can accomplish using shaders and I found the Normal mapping shader to be of particular interest. This shader would add depth to textures but was not a geometric shader, It only changed how lighting and shadows were used with the texture. I used normal mapping in my previous module and I was really impressed by it. I had a model with a great texture but it was appearing blurry the pre-baked lighting looked off. After applying a normal map to the object it suddenly sprang to life. I need to make a note about normal mapping / bump mapping as a potential topic for this module.

As it stands now, I will continue to look into things and try to come up with a proper proposal to discuss with my lecturers this Tuesday.

That's all for now,
Rob

References:
Youtube. (2014) SIGGRAPH University : "An Introduction to OpenGL Programming". [Online] Available from: https://www.youtube.com/watch?v=6-9XFm7XAT8 [Accessed: 21st January 2015]. 
Unity. (2015) Built-in Shader Guide. [Online] Available from: http://docs.unity3d.com/Manual/Built-inShaderGuide.html [Accessed: 4th February 2015].
McKesson. (2012) Learning Modern 3D Graphics Programming. [Online]  Available from: http://www.arcsynthesis.org/gltut/index.html [Accessed: 19th January 2015].

Sunday 1 February 2015

The End ... ?

Well my Digital Studio Practise module is done now. The system however is not so I'm aiming to fix it up properly as time permits. It's important to keep in mind that while I would like to work on this and get it done, I am really busy at work during the day. My free-time game project is continuing but largely due to my amazing team and I can't keep expecting them to do all the work, so this is another matter I need to keep in mind.

Additionally my new module has already started and I have been looking into OpenGL stuff. There is so much to learn! And there is so much math! But I am chipping away at things as often as I can.

More on that though when I finalise my topic for my next module. With regards to the DSP system I am trying to finish up, I thought it'd be useful to keep a list of things I need to do:

Features:
  • Research topics for final two minigames
  • Implement final two minigames
  • Implement admin panel, if this is still a feature that will add to the system overall
  • Finish off minigame 2 by adding other level assets, add UI
  • Add audio to game
  • See if more detail can be added to Minigame 1 - Triton

Bugs to fix:
  • Fix camera panning bug on main menu -Fixed
  • Fix panning speed on menu load-in -Fixed
  • Change skybox on main menu to Visual from minigame 2
  • Fix skyboxes in minigame 2

That's it for now.
Rob