<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Paul Tondeur</title>
	<atom:link href="http://www.paultondeur.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.paultondeur.com</link>
	<description></description>
	<lastBuildDate>Tue, 10 Apr 2012 21:03:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Robotlegs Away3D 4 Broomstick integration with a wink at Unity</title>
		<link>http://www.paultondeur.com/2011/03/07/robotlegs-away3d-4-broomstick-integration-with-a-wink-at-unity/</link>
		<comments>http://www.paultondeur.com/2011/03/07/robotlegs-away3d-4-broomstick-integration-with-a-wink-at-unity/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 22:31:54 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Away3D]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/?p=256</guid>
		<description><![CDATA[Since the beginning of this year I got in touch with Robotlegs thanks to Erik van Nieuwburg. In case you have&#8217;t heard of Robotlegs or haven&#8217;t used it, you should...]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-265" title="Robotlegs Away3d Extension CarExample" src="http://www.paultondeur.com/wp-content/uploads/2011/03/robotlegs-away3d-extension-CarExample.jpg" alt="" width="930" height="318" /></p>
<p>Since the beginning of this year I got in touch with <a title="Robotlegs" href="http://www.robotlegs.org" target="_blank">Robotlegs</a> thanks to <a title="Erik van Nieuwburg" href="http://www.rumblingskies.com/blog/" target="_blank">Erik van Nieuwburg</a>. In case you have&#8217;t heard of Robotlegs or haven&#8217;t used it, you should really check it out sometime soon. It is a micro framework that helps separating your application tiers in a very elegant way. I&#8217;ve developed a couple of projects myself using Robotlegs and I really have to say that I&#8217;m loving it. Once you know the trick, it seems like a natural way develop your applications like this. It makes your life as a developer a lot easier.</p>
<p>Once I got this into my fingers I suddenly realized that how Robotlegs handles views with mediators is somehow similar to how Unity works with game objects (models aka views in Robotlegs) and components (scripts/predefined functionality aka mediators in Robotlegs). The big difference between Unity components and mediators in Robotlegs is that Unity can work with multiple components on an object and Robotlegs doesn&#8217;t.</p>
<p>With the recent public beta release of <a title="Flash Player 11 Incubator" href="http://labs.adobe.com/wiki/index.php/Flash_Player_Incubator" target="_blank">Flash Player 11 (Incubator) and SDK</a> with the Molehill functionality (native 3D), the alpha release of <a title="Away3D 4 Broomstick" href="http://away3d.com/away3d-4-0-alpha-release-broomstick" target="_blank">Away3D 4 &#8220;Broomstick&#8221;</a> and the <a title="Announcement Unity Flash Publishing" href="http://blogs.unity3d.com/2011/02/27/unity-flash-3d-on-the-web/" target="_blank">announcement by Unity regarding Flash publishing</a>, it became time to get started with this experiment.</p>
<p><span id="more-256"></span>Basically I wanted to achieve two seperate things:</p>
<ol>
<li>Marrying Robotlegs to Away3D</li>
<li>Add multiple mediators to 3D objects similar to script components in Unity3D</li>
</ol>
<p>In order to achieve this I had to make small adjustments to Away3D in order te get an event dispatched as soon as a model is added to the scene. By default no event is fired once a model is added to the Context3D (Aka 3D stage). This is because the 3D stage doesn&#8217;t have a display list. So I forked Away3D on GitHub and applied the needed changes and send out a pull request so that these changes could be implemented by the Away3D team. At time of writing this request is still pending, but I&#8217;m sure the Away3D team will merge this into their code anytime soon.</p>
<p>A new GitHub repository has been created under the name of &#8220;<a title="Robotlegs Away3D Extension on GitHub" href="https://github.com/PaulTondeur/Robotlegs-Away3D-Extension" target="_blank">Robotlegs-Away3D-Extension</a>&#8220;, which introduces several new classes. The most important once are</p>
<ul>
<li><strong>Context3D</strong> (not to be confused with native Flash 11 Context3D)<br />
You need to extend this class and use it as the context of your application</li>
<li><strong>Mediator3D</strong><br />
Similar to a mediator as we normally use in Robotlegs, only this type is for 3D objects and not for view components.</li>
<li><strong>Mediator3DMap</strong><br />
As you probably have guessed it, this is similar to the MediatorMap, but maps zer0, one or multiple Mediator3D instances to a 3D object that is present in a scene.</li>
</ul>
<p>So with this available you can do things in your context like:</p>
<pre class="brush: as3; title: ;">
threeDeeMap.mapObject3D(Car3D, [BoxCollider, SimpleSteerBehaviour]);
</pre>
<p>Which says in fact that whenever a Car3D is added to the scene, we need to create an accompanying BoxCollider and a SimpleSteerBehaviour. The latter two are extended Mediator3D classes and are connected to the Car3D. This separates views from functionality and goes even a step further than Robotlegs does by default, as we can have multiple mediators for one single thing we want to display and is consistant with the &#8220;Single Responsibility Principle (SRP)&#8221; where one class is only responsible for doing one type of actions. In this case functionality of steering has nothing to do with detecting collisions. Although you possibly want to use both, they both do other types of operations and should not be merged into a single class. As this will make classes longer and harder to understand.</p>
<p>As I mentioned earlier, this work is available on GitHub, as well as an example project on how you could use this. The work is far from being perfect and should be improved when I decide to further develop on this (or when someone forks it and continues development <img src='http://www.paultondeur.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ). What interests me the most at this stage is to hear from others whether this approach would make any sense or not and how it could be improved concept wise.<br />
Besides, and here comes an extra wink at Unity, I hope that Unity gets inspired by this approach and possibly even adopt the use of Robotlegs. As if Unity publishing to Flash isn&#8217;t awesome enough, I think such approach has the potential to become a mind blowing awesome combination. This also means that I am voting for creating a code based build instead of just compiling a SWF file. With code publishing you leave so much more power in the hands of the developers to integrate the 3D content with 2D content. Also integrating external tools such as FDT, Flash Builder or Flex builder and the Flash IDE itself would an interesting approach.</p>
<p>So lets finally sum up some relevant links:</p>
<ul>
<li><a title="Robotlegs Away3D Extension on GitHub" href="https://github.com/PaulTondeur/Robotlegs-Away3D-Extension" target="_blank">Robotlegs Away3D Extension on GitHub</a></li>
<li><a title="Away3D Broomstick fork on GitHub" href="https://github.com/PaulTondeur/away3d-core-broomstick" target="_blank">Away3D Broomstick fork on GitHub</a> (as long as my pull request isn&#8217;t implemented by the Away3D team)</li>
<li><a title="CarExample source on GitHub" href="https://github.com/PaulTondeur/Robotlegs-Away3D-Extension/tree/master/examples/CarExample" target="_blank">CarExample source on GitHub</a></li>
<li><a title="CarExample of RobotLegs Away3D Extension" href="http://www.paultondeur.com/files/2011/Robotlegs-Away3D-Extension/CarExample/index.html">CarExample</a> as included in the examples on GitHub (requires Flash Player 11 Incubator)</li>
<li><a title="CarExample screencast" href="http://vimeo.com/20763322">CarExample</a> screen-cast (for those without the beta player installed)</li>
</ul>
<p>And again please, if you have any thoughts on this that you&#8217;d like to share. Please let me know. I think it would be good to get the debate going and find out what would be a powerful and elegant way to manage your 3D content with Robotlegs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2011/03/07/robotlegs-away3d-4-broomstick-integration-with-a-wink-at-unity/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Time for a redesign</title>
		<link>http://www.paultondeur.com/2011/03/04/time-for-a-redesign/</link>
		<comments>http://www.paultondeur.com/2011/03/04/time-for-a-redesign/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 15:27:46 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/?p=253</guid>
		<description><![CDATA[I have just update my blog to the latest WordPress version and completely restyled it (based on the Arras theme). This new theme creates more space for in depth articles...]]></description>
			<content:encoded><![CDATA[<p>I have just update my blog to the latest WordPress version and completely restyled it (based on the <a title="Arras theme" href="http://www.arrastheme.com/" target="_blank">Arras theme</a>). This new theme creates more space for in depth articles with code samples. So I hope you all like it <img src='http://www.paultondeur.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2011/03/04/time-for-a-redesign/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tutorial: Loading and parsing external XML and JSON files with Unity &#8211; Part 2: JSON</title>
		<link>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-2-json/</link>
		<comments>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-2-json/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 14:41:13 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-2-json/</guid>
		<description><![CDATA[In this part of the tutorial we&#8217;ll have a look at how to load the some book information in the JSON format into Unity. For good comparison between JSON and...]]></description>
			<content:encoded><![CDATA[<p>In this part of the tutorial we&#8217;ll have a look at how to load the some book information in the JSON format into Unity. For good comparison between JSON and XML, this file will describe the same books and uses roughly the same structure. Take a look at how that looks:<br />
<span id="more-97"></span></p>
<pre class="brush: plain; title: ;">{
  &quot;book&quot;:[
    {
      &quot;id&quot;:&quot;1&quot;,
      &quot;title&quot;:&quot;Papervision3D Essentials&quot;,
      &quot;image&quot;:&quot;http:\/\/paultondeur.com\/files\/2010\/UnityExternalJSONXML\/Papervision3DEssentials.jpg&quot;,
      &quot;authors&quot;:
      {
        &quot;author&quot;:[
          {&quot;id&quot;:&quot;1&quot;,&quot;name&quot;:&quot;Paul Tondeur&quot;},
          {&quot;id&quot;:&quot;2&quot;,&quot;name&quot;:&quot;Jeff Winder&quot;}
        ]
      },
      &quot;description&quot;:&quot;&lt;p&gt;Create interactive &lt;b&gt;Papervision3D&lt;\/b&gt; applications with stunning effects and powerful animations&lt;\/p&gt;&quot;
    },
    {
      &quot;id&quot;:&quot;2&quot;,
      &quot;title&quot;:&quot;Unity Game Development Essentials&quot;,
      &quot;image&quot;:&quot;http:\/\/paultondeur.com\/files\/2010\/UnityExternalJSONXML\/UnityGameDevelopmentEssentials.jpg&quot;,
      &quot;authors&quot;:
      {
        &quot;author&quot;:[
          {&quot;id&quot;:&quot;3&quot;,&quot;name&quot;:&quot;Will Goldstone&quot;}
        ]
      },
      &quot;description&quot;:&quot;&lt;p&gt;Build fully functional, professional 3D games with realistic environments, sound, &lt;i&gt;dynamic effects&lt;\/i&gt;, and more!&lt;\/p&gt;&quot;
    }
  ]
}</pre>
<p>This file can also be found on <a href="http://paultondeur.com/files/2010/UnityExternalJSONXML/books.json" title="Example JSON file" target="_blank">http://paultondeur.com/files/2010/UnityExternalJSONXML/books.json</a> and will be used later on in this tutorial.</p>
<p>JSON isn&#8217;t as integrated in C# development as XML is. Furtunatly the <a href="http://json.org/" title="JSON" target="_blank">JSON documentation website</a> lists external libraries that are available for a variety of languages. Including a couple C# projects. After having a glance at all, I found out that I liked <a href="http://litjson.sourceforge.net/" title="LitJSON" target="_blank">LitJSON</a> the most. It&#8217;s usage is quite straight forward. The source of this project can be found on found on SVN. After checking this project out from SVN, you&#8217;ll end up with a couple of classes and make files. From these files, a dll should be created for use in Unity. This might sound a bit frightening when you&#8217;re new to C Sharp development. Therefore <a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/LitJSON.dll" title="LitJSON DLL" target="_blank">I&#8217;ve already created this dll</a> for you (also included in the download at the end of this article). You just need to copy this into the asset folder of your Unity project and from then on you&#8217;ll have access to all classes inside of this dll. In order to use them in your scripts, you need to set the using directive on top of your class to:
<pre class="brush: csharp; title: ;">using UnityEngine;</pre>
<p>Just like with XML, we can load the JSON file by using the WWW class.
<pre class="brush: csharp; title: ;">WWW www = new WWW(&quot;http://paultondeur.com/files/2010/UnityExternalJSONXML/books.json&quot;);</pre>
<p>Once the data is loaded from the provided URL, we need to convert the loaded string into an object of the JsonData type. We can use a static method of the JsonMapper class to achieve this:
<pre class="brush: csharp; title: ;">JsonData jsonBooks = JsonMapper.ToObject(jsonString);</pre>
<p>Now we have the string converted into an object, we can easily access the objects that have been defined in the JSON file. So let&#8217;s say we want access the book object and show how many books are nested:
<pre class="brush: csharp; title: ;">Debug.Log(jsonBooks[&quot;book&quot;].Count);</pre>
<p>That looks easy, right? jsonBooks["book"] holds an array of books, so in order to loop through all books, we can use a simple for loop:
<pre class="brush: csharp; title: ;">for(int i = 0; i&lt;jsonBooks[&quot;book&quot;].Count; i++)
{
  ......
}</pre>
<p>In this example, it will loop through the two books. While looping through them, we can print the book title on the screen:
<pre class="brush: csharp; title: ;">Debug.Log(jsonBooks[&quot;book&quot;][i][&quot;title&quot;].ToString());</pre>
<p>Notice the ToString() method call at the end of the selected object. This will convert the object into a string. C# is more strict with this as compared to ActionScript, so never forget to call this to prevent errors.</p>
<p>Now let&#8217;s say you want to access the book ID and treat it as in integer. You first need to convert the object to a string and then convert it to an integer.
<pre class="brush: csharp; title: ;">Debug.Log(Convert.ToInt16(jsonBooks[&quot;book&quot;][i][&quot;id&quot;].ToString()));</pre>
<p>Nested inside an book object are the authors. Looping through them is quite easy, as we can you access these nested elements. Look at how to loop through the authors and print their names on the screen:
<pre class="brush: csharp; title: ;">for(int j = 0; j&lt;jsonBooks[&quot;book&quot;][i][&quot;authors&quot;][&quot;author&quot;].Count; j++)
{
  Debug.Log(jsonBooks[&quot;book&quot;][i][&quot;authors&quot;][&quot;author&quot;][j][&quot;name&quot;].ToString());
}</pre>
<p>I&#8217;ve recreated the same example as used in part 1 of this tutorial, only this time with a JSON file as the data source. The complete source can be found in the download, however have a look at the following code to see how LitJSON could be used in production:
<pre class="brush: csharp; title: ;">using UnityEngine;
using LitJson;
using System;
using System.Collections;

public class LoadJSON : MonoBehaviour
{
  IEnumerator Start()
  {
    //Load JSON data from a URL
    string url = &quot;http://paultondeur.com/files/2010/UnityExternalJSONXML/books.json&quot;;
    WWW www = new WWW(url);

    //Load the data and yield (wait) till it's ready before we continue executing the rest of this method.
    yield return www;
    if (www.error == null)
    {
      //Sucessfully loaded the JSON string
      Debug.Log(&quot;Loaded following JSON string&quot; + www.data);

      //Process books found in JSON file
      ProcessBooks(www.data);
    }
    else
    {
      Debug.Log(&quot;ERROR: &quot; + www.error);
    }

  }

  //Converts a JSON string into Book objects and shows a book out of it on the screen
  private void ProcessBooks(string jsonString)
  {
    JsonData jsonBooks = JsonMapper.ToObject(jsonString);
    Book book;

    for(int i = 0; i&lt;jsonBooks[&quot;book&quot;].Count; i++)
    {
      book = new Book();
      book.id = Convert.ToInt16(jsonBooks[&quot;book&quot;][i][&quot;id&quot;].ToString());
      book.title = jsonBooks[&quot;book&quot;][i][&quot;title&quot;].ToString();
      book.image = jsonBooks[&quot;book&quot;][i][&quot;image&quot;].ToString();
      book.description = jsonBooks[&quot;book&quot;][i][&quot;description&quot;].ToString();
      book.authors = new ArrayList();

      for(int j = 0; j&lt;jsonBooks[&quot;book&quot;][i][&quot;authors&quot;][&quot;author&quot;].Count; j++)
      {
        book.authors.Add(jsonBooks[&quot;book&quot;][i][&quot;authors&quot;][&quot;author&quot;][j][&quot;name&quot;].ToString());
      }

      LoadBook(book);
    }
  }

  //Finds book object in application and send the Book as parameter.
  //Currently only works with two books
  private void LoadBook(Book book)
  {
    GameObject bookGameObject = GameObject.Find(&quot;Book&quot; + book.id.ToString());
    bookGameObject.SendMessage(&quot;LoadBook&quot;, book);
  }

}</pre>
<p>This gives an idea how to handle JSON files in Unity.  Just like with XML this comes with a disadvantage in terms of filesize. It&#8217;s size footprint to the Unity file is about equal to XML: +/- 850kb.  <a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/externalSJON.html" title="Unity loading an external JSON example" target="_blank">A live example of this can be viewed here.</a></p>
<p><strong>Conclusion</strong><br />
I think it&#8217;s quite hard to say which file format is better. Both XML and JSON add about the same amount of kilobytes to the Unity file. I&#8217;ve not tested which of these is more efficient performance wise. It might be worth checking that out before you&#8217;ll be working with large amounts of data. In case that doesn&#8217;t matter, I think it&#8217;s just a matter of personal taste. I think I kind of prefer to use JSON, as this reminds me of handling XML files with ActionScript in the AS2 days.<br />
But give it a try yourself and see what works best for you.</p>
<p align="left"><strong>Downloads / Examples</strong></p>
<ul>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/ExternalDataExamples.zip" title="External XML and JSON data example files" target="_blank">Download XML and JSON example files</a></li>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/LitJSON.dll" title="LitJSON dll file" target="_blank">Download LitJSON dll file</a></li>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/externalXML.html" title="Unity loading an external XML example" target="_blank">View XML Example</a></li>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/externalJSON.html" title="Unity loading an external JSON example" target="_blank">View JSON Example</a></li>
<li><a href="http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-1-xml/" title="Part1: Loading an XML file into Unity">Go to part 1 of this tutorial</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-2-json/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Tutorial: Loading and parsing external XML and JSON files with Unity &#8211; Part 1: XML</title>
		<link>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-1-xml/</link>
		<comments>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-1-xml/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 14:41:00 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-1-xml/</guid>
		<description><![CDATA[As being a Flash Developer for many years, I&#8217;m very used to just quickly loading and parsing an external XML file. Although this is possible with Unity, I found out...]]></description>
			<content:encoded><![CDATA[<p>As being a Flash Developer for many years, I&#8217;m very used to just quickly loading and parsing an external XML file. Although this is possible with Unity, I found out there&#8217;s very limited information about this subject available in a Unity context. While investigating this subject a while ago, I also decided to look into the JSON format as a data container, to see which works best for me. Naturally I&#8217;d prefer to use XML over JSON, but it turns out that both comes with their cons and pros, which makes it hard to say which works best.<br />
In this two part tutorial I&#8217;ll show how you could load an XML or JSON file into Unity and parse it&#8217;s information. Both the XML file and JSON file are containers for the same information, which makes it easier to compare the differences between the two.<br />
<span id="more-96"></span><br />
<strong>XML</strong><br />
The XML file I&#8217;ve created contains a couple of books. In order to cover different ways to work with XML, it contains a variety of data, like attributes, regular nodes and childnodes, integers, strings and CDATA blocks.</p>
<pre class="brush: xml; title: ;">
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;books&gt;
  &lt;book id=&quot;1&quot;&gt;
    &lt;title&gt;Papervision3D Essentials&lt;/title&gt;
    &lt;image&gt;http://paultondeur.com/files/2010/UnityExternalJSONXML/Papervision3DEssentials.jpg&lt;/image&gt;
    &lt;authors&gt;
      &lt;author id=&quot;1&quot;&gt;Paul Tondeur&lt;/author&gt;
      &lt;author id=&quot;2&quot;&gt;Jeff Winder&lt;/author&gt;
    &lt;/authors&gt;
    &lt;description&gt;
      &lt;![CDATA[&lt;p&gt;Create interactive &lt;b&gt;Papervision3D&lt;/b&gt; applications with stunning effects and powerful animations&lt;/p&gt;]]&gt;
    &lt;/description&gt;
  &lt;/book&gt;
  &lt;book id=&quot;2&quot;&gt;
    &lt;title&gt;Unity Game Development Essentials&lt;/title&gt;
    &lt;image&gt;http://paultondeur.com/files/2010/UnityExternalJSONXML/UnityGameDevelopmentEssentials.jpg&lt;/image&gt;
    &lt;authors&gt;
      &lt;author id=&quot;3&quot;&gt;Will Goldstone&lt;/author&gt;
    &lt;/authors&gt;
    &lt;description&gt;
      &lt;![CDATA[&lt;p&gt;Build fully functional, professional 3D games with realistic environments, sound, &lt;i&gt;dynamic effects&lt;/i&gt;, and more!&lt;/p&gt;]]&gt;
    &lt;/description&gt;
  &lt;/book&gt;
&lt;/books&gt;</pre>
<p>This file can also be found on: <a href="http://paultondeur.com/files/2010/UnityExternalJSONXML/books.xml" title="Example external XML for use in Unity" target="_blank">http://paultondeur.com/files/2010/UnityExternalJSONXML/books.xml</a> and will be loaded later on in this tutorial.</p>
<p>XML is not new to C#. In fact, it&#8217;s quite integrated within the language. When you create a new application in Visual Studio, you have access to the <em>System.Xml</em> namespace by default. Within this namespace, lots of classes can be found for creating, reading and modifying XML documents. Accessing these classes in Unity however, doesn&#8217;t work out of the box. This is because this namespace isn&#8217;t available within Unity. The solution for this is relatively simple; We just need to reference the System.Xml dll in Unity. As Unity is build upon the <a href="http://en.wikipedia.org/wiki/Mono_%28software%29" title="Mono Framework" target="_blank">Mono Framework</a>, this file is provided with your local Unity install. You can find these files at the following locations, depending on the machine you&#8217;re running on:</p>
<ul>
<li>MAC: Go to /Applications/Unity/ and right-click on Unity.app -&gt; Show Package Contents. Then browse to &#8220;Contents/Frameworks/Mono.framework/&#8221;. In this folder you&#8217;ll find lot&#8217;s of dll files. In this case, just copy System.Xml.dll</li>
<li>Windows: Go to C:\Program Files\Unity\Editor\Data\Frameworks\Mono.framework and copy System.Xml.dll from here.</li>
</ul>
<p>The next thing to do is paste the dll into your assets folder of a Unity project. Next time you compile this project, the System.Xml namespace is available to you from within the Unity player.</p>
<p>To load any external content from a webserver with Unity, we can use the WWW class. (can be compared to a URLRequest in Flash).
<pre class="brush: csharp; title: ;">
WWW www = new WWW(&quot;http://paultondeur.com/files/2010/UnityExternalJSONXML/books.xml&quot;);</pre>
<p>Once the data is loaded we can instantiate a new XML document and load the XML by the data that has returned from the www class request.
<pre class="brush: csharp; title: ;">XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(www.data);</pre>
<p>Instead of using E4X (as in Flash) to select childnodes inside the XML document, we have to make use of an <a href="http://en.wikipedia.org/wiki/XPath_1.0" title="XPath Expression explained" target="_blank">XPath expression</a>. In our case we want to select all books, which are nested inside the books element. Selecting nodes returns an XmlNodeList, which will be used to loop through all results. Take a look at how to select all book nodes and loop through them:
<pre class="brush: csharp; title: ;">foreach (XmlNode node in xmlDoc.SelectNodes(&quot;books/book&quot;) )
{
  .....
}</pre>
<p>Inside the loop we have access to the value &#8220;<em>node</em>&#8220;, which contains information of the selected book. Let&#8217;s say we want to access the title node value of the book and show it on the screen:
<pre class="brush: csharp; title: ;">Debug.Log(node.SelectSingleNode(&quot;title&quot;).InnerText);</pre>
<p>Accessing the description (which contains a CDATA block) is no different from selecting the title node:
<pre class="brush: csharp; title: ;">Debug.Log(node.SelectSingleNode(&quot;description&quot;).InnerText);</pre>
<p>Selecting an attribute of a node works of course a bit different. When we want to access the book id attribute we do this as follows:
<pre class="brush: csharp; title: ;">Debug.Log(node.Attributes.GetNamedItem(&quot;id&quot;).Value);</pre>
<p>All values in an XML are of a String type by default. In this case the id attribute is clearly of an integer type. Although it wouldn&#8217;t make any sense in this case, casting it to an int can be achieved by using the Convert utils class:
<pre class="brush: csharp; title: ;">Debug.Log(Convert.ToInt16(node.Attributes.GetNamedItem(&quot;id&quot;).Value));</pre>
<p>Inside a book node, we can find an authors node, which contains nested author nodes inside. In order to loop through these, we can again use an XPath expression, only this time on the current selected node.
<pre class="brush: csharp; title: ;">foreach (XmlNode author in node.SelectNodes(&quot;authors/author&quot;))
{
  Debug.Log(author.InnerText);
}</pre>
<p>Around this concept of loading and parsing an XML file I&#8217;ve created a very small Unity application, which shows the two book covers on screen and calls a Debug.Log() on the author name on click on the book. The complete code can be found in the download at the bottom of this article. But the class that handles loading and parsing the XML looks as follows:
<pre class="brush: csharp; title: ;">using UnityEngine;
using System.Collections;
using System.Xml;
using System;

public class LoadXML : MonoBehaviour
{
  IEnumerator Start()
  {
    //Load XML data from a URL
    string url = &quot;http://paultondeur.com/files/2010/UnityExternalJSONXML/books.xml&quot;;
    WWW www = new WWW(url);

    //Load the data and yield (wait) till it's ready before we continue executing the rest of this method.
    yield return www;
    if (www.error == null)
    {
      //Sucessfully loaded the XML
      Debug.Log(&quot;Loaded following XML &quot; + www.data);

      //Create a new XML document out of the loaded data
      XmlDocument xmlDoc = new XmlDocument();
      xmlDoc.LoadXml(www.data);

      //Point to the book nodes and process them
      ProcessBooks(xmlDoc.SelectNodes(&quot;books/book&quot;));
    }
    else
    {
      Debug.Log(&quot;ERROR: &quot; + www.error);
    }

  }

  //Converts an XmlNodeList into Book objects and shows a book out of it on the screen
  private void ProcessBooks(XmlNodeList nodes)
  {
    Book book;

    foreach (XmlNode node in nodes)
    {
      book = new Book();
      book.id = Convert.ToInt16(node.Attributes.GetNamedItem(&quot;id&quot;).Value);
      book.title = node.SelectSingleNode(&quot;title&quot;).InnerText;
      book.image = node.SelectSingleNode(&quot;image&quot;).InnerText;
      book.description = node.SelectSingleNode(&quot;description&quot;).InnerText;
      book.authors = new ArrayList();

      //Loop the authors
      foreach (XmlNode author in node.SelectNodes(&quot;authors/author&quot;))
      {
        book.authors.Add(author.InnerText);
      }

      LoadBook(book);
    }
  }

  //Finds book object in application and send the Book as parameter.
  //Currently only works with two books
  private void LoadBook(Book book)
  {
    GameObject bookGameObject = GameObject.Find(&quot;Book&quot; + book.id.ToString());
    bookGameObject.SendMessage(&quot;LoadBook&quot;, book);
  }
}</pre>
<p>With this example you should be able to load and parse your own XML files. Before doing this, I need to point you to the fact that using the System.Xml dll results in quite a large footprint to your application. In my tests it turned out that it was about an 850kb difference between having an empty Unity application and an application that is using the System.Xml dll.</p>
<p>In the next part of this tutorial I&#8217;ll demonstrate how you could achieve the same results with a JSON file as data container.</p>
<ul>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/ExternalDataExamples.zip" title="External XML and JSON data example files" target="_blank">Download the source files for this complete tutorial (part1 and part2) here.</a></li>
<li><a href="http://www.paultondeur.com/files/2010/UnityExternalJSONXML/externalXML.html" title="Unity loading an external XML example" target="_blank">A working demonstration of this example with XML can be found here.</a></li>
<li><a href="http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-2-json/" title="Part 2: Loading an external JSON file into Unity">Continue reading this tutorial in part 2 about loading and parsing a JSON file.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2010/03/23/tutorial-loading-and-parsing-external-xml-and-json-files-with-unity-part-1-xml/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Getting started with Unity workshop @ Adobe Usergroup XL</title>
		<link>http://www.paultondeur.com/2009/11/10/getting-started-with-unity-workshop-adobe-usergroup-xl/</link>
		<comments>http://www.paultondeur.com/2009/11/10/getting-started-with-unity-workshop-adobe-usergroup-xl/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 23:19:12 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/11/10/getting-started-with-unity-workshop-adobe-usergroup-xl/</guid>
		<description><![CDATA[On the 3rd of December, I&#8217;ll be doing a workshop on getting started with Unity at the upcoming Adobe Usergroup XL meeting in Amsterdam. During this 2 hour workshop, a...]]></description>
			<content:encoded><![CDATA[<p>On the 3rd of December, <a href="http://www.adobeusergroupxl.nl/sprekers#sp_91" title="Adobe Usergroup XL meeting - Speaker Paul Tondeur" target="_blank">I&#8217;ll</a> be doing a workshop on getting started with Unity at the upcoming <a href="http://www.adobeusergroupxl.nl/" title="Adobe Usergroup XL meeting" target="_blank">Adobe Usergroup XL</a> meeting in Amsterdam. During this 2 hour workshop, a short introduction on Unity will be given. What is the tool and where could you use it for. Which elements do we find in the interface, where does this overlap with Flash, how to program and how to create a first game. Right from the start when we have a look at the interface, you can actively work on the examples by using your own laptop. By playing around with Unity, you&#8217;ll get familiar with it. This workshop is a good start to continue learning Unity on your own, after the workshop.<br />
Depending on the sign-ups  this could be an English spoken workshop.</p>
<p>Besides my workshop, there will be lots of other interesting presentations and workshops during the day. You should keep an eye on the website of the usergroup for updates about all sessions and speakers. So far the other confirmed speakers are:  <a href="http://www.group94.be" title="Pascal Leroy" target="_blank">Pascal Leroy</a>, <a href="http://www.ooo-ii.com" title="Dave August" target="_blank">Dave August</a>, <a href="http://www.kgbamsterdam.com" title="Zender" target="_blank">Zender</a>, <a href="http://www.karakterconcept.com" title="Tobias Mannewitz" target="_blank">Tobias Mannewitz</a>, <a href="http://www.demonsters.com" title="De Monsters" target="_blank">De Monsters</a>, Rufus Deuchler,<a href="http://www.champagnevalentine.com" title="Champagne Valentine" target="_blank"> Champagne Valentine</a>, <a href="http://www.sergejespers.com" title="Serge Jespers" target="_blank">Serge Jespers</a>, <a href="http://www.hanazuki.com" title="Hanazuki" target="_blank">Hanazuki</a>, <a href="http://blogs.adobe.com/jlevmedia" title="Jason Levine" target="_blank">Jason Levine</a>, <a href="http://www.unitzeroone.com" title="Ralph Hauwert" target="_blank">Ralph Hauwert</a>, <a href="http://www.layar.com" title="Dirk Groten" target="_blank">Dirk Groten</a>, <a href="http://www.mad.com.au/blog" title="Paul Burnett">Paul Burnett</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/11/10/getting-started-with-unity-workshop-adobe-usergroup-xl/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Unity and Flash, the best of both worlds! &#8211; Unite presentation slides</title>
		<link>http://www.paultondeur.com/2009/10/29/unity-and-flash-the-best-of-both-worlds-unite-presentation-slides/</link>
		<comments>http://www.paultondeur.com/2009/10/29/unity-and-flash-the-best-of-both-worlds-unite-presentation-slides/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 22:30:00 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Red5]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/10/29/unity-and-flash-the-best-of-both-worlds-unite-presentation-slides/</guid>
		<description><![CDATA[Last Tuestday I presented at the pre-conference Unity for Flash developers day, at invitation of Unity. It was a very interesting day for every Flash developer who wants to get...]]></description>
			<content:encoded><![CDATA[<p>Last Tuestday I presented at the pre-conference Unity for Flash developers day, at invitation of Unity. It was a very interesting day for every Flash developer who wants to get into Unity (which by the way is  very easy to get started with, as <a title="Free Unity" href="http://unity3d.com/unity/download/" target="_blank">Unity Indy has been made a free product</a>!). Other speakers that day were <a title="Mauricio Longoni" href="http://www.aquiris.com.br" target="_blank">Mauricio Longoni</a>, <a title="John Grden" href="http://rockonflash.wordpress.com/" target="_blank">John Grden</a> and <a title="Tom Higgins" href="http://blogs.unity3d.com/author/tom/" target="_blank">Tom Higgins</a>.</p>
<p>I think the day provided the visitors with a lot of essential information in order to get started with Unity. The feedback I received on my talk was very good, so hopefully I contributed to new Unity users getting started with Unity.</p>
<p>As promised in my presentation, I&#8217;ve posted my presentation online, which you&#8217;ll find at the end of this post. In the next weeks when I&#8217;ve returned and recoverd from this conference, I&#8217;ll start posting some of the examples as mentioned in my presentation. So you can expect the JSON, Google Analytics, XML loading and Parsing, image loading and posting variables examples on this page.</p>
<p><object style="margin: 0px;" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=unite2009slideshare-091029172653-phpapp01&amp;stripped_title=unity-and-flash-the-best-of-both-worlds-unite-presentation-slides" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=unite2009slideshare-091029172653-phpapp01&amp;stripped_title=unity-and-flash-the-best-of-both-worlds-unite-presentation-slides" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script><br />
<script src="http://b.scorecardresearch.com/beacon.js?c1=7&amp;c2=7400849&amp;c3=1&amp;c4=&amp;c5=&amp;c6="></script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/10/29/unity-and-flash-the-best-of-both-worlds-unite-presentation-slides/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Speaking at Unite 2009 in San Fransisco &#8211; Unity for Flash developers</title>
		<link>http://www.paultondeur.com/2009/10/09/speaking-at-unite-2009-in-san-fransisco-unity-for-flash-developers/</link>
		<comments>http://www.paultondeur.com/2009/10/09/speaking-at-unite-2009-in-san-fransisco-unity-for-flash-developers/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 11:15:42 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Unity3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/10/09/speaking-at-unite-2009-in-san-fransisco-unity-for-flash-developers/</guid>
		<description><![CDATA[I already twittered this while being on vacation, however I thought it would be nice to give this some extra attention, since I think the conference is going to rock....]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/10/unite2009.jpg" alt="Unite 2009" /></p>
<p>I already twittered this while being on vacation, however I thought it would be nice to give this some extra attention, since I think the conference is going to rock. After investing a lot of time since last years Unite conference in Copenhagen, it would be very interesting to see where other developers have been into and join the very promising sessions that are scheduled (<a title="Unite 2009 Agenda" href="http://unity3d.com/unite/agenda" target="_blank">http://unity3d.com/unite/agenda</a>).</p>
<p>If you don&#8217;t have a ticket yet, you should really rush, as the conference already starts in a little more than 2 weeks on the 27th of October.</p>
<p>In my point of view, Unity made a very wise decision this year by organizing a special day for Flash developers. This day will give the conference a kick-start for Flash developers who want to get into Unity, as they will be introduced to everything they need to know to get along with the rest of the conference (and start themselves with some Unity development afterwards). I would have been so grateful when such conference day was available at the time I got into Unity.</p>
<p>I feel very honored that &#8216;m invited by the people of Unity to come over and do a session for Flash developers. My talk will be about using best of both worlds and how to interact between the two. Unity for 3D content and Flash elements for 2D content. I have some very interesting cases in mind, which I&#8217;ll work out in the next two weeks and present at my session.</p>
<p><a title="John Grden" href="http://rockonflash.wordpress.com/" target="_blank">John Grden</a> from the <a title="Papervision3D" href="http://blog.papervision3d.org" target="_blank">Papervision3D</a> team will host another session, as well as Mauricio Longoni who created <a title="u3dobject" href="http://code.google.com/p/aquiris-u3dobject/" target="_blank">u3dobject</a>.</p>
<p>So to conclude this and be honest; if this is within your field of interest you just need to be there! So get your tickets today and see you in San Fransisco!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/10/09/speaking-at-unite-2009-in-san-fransisco-unity-for-flash-developers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Papervision3D Essentials &#8211; Out now!</title>
		<link>http://www.paultondeur.com/2009/09/03/papervision3d-essentials-out-now/</link>
		<comments>http://www.paultondeur.com/2009/09/03/papervision3d-essentials-out-now/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 16:34:18 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/09/03/papervision3d-essentials-out-now/</guid>
		<description><![CDATA[After more than 8 months of hard work, at least 1600 man-hours, writing 13 chapters and 428 pages, Jeff Winder and I are proud to let the world know that...]]></description>
			<content:encoded><![CDATA[<p>After more than 8 months of hard work, at least 1600 man-hours, writing 13 chapters and 428 pages, Jeff Winder and I are proud to let the world know that our book has finally been <a href="http://www.packtpub.com/papervision3d-essentials/book" title="Papervision3D Essentials Book" target="_blank">published</a>!</p>
<p>With this book we had the goal to write a book for beginners. A book which we would like to read when we were starting with Papervision3D. Taking nothing for granted and gradually work to more advanced topics. Hopefully we have achieved that goal, which will become clear once the copies are sold and we will get feedback from our readers. Now the book is on sale we can finally get feedback from more people other than the very valuable reviewers <a href="http://www.flashmonkey.org/" title="Trevor Burton - Reviewer of Papervision3D Essentials" target="_blank">Trevor Burton</a>, <a href="http://blog.tartiflop.com/" title="Stuart Caunt - Reviewer of Papervision3D Essentials" target="_blank">Stuart Caunt</a> and <a href="http://www.patrickrushton.com/" title="Patrick Rushton - Reviewer of Papervision3D Essentials" target="_blank">Patrick Rushton</a>.</p>
<p>The book covers many topics in detail, which results to that the book could be used as a reference guide. More than once I&#8217;ve looked back to the chapters that we&#8217;ve written and see how things work. We have chapters dedicated to the following topics:</p>
<ul>
<li>Setting up</li>
<li>Building your first application</li>
<li>Primitives</li>
<li>Materials</li>
<li>Cameras</li>
<li>Moving things around</li>
<li>Shading</li>
<li>External models</li>
<li>Z-sorting</li>
<li>Particles</li>
<li>Filters and effects</li>
<li>3D Vector drawing and text</li>
<li>Optimizing performance</li>
</ul>
<p>Together with releasing this book, our publisher posted an example chapter on their website. <a href="http://www.packtpub.com/files/5722-papervision-3d-sample-chapter-8-external-models.pdf" title="Papervision3D Essentials - Chapter 8 - Modeling" target="_blank">Which is chapter 8 about modeling</a>. I think this chapter gives a good impression on how thouroughly we tried to explain certain topics.</p>
<p>More information about the topics of our book can be found on the website of our publisher. Make sure you&#8217;ll check out:</p>
<ul>
<li><a href="http://www.packtpub.com/view_popup/page/papervision3d-essentials-table-of-contents" title="Papervision3D Essentials Table of contents" target="_blank">Table of contents</a></li>
<li><a href="http://www.packtpub.com/article/3d-vector-drawing-and-text-papervision3d-part1" title="Article from Papervison3D Essentials book - 3D Vector Drawing and Text - part 1" target="_blank">3D Vector Drawing and Text with Papervision3D: Part 1</a></li>
<li><a href="http://www.packtpub.com/article/3d-vector-drawing-and-text-papervision3d-part2" title="Article from Papervison3D Essentials book - 3D Vector Drawing and Text - part 2" target="_blank">3D Vector Drawing and Text with Papervision3D: Part 2 </a></li>
</ul>
<p>In the next couple of weeks you can expect some articles here on my blog about subjects that have not made it to the book. So keep an eye on this blog.</p>
<p>But for now, I&#8217;m going to enjoy my vacation first and I want to say a big THANK YOU!, to those who have supported us during the writing. Our reviewers Trevor, Patrick and Stuart. The Flash community for posting valuable articles and last but not least the Papervision3D team for their help and answers while writing the book.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/09/03/papervision3d-essentials-out-now/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Papervision3D Essentials &#8211; A Book By Paul Tondeur and Jeff Winder Officially Announced</title>
		<link>http://www.paultondeur.com/2009/07/24/papervision3d-essentials-a-book-by-paul-tondeur-and-jeff-winder-officially-announced/</link>
		<comments>http://www.paultondeur.com/2009/07/24/papervision3d-essentials-a-book-by-paul-tondeur-and-jeff-winder-officially-announced/#comments</comments>
		<pubDate>Fri, 24 Jul 2009 21:41:23 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[Books]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Papervision3D]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/07/24/papervision3d-essentials-a-book-by-paul-tondeur-and-jeff-winder-officially-announced/</guid>
		<description><![CDATA[I&#8217;m very delighted to finally announce that I have been working on the first Papervision3D book that will be released ever. The book is in cooperation with my good friend...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.paultondeur.com/2009/07/24/papervision3d-essentials-a-book-by-paul-tondeur-and-jeff-winder-officially-announced/" title="Papervision3D Essentials Book Cover"><img src="http://www.paultondeur.com/wp-content/uploads/2009/08/papervision3d-essentials.jpg" alt="Papervision3D Essentials Book Cover" /></a></p>
<p>I&#8217;m very delighted to finally announce that I have been working on the first Papervision3D book that will be released ever. The book is in cooperation with my good friend and co-author <a href="http://seedylifestyle.blogspot.com/" title="Jeff Winder" target="_blank">Jeff Winder</a> and will be published by <a href="http://www.packtpub.com/" title="Packt Publishing - Publisher of Papervision3D Essentials" target="_blank">Packt Publishing</a>. Since the beginning of this year we have been working extremely hard on the writing of this book. We are ready with the writing of all chapters and are preparing all final drafts right now. So you can expect this book to be published really soon.</p>
<p>The result of our hard work is that we have a book that will be useful for both experienced as non-experienced Papervision3D users. The first few chapters take no knowledge for granted and guides the reader through all steps for getting started with Papervision3D. It describes how to get Flash CS3, Flash CS4, Flex Builder and Flash Builder correctly configured for running Papervision3D code. This includes downloading Papervision3D (SWC, ZIP and a step-by-step guide for downloading from SVN). Once an example project has been compiled, a short introduction to OOP and classes is given for those who have no experience in this. From there the reader book gradually works through more advanced topics, such as loading external models, shading, z-sorting, viewport layers, particles, filters and effects, vector drawing and performance optimizations.</p>
<p>As the book contains much information on a variety of topics it is also interesting for those who already have experience in Papervision3D, but want to extend their knowledge and understanding. It was not aimed to be a reference guide, however it turns out that many topics are thoroughly described and can be used for this purpose as well. (I personally already did this while working on commercial projects that make use of Papervision3D)</p>
<p>Today <a href="http://www.packtpub.com/papervision3d-essentials" title="Papervision3D Essentials - By Paul Tondeur and Jeff Winder" target="_blank">the book has been announced on the website of our publisher, Packt Publishing</a> and will soon be announced on other websites, like Amazon for example. For both Jeff and myself this is the first book we have ever written. Seeing our book and names listed is already very exciting.</p>
<p>We can&#8217;t wait to have our book finished and hold the final copy in our hands. We did our best (and still do) to make this a very good book and we are looking forward to hear responses from our readers.  But for now we will continue writing on the last bits. Once there&#8217;s more news about the exact release date I will post it here on my blog.</p>
<p>[Update 2009-07-29] <a href="http://www.amazon.com/Papervision3D-Essentials-Paul-Tondeur/dp/1847195725/ref=sr_1_12?ie=UTF8&amp;s=books&amp;qid=1248878573&amp;sr=8-12" title="Papervision3D Essentials - Amazon" target="_blank">Papervision3D Essentials &#8211; Now listed on Amazon </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/07/24/papervision3d-essentials-a-book-by-paul-tondeur-and-jeff-winder-officially-announced/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>New mobile streaming campaign &#8211; Pak de Polo</title>
		<link>http://www.paultondeur.com/2009/07/18/new-mobile-streaming-campaign-pak-de-polo/</link>
		<comments>http://www.paultondeur.com/2009/07/18/new-mobile-streaming-campaign-pak-de-polo/#comments</comments>
		<pubDate>Sat, 18 Jul 2009 11:45:48 +0000</pubDate>
		<dc:creator>Paul Tondeur</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mobile streaming]]></category>
		<category><![CDATA[Red5]]></category>

		<guid isPermaLink="false">http://www.paultondeur.com/2009/07/18/new-mobile-streaming-campaign-pak-de-polo/</guid>
		<description><![CDATA[Last Thursday a new campaign for Volkswagen went live, which makes use of mobile streaming. I did some work for this in cooperation with Achtung!, before looking at what I...]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.paultondeur.com/2009/07/18/new-mobile-streaming-campaign-pak-de-polo/" title="PakDePolo.nl"><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/pakdepolonl.jpg" alt="PakDePolo.nl" /></a></p>
<p>Last Thursday a new campaign for Volkswagen went live, which makes use of mobile streaming. I did some work for this in cooperation with <a href="http://www.achtung.nl" title="Achtung!" target="_blank">Achtung!</a>, before looking at what I developed for this campaign let me first give a nutshell introduction.</p>
<p>A new Volkswagen Polo is driving around in the Netherlands. When you see the car passing by, you can wave at the car, so the current driver has to stop and the new driver can continue the ride. Each day winner who drove the longest distance gets a ticket for the finale that takes place after the campaign. The one who wins the finale will win the car.</p>
<p>Visitors of the website www.pakdepolo.nl can see where the car is at this moment through several video streams and live GPS. You can leave your zip code on the website in to vote for your neighborhood, which could result in sending the car in that direction. The car is equipped with an custom written navigation system making use of Google maps and is in connection with the website. New routes can be pushed to the car. It is also possible to leave your mobile phone number or e-mail, in order to get a warning when the car is will cross your neighborhood.<br />
I was asked to equip the car with all the technical stuff, as I have quite some experience with mobile streaming and equipping cars with it.</p>
<p>I had to:</p>
<ul>
<li>Recreate and assemble the camera system.</li>
<li>Set up streaming to a Wowza server.</li>
<li>Real-time push GPS positions from the car to all clients over a RTMP (Red5) connection</li>
<li>Track distance per driver. (This was a real hassle, as the GPS devices which I’ve used gave unreliable positions once in a while)</li>
<li>Create a LED display showing a driven distance per driver. (This was custom made. A Phidget has been used as the interface between a laptop and the LED display).</li>
<li>Set up a local in-car network to set up a remote desktop between the laptop in front of the car, with laptops in the trunk.</li>
<li>Custom build all hardware in the car.</li>
</ul>
<p>The following images show some parts of my work: <span id="more-74"></span><br />
<img src="http://www.paultondeur.com/wp-content/uploads/2009/07/polooutside.jpg" alt="Polo outside" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/poloandtrackingvan.jpg" alt="Polo and tracking van" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/driversseat.jpg" alt="Driver’s seat" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/backseat.jpg" alt="Back seat" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/insideled.jpg" alt="Led display from inside" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/trunkbottom.jpg" alt="Trunk bottom" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/trunklaptops.jpg" alt="Trunk laptops" /></p>
<p><img src="http://www.paultondeur.com/wp-content/uploads/2009/07/leddisplay.jpg" alt="Led display development" /></p>
<p>It was a lot of fun to create all this. It was also a pleasure to work with <a href="http://www.achtung.nl" title="Achtung!" target="_blank">Achtung!</a> and their very talented creative developer <a href="http://www.flashaddict.nl" title="Talented creative developer Patrick Pietens" target="_blank">Patrick Pietens</a> who did the front-end. The fun continues now the campaign is started and you can see who &#8220;hijacks&#8221; the car at this moment.<br />
Take a look yourself at <a href="http://www.pakdepolo.nl" title="Pak de Polo" target="_blank">www.pakdepolo.nl</a></p>
<p>Update July 21st: There is also an English version of the website available <a href="http://www.pakdepolo.nl/en/" title="Pak de Polo - English" target="_blank">www.pakdepolo.nl/en/ </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.paultondeur.com/2009/07/18/new-mobile-streaming-campaign-pak-de-polo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

