Review: Away3D 3.6 Essentials.

Over the last few weeks I have been working my way through Away3D 3.6 Essentials written by Matthew Casperson. This is a really good book to get if your interested in learning 3D in Flash as it covers everything from basic 3D concepts to creating full 3d scenes using the Away3D engine.

The book starts of with a fairly in-depth introduction into how to get started with Away3D by teaching you how to check out the library using SVN, get it set up in Flash Builder or Flash CS4 and even covers using FlashDevelop. The book then moves on to explain the basic components of the Away3D engine such as Camera3D, Scene3D & View3D. It even provides you with a basic template class to get you started ASAP.

Once you’ve mastered this step, the next thing covered is basic 3D concepts like 3D positioning, vertices, faces, coordinates and primitive shapes. A basic explanation of all the primitives available in Away3D is given and what properties can be applied to them.

With this mastered the next chapter covers moving 3D objects in 3D space. Coordinates systems are covered including explanations of world, parent and local space (each with code examples) and other functions such as the moveForward/Backward/etc() functions are covered. Then tweening with library’s such as TweenLite is covered. When you have finished this chapter you’ll be completely familiar with all the animation methods the Away3D library offers you to manipulate and animate objects in you scene.

The next topic covered is z-sorting and has an entire chapter dedicated to it. This covers the default method of z-sorting that Away3D uses, an in-depth explanation of how your 3D scene is sorted, how to edit and adjust the sorting of 3D objects and what additional renderers are offered by Away3D.

After this the extensive subject of Materials is covered. All the different types of materials such as WireframeMaterial, AnimatedBitmapMaterial and many others are covered, as well as the Pixel Bender based ones such as the Dot3BitmapMaterialF10. Different kinds of mapping such as texture and environment are covered and also a brief explanation and code sample of how to apply each different material.  A useful table of all the supported colours and what materials support what lighting techniques is provided.

Models & Animation is the next topic covered with an introduction to loading 3D models in to your scene, what different file types are supported and a brief explanation on how to export models in certain 3D packages. An explanation of what types of cameras are available, their differences and effects as well as mouse interactivity.

After this mouse interactivity, 3D text, special effects and performance issues are covered. Each chapter following the same as the ones already mentioned with a good selection of code samples provided and an in-depth explanation. Overall this book gives you everything you need to get started with the Away3D engine, and the good thing is it can be used by people who are already familiar with Away3D but what to learn more. A good understanding of Actionscript 3 is obviously required, but I highly recommend this book the anyone looking to get a good understanding of Away3D.

Posted in 3D, Flash, News | Leave a comment

Away3D 3.6 Essentials

Packt Publishing just launched a new book on Away3D 3.6 written by Matthew Casperson.

This book covers everything you need to get started with the 3D engine, including:

  • Draw primitive shapes such as cubes, cones, spheres, and planes without having to manually construct them from their basic elements
  • Add eye-catching special effects to your Away3D application
  • Warp, curve, modify, and bend 3D text to your will
  • Focus the Camera and view 3D objects from all angles
  • Improve mouse interactivity in your 3D application
  • Integrate third-party libraries such as TweenLite and Stardust with Away3D to animate 3D objects and create particle effects
  • Use sprites and sprite classes
  • Utilize the power of Pixel Bender for image processing
  • Export 3D models from 3D modeling applications such as 3ds Max, Blender, MilkShape, and Sketch-Up
  • Get practical tips on achieving maximum performance in your 3D applications

The book is mainly aimed at beginners with a good first chapter on 3D basics and terminology.

I will be posting a more in depth review later on, but if anyone else has this book let me know what you think!

Posted in 3D, Flash | Leave a comment

A basic Javascript 3D Renderer

Updated: New Demo added.

Since playing around with Three.js and Javascript in general I was inspired to go ahead and understand how the 3D magic works, so I created my own basic 3D engine. It is by no means comparable to Three.js, it can just draw particles, lines and boxes, so all good fun ;)

I recreated the demo below using my own engine and here is the result.

How it works.
The first thing I did was to create a Canvas based renderer that took a 3D point, converted it to 2D then drew it on to the canvas. This then later expanded to being able to draw lines in 3D and now 3D planes. All of this is demonstrated in the examples below.

