<?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>The Park is Vast &#187; IMML</title>
	<atom:link href="http://theparkisvast.com/VastPark/nerdy/imml/feed/" rel="self" type="application/rss+xml" />
	<link>http://theparkisvast.com</link>
	<description></description>
	<lastBuildDate>Mon, 31 Oct 2011 18:44:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Presentation: The Technology Behind VastPark</title>
		<link>http://theparkisvast.com/2011/06/11/presentation-the-technology-behind-vastpark/</link>
		<comments>http://theparkisvast.com/2011/06/11/presentation-the-technology-behind-vastpark/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 14:40:29 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VastPark General]]></category>

	<!-- AutoMeta Start -->
	<category>paris</category>
	<category>cantine</category>
	<category>slideshare</category>
	<category>10th</category>
	<category>june</category>
	<category>presentation</category>
	<category>technology</category>
	<category>audience</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=652</guid>
		<description><![CDATA[Today I presented at La Cantine in Paris to both a real world audience and a virtual audience inside of VastPark. The presentation covered the technology that powers VastPark, where to find the open source code and the specifications such as IMML, Continuum, and the recently announced OpenAvatar. I also showed some live demonstrations of [...]]]></description>
			<content:encoded><![CDATA[<p>Today I presented at La Cantine in Paris to both a real world audience and a virtual audience inside of VastPark.</p>
<p>The presentation covered the technology that powers VastPark, where to find the open source code and the specifications such as IMML, Continuum, and the recently announced OpenAvatar. I also showed some live demonstrations of VastPark in action (the selective Continuum capture I did can be downloaded from <a href='http://theparkisvast.com/wp-content/uploads/2011/06/Retreat-2011-06-10-1031.continuum'>here</a>).</p>
<p>See the slideshare below, there was a lot of talking during the presentation so the slides may seem a little light on content. If you have questions about the slides feel free to comment and I will answer. </p>
<div style="width:595px" id="__ss_8271303"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/craigomatic/la-cantine-presentation-paris-10th-june-2011" title="La Cantine Presentation, Paris, 10th June 2011">La Cantine Presentation, Paris, 10th June 2011</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/8271303" width="595" height="497" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe> </div>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2011/06/11/presentation-the-technology-behind-vastpark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Pianist v2</title>
		<link>http://theparkisvast.com/2011/04/15/the-pianist-v2/</link>
		<comments>http://theparkisvast.com/2011/04/15/the-pianist-v2/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 04:29:51 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Audio]]></category>
		<category><![CDATA[Behaviours]]></category>
		<category><![CDATA[Continuum]]></category>
		<category><![CDATA[Recording]]></category>
		<category><![CDATA[Roland HP1300e]]></category>
		<category><![CDATA[Virtual Piano]]></category>

	<!-- AutoMeta Start -->
	<category>piano</category>
	<category>sound</category>
	<category>behaviours</category>
	<category>csharp</category>
	<category>pianist</category>
	<category>played</category>
	<category>parkengine</category>
	<category>visually</category>
	<category>piano</category>
	<category>sound</category>
	<category>behaviours</category>
	<category>csharp</category>
	<category>pianist</category>
	<category>played</category>
	<category>parkengine</category>
	<category>visually</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=588</guid>
		<description><![CDATA[Back in April of 2007 I was inspired to build a virtual piano in VastPark, you can read the super brief post about it here. At the time, I was pretty happy with the way it turned out and recently decided it was time for it to make a comeback! How it works This time [...]]]></description>
			<content:encoded><![CDATA[<p>Back in April of 2007 I was inspired to build a virtual piano in VastPark, you can read the super brief post about it <a href="http://theparkisvast.com/2007/04/18/the-pianist-v10/">here</a>. </p>
<p>At the time, I was pretty happy with the way it turned out and recently decided it was time for it to make a comeback!</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2011/04/the-pianist-v2.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2011/04/the-pianist-v2.jpg" alt="" title="the-pianist-v2" width="836" height="499" class="alignnone size-full wp-image-590" /></a></p>
<h4>How it works</h4>
<p>This time around I decided to do things a little differently and shift all of the logic to a single .NET plugin that controls the entire piano experience. </p>
<p>While this has a number of benefits, I was primarily interested in keeping the structure of the environment cleanly separated from the logic.</p>
<p>To keep this separation simple, I made use of a little known feature of IMML called behaviours. Here&#8217;s a sample of my IMML:</p>
<pre class="brush: xml; highlight: [20,26]; title: ; notranslate">&lt;IMML Name=&quot;The Pianist v2&quot; Camera=&quot;camera&quot; xmlns=&quot;http://schemas.vastpark.com/2007/imml/&quot;&gt;

  &lt;!-- The plugin manages all interaction with the piano via behaviours --&gt;
  &lt;Plugin Name=&quot;PianoPlugin&quot; Enabled=&quot;True&quot; Source=&quot;plugins/Piano.plugin&quot;&gt;
    &lt;Parameter Key=&quot;HighlightColour&quot; Value=&quot;#00FF00&quot; /&gt;
    &lt;Parameter Key=&quot;RotationWhenPressed&quot; Value=&quot;0.03120605, 0, 0&quot; /&gt;
  &lt;/Plugin&gt;

  &lt;Model Name=&quot;black_piano&quot;
         Size=&quot;1.193525,1.065062,0.524349&quot;
         Rotation=&quot;6.283185,0,0&quot;
         Position=&quot;4.76837E-07,1.63393E-08,0.111626&quot;
         Source=&quot;models/black_piano.model&quot; /&gt;

  &lt;!-- Piano key models --&gt;
  &lt;Model Name=&quot;key_b_8&quot;
         Size=&quot;0.01918364,0.02875674,0.1308559&quot;
         Rotation=&quot;6.283185,0,0&quot;
         Position=&quot;-0.4839502,0.8194631,0.2247874&quot;
         Behaviours=&quot;piano-key&quot;
         Source=&quot;models/white_key1.model&quot; /&gt;
  &lt;!-- other models snipped for brevity --&gt;

  &lt;!-- Piano sounds --&gt;
  &lt;Sound Name=&quot;note_b_8&quot;
         Behaviours=&quot;piano-key-sound&quot;
         Source=&quot;sounds/pianokey_b_8.mp3&quot; /&gt;
  &lt;!-- other sounds snipped for brevity --&gt;

&lt;/IMML&gt;</pre>
<p>Note the usage of the piano-key and piano-key-sound behaviours. </p>
<p>Also, I&#8217;ve only shown one model and one sound, the actual file contains 88 of each named according to a convention so that the appropriate sound can be mapped.</p>
<h4>Using Behaviours</h4>
<p>Every IMML element has the ability to be marked as having one or more behaviours that can be accessed as a list via the DOM.</p>
<p>This is extremely handy when writing plugins that manipulate elements, as you can simply query the scene for elements that match the desired behaviours like so:</p>
<pre class="brush: csharp; title: ; notranslate">
//find all audio and models based on behaviour
var keyModels = base.ParkEngine.Context.Elements.Where(e =&gt; e.Behaviours.Contains(this.KeyModelBehaviour));
var keySounds = base.ParkEngine.Context.Elements.Where(e =&gt; e.Behaviours.Contains(this.KeySoundBehaviour));

if(keyModels.Any())
{
    //build keys for each model/sound combination
}
</pre>
<p>This works really well during the <em>Load()</em> method and can also be performed on elements dynamically added into the scene by listening to the <em>ParkEngine.ElementLoaded</em> event</p>
<p>In the context of the-pianist, it finds all elements of type <em>piano-key</em> and <em>piano-key-sound</em> and builds a PianoKey instance to manage them so that:</p>
<ul>
<li>When the mouse is down, the key is visually down, highlighted and the sound plays.</li>
<li>When the mouse is up, the key is visually up.</li>
<li>When the sound is no longer playing, the key is no longer highlighted</li>
</ul>
<h4>Continuum</h4>
<p>Next, I wanted to make sure that the work my plugin was doing would be correctly captured by Continuum. By default, Continuum will happily capture any series of changes in IMML state, so this initially didn&#8217;t seem like it would be a concern. </p>
<p>However, in my implementation of the Piano plugin I wanted to allow the same key to be pressed while the previous sound for that key was still playing. Just like a real piano.</p>
<p>To do this, I&#8217;ve been a little sneaky by going directly to the sound engine, bypassing the IMML change notification infrastructure which means that Continuum doesn&#8217;t see that change and cannot record it without some additional help.</p>
<p>You can see the two contrasting approaches below:</p>
<pre class="brush: csharp; title: ; notranslate">
//toggle approach
this.Audible.Enabled = true;

//direct approach, bypass the IMML change framework
this.ParkEngine.SoundEngine.Play(this.Audible);
</pre>
<p>To overcome this limitation, I wrote an implementation of IStateRecorder for my plugin with one very simple method:</p>
<pre class="brush: csharp; title: ; notranslate">
/// &lt;summary&gt;
/// Marks the sound as being played directly by the SoundEngine.
/// &lt;/summary&gt;
/// &lt;param name=&quot;sound&quot;&gt;The sound.&lt;/param&gt;
public void MarkSoundPlayed(Sound sound)
{
        if (!this.IsStarted)
        {
            return;
        }

        var captureState = new PianoCaptureState(Encoding.ASCII.GetBytes(sound.Name), Constants.Guid, DateTime.UtcNow, 0);

        this.Buffer.Enqueue(captureState);
}
</pre>
<p>It takes the name of the element that was played directly and writes it into the Continuum stream. </p>
<p>Later during playback, that element is resolved and at the appropriate time is played directly by the PianoStateController.</p>
<h4>Goodies</h4>
<p>I&#8217;ve zipped up the full source code to Plugin.Piano, along with the IMML and models you see in the screenshot at the beginning of this post. </p>
<p>Download here: <a href="http://tpiv.s3.amazonaws.com/the-pianist-v2.7z">http://tpiv.s3.amazonaws.com/the-pianist-v2.7z</a></p>
<p>Note that In order to run this properly, you&#8217;ll need to be a member of the Closed Beta community on <a href="http://vastpark.org">vastpark.org</a> (contact me if you&#8217;d like in) and be rocking Player v1.5.2 build 92 or newer.</p>
<p><strong>Update:</strong> <em>A more recent version of the-pianist IMML is available <a href='http://theparkisvast.com/wp-content/uploads/2011/04/the-pianist.zip'>here</a>. </p>
<p>Simply unzip into the hosting root directory of your WorldServer to host.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2011/04/15/the-pianist-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VastServer Developer Edition RTW</title>
		<link>http://theparkisvast.com/2010/11/06/vastserver-developer-edition-rtw/</link>
		<comments>http://theparkisvast.com/2010/11/06/vastserver-developer-edition-rtw/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 05:42:35 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[Content]]></category>
		<category><![CDATA[IMML]]></category>
		<category><![CDATA[VastPark General]]></category>
		<category><![CDATA[WPF]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[VastServer]]></category>

	<!-- AutoMeta Start -->
	<category>message</category>
	<category>displays</category>
	<category>clients</category>
	<category>resolved</category>
	<category>vastserver</category>
	<category>counts</category>
	<category>client</category>
	<category>history</category>
	<category>message</category>
	<category>displays</category>
	<category>clients</category>
	<category>resolved</category>
	<category>vastserver</category>
	<category>counts</category>
	<category>client</category>
	<category>history</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=406</guid>
		<description><![CDATA[Today marks the release to web of a new flavour of VastServer, known as VastServer Developer Edition. As the name implies, this version of the server is targeted at developers and aims to provide more information on the framework&#8217;s behaviour, a little closer to the metal than has been possible in the past. The user [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>Today marks the release to web of a new flavour of VastServer, known as VastServer Developer Edition. </p>
<p>As the name implies, this version of the server is targeted at developers and aims to provide more information on the framework&#8217;s behaviour, a little closer to the metal than has been possible in the past.
</td>
<td valign="top"><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-icon.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-icon.png" alt="" title="vastserver-icon" width="66" height="60" class="alignnone size-full wp-image-407" /></a></td>
</tr>
<tr>
<td>
The user interface for the server is written with WPF and looks like this:</p>
<div id="attachment_437" class="wp-caption alignnone" style="width: 310px"><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-ui-contextmenu.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-ui-contextmenu-300x171.png" alt="" title="vastserver-dev-ui-contextmenu" width="300" height="171" class="size-medium wp-image-437" /></a><p class="wp-caption-text">Click for larger view</p></div>
<p>Some of the more interesting features are covered in detail below.</p>
<h4>Server Usage History</h4>
<p>Many of the factors that contribute to server load such as send/receive rates, send/receive queues and client connections, are visible at a glance, with a rolling 60 second view of activity graphed:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-usage-history.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-usage-history.png" alt="" title="vastserver-dev-usage-history" width="568" height="154" class="alignnone size-full wp-image-418" /></a></p>
<p>It&#8217;s likely additional metrics will be made available in future releases, such as dynamic element counts, owned element counts, mutex holders, etc along with the ability to filter and manipulate the usage history graph.</p>
<h4>Logging</h4>
<p>Each world maintains it&#8217;s own log that displays IMML notifications such as those related to scene.ui:writeline, along with any world related notices, errors and warnings that the framework associates with that context. </p>
<p>A system log is also available via the <strong>View -> Log</strong> menu. It contains log information related to the networking infrastructure.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-system-log.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-system-log.png" alt="" title="vastserver-dev-system-log" width="608" height="540" class="alignnone size-full wp-image-451" /></a></p>
<h4>File Hosting Support</h4>
<p>One nice new feature is the ability to host assets along side client IMML, meaning that IMML can be coded with relative URIs.</p>
<p>This supports the use case where a team wants to avoid setting up a web server or using a public storage provider such as Amazon S3 and is a convenient way to consider developing worlds. </p>
<p>For example, the model in this IMML:<br />
<pre class="php">&lt;IMML xmlns=<span style="color: #ff0000;">&quot;http://schemas.vastpark.com/2007/imml/&quot;</span>&gt;
  &lt;Model Source=<span style="color: #ff0000;">&quot;models/ground_path1.model&quot;</span> /&gt;
&lt;/IMML&gt;</pre></p>
<p>Is resolved to the client folder of the hosted context via the HostingRoot:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-resolved-hosting.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-resolved-hosting.png" alt="" title="vastserver-dev-resolved-hosting" width="596" height="120" class="alignnone size-full wp-image-433" /></a></p>
<p>In the above example, the HostingRoot is at My Documents\VastPark\Server\ and the hosted context is called &#8220;sanctuary&#8221; (for some live shots of sanctuary in action, see <a href="http://www.flickr.com/photos/vastpark-screenshots/tags/campus/">here</a>) .</p>
<h4>Client Metrics</h4>
<p>The client tab displays the behaviour of all clients connected to a specific world. </p>
<p>Information on user alias, connection time, framework version, ping, message resends, and time since last message provide the ability to troubleshoot scenarios where certain clients are experiencing difficulty with the system. </p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-clients.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/11/vastserver-dev-clients.png" alt="" title="vastserver-dev-clients" width="576" height="171" class="alignnone size-full wp-image-463" /></a></p>
<p>Both v1.3 and v1.5 clients are supported by this release of the server, the network stack has remained compatible between these versions of the framework.</p>
<h4>Download</h4>
<p>VastServer Developer Edition is freely available to developers for download with a limitation of 10 concurrent user connections across all hosted worlds. It&#8217;s built for windows and requires <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992">.NET Framework 4.0</a></p>
<p>License keys are available to partners and enterprise customers to remove the concurrent user limitation.</p>
<p>Link: <a href="http://www.vastpark.com/resources/downloads.html#server">http://www.vastpark.com/resources/downloads.html#server</a></p>
</td>
</tr>
</table>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/11/06/vastserver-developer-edition-rtw/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Portable IMML &#8211; Host a virtual world like a PDF</title>
		<link>http://theparkisvast.com/2010/08/11/portable-imml-host-a-virtual-world-like-a-pdf/</link>
		<comments>http://theparkisvast.com/2010/08/11/portable-imml-host-a-virtual-world-like-a-pdf/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 11:46:53 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[VastPark General]]></category>

	<!-- AutoMeta Start -->
	<category>offline</category>
	<category>hills</category>
	<category>pimml</category>
	<category>summary</category>
	<category>vastserver</category>
	<category>online</category>
	<category>choosen</category>
	<category>additional</category>
	<category>offline</category>
	<category>hills</category>
	<category>pimml</category>
	<category>summary</category>
	<category>vastserver</category>
	<category>online</category>
	<category>choosen</category>
	<category>additional</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=344</guid>
		<description><![CDATA[As part of the v1.3 release the Portable IMML (PIMML) format was updated to include some new features (encryption, URI impersonation, additional assets, DRM). An update was also made to the Creator to expose this new functionality and make packaging up a PIMML file a simpler experience. Here&#8217;s a quick step-by-step guide to create a [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the <a href="http://theparkisvast.com/2010/08/04/vastpark-platform-1-3-released/">v1.3 release</a> the <a href="http://vastpark.org/wiki/1/Deploying_Virtual_Worlds#IMML-vs-PIMML">Portable IMML</a> (PIMML) format was updated to include some new features (encryption, URI impersonation, additional assets, DRM). </p>
<p>An update was also made to the Creator to expose this new functionality and make packaging up a PIMML file a simpler experience. </p>
<p>Here&#8217;s a quick step-by-step guide to create a PIMML file using the Creator (v1.3 required!)</p>
<p>Begin by loading your IMML up into the Creator. For this example I&#8217;ll use <a href='http://theparkisvast.com/wp-content/uploads/2010/08/hello-world-hills.imml'>hello-world-hills.imml</a>. Navigate to the <em>Publish</em> menu and select <em>File</em>.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/creator-publish-to-file.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/creator-publish-to-file.png" alt="" title="creator-publish-to-file" width="424" height="338" class="aligncenter size-full wp-image-300" /></a></p>
<p>The first step is to decide how the PIMML file will be used. If you have designed it to be a multi-user environment, choose <em>Offline Use</em>. The difference between <em>Online Use</em> and <em> Offline Use</em> is quite simple; online means that the PIMML can use <em>URI Impersonation</em> to connect to a VastServer whereas offline cannot.</p>
<p>For this example I&#8217;ll pretend this file will be used online &#8211; in reality the IMML for hello-world.hills hasn&#8217;t been designed for online use, so don&#8217;t expect anything multi-userish to magically happen if you are following along at home <img src='http://theparkisvast.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-step1.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-step1.jpg" alt="" title="PIMML-step1" width="558" height="440" class="aligncenter size-full wp-image-368" /></a></p>
<p>Next, we need to instruct the PIMML file where the VastServer that will manage the multi-user data is located. In this case I&#8217;m using the fictitious example.org as my address.</p>
<p>The benefit of this is that the PIMML file can be shared via email, served via Apache/IIS/VastServer/other, handed out on a USB stick, etc and still have the ability to be multi user. This is known as <em>URI Impersonation</em>.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-online-use-step2.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-online-use-step2.jpg" alt="" title="PIMML-online-use-step2" width="559" height="438" class="aligncenter size-full wp-image-367" /></a></p>
<p>By default, the Creator will only PIMML assets that are <strong>statically referenced </strong>in the original IMML. </p>
<p>In our example IMML the only element that really qualifies for packaging is the model called <em>Mountain Terrain</em>.</p>
<p>Often scripting will dynamically source content, so you may wish to add additional assets into the PIMML file. A good example of this is an animation resource as shown in the below example:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-add-additional-asset.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-add-additional-asset.jpg" alt="" title="PIMML-add-additional-asset" width="561" height="441" class="aligncenter size-full wp-image-363" /></a></p>
<p><strong>URI: </strong> The remote URI to map acquisition requests from<br />
<strong>File path: </strong> The file to resolve the requests for that URI to</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-additional-asset-added.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-additional-asset-added.jpg" alt="" title="PIMML-additional-asset-added" width="561" height="440" class="aligncenter size-full wp-image-364" /></a></p>
<p>The final step is to check the document name is correct (it gets displayed at the bottom left of the Player UI) and choose an encryption level for the package. </p>
<p>I&#8217;ve choosen to encrypt in this example using a really <a href="http://www.youtube.com/watch?v=01-vPBqLplg">thirst quenching</a> password.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-final-step-encryption.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-final-step-encryption.jpg" alt="" title="PIMML-final-step-encryption" width="561" height="441" class="aligncenter size-full wp-image-366" /></a></p>
<p>That&#8217;s all there is to it, hit <em>Next</em> and the Creator will do the rest:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-summary.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-summary.jpg" alt="" title="PIMML-summary" width="560" height="437" class="aligncenter size-full wp-image-369" /></a></p>
<p>The summary screen tells you where the PIMML was output to (defaults to Documents\VastPark\Creator\PortableIMML), the file can now be opened in the Player and interacted with as per usual:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-hello-world-hills-player.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/08/PIMML-hello-world-hills-player-300x162.jpg" alt="" title="PIMML-hello-world-hills-player" width="300" height="162" class="aligncenter size-medium wp-image-391" /></a></p>
<p><em>Note: The title for this post was inspired by <a href="http://twitter.com/jokay/status/20869967909">http://twitter.com/jokay/status/20869967909</a></em> <img src='http://theparkisvast.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/08/11/portable-imml-host-a-virtual-world-like-a-pdf/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>VastPark Developer Introduction &#8211; v1.3 Framework</title>
		<link>http://theparkisvast.com/2010/07/30/vastpark-developer-introduction-v1-3-framework/</link>
		<comments>http://theparkisvast.com/2010/07/30/vastpark-developer-introduction-v1-3-framework/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 00:02:42 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VastPark General]]></category>

	<!-- AutoMeta Start -->
	<category>talk</category>
	<category>audio</category>
	<category>audience</category>
	<category>offered</category>
	<category>products</category>
	<category>primer</category>
	<category>planning</category>
	<category>curious</category>
	<category>talk</category>
	<category>audio</category>
	<category>audience</category>
	<category>offered</category>
	<category>products</category>
	<category>primer</category>
	<category>planning</category>
	<category>curious</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=284</guid>
		<description><![CDATA[Update: The video was re-dubbed, you now get the pleasure of Liz&#8217;s delightful voice I recently gave a talk to a team of developers interested in working with the platform who are planning to build some new exciting products on top of it. One of the audience offered to record the session remotely so the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update:</strong> The video was re-dubbed, you now get the pleasure of Liz&#8217;s delightful voice <img src='http://theparkisvast.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I recently gave a talk to a team of developers interested in working with the platform who are planning to build some new exciting products on top of it. </p>
<p>One of the audience offered to record the session remotely so the audio is a little scratchy, but I think it&#8217;s come across ok.</p>
<p>The talk covers:</p>
<ul>
<li>IMML</li>
<li>VastScript</li>
<li>Network enabled elements</li>
<li>HTML interop</li>
<li>Video</li>
<li>Audio</li>
<li>Textures</li>
<li>User Profiles</li>
<li>Plugins</li>
</ul>
<p><object width="640" height="424"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=13720857&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=FF7700&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=13720857&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=FF7700&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="424"></embed></object></p>
<p>Hopefully this is a useful primer if you are interested in developing with VastPark or are curious to know a little more about the way the system functions.</p>
<p>Download the PDF shown in the video here: <a href="http://theparkisvast.com/wp-content/plugins/download-monitor/download.php?id=7">VastPark Developer Introduction - Framework v1.3</a></p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/07/30/vastpark-developer-introduction-v1-3-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FCVW 2010</title>
		<link>http://theparkisvast.com/2010/06/04/fcvw-2010/</link>
		<comments>http://theparkisvast.com/2010/06/04/fcvw-2010/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 23:50:48 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[VastPark General]]></category>

	<!-- AutoMeta Start -->
	<category>imagemetrics</category>
	<category>attend</category>
	<category>previous</category>
	<category>year</category>
	<category>keynote</category>
	<category>childs</category>
	<category>begins</category>
	<category>robert</category>
	<category>imagemetrics</category>
	<category>attend</category>
	<category>previous</category>
	<category>year</category>
	<category>keynote</category>
	<category>childs</category>
	<category>begins</category>
	<category>robert</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=275</guid>
		<description><![CDATA[In May of 2010, VastPark again exhibited at the Federal Consortium for Virtual Worlds in Washington DC. As with the previous year, we provided a way for people who were unable to attend in person to attend virtually: We also were involved in the keynote by Dr. Robert Childs, following some very cool work by [...]]]></description>
			<content:encoded><![CDATA[<p>In May of 2010, VastPark again exhibited at the <a href="http://www.ndu.edu/iCollege/fcvw/index.htm">Federal Consortium for Virtual Worlds</a> in Washington DC.<br />
<br />
As with the <a href="http://theparkisvast.com/2009/04/24/virtual-fcvw/">previous year</a>, we provided a way for people who were unable to attend in person to attend virtually:<br />
<br />
<a href="http://theparkisvast.com/wp-content/uploads/2010/06/fcvw-2010.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/06/fcvw-2010-300x165.png" alt="" title="fcvw-2010" width="300" height="165" class="aligncenter size-medium wp-image-279" /></a></p>
<p>We also were involved in the keynote by Dr. Robert Childs, following some very cool work by ImageMetrics as shown in this video:</p>
<p><object width="640" height="360"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=11720162&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=FF7700&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=11720162&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=1&amp;color=FF7700&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="640" height="360"></embed></object></p>
<p>The VastPark portion of the video begins at 5:08, prior to that you are seeing ImageMetrics in action.</p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/06/04/fcvw-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flocking algorithm in VastPark</title>
		<link>http://theparkisvast.com/2010/04/13/flocking-algorithm-in-vastpark/</link>
		<comments>http://theparkisvast.com/2010/04/13/flocking-algorithm-in-vastpark/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 03:47:26 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Boids]]></category>
		<category><![CDATA[Flocking]]></category>

	<!-- AutoMeta Start -->
	<category>flocking</category>
	<category>boids</category>
	<category>boids</category>
	<category>implement</category>
	<category>algorithm</category>
	<category>rule</category>
	<category>enjoy</category>
	<category>cool</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=236</guid>
		<description><![CDATA[Many months ago during May of 09, after meeting Ian Hughes at FCVW, I came across an interesting post on his blog discussing an implementation of the flocking algorithm in Unity. I&#8217;d not heard of the term flocking or boids, so proceeded to get stuck into some research, which lead me to Conrad Parker&#8217;s page [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://theparkisvast.com/wp-content/uploads/2010/04/flocking.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/04/flocking.jpg" alt="" title="flocking" width="242" height="150" class="alignright size-full wp-image-255" /></a></td>
<p>Many months ago during May of 09, after meeting Ian Hughes at <a href="http://www.ndu.edu/IRMC/fedconsortium.html">FCVW</a>, I came across an <a href="http://www.feedingedge.co.uk/blog/2009/05/11/flocking-brilliant-fill-in-own-joke-here/">interesting post</a> on his blog discussing an implementation of the <a href="http://www.red3d.com/cwr/boids/">flocking algorithm</a> in Unity. </p>
<p>I&#8217;d not heard of the term flocking or boids, so proceeded to get stuck into some research, which lead me to Conrad Parker&#8217;s page on <a href="http://www.vergenet.net/~conrad/boids/pseudocode.html">Boids Pseudocode</a> as well as many others who had implemented the algorithm, I figured it would be a fun little plugin to write for VastPark so gave it a try.</p>
<h4>Implementing the algorithm</h4>
<p>Thinking about what was required, I came up with the following as the plan for the plugin:</p>
<ul>
<li>Any IPositionalElement (Model, Primitive, Sound, Camera, Light, etc) would be supported</li>
<li>Implement Rule 1 &#8211; &#8220;Boids try to fly towards the centre of mass of neighbouring boids&#8221;</li>
<li>Implement Rule 2 &#8211; &#8220;Boids try to keep a small distance away from other objects (including other boids)&#8221;</li>
<li>Implement Rule 3 &#8211; &#8220;Boids try to match velocity with near boids&#8221;</li>
<li>For bonus points I&#8217;d implement &#8220;Tendency towards a particular place&#8221;, &#8220;Limiting the speed&#8221;, &#8220;Bounding the position&#8221;, &#8220;Perching&#8221; and &#8220;Scattering the flock&#8221;</li>
</ul>
<p>In terms of the plugin this translates into these properties:</p>
<ul>
<li>SmallDistance</li>
<li>MaxVelocity</li>
<li>MinVelocity</li>
<li>EnableBounds</li>
<li>MaxBounds</li>
<li>MinBounds</li>
<li>EnablePerching</li>
<li>MinPerchTime</li>
<li>MaxPerchTime</li>
<li>PerceivedCentre (get only)</li>
</ul>
<p>The following callbacks:</p>
<ul>
<li>ElementPerched</li>
<li>ElementLeftPerch</li>
</ul>
<p>The following methods:</p>
<ul>
<li>SetPointOfInterest</li>
<li>AddPlaceToAvoid</li>
<li>AddPerch</li>
<li>Scatter</li>
</ul>
<p>The class diagrams look like this:<br />
<a href="http://theparkisvast.com/wp-content/uploads/2010/04/flocking-plugin-class-diagram.png" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/04/flocking-plugin-class-diagram.png" alt="" title="flocking-plugin-class-diagram" width="619" height="523" class="aligncenter size-full wp-image-243" /></a></p>
<h4>How does it work?</h4>
<p>Put quite simply, the plugin works like this:</p>
<ul>
<li><em>AddElement(ImmlElement element)</em> creates a boid instance for the positional element passed</li>
<li>The plugin Update method (called once each update by the VastPark framework) proceeds to calculate the rules, one at a time for each boid to work out the new velocity and position for the element it represents</li>
<li>Scatter requests made during runtime are dealt with during the next update</li>
</ul>
<h4>Downloads</h4>
<p>Here is some sample IMML and the source code to the plugin, enjoy! Let me know if you decide to implement any of the other rules or do something cool with it <img src='http://theparkisvast.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Sample IMML: <a href='http://theparkisvast.com/wp-content/uploads/2010/04/flocking.imml'>flocking.imml</a><br />
Source code to plugin: <a href='http://theparkisvast.com/wp-content/uploads/2010/04/Plugin.Flocking.zip'>Plugin.Flocking.zip</a></p>
<p><strong>Note:</strong> The source code will probably complain about some missing references. Install the Player from <a href="http://www.vastpark.com">www.vastpark.com</a> and link against the relevant binaries included with it.</p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/04/13/flocking-algorithm-in-vastpark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag and Drop Sample</title>
		<link>http://theparkisvast.com/2010/02/20/drag-and-drop-sample/</link>
		<comments>http://theparkisvast.com/2010/02/20/drag-and-drop-sample/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 20:56:14 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[0.98 release]]></category>

	<!-- AutoMeta Start -->
	<category>tostring</category>
	<category>updateuri</category>
	<category>metaforikadapter</category>
	<category>writeline</category>
	<category>item</category>
	<category>drag</category>
	<category>controller</category>
	<category>pages</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=177</guid>
		<description><![CDATA[One of the major features of the 0.98 release is the inclusion of drag and drop. Basically, this allows you to drag an Item into the 3D space where the IMML can decide to do something with it. To try drag and drop out for yourself, first download (right-click, save as) and open in the [...]]]></description>
			<content:encoded><![CDATA[<table>
<tr>
<td>
<img src="http://theparkisvast.com/wp-content/uploads/2010/02/mouse-cursor.png" alt="" title="mouse-cursor" width="48" height="48" class="alignleft size-full wp-image-226" />
</td>
<td>
One of the major features of the <a href="http://theparkisvast.com/2010/02/17/vastpark-platform-0-98-released/">0.98 release</a> is the inclusion of drag and drop. Basically, this allows you to drag an Item into the 3D space where the IMML can decide to do something with it.
</td>
</tr>
</table>
<p>To try drag and drop out for yourself, first download <a href="http://theparkisvast.com/wp-content/plugins/download-monitor/download.php?id=5">generic-drag-drop-sample.imml</a> (right-click, save as) and open in the Player.</p>
<p>Next, you&#8217;ll need to expand the Items list. Do so by clicking on this icon:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/player-items-button.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/player-items-button.jpg" alt="" title="player-items-button" width="232" height="42" class="aligncenter size-full wp-image-162" /></a></p>
<p>By default you are presented with the list of Items of type <em>Video</em> and <em>Document</em> that the currently logged in account has access to (these can be further restricted by the <a href="http://vastpark.org/wiki/vp/VastPark_Server#ACL">hosting server&#8217;s group ACL</a>). </p>
<p>In this case as we are opening the file directly, it will default to showing the most recently published Items without filtering and should look similar to this:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-1.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-1-300x178.jpg" alt="" title="drag-drop-1" width="300" height="178" class="aligncenter size-medium wp-image-173" /></a></p>
<p>Click to select one of the items from the list (in my example, I&#8217;ve chosen &#8220;VastPark Logo&#8221;) and drag it onto the 3D view. The large rectangle in the centre of the screen will change colour to blue indicating it is a drop target.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-2.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-2-300x178.jpg" alt="" title="drag-drop-2" width="300" height="178" class="aligncenter size-medium wp-image-174" /></a></p>
<p>Next, drop the Item onto the blue rectangle, which will cause it to change colour to green. Shortly the VastPark logo will appear on it.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-3.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/drag-drop-3-300x178.jpg" alt="" title="drag-drop-3" width="300" height="178" class="aligncenter size-medium wp-image-175" /></a></p>
<h4>How does this work?</h4>
<p>Behind the scenes is a plugin (called MetaforikAdapter) which currently supports adapting Items of type &#8220;Document&#8221; and &#8220;Video&#8221; to a Model or Primitive element. The code to do this is quite simple. </p>
<p>First, reference the Plugin:<br />
<pre class="php">&lt;Plugin Enabled=<span style="color: #ff0000;">&quot;True&quot;</span> Source=<span style="color: #ff0000;">&quot;http://id.vastpark.com/VastParkWS/get.vpws?name=MetaforikAdapter&amp;amp;publisher=craigomatic&amp;amp;domain=vastpark&amp;amp;context=park&quot;</span> Name=<span style="color: #ff0000;">&quot;MetaforikAdapter&quot;</span>&gt;
    &lt;Element Name=<span style="color: #ff0000;">&quot;InvalidRequestHandler&quot;</span> /&gt;
    &lt;Parameter <a href="http://www.php.net/key"><span style="color: #000066;">Key</span></a>=<span style="color: #ff0000;">&quot;InvalidRequestEvent&quot;</span> Value=<span style="color: #ff0000;">&quot;InvalidRequestHandler&quot;</span> /&gt;    
  &lt;/Plugin&gt;   
  
  &lt;Script Name=<span style="color: #ff0000;">&quot;InvalidRequestHandler&quot;</span>&gt;
    <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>obj, args<span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'invalid request'</span><span style="color: #66cc66;">&#41;</span>          
    <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
  <span style="color: #000000; font-weight: bold;">&lt;/Script&gt;</span></pre><br />
Next, handle the appropriate events on the elements you want to be able to drop on. Alternatively, this can be at the document level:<br />
<pre class="php">&lt;Trigger Event=<span style="color: #ff0000;">&quot;DragDrop&quot;</span> Target=<span style="color: #ff0000;">&quot;OnDragDrop&quot;</span> /&gt;
&lt;Trigger Event=<span style="color: #ff0000;">&quot;DragEnter&quot;</span> Target=<span style="color: #ff0000;">&quot;OnDragEnter&quot;</span> /&gt;
&lt;Trigger Event=<span style="color: #ff0000;">&quot;DragLeave&quot;</span> Target=<span style="color: #ff0000;">&quot;OnDragLeave&quot;</span> /&gt;</pre></p>
<p>In you script for the drop, pass the Item along with the element you want to adapt it to into the load method on the plugin. You may choose to inspect the Item before the drop to give user feedback as is done in the sample IMML.<br />
<pre class="php">&lt;Script Name=<span style="color: #ff0000;">&quot;OnDragDrop&quot;</span>&gt;
    <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>obj, args<span style="color: #66cc66;">&#41;</span>            
      --args.data contains the Item which was dragged in
      
      --load returns a controller object
      c = metaforikadapter:load<span style="color: #66cc66;">&#40;</span>args.data, obj<span style="color: #66cc66;">&#41;</span>      
    
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'item name: '</span>..c.item.name<span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'id: '</span>..c.id<span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'is first: '</span>..tostring<span style="color: #66cc66;">&#40;</span>c.isfirst<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'is last: '</span>..tostring<span style="color: #66cc66;">&#40;</span>c.islast<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'total pages: '</span>..tostring<span style="color: #66cc66;">&#40;</span>c.pages<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'current page: '</span>..tostring<span style="color: #66cc66;">&#40;</span>c.currentpage<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
    <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
<span style="color: #000000; font-weight: bold;">&lt;/Script&gt;</span>
  
&lt;Script Name=<span style="color: #ff0000;">&quot;OnDragEnter&quot;</span>&gt;
    <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>obj, args<span style="color: #66cc66;">&#41;</span>
        scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'drag enter on: '</span>..obj.name..<span style="color: #ff0000;">' of type: '</span>..args.data.assets<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.type<span style="color: #66cc66;">&#41;</span>     
    <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
<span style="color: #000000; font-weight: bold;">&lt;/Script&gt;</span>
  
&lt;Script Name=<span style="color: #ff0000;">&quot;OnDragLeave&quot;</span>&gt;
    <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>obj, args<span style="color: #66cc66;">&#41;</span>
      scene.ui:writeline<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'drag leave on: '</span>..obj.name<span style="color: #66cc66;">&#41;</span>
    <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
<span style="color: #000000; font-weight: bold;">&lt;/Script&gt;</span></pre></p>
<h4>Working with elements other than Document or Video</h4>
<p>One thing to be aware of is that you don&#8217;t necessarily have to use the MetaforikAdapter plugin to benefit from drag and drop. If you want to allow for models or sounds to be dropped in, you can use the item.updateuri as the source for the element and add it into the scene, like this:<br />
<pre class="php">&lt;Script Name=<span style="color: #ff0000;">&quot;OnDragDrop&quot;</span>&gt;
    <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span>obj, args<span style="color: #66cc66;">&#41;</span>    
      item = args.data
      <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>item.assets<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.type == <span style="color: #ff0000;">'Model'</span><span style="color: #66cc66;">&#41;</span> then       
          m = model<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
          m.source = args.data.updateuri
      
          scene:add<span style="color: #66cc66;">&#40;</span>m<span style="color: #66cc66;">&#41;</span>     
      <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
    <a href="http://www.php.net/end"><span style="color: #000066;">end</span></a>
<span style="color: #000000; font-weight: bold;">&lt;/Script&gt;</span></pre></p>
<h4>Final Note</h4>
<p>That&#8217;s really all there is to it, you may want to craft different UI depending on the state of the controller properties in the MetaforikAdapter plugin sample, ie: to handle a multi-page document differently to a video or single page document, or in the model example to only allow certain users to drop models into a specific region of your space. </p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/02/20/drag-and-drop-sample/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated IMML for Stock Market Ticker</title>
		<link>http://theparkisvast.com/2010/02/17/updated-imml-for-stock-market-ticker/</link>
		<comments>http://theparkisvast.com/2010/02/17/updated-imml-for-stock-market-ticker/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 03:56:28 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[stock market]]></category>
		<category><![CDATA[Yahoo]]></category>

	<!-- AutoMeta Start -->
	<category>define</category>
	<category>tooltip</category>
	<category>tooltipid</category>
	<category>tooltipplugin</category>
	<category>lines</category>
	<category>settext</category>
	<category>lasttradeprim</category>
	<category>mouse</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=208</guid>
		<description><![CDATA[I&#8217;ve made some adjustments to the stock ticker built as part of my building a stock ticker in vastpark post to take advantage of the new Tooltip Plugin and the Define element in IMML. Rather than going all out, I&#8217;ve simply added a tip that shows the volume for the current day when the mouse [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made some adjustments to the stock ticker built as part of my <a href="http://theparkisvast.com/2009/01/12/building-a-stock-market-ticker-in-vastpark/">building a stock ticker in vastpark post</a> to take advantage of the new Tooltip Plugin and the Define element in IMML. Rather than going all out, I&#8217;ve simply added a tip that shows the volume for the current day when the mouse is over one of the green bars and a Define that lets you more easily choose which stocks should be displayed.</p>
<p>If you haven&#8217;t already read the original article and are interested in how it works, be sure to <a href="http://theparkisvast.com/2009/01/12/building-a-stock-market-ticker-in-vastpark/">have a read</a> before continuing.</p>
<h4>Define Element</h4>
<p>The Define element is a declarative way of expressing a variable in IMML. It&#8217;s equivalent to doing element:set(&#8216;variableName&#8217;, variableValue) but doesn&#8217;t require interpretation via the scripting engine which results in much better performance. It&#8217;s also a much nicer way to store global variables as they can be placed in more a easily identifiable location in the IMML rather than being buried within a script.</p>
<p>My Define in the sample looks similar to this (truncated for brevity):<br />
<pre class="php">&lt;!--Use any Yahoo stock codes in the below <a href="http://www.php.net/define"><span style="color: #000066;">define</span></a> to control the stocks being generated and updated--&gt;
 &lt;Define <a href="http://www.php.net/key"><span style="color: #000066;">Key</span></a>=<span style="color: #ff0000;">&quot;stocks&quot;</span> Value=<span style="color: #ff0000;">&quot;IPL.AX,VIL.AX,FMG.AX,RIO.AX,BHP.AX,BOQ.AX&quot;</span> /&gt;</pre></p>
<p>To change the ticker to show different stocks, replace any of the entries in the Value of the Define with the appropriate <a href="http://finance.yahoo.com/lookup">Yahoo ticker code</a> for the relevant stock.</p>
<h4>Tooltip Plugin</h4>
<p>Note: To use the Tooltip plugin, you&#8217;ll need to be running either the most recent Player snapshot or version 0.98+ as it uses the <em>Handle</em> property that was added recently to the IRenderEngine interface. </p>
<p>The tooltip concept has been around for quite a while and is used by just about every modern desktop application. Ever wondered what that big red button does and hovered your mouse to find out? If yes, you&#8217;ve seen a tooltip. This plugin extends the concept to allow developers to associate a tip with an element in world. </p>
<p>To do so is quite simple, the following functions are provided with the plugin:<br />
<pre class="php">int Add<span style="color: #66cc66;">&#40;</span>string text, ImmlElement element<span style="color: #66cc66;">&#41;</span>
void Remove<span style="color: #66cc66;">&#40;</span>int id<span style="color: #66cc66;">&#41;</span>
void SetText<span style="color: #66cc66;">&#40;</span>int id, string text<span style="color: #66cc66;">&#41;</span></pre></p>
<p>To make use of these, I&#8217;ve added 2 lines to <em>_updateStock</em> in the UpdateStocks script:<br />
<pre class="php">--update the volume tooltip	
id = lastTradeVisual:get<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tooltipId'</span><span style="color: #66cc66;">&#41;</span>
tooltipplugin:settext<span style="color: #66cc66;">&#40;</span>id, <span style="color: #ff0000;">'Volume: '</span>..volume<span style="color: #66cc66;">&#41;</span></pre></p>
<p>&#8230;and 3 lines to <em>_generateStock</em> in the GenerateStocks script:<br />
<pre class="php">--store a <a href="http://www.php.net/define"><span style="color: #000066;">define</span></a> value on the last trade to represent volume <span style="color: #b1b100;">for</span> the tooltip
lastTradePrim:set<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'volume'</span>, volume<span style="color: #66cc66;">&#41;</span>
id = tooltipplugin:add<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Volume: '</span>..volume, lastTradePrim<span style="color: #66cc66;">&#41;</span>
lastTradePrim:set<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'tooltipId'</span>, id<span style="color: #66cc66;">&#41;</span></pre></p>
<p>The end result still looks similar to before, but we now get tooltips when hovering:</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/stock-ticker-with-tooltip.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/stock-ticker-with-tooltip-300x162.jpg" alt="" title="stock-ticker-with-tooltip" width="300" height="162" class="aligncenter size-medium wp-image-210" /></a></p>
<p>Download the updated IMML here:  <a href="http://theparkisvast.com/wp-content/plugins/download-monitor/download.php?id=6">stock-ticker.imml</a></p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/02/17/updated-imml-for-stock-market-ticker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VastPark Platform 0.98 Released</title>
		<link>http://theparkisvast.com/2010/02/17/vastpark-platform-0-98-released/</link>
		<comments>http://theparkisvast.com/2010/02/17/vastpark-platform-0-98-released/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 00:37:18 +0000</pubDate>
		<dc:creator>craigomatic</dc:creator>
				<category><![CDATA[IMML]]></category>
		<category><![CDATA[VastPark General]]></category>
		<category><![CDATA[0.98 release]]></category>
		<category><![CDATA[VastPark Player]]></category>

	<!-- AutoMeta Start -->
	<category>capture</category>
	<category>menu</category>
	<!-- AutoMeta End -->
	
		<guid isPermaLink="false">http://theparkisvast.com/?p=161</guid>
		<description><![CDATA[Along with a fresh look for www.vastpark.com, the 0.98 versions of the Player, Creator, Publisher and Server have been released. This will be the final DirectX only version of the platform as we move towards 1.0 What&#8217;s included in 0.98? Drag and Drop Drag and Drop allows the user to drag an Item from the [...]]]></description>
			<content:encoded><![CDATA[<p>Along with a fresh look for <a href="http://www.vastpark.com">www.vastpark.com</a>, the 0.98 versions of the Player, Creator, Publisher and Server have been released. This will be the final DirectX only version of the platform as we move towards 1.0</p>
<h4>What&#8217;s included in 0.98?</h4>
<h5>Drag and Drop</h5>
<p>Drag and Drop allows the user to drag an Item from the Items list into the 3D space. This Item can then be interrogated via script or plugin and an action can occur based on the developer listening to the DragEnter, DragDrop, DragLeave triggers in IMML. </p>
<p>The benefits of this can be extensive, from dynamic presentations with multiple presenters able to drag out their presentation on demand to injecting new content into the scene. </p>
<p><strong>Note:</strong> This Items list is populated by the Metaforik index. You can get content into this index using the Publisher application (you must have a publisher account!) which supports Models, Video, Audio, etc, but currently doesn&#8217;t support the type &#8220;Document&#8221;. </p>
<h5>Simplified UI</h5>
<p>Feedback was received that the UI for the Player was a little complex, so we&#8217;ve introduced a menu and removed much of the clutter from the tray area. All of the functionality previously accessible from the tray is now found under the menu at the top of the application.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/0.98-player-ui-overview.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/0.98-player-ui-overview-300x162.jpg" alt="" title="0.98-player-ui-overview" width="300" height="162" class="aligncenter size-medium wp-image-184" /></a></p>
<p>The address bar now has back, forward and refresh buttons as well as a new icon that indicates the health of the current document and an icon that appears when content is loading in the background.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/player-menu-annotated.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/player-menu-annotated.jpg" alt="" title="player-menu-annotated" width="574" height="179" class="aligncenter size-full wp-image-171" /></a></p>
<p>The debug dialog has been slightly tweaked and simplified also, note that debug rendering options now appear under the menu View -> Render. By default, the LoadQueue tab is now displayed which is useful in working out what is occurring while you are waiting for a document to complete loading.</p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/debud-ui-load-queue.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/debud-ui-load-queue.jpg" alt="" title="debud-ui-load-queue" width="494" height="402" class="aligncenter size-full wp-image-185" /></a></p>
<h5>More of a focus on capture</h5>
<p>Along with the support for Continuum capture, the Player now supports capture of screenshots. </p>
<p><a href="http://theparkisvast.com/wp-content/uploads/2010/02/player-capture-menu.jpg" rel="lightbox"><img src="http://theparkisvast.com/wp-content/uploads/2010/02/player-capture-menu.jpg" alt="" title="player-capture-menu" width="541" height="132" class="aligncenter size-full wp-image-189" /></a></p>
<p>Screenshot and Continuum captures default to being stored in your Documents folder under the subfolders &#8220;Continuum&#8221; and &#8220;Screenshots&#8221;. This can be customised by visiting the Options menu (Tools -> Options) and selecting a new capture path.</p>
<p>In a future release video capture support is likely to make an appearance as we aim to provide a variety of ways to capture the experience within the Player.</p>
<h5>Search Syntax</h5>
<p>Some slightly more advanced searching ability is included in the Player&#8217;s Item list and follows this syntax:</p>
<p><item name like> [type:itemType] [publisher:nameOfPublisher] [tags:tag1, tag2, etc]</p>
<p>Some valid searches that follow this syntax are:</p>
<p><em>Crate type:Model publisher:craigomatic</em><br />
- Finds all Model items published by craigomatic that have a name like &#8220;Crate&#8221;</p>
<p><em>Crate</em><br />
- Finds all items that have a name like &#8220;Crate&#8221;</p>
<p><em>type:Document</em><br />
- Finds all items of the type Document</p>
<h5>0.98 Platform Changelog</h5>
<ul>
<li>Improved reliability and performance in all libraries that use threaded queueing</li>
<li>Improved reliability of connection code in server libraries</li>
<li>DragDrop, DragEnter, DragLeave events added to IMML</li>
<li>Handle property added to IRenderEngine, plugins can now mix winforms/WPF overlays into the experience</li>
<li>Added access to CacheProvider, ContentAcquirer and ContentLoader via ParkEngine. Plugins can now download content using the common download system and take advantage of the user&#8217;s cache</li>
<li>Added concept of NetworkChannel, shifted mutex acquisition to a dedicated channel</li>
<li>Added concept of Behaviours to IMML</li>
<li>Fixed bug where texture source change didn&#8217;t work during runtime</li>
<li>Fixed bug where video source change didn&#8217;t work during runtime</li>
<li>Changed behaviour of Groups property in script scene.user:groups, now uses cached data. Use scene.user:GetProfile(&#8220;alias&#8221;) for live data</li>
<li>Added support for constraints between bones on separate models</li>
<li>Misc. bug fixes</l>
</ul>
<p>Download link: <a href="http://www.vastpark.com/resources/downloads.html">http://www.vastpark.com/resources/downloads.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://theparkisvast.com/2010/02/17/vastpark-platform-0-98-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