Once I had got the basics working, I added camera and scene functionality, although the camera has no actual camera functionality yet, that is coming when I can get my head around this transformation matrix stuff. This is all I’m getting at the moment.

Then I added some basic primitives and 3D objects like Particles and a Cube, with a basic RGB material for starters.

Demos.
Plane Demo

Granted, these demos are exciting at all and have been done 1000′s of times before, but I’m pleased that I’ve managed to get this far! There is so much more that I can add to make this a properly fully functional 3D Javascript engine.

At the moment the only available renderer is just using Canvas and I would like to add a WebGL renderer in the future.

If anyone knows of any good articles/resources on 3D math then I’d greatly appreciate a comment with a link!

Posted in 3D, Experimental, HTML5, Javascript | Tagged , , , , | 1 Comment

Messing with HTML 5 Canvas & Three.js

Whilst building my new site, I have picked up quite a love for Javascript, so I decided to start doing more exciting stuff with it instead of just front end for work my CMS. I started of playing around with canvas and quickly got some cool 2D stuff going on, and then decided to give Mr. Doobs Three.js a try, which turned out to be pretty awesome.

I went ahead and built a little demo based on my first 2D experiment with canvas.

It’s fairly simple but it gave me a good idea of the Three.js 3D engine and I highly recommend anyone who wants something different to play around with, have a go with it. The code for the demo above is below.

3d.js:

// 3d vars.
var camera;
var scene;
var renderer;

// size
var WIDTH 				= 800;
var HEIGHT 				= 600;

var circleColours 		= [0x0099CC, 0xCCCCCC, 0x9900CC];
var colourIndexToUse 	= 0;
var fadeAmount 			= 0.0000000005;

// used to tell when to draw.
var shouldDraw 			= false;

// mouse coordinates.
var mouseX;
var mouseY;

setInterval( invalidate, 10 );

function init() {
	camera 					= new THREE.Camera( 75, WIDTH / HEIGHT, 1, 10000 );
	scene 					= new THREE.Scene();
	renderer 				= new THREE.CanvasRenderer();
	renderer.setSize( WIDTH, HEIGHT );

	camera.position.z 		= 700;
	document.body.appendChild( renderer.domElement );
}

function invalidate()
{
	if(shouldDraw) draw();
	// fade all the current circles.
	fade();
	// render it all.
	renderer.render( scene, camera );
}

function draw() {
	 for(var i = 0; i < 5; ++i)
	 {
		 var particle 			= new THREE.Particle( new THREE.ParticleCircleMaterial( circleColours[colourIndexToUse], Math.random() ) );
		 particle.position.x 	= i == 0 ? mouseX - 500 : mouseX - 500 * (Math.random() * 1.5);
		 particle.position.y 	= i == 0 ? mouseY - 500 : mouseY - 500 * (Math.random() * 1.5);
		 particle.position.z 	= mouseX * Math.random();
		 particle.scale.x 		= i == 0 ? particle.scale.y = Math.random() * 50 : particle.scale.y = Math.random() * 5;
	     scene.addObject( particle );
	 }
}

/*
 * This fades all the existing objects in the scene.
 */
function fade() {
	for(var i = 0; i < scene.objects.length; ++i)
	{
		var prevAlpha = scene.objects[i].material[0].color.a;
		if(prevAlpha != 0)
		{
			var newMat 						= new THREE.ParticleCircleMaterial( circleColours[colourIndexToUse], prevAlpha - fadeAmount );
			scene.objects[i].material[0] 	= newMat;
		}
		else scene.removeObject(scene.objects[i]);
	}
}

function setMousePosition(x, y)
{
	mouseX 				= x;
	mouseY 				= y;

	camera.position.x 	+= (mouseX - camera.position.x) * .045;
	camera.position.y 	+= (-mouseY - camera.position.y) * .045;
}

jQuery(document).ready(function() {
	$('canvas').mousemove(function(e) { setMousePosition(e.pageX, e.pageY); } );
	$('canvas').mousedown(function(e) { shouldDraw = true;  } );
	$('canvas').mouseup(function(e)   { shouldDraw = false; } );
});

init();

For those looking for more resources in regards to getting started with the whole HTML5/Canvas and also Three.js here’s some good ones:

Have Fun!

Posted in 3D, Experimental, Javascript | 1 Comment

The Corner, Hudson Builds and Design Patterns.

Starting on the 19th of July and lasting for five weeks, I got the opportunity to do some work experience at AKQA London. This was a simply brilliant experience, filled with opportunities to understand and experience how the new media industry operates, from attending client workshops to doing work for some pretty awesome clients.

On my first day, nerves were running considerably high. Seeing as I had never before been in an industry environment I had no idea what to expect, whether I would just be given a brief and told to get on with it or just be left cleaning desks and doing milk-shake runs, but either way it was going to be awesome to be back up at AKQA after two years. Making it there finally after a quick sprint up Farringdon Road I got shown to my desk, which by the way looked the most hardcore programmers desk ever (4 screens + private army of mini ninjas), in the Creative Research & Development department. Then I got to meet some of the people in the CRD team and have a chat to get to know the various roles/titles people occupied. This didn’t make much sense at first as everyone seemed to have ‘Creative Developer’, ‘Director’ or ‘Interactive’ in their title so it took me a while to really understand what people did, and only then did I start questioning why some people had ‘Senior’ in their titles ;) .

Next up on the list was learning Android which was great because this was something I had absolutely no knowledge about. This is something that has rightly been given a lot of attention and I found it a great thing to get experience in, much nicer doing Java than faffing around with Objective-C :) .

From then onwards things only got better. Nerves went away after a few days and I got to know the team well. My technical knowledge increased immensely, understanding of how projects are managed and structured grew but most importantly, I knew more and more that this is what I wanted to do as a career.

My first piece of work was a Flash piece (thanks Rick!) and it was good to have a break from PHP which had been my focus for the last few months for my new site (site working on it by the way!). This, although only a small project, gave me a good understanding of using OOP in real life applications, working with Creative to deliver it just as it should be, using SVN and gaining a better programming knowledge. Luckily I had a bit of time and someone helping me so I could understand everything that went on and why.

Once that was done it was back to general research and working on my new site with lots of comments coming from my right. The next thing to come would be attending my first client workshop which was pretty damn cool. This showed me a different aspect of the company and how AKQA works it’s magic with its clients. After taking part in this I realised that not only did I enjoy developing software, but I also enjoyed speaking to clients and learning about the preparation that went into these workshops. This made me realise that this is something that I would like to do, instead of just been a developer, but also lead projects and speak/present to clients.

I then worked on a project with Emile. This was the first time I had worked
on a professional application using PureMVC. The good thing with this
project was that I  could see what benefit using PureMVC had and what role
each part of the MVC pattern played. I also got to understand how continuous
integration works, what tools like Hudson do, what goes into deploying a
site to live, and finally I at last got to find out what a Technical
Delivery Manager does :)

Other things that I was lucky enough to be able to go to where the LFPUG event at AKQA and internal presentations on various topics that related to the role of a CRD developer. All interesting stuff and I was lucky to work in a company that have such talented people who are willing to put together all these sessions.

In between all of this I got to know the people in the CRD team a lot better and thanks to Aaron, Abe and everyone else who I met, I learnt a whole load of new stuff in regards to programming, projects, and life at AKQA. This was the best bit of my five weeks, getting to know the team. There was none of this ‘your just and intern clean my desk’ bullshit (except on one occasion, and I’m not doing that again without getting my Hantavirus jabs first :p), I just felt like one of the team and got on with everyone, which was the most important thing for me.

The five weeks I spent at AKQA were simply, brilliant. I had very little in the way of expectations, but I couldn’t of possibly wished for it to have gone any better. Thank you to everyone up there who I met for being unbelievably friendly, helpful and for teaching me an awful lot. Thank you especially to Aaron Newton for being my ‘mentor’ who, despite moaning like an old women 99.01% of the time, taught me a new way of thinking about my projects and helped me out on my work. Cheers :)

My biggest thank you goes to Andy Hood who made this whole thing possible, for giving me the chance to see what the New Media industry is aboust, meet the people who create the brilliant work that comes out of AKQA, learn a whole load of new stuff, experience all different aspects of the agency, and overall thank you for making me 110% sure that this is what I want to do as a career and also 110% sure that I want to return to AKQA.

I believe I have a dragon that needs returning.

Thank you all so much.

Good reads:
Rick Williams – Blog | Twitter
Dennis Ippel (crazy 3d guy) – Blog | Twitter
Aaron Newton (never let this guy have a plastic dragon) – Site | Twitter
Abe Azam – Blog
Joakim Carlgren (watch out) – Site
Richard Szalay – Blog | Twitter
Tudor Bay – Blog | Twitter
Wanja Stier – Blog | Twitter

SHAKES & FIDGETS – http://s1.sfgame.us/

Posted in Inspiration, News | 1 Comment

New .com/CMS updates.

As you may have noticed, this blog has been pretty quite recently. This is mainly because I have my exams coming up soon so I spend most of my time working, and the in spare time I have I’m working on my new personal blog/site. Currently I have been working on the custom CMS that is gonna be the backend to my new site, so here is a few shots of whats coming up!

I’m hoping to launch it sometime next month. The CMS is pretty near completion, and then on to the rest of the frontend!

Posted in Random | Tagged , , , | Leave a comment

Coding in Bubbles (IDE Concept).

I came across this early this evening and thought it looked a brilliant and fascinating way of coding!

The idea is that code is split into different bubbles, each one representing a function. You can then drop and drag different methods around, adding notes to them, marking them as bugs or flagging that particular function as important. I think this is a great way of coding as coding by nature is a very logical task and so by displaying it in a very organized, logical way makes a lot of sense. Traditionally code is just displayed as a single file with methods listed one after the other which is fine for smaller files/projects with a moderate amount of functions and classes with little to no external dependencies, but when you are dealing with large projects, multiple files and lots of external library’s then this way of logically splitting it up into relevant bubbles really makes sense. So watch the video and see what you think!

Project page here: http://www.cs.brown.edu/people/acb/codebubbles_site.htm

Posted in Experimental, News | Tagged , | 1 Comment

Unity Game Development Essentials – Review

When a new and groundbreaking technology like Unity comes out, it can be hard to get a good grip on it. After spending some time reading Unity Game Development Essentials, it gave me a good insight on the user interface of the program, and how to build a game right from step 1, whether it be creating the terrain, scripting it, creating GUIs or using Unity’s particle systems. All the aspects of modern game development and the vast majority of Unity’s features are covered in this book making it pretty much essential to get of the ground with the software.

The book starts of by explaining what Unity offers in the way of built-in terrain tools, along with an explanation of how to use them. It then puts your new skills to the test by creating a small mini-game based on an island that is created entirely in Unity, which involves creating a terrain using the Terrain (Script) tools, then apply materials provided with Unity which allow you to add an extra degree of realism to your project. Then the book goes on to show how to add models skyboxes and finally sound to your game for a really complete project. The author does this all very slowly and explained step by step which is what I find you need when your learning something completely new like Unity.

After the first mini project is completed players are introduced by first giving an explanation of what players are and how they work. Then things like parent-child relationships are explained and also the basics of scripting Unity projects in JavaScript and how to add in movement. Once players have been covered important aspects of modern game development, Ray Casting and Collision Detection, are brought in which are vital to any games success. The math behind these two topics is the first thing to be explained to the reader showing them how rays are calculated and what is needed to see if a player has been shot or not. Clear diagrams were included to allow those visual learners amongst us to get a good grip on the theory. Then these techniques are show how to be implemented in JavaScript once the prior configuration has been done in the Unity IDE.

One essential aspect of any game is a HUD (Head-up Display) and is show along with how to use colliders as Triggers. This enables developers to restrict certain actions like the opening of a door until the player has a certain object. Learning techniques like this allow beginners to take the interactivity of their games to the next level. Also adding in-game hints is show as this can be really helpful when you introduce challenges that have to be completed before progress can be made. If helps are available then this stops the player getting bored if they cannot figure the puzzle/challenge out on their own.

Next you learn how to create instances of objects in the 3D world and also rigid body physics which is when a physics engine, like Nvidia PhysX which is the one used by Unity, is applied to an object in the game which tells the game engine to apply physics to this object. All these concepts are then out into practice by creating various mini-games which allows readers to know how the link together in a complete game.

Particle systems are key to all special effects and are one of the more complicated aspects of game development and this is what is explained next. They are explained in general then how to add them to your projects by creating a fire with wood, rocks and matches. With a lot of the key parts of the modern game being covered all ready the book then shows how to introduce a menu to a game. Textures are added and adding interactivity to the menu is show and explained, the how to animate and make your menu more interesting.

Lastly seeing as Unity supports a multitude of publishing platforms (Windows, Mac, iPhone*, Web, Wii, Mac OSX Dashboard Widget) it is important to understand how to publish your projects for these platforms. Clear instructions are given for how to publish to these platforms and an overview of each platform is also given for those who are unsure what one is or what they are appropriate for. There is also advice on how to share your complete game and a few noticeable differences between Unity Free and Pro. The last chapter tops it all of by giving advice on how to thoroughly test your game and boost its performance.

Overall I think this book is great for people who have no idea about the Unity IDE but have a basic understanding of game development and also having a background in JavaScript would be useful. I am extremely excited about building more with Unity once I find the time and I can’t wait to see what comes out in the future.

You can find a sample chapter here: http://www.packtpub.com/files/8181-unity-game-development-essentials-sample-chapter-4-interactions.pdf

Get the book here: http://www.packtpub.com/unity-game-development-essentials?utm_source=harrynorthover.com&utm_medium=bookrev&utm_content=blog&utm_campaign=mdb_001397

*You must be an approved Apple Developer for the iPhone and install the iPhone SDK (requires Intel-based Mac running OSX 10.5.4 or later)

Posted in Unity | Tagged , , , , , | 1 Comment

Merry Christmas & Happy New Year.

I know, it’s a bit late for the Merry Christmas part of the title, but never the less. I would just like to wish you all a happy Christmas and have a great new year, and decade!

I myself and very very excited about next year, as for me it is a real turn point. Next year I finish school and am off to college, finally doing subjects that I’m actually interested in, which the exception of maths (Business Studies, Computing, Maths and Photography), at a college which is close to home, which is nice seeing as my current school is a quite a drive. Before that can happen, I have to take my GCSEs which is a pain, but in a few months they’ll be over and I can finally get back to updating this blog more regularly.

Talking about my blog reminds me that I’ve take the chance to draw up a few comps of what my new site is going to look like, and here’s a preview of the homepage.

2010 Homepage Comp

I hope you like it. I was aiming for a very clean, but interesting look. I don’t know how long it will take me to get this live as my HTML is very rusty, but this is a good chance to get it back on top form. I plan to use ExpressionEngine as my CMS as it’s very customizable, and suits my needs better than the other CMSs I looked at.

I also have a book review in the works on Unity Game Development Essentials, which should be up within the next week or so. I have to say though, this book is really good and very easy to understand. After than I intend to hopefully write a few tutorials for sites like Activetuts and sell a few things on FlashDen.net to get a bit of extra cash.

Finally there’s the case of my portfolio. I’m shelving this for the time being as I there’s so much else I want to learn like C# + Silverlight, Cinema4D, Better AS3, Obj-C and the list goes on, so once I’ve got my new blog up, with a basic works section I will get to grips with some of these and then see how it goes from there. I feel I’ve lost focus over the past few months with school, fitness and a few other things, but this new year is a great time to get back on the ball and catch up.

So I hope you all have a great time over this celebratory period and are looking forward to the new decade as much as I am! I feel this decade is going to be the most important one of my life.

Speak next year :p

Harry.

Posted in Random | Tagged | 1 Comment

Unity 3D Game Development Essentials

I’ve just received my copy of Unity 3D Game Development Essentials which is written by Will Goldstone. In a nutshell its about giving novice programmers right the way through to experienced developers a good and thorough handle on building a game with Unity. It covers physics, scripting, particle effects,instantiation terrain generation and generally everything required for the modern game.

It’s based on the 2.5 version of Unity and uses Javascript for its scripting language.

Once I’ve finished reading it I’m gonna post a review which should be up in a couple of weeks, but going on first impressions it looks a great book! If you what to get a better impression on how the book is written and whether you’d benefit from it, there’s a sample chapter available here.

If you already have the book, let me know what you think!

Posted in Unity | Tagged , , , , | Leave a comment