<?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>Fractured Foundations</title>
	<atom:link href="http://andrewritchie.net/college/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://andrewritchie.net/college</link>
	<description>Stumbling Through Life</description>
	<lastBuildDate>Mon, 10 Aug 2009 04:10:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Playing nicely with C#</title>
		<link>http://andrewritchie.net/college/?p=118</link>
		<comments>http://andrewritchie.net/college/?p=118#comments</comments>
		<pubDate>Mon, 10 Aug 2009 04:10:49 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=118</guid>
		<description><![CDATA[Just as this past weekend was starting I came across a GDC presentation made by one of the guys from Ensemble Studios.  Specifically it was about making their final game Halo Wars.  It was a technical presentation with some very cool stuff, such as how they used multi channel heightmaps to give their landscape a [...]]]></description>
			<content:encoded><![CDATA[<p>Just as this past weekend was starting I came across a GDC presentation made by one of the guys from Ensemble Studios.  Specifically it was about making their final game Halo Wars.  It was a technical presentation with some very cool stuff, such as how they used multi channel heightmaps to give their landscape a 3D mesh rather than just a verticle offset for each vertex.  However, the thing that caught my eye was the screen shots from their editor.  It was all C# based.  Ok I suppose it could just be generic managed Windows Forms, but I doubt it.  Combining this with both the comments I&#8217;d overheard about how &#8220;nice&#8221; the interface was for one of the other dissertation projects and the fact I&#8217;ve been dying to have a go at C# tool dev and bridging native and managed libraries I went a head and did just that.</p>
<p>The first real step was putting into place the managed wrapper classes for my unmanaged library.  After some looking around and not really finding anything that could help me much I decided to amalgamate all I&#8217;d seen and could assume into a best guess implementation.  It turned out it was quite simple.  Since I relied on a lot of interfaces already as well as my main library interface being bridged it worked quite well.</p>
<p>With the first manged library built and running I patched it into a simple C# frame that would list all the available nodes in a loaded module.</p>
<div id="attachment_119" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface.jpg"><img class="size-thumbnail wp-image-119" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface-150x150.jpg" alt="First Pass C# Interface" width="150" height="150" /></a><p class="wp-caption-text">First Pass C# Interface</p></div>
<p>Next up was a little organisation.  Modules are referenced within the library by a provided name.  The loaded file itself is abstracted away.  So if you load a module with the name &#8216;Core&#8217; and it contains a module called &#8216;time&#8217; you would create that node by using the name &#8216;Core::time&#8217; where the &#8216;::&#8217; is used to show a reference into a module is made.  I figured the simpilest way to break that down visually was just a tree view.</p>
<div id="attachment_121" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface2.jpg"><img class="size-thumbnail wp-image-121" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface2-150x150.jpg" alt="Organised Node Libraries" width="150" height="150" /></a><p class="wp-caption-text">Organised Node Libraries</p></div>
<p>With a proof of concept type implementation taken care of with regards to actually proving it works I started messing around with layout ideas.  Naturally this ment snazzing it up a little with file menus, work spaces and of course an about box.</p>
<div id="attachment_123" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface3.jpg"><img class="size-thumbnail wp-image-123" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface3-150x150.jpg" alt="Fleshing out the Interface" width="150" height="150" /></a><p class="wp-caption-text">Fleshing out the Interface</p></div>
<p>After playing around with default items in the work space I set about actually showing the procedures, both the current one being edited and a list of &#8220;grouped&#8221; procedures.  The editor window is fairly straight forward in concept, it&#8217;s where the &#8220;nodes&#8221; will be for connecting up to make procedures.  I had to use the property grid just because it seems everyone uses it these days.  There are 2 types of visual nodes.  The IO node and the Bound Node.  IO Nodes are the first I started with.  These just represent the inputs and outputs of procedure so.  The bound nodes are those associated with a specific node in the procedure, these I didn&#8217;t get round to finishing as there&#8217;s some back end editing stuff I have to adjust to let them play a bit more nicely.</p>
<div id="attachment_124" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface4.jpg"><img class="size-thumbnail wp-image-124" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface4-150x150.jpg" alt="First Interactive Procedure" width="150" height="150" /></a><p class="wp-caption-text">First Interactive Procedure</p></div>
<p>With the nodes floating about I spent time getting dragging to work a bit nicer as well as investigating how to make the nodes a bit more visually appealing.  I hadn&#8217;t really thought about how they would look when I began so I just messed around and decided upon something fairly plain, simple but pleasant.</p>
<div id="attachment_125" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface5.jpg"><img class="size-thumbnail wp-image-125" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface5-150x150.jpg" alt="Custom Drawn Nodes" width="150" height="150" /></a><p class="wp-caption-text">Custom Drawn Nodes</p></div>
<p>I finished off the weekends work for this by iterating again on the design of the node controls.  These are now fully custom elements with no more hacked in place windows components that do nothing.  The sockets are now more obvious as well as showing their connecting points.  I also went back over the whole UI and rejigged it a bit to use it&#8217;s space better, offer more feedback to the user and try to provide more command buttons on the UI so the user can use them or the ones provided through the file menu.</p>
<div id="attachment_126" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface6.jpg"><img class="size-thumbnail wp-image-126" src="http://andrewritchie.net/college/wp-content/uploads/2009/08/csharp_interface6-150x150.jpg" alt="Last UI Iteration for the Time Being" width="150" height="150" /></a><p class="wp-caption-text">Last UI Iteration for the Time Being</p></div>
<p>I have to admit I enjoy working with C#.  How quickly you can put together a UI is just one of it&#8217;s strengths.  Setting up meaning full interactions between objects and over all structuring for happy interface development is quite straight forward.  It&#8217;s not my beloved C or C++ but the tools Microsoft have provided for it inside of Visual Studio are excellent.</p>
<p>Alas as I created this editor I started tinkering with the notion of creating a second interface for my library.  Essentially splitting the Application interactions into 2 logical parts.  The original interface refered to just as &#8220;ProcLib&#8221; would be simple and straight forward, load procedures and run them, not much more.  That would be for the runtime aspect.  For editors the library provides a more flexible and open ended interface that can be used more for modifying and creating procedures.  This proved to be some fun, but since it is back to C++ and technically after the weekend has finished I shall talk more about it in days to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=118</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Post Development Research</title>
		<link>http://andrewritchie.net/college/?p=116</link>
		<comments>http://andrewritchie.net/college/?p=116#comments</comments>
		<pubDate>Thu, 30 Jul 2009 02:59:45 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=116</guid>
		<description><![CDATA[Everything to do with this project can be summed up with &#8220;if I&#8217;d just done it like that from the start.&#8221;
I spent most of this week going back to what had been my rough research papers.  I am rereading them with a good deal more perspective in what I am doing and why.  Where originally [...]]]></description>
			<content:encoded><![CDATA[<p>Everything to do with this project can be summed up with &#8220;if I&#8217;d just done it like that from the start.&#8221;</p>
<p>I spent most of this week going back to what had been my rough research papers.  I am rereading them with a good deal more perspective in what I am doing and why.  Where originally I tried to ignore what some of the papers had done as I wanted to do it, I am now finding a lot of gaps and areas that appear to be fairly untouched.  I&#8217;m not under the dellusion I am the first, but it definately seems my area of choice is growing and under a lot of research so my goal and approach may turn out to be something worth while.</p>
<p>I don&#8217;t think my time was miss spent over the last month or so, it&#8217;s just that I&#8217;m now on my third ground up build and would prefer to have done it properly the first time.  There&#8217;s a lot of work I&#8217;ve put in that will never see the light of day because it was trying to be a global problem solver rather than a focused piece of software.</p>
<p>My current itteration of the library entitled &#8220;ProcLib&#8221; is quite light weight and while there&#8217;s still a fair bit to do, I think it&#8217;s certainly benefited from the previous attempts.  Some parts of it are better designed now, such as my eventual implementation of actual node links will be threadable.  The way developers extend the nodes is a lot more elegant as well as much more abstract.  Still bits to do but it&#8217;s the most complete version yet.  It&#8217;d just have been nice to be here 4 weeks ago and have loads of time to do clever stuff.  At the moment I&#8217;m just driving to create the specific demos I&#8217;d had in mind and whether I have the time to finish them and a write up is very unilikely.</p>
<p>Tommorrow, if I get enough done I think I&#8217;ll put up a blog with the papers I am most interested in using in my report or as a basis of a demo.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=116</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Graph Format Design</title>
		<link>http://andrewritchie.net/college/?p=102</link>
		<comments>http://andrewritchie.net/college/?p=102#comments</comments>
		<pubDate>Sun, 12 Jul 2009 23:41:57 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=102</guid>
		<description><![CDATA[Today I spent a while outlining the format of my graph storage files.  There were a couple concerns I wanted to tackle in terms of both functionality and data types.  The first one I solved was the storage medium which I decided to just go with XML.  I suppose that decision meant the rest just [...]]]></description>
			<content:encoded><![CDATA[<p>Today I spent a while outlining the format of my graph storage files.  There were a couple concerns I wanted to tackle in terms of both functionality and data types.  The first one I solved was the storage medium which I decided to just go with XML.  I suppose that decision meant the rest just became an XML schema definition but I know very little about the high level concepts so just refer to it as &#8220;making a file to hold my graph data.&#8221;</p>
<p>The XML formatting gave me an idea that had been working it&#8217;s way through my head for a while.  Originally I was building graphs with the concept of 3 node types, generators, operators and exporters.  The important note for these is that the applications would have had to retrieve the specific nodes from my library and manually set and get data values from the nodes.  What I have come up with for the redesign is input and output elements that are fixed tables with named parameters.  This means the application only ever deals with the input and output tables and nodes internal to graphs can retrieve values or set values in those tables.   This I believe makes the procedures that the graphs represent much more application friendly.</p>
<p>On top of the new IO tables I&#8217;ve designed in a simple name space system.  This is done in an attempt to allow extension modules a fair bit of freedom with their data types and functions without clashing too badly with other modules.  When registering a module to the system it is given a name or a title which becomes it&#8217;s root level namespace.  This name will be guaranteed by the system to be unique, I intend to ensure that the system has a way of avoiding loading the same module under a different name as well.  Once the module is loaded with it&#8217;s title, the node and data types it contains are referenced using the title followed by a &#8216;::&#8217; symbol.  So a module named &#8216;Maths&#8217; with a node called &#8216;Add&#8217; would reference that node as &#8216;Maths::Add.&#8217;</p>
<p>So with the conceptual components mostly done I tackled the actual design of the XML itself.  I tried to keep it fairly simple, clean, understandable and ideally flexible.  For the purposes, I am quite happy with the results.</p>
<p>The first part is the &#8220;graph&#8221; element that wraps the entire definition.  It contains a &#8220;name&#8221; attribute which will be used to reference the graph within the engine.</p>
<p>The first sub section is the &#8220;modules&#8221; section.  This is where the graph identifies to the system what modules it references or needs loaded.  There are sub elements within this tagged as &#8220;module&#8221; each of which contain the attributes &#8220;name&#8221; and &#8220;file.&#8221; The &#8220;module&#8221; elements are loaded based on their file attribute and use the name attribute as that modules namespace.</p>
<p>Following this are the &#8220;input&#8221; and &#8220;output&#8221; elements.  These represent the named input and output tables associated with the graph. The sub elements in these sections are tagged &#8220;parameters&#8221; which contain a &#8220;name&#8221;, &#8220;type&#8221; and &#8220;default&#8221; attribute.  The name attribute identifies the parameter for referencing by both the system and the nodes withing the graph.  The type attribute identifies what kind of data the parameter holds and the default attribute is able to pass an initial value to the parameter.</p>
<p>The next section of the file is the &#8220;nodes&#8221; element.  It is what identifies all the nodes that will exist in the graph.  Individual nodes are handled by the &#8220;node&#8221; element handle, which contains &#8220;name&#8221; and &#8220;type&#8221; attributes.  Nodes can also contain &#8220;parameter&#8221; elements to initialize internal data.  Declaring parameters in this section means that are most likely not going to change for the life span of the graph.</p>
<p>The final element in the file is the &#8220;connections&#8221; element.  This is where the links between nodes are made to define data flow when a graph is operating.  The sub element that defines a single connection is tagged &#8220;connection.&#8221; The connection element contains sub elements tagged &#8220;to&#8221; and &#8220;from.&#8221; These sub elements contain the attributes &#8220;node&#8221; and &#8220;socket.&#8221;  Essentially they define which output parameter on a node gets connected to which input parameter on another node.</p>
<p>At the end of the post is a simple example of a stored graph, however first I want to have a brief conclusion.  I believe this format is fairly portable and quite simple to manage.  The user interface for creating them isn&#8217;t as big a priority as I had originally thought so I believe any developer application would be able to create an exporter to this format.  I also believe the new system design will benefit any user applications and games since it gives them a cleaner interface with the graphs and also hopefully allows for more straight forward management of various types.</p>
<p>My next step will hopefully to be recode bits of the engine that need to be changed to match this new design, possibly a little redesign of the engine as well, and to get a parser written for this file format.  The parser will need to generate the run time graphs with loaded modules, connected inputs and outputs and all that good stuff.</p>
<p>This final section will probably be quite long due to the formatting but here it is.  This is an example graph saved out to my format.  It is a simple graph that has 2 named inputs of type &#8220;Float&#8221; which the graph uses with 2 other constant float values to create 2 addition functions and the results of those get multiplied and output to a named output parameter.</p>
<p>&lt;graph name=&#8221;" &gt;<br />
&lt;modules&gt;<br />
&lt;module name=&#8221;Maths&#8221; file=&#8221;PrEditorMaths.dll&#8221; /&gt;<br />
&lt;module name=&#8221;Noise&#8221; file=&#8221;PrEditorNoise.dll&#8221; /&gt;<br />
&lt;/modules&gt;</p>
<p>&lt;input&gt;<br />
&lt;parameter name=&#8221;value1&#8243; type=&#8221;Maths::Float&#8221; default=&#8221;0.0&#8243; /&gt;<br />
&lt;parameter name=&#8221;value2&#8243; type=&#8221;Maths::Float&#8221; default=&#8221;0.0&#8243; /&gt;<br />
&lt;/input&gt;</p>
<p>&lt;output&gt;<br />
&lt;parameter name=&#8221;value1&#8243; type=&#8221;maths::Float&#8221; default=&#8221;0.0&#8243; /&gt;<br />
&lt;/output&gt;</p>
<p>&lt;nodes&gt;<br />
&lt;node name=&#8221;node1&#8243; type=&#8221;Maths::Float::Constant&#8221;&gt;<br />
&lt;parameter name=&#8221;value&#8221; type=&#8221;Maths::Float&#8221; value=&#8221;23.7&#8243; /&gt;<br />
&lt;/node&gt;</p>
<p>&lt;node name=&#8221;node2&#8243; type=&#8221;Maths::Float::Constant&#8221;&gt;<br />
&lt;parameter name=&#8221;value&#8221; type=&#8221;Maths::Float&#8221; value=&#8221;5.0&#8243; /&gt;<br />
&lt;/node&gt;</p>
<p>&lt;node name=&#8221;node3&#8243; type=&#8221;Maths::Float::Add&#8221; /&gt;<br />
&lt;node name=&#8221;node4&#8243; type=&#8221;Maths::Float::Add&#8221; /&gt;<br />
&lt;node name=&#8221;node5&#8243; type=&#8221;Maths::Float::Multiply&#8221; /&gt;<br />
&lt;/nodes&gt;</p>
<p>&lt;connections&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;inputs&#8221; socket=&#8221;value1&#8243; /&gt;<br />
&lt;to node=&#8221;node3&#8243; socket=&#8221;input1&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;node1&#8243; socket=&#8221;output&#8221; /&gt;<br />
&lt;to node=&#8221;node3&#8243; socket=&#8221;input2&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;inputs&#8221; socket=&#8221;value2&#8243; /&gt;<br />
&lt;to node=&#8221;node4&#8243; socket=&#8221;input1&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;node2&#8243; socket=&#8221;output&#8221; /&gt;<br />
&lt;to node=&#8221;node4&#8243; socket=&#8221;input2&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;node3&#8243; socket=&#8221;output&#8221; /&gt;<br />
&lt;to node=&#8221;node5&#8243; socket=&#8221;input1&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;node3&#8243; socket=&#8221;output&#8221; /&gt;<br />
&lt;to node=&#8221;node5&#8243; socket=&#8221;input2&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;connection&gt;<br />
&lt;from node=&#8221;node5&#8243; socket=&#8221;output&#8221; /&gt;<br />
&lt;to node=&#8221;outputs&#8221; socket=&#8221;value1&#8243; /&gt;<br />
&lt;/connection&gt;<br />
&lt;/connections&gt;<br />
&lt;/graph&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=102</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turning Point</title>
		<link>http://andrewritchie.net/college/?p=100</link>
		<comments>http://andrewritchie.net/college/?p=100#comments</comments>
		<pubDate>Thu, 09 Jul 2009 04:01:20 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=100</guid>
		<description><![CDATA[Realizing something or finding out hours were spent developing something minor or irrelevant seem to be a common trend when working on research projects.  I&#8217;ve got a few pictures and some updates to talk about that I&#8217;ve gotten done since the last update but those will be put off a little but as the last [...]]]></description>
			<content:encoded><![CDATA[<p>Realizing something or finding out hours were spent developing something minor or irrelevant seem to be a common trend when working on research projects.  I&#8217;ve got a few pictures and some updates to talk about that I&#8217;ve gotten done since the last update but those will be put off a little but as the last few days have really altered my perspective on this project.</p>
<p>The first step in getting this whole issue straight is to identify just what I&#8217;d been focusing on and the areas I thought would be most important.  Specifically this area was giving artists and designers an easy to user interface to create generation procedures.  This really focused on the interface and how the artists used it to do new things and create content in new ways.</p>
<p>This original intention is very broad but also doesn&#8217;t really put into perspective the projects goals.  The way I outlined it was really this radical new  way of interacting with users and making the underlying technology a minor player in the whole thing.  In my head I had that as the appropriate prioritization of the project.  However as I&#8217;ve progressed it&#8217;s been far more obvious that my true intentions were to make a middleware type library that was capable of loading user created graphs and generating assets for use in a game engine.</p>
<p>You may now be asking: &#8220;Woah there, that&#8217;s the same thing really isn&#8217;t it?&#8221; To which my answer is: yes on the surface and at either end of the pipeline it sort of is.  However when it comes to scope and being able to say what&#8217;s &#8220;new&#8221; about my project it really brings the obvious answers to the surface.  My use of node graph and visual programming style interfaces aren&#8217;t new, they&#8217;re directly inspired by existing paradigms and even specific tools.  The state of the art would point out that these are infact very succesful ways of doing things and why I wanted to use them.  At the other end of the spectrum using procedurally generated content in game isn&#8217;t new at all either.  There are plenty of examples of assets being generated in external applications to be imported into games, there are also examples of features within game using procedural methods to create elements that they will use.  My real contribution is this middle ware library that takes as it&#8217;s input a formatted generation description that it then parses and runs to provide a defined output that is an asset a game can understand and use.</p>
<p>So, where&#8217;s the huge change?  Well it feels a bit like designing the first ever car and slapping a body together, popping a comfy seat and a steering wheel in for the driver, assuming the engine will go up front and the putting shiny wheels on it.  I&#8217;ve been praising the wheels, both steering and rolling, designing them as being the important feature to it, no wheels, no rolling, no control, no car.  However the fact of the matter is I just assumed mechanical details and that the engine would just happen.  Taking a step back I can see the engine itself is the crucial piece of technical detail.  It&#8217;s the true heart of the car, the steering wheel may allow the driver to control the car and the wheels on the road may let it travel about but both of those have been done before, it&#8217;s the combustion engine that drives it all.  The pistols firing away turning the crank to push power to the drive wheels to make it go and the throttle pedal giving the driver control over just how much power the engine should put out.</p>
<p>The analogy is rough around the edges, but the point is there.  What I want to do is really delve into the specifics of how my &#8220;PrEditor Engine&#8221; will work, define the inputs and outputs so the Editors can control the procedures and the games know what they&#8217;re getting.  I had intended the Engine to be an implementation detail, mostly ignored with the &#8220;usability&#8221; factor being the key selling point.  Well that&#8217;s turned out to be jumping the gun hugely.  Yes a node based editor is really cool and I&#8217;m not ditching that, as well as the demo frame work it&#8217;s hanging about, it&#8217;s just I&#8217;m going to have to REALLY put a lot of effort in to make up the lost time on the Engine.  It&#8217;s where I&#8217;ve wanted to be, it&#8217;s not something to be thought up after the Interface is created.  It&#8217;s got to be the key stone in all of this.</p>
<p>I wanted to try and approach this as a Rapid Application Development but the very thing I was trying to avoid was the most important detail.  I don&#8217;t have a system in place that needs to accessed, I don&#8217;t have a team of artists waiting for an easier way to create procedural content, I&#8217;m on the very tip of the technical side trying to create a reusable and expandable library that can be used to do all that with.</p>
<p>So, back on track, not all the old work lost, but certainly not what I am going to focus on as my key development goals.  They are ultimately just a way of facilitating generation of and rendering the outputs from the core engine.  From here on out the PrEditor Engine might need a new name, so it&#8217;s a Procedural Generator rather than a Procedural Editor, the editor is merely part of the toolkit used to create the inputs to the system.</p>
<p>This means for this week I&#8217;m going to try and wrap up to some degree my work on the editor and demos and really have to get to the drawing board with this engine implementation.  What was a fairly straight forward and thrown together system to create the means to an end will have to be come a strongly defined process.  By the end of the week I hope to have the structure of the input data, the parsing and graph generation process, the node definitions, the graph execution and the setting of input data and retrival of output data atleast in the research phases if not early definitions outlined.  I plan on sticking to the avoidance of over engineering and keeping it straight forward but I also want to tackle head on the crucial points I&#8217;ve uncovered about where and how to define data types that will be extensible but still be able to run as part of a generalised node graph.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Node Graph Hitting Milestones</title>
		<link>http://andrewritchie.net/college/?p=86</link>
		<comments>http://andrewritchie.net/college/?p=86#comments</comments>
		<pubDate>Wed, 01 Jul 2009 05:26:05 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=86</guid>
		<description><![CDATA[Today was spent early on debugging the STL vector replacement I wrote.  Originally I had thought it quite clever with a double linked list that stored extra nodes off the tail,  so it didn&#8217;t have to always create and delete elements as they were used.  It turned out a simple thing like reordering head and [...]]]></description>
			<content:encoded><![CDATA[<p>Today was spent early on debugging the STL vector replacement I wrote.  Originally I had thought it quite clever with a double linked list that stored extra nodes off the tail,  so it didn&#8217;t have to always create and delete elements as they were used.  It turned out a simple thing like reordering head and tail pointers can be quite complex when handled in various ways at different points.  I&#8217;d end up fixing an issue in a stack style function and realise the issue went unfixed in a queue type function.  However after walking through it all and nailing down some of the lose ends it&#8217;s up and working and actually doing it&#8217;s job in some areas.  For example my mesh loading library has a few objects that stores of thousands of faces but uses a swap buffer that is cleared after each use.  With some of the list entries stored off for later use this means the swap buffer only actually allocates the highest number of  verticies used by a face.  I&#8217;m sure the STL vector class does this too so not amazing per se but it&#8217;s nice to have written my own just to see if I can and how it&#8217;s done.  No fun using something someone made for you if you don&#8217;t know how it works.</p>
<p>So actual progress on the project was also achieved.  I&#8217;ve got a simpler and hopefully more solid implementation of the nodes in place.  One of the biggest issues I think I&#8217;m going to face is figuring out how to balance the data types of inputs and outputs.  I want to be able to set it up so that I can explicitly  make sure I&#8217;m passing a input data type to a node and that it will be outputting a specific type that can then be used.  The current system in place is quite lenient in that it&#8217;s up to the implementation to define the storage medium.  The interface only defines a method to retrieve an integer value to represent a mnemonic value for it&#8217;s type and the a get and set method that return and take pointers of type void, respectively.  It&#8217;s not the most impressive interface nor do i think it&#8217;s very professional. I had tried a templated version and extremely overloaded version but the former is a tough nut to crack with an application running through interfaces and the later got very messy and wouldn&#8217;t have supported data types beyond what I supported.  The reason I want this kind of flexibility is the fact that there are so many different data types to deal with and so many are going to be defined by the intended use. Things like a mesh of spatial Vectors that are manipulated to create a terrain aren&#8217;t even as simple as I had hoped, a company might use mere bytes to represent the data where others might use full blown double precision floating point values.  String types may vary accross libraries, where I use a lot of STL strings others might have their own custom built ones.  At the end of the day I want to support as much as possible and inhibit as little possible.  I think I&#8217;ll be looking into this a fair bit but I&#8217;d like to find a soloution that can leave it fairly flexible without requiring me to code handlers for every possible permiation of data structures.</p>
<p>So, on to a slightly more successful part of the day. I got the UI running with the new node structures as well as getting in the base frame work for handling the different types.</p>
<div id="attachment_87" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo29.jpg"><img class="size-thumbnail wp-image-87" src="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo29-150x150.jpg" alt="Colour Coordinated Node Types" width="150" height="150" /></a><p class="wp-caption-text">Colour Coordinated Node Types</p></div>
<p>Now when a node module is loaded and registers the UI creates a new GUI for it and adds the availabel nodes to the lists.  These can then be selected and placed by the user.</p>
<div id="attachment_88" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo30.jpg"><img class="size-thumbnail wp-image-88" src="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo30-150x150.jpg" alt="Organised Nodes. Tabbing for Modules and Lists for Node Types" width="150" height="150" /></a><p class="wp-caption-text">Organised Nodes. Tabbing for Modules and Lists for Node Types</p></div>
<p>While placement, selection and movement are all in place the connection creater is still in need of some work.</p>
<div id="attachment_89" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo31.jpg"><img class="size-thumbnail wp-image-89" src="http://andrewritchie.net/college/wp-content/uploads/2009/07/demo31-150x150.jpg" alt="Input and Output System becomes a colourful messy graph" width="150" height="150" /></a><p class="wp-caption-text">Input and Output System becomes a colourful messy graph</p></div>
<p>Tomorrows task will be to get the outputs listed on the node elements, setup the connections so you can only drag connections from an output to a valid input(ensuring inputs only have 1 link) and I would like to make a rudamentry pass at running the graph.</p>
<p>Other areas I&#8217;ll be keeping in mind or having a think about will be a properties editor for nodes so that I can use the GUI to edit the values inside generator and output nodes.  I also plan on having a think about how to load and store pre built graphs, as well as the possibility of some real time preview windows or nodes.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Restructure, Node Modules and other issues</title>
		<link>http://andrewritchie.net/college/?p=80</link>
		<comments>http://andrewritchie.net/college/?p=80#comments</comments>
		<pubDate>Mon, 29 Jun 2009 05:04:40 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=80</guid>
		<description><![CDATA[The last couple of days were spent largely rooting through the innards of unexpected behaviours from Microsofts Visual C++ compiler and walking through my design process for how to organise nodes.
The first thing I did after the previous post was sit down with a pen and paper and map out the structure of my modules [...]]]></description>
			<content:encoded><![CDATA[<p>The last couple of days were spent largely rooting through the innards of unexpected behaviours from Microsofts Visual C++ compiler and walking through my design process for how to organise nodes.<br />
The first thing I did after the previous post was sit down with a pen and paper and map out the structure of my modules and interfaces.  It&#8217;s easy to get lost in the true relationships as you work with code and I found myself getting very grey about where code needs to maintain strict seperations.  When going through the design of the node libraries I realised that the ideal structure was actually quite straight forward.   Creating the concept of a &#8220;Node Module&#8221; which was the hub to any node library.  It is what the engine component deals with as well as what nodes within the libraries register with so that they can be listed and instanciated.  With a library of nodes and a node module being a self contained unit the engine component can then load any amount of these libraries and then notifies the Editor itself or any object that wants to know about the loading and unloading via callback registrations.</p>
<p>So with the redesign in place I set about implementing the code.  The interfaces for the nodes were reduced to just a single one.  I&#8217;m still a bit iffy on how inputs and outputs will interact, currently it&#8217;s a bit hack and slash but is quite generic and allows flexibility at the implementation end.  The engine&#8217;s loading function was modified to call the appropriate callbacks and ensure the node module was created.</p>
<p>It was at this time however the troubles started.  I found that upon calling into a node module I wasn&#8217;t getting back the appropriate information.  I couldn&#8217;t create, list or retrieve any of the node factories within the library.  I tried all manner of debugging to walk through the issue trying to track it&#8217;s origin.  Ultimately it was a difficult one to track.  The calls into the node module library seemed to never leave the local library and find no registered factories even though the factories registered properly and the modules data was fine.  I had been a bit worried about using Standard Template Library data types in my libraries but their usage was fairly self contained.  However with this issue I spent time rewriting my own templated data storage packages to try and improve the library compatibility.  This sank about a full days work, though I was able to improve on some of the workings of the classes, probably not speed but task specific features which made it a bit cleaner to work with.</p>
<p>After I&#8217;d taken a bit of an over enthusiastic jump into the world of STL replacement, I decided to log and visualise the process leading up to the issue.  For this I wrote a little tool in Windows to load up each library and list off the available registered factories.  To do this it simply gave the user a selection to go choose the library they wanted and then it grabbed the exported module class.  This module class is shared accross all of my libraries as a single common interface.</p>
<div id="attachment_81" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo27.jpg"><img class="size-thumbnail wp-image-81" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo27-150x150.jpg" alt="Selecting A Module To Inspect" width="150" height="150" /></a><p class="wp-caption-text">Selecting A Module To Inspect</p></div>
<p>For this tool I added interfaces to the module interface that allowes for simply itterating over all the registered factory names.  I hit yet another snag here.  It turned out the modules I was inspecting didn&#8217;t want to work with my new functions and refused to acknowledge the existance of any factories.  I noticed that it was a similar issue to the node module in that the function calls always called to an instance of the module class contained in the local calling library rather than the remote library.  This was even more perplexing because I could access my &#8220;RequestSystem&#8221; method and it would go and use the factories just fine.</p>
<p>Fast forward a few hours of rooting through forums and the Microsoft Developer Network, I was on my last nerve and had made changes that in hindesight could have caused a lot of issues later.  On a whim I copy and pasted the method declarations in the Module class to see if it was some strange compiler issue.  As I was doing so I removed the &#8216;virtual&#8217; tags that were in front of the RequestSystem and ReleaseSystem module methods as they weren&#8217;t needed due any longer.  I had intended to use the module class as  a base class for further module specialisation but factories did away with that needed.  Upon removal of the virtual methods the test application began acting very strange.  For the request system it no longer called the right library, it was calling the local library version.</p>
<p>This realisation took me straight to the soloution.  If I declared a method in a class virtual and that class existed both on the local library and the remote one, the virtual declaration meant it would call to the correct place where as the normal methods always called the local instance no matter what.  I usually interface out all my cross library features but with the module and node module classes they were compiled out to a core library and I assumed that since they all rely on just a single class it&#8217;d be fine.  Well that was wrong, as soon as I interfaced out the module data and used the interface to invoke methods everything went back to working happy as can be.  The interface testing application was able to list off all registered factories just fine.</p>
<div id="attachment_82" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo25.jpg"><img class="size-thumbnail wp-image-82" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo25-150x150.jpg" alt="PrEditor Engine Interface Listing" width="150" height="150" /></a><p class="wp-caption-text">PrEditor Engine Interface Listing</p></div>
<p>By giving the node module the same treatment I was able to accurately list off the node factories and the modules root name.  This I passed to my UI manager in the PrEditor system.  Currently it just lists in a static text box the module name and the nodes it contains but now I&#8217;m hoping I can get round to adding the library name as a selectable list and associate the factory names with GUI nodes.  With any luck this will allow for a good start to the week.</p>
<div id="attachment_83" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo24.jpg"><img class="size-thumbnail wp-image-83" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo24-150x150.jpg" alt="Editor Interface Listing Registered Node Module and Nodes" width="150" height="150" /></a><p class="wp-caption-text">Editor Interface Listing Registered Node Module and Nodes</p></div>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=80</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editor Implementation and PrEditor Engine Layout</title>
		<link>http://andrewritchie.net/college/?p=71</link>
		<comments>http://andrewritchie.net/college/?p=71#comments</comments>
		<pubDate>Sat, 27 Jun 2009 03:51:11 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=71</guid>
		<description><![CDATA[I spent the last couple of days fighting APIs and limitations.  Bit of a pain and lost a lot of time to nothing but overall I got a large chunk of progress made on the implementation of the Editor UI.  I&#8217;ve also got a few pages of design work in place for the actuall structure [...]]]></description>
			<content:encoded><![CDATA[<p>I spent the last couple of days fighting APIs and limitations.  Bit of a pain and lost a lot of time to nothing but overall I got a large chunk of progress made on the implementation of the Editor UI.  I&#8217;ve also got a few pages of design work in place for the actuall structure of the core library for running the project.</p>
<p>First the boring design stuff, since I&#8217;m not scanning paper to speak for itself my rough description would go as follows.  UML type interface boxes showing overall code structure and call directions.  Pseudo class definitions for some of the core interfaces for listing, polying and querying contained interfaces.  Finishing off with more pseudo algorithm design for parsing graphs using stacks and reverse traversal.<br />
After I&#8217;d gotten that design stuff out of the way I worked on the interface for loading, creating and saving graphs.  At first I was going to keep using the same GUI Toolkit that I&#8217;d been working with previously, however trying to push my code into it&#8217;s structure just didn&#8217;t want to play nice without requiring a lot of work involving scripting and over engineering a few classes.  After losing a day and a half to that I worked on my own task specific UI that I was able to get up and running to my liking.  It&#8217;s not overly pretty perhaps but in terms of allowing me to built on it how I want to,  it does the job.</p>
<div id="attachment_72" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo19.jpg"><img class="size-thumbnail wp-image-72" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo19-150x150.jpg" alt="First Pass of Graph Interface" width="150" height="150" /></a><p class="wp-caption-text">First Pass of Graph Interface</p></div>
<p>With the outline in place and it rendering without too much hack and slash I was able to add in selection and dragging, so that the nodes aren&#8217;t static and can be ordered however you want. Or in the case of my examples to scatter nodes out of their lovely little triangles.</p>
<div id="attachment_75" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo20.jpg"><img class="size-thumbnail wp-image-75" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo20-150x150.jpg" alt="Node Graph Moved Around" width="150" height="150" /></a><p class="wp-caption-text">Node Graph Moved Around</p></div>
<p>With the selection stuff working adding in connections to the graph was my next little venture.  At the moment a created connection just represents a line between 2 nodes but I&#8217;ll be expanding on the slection modes, connection features and the shapes and end points of the rendered lines themselves.</p>
<div id="attachment_76" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo22.jpg"><img class="size-thumbnail wp-image-76" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo22-150x150.jpg" alt="Connections Created On Node Graph" width="150" height="150" /></a><p class="wp-caption-text">Connections Created On Node Graph</p></div>
<p>The final piece of the puzzle for this little venture was the fact that I&#8217;d not abandoned the GUI toolkit entirely.  What I&#8217;d done was layered it ontop of my new GUI stuff so that it still existed as a context menu type system pulled up when the user clicks a certain button.  My goal is to put everything the user will need into the pop ups so that they can easily get to all the features.  Editors such as that for LOVE and some 2D tile editors feature this kind of interface and modelling tools such as 3D Max feature quite complex context menus containing many features.  Though technically I have to admit it&#8217;s also a handy way to run things as CEGUI essentially gets to run in isolation.</p>
<div id="attachment_77" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo21.jpg"><img class="size-thumbnail wp-image-77" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo21-150x150.jpg" alt="CEGUI Running On Top of Graph UI" width="150" height="150" /></a><p class="wp-caption-text">CEGUI Running On Top of Graph UI</p></div>
<p>That&#8217;s about it for now.  Next steps will be implementing the PrEditor engine so the graph UI can start linking up to real graph elements and creating/designing the UI to allow the user to change selection modes, connect node inputs and outputs, save and load graphs, create different node types and possibly edit properties of some nodes.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Shaders and Planning</title>
		<link>http://andrewritchie.net/college/?p=65</link>
		<comments>http://andrewritchie.net/college/?p=65#comments</comments>
		<pubDate>Thu, 25 Jun 2009 02:05:41 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=65</guid>
		<description><![CDATA[I spent today bouncing between semi useless and quite important tasks.  Most of my time got swept into the useless because it&#8217;s immediately more visuall interesting unless I can find a scanner.
Firstly, the important stuff was fleshing out my library interfaces and planning for the graphing system.  It&#8217;s getting a bit silly they design process [...]]]></description>
			<content:encoded><![CDATA[<p>I spent today bouncing between semi useless and quite important tasks.  Most of my time got swept into the useless because it&#8217;s immediately more visuall interesting unless I can find a scanner.</p>
<p>Firstly, the important stuff was fleshing out my library interfaces and planning for the graphing system.  It&#8217;s getting a bit silly they design process revolving around this project.  It&#8217;s definately an interative design process but each itteration removes complexity and focuses the project more.  I had originally wanted to do all XML based graphs and node handling but I realised it&#8217;s not actually important.  A more concise and faster internal structure makes much more sense plus if all goes as planned and the runtime library is used for generation then extensibility isn&#8217;t really needed as I have full control over the formats and just need to ensure intput and output data types are strongly defined.  I also twiddled with the interface a little but it didn&#8217;t actually achieve much.</p>
<p>The useless things I did today revolved entirely around the demo framework.  I implemented a splash screen which I&#8217;ll post up if I have a day with nothing worth posting.  The other thing I really focused on was expanding on and further coding my shader class.  Adding texture sampling pass throughs and messing around with various effects.  I don&#8217;t think I&#8217;ve made any major revoloutions and infact I probably didn&#8217;t even do it right but I&#8217;m happy with how it&#8217;s turning out.  The loading of shaders from external files makes it so tempting to mess with them.  However the more complex I try to make it the more I find myself going back into my C++ code and revising or altering chunks to be more flexible.</p>
<p>Just before I put up the pictures of my messings around today, I do have a bit of method to mayhem.  I want to have a crack later, if I can, at using the editor to create materials, similar to UE3&#8217;s material editor which is one of the direct insipirations for this project.  And now, pictures! Nothing amazing, just doodling and messing.</p>
<div id="attachment_66" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo15.jpg"><img class="size-thumbnail wp-image-66" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo15-150x150.jpg" alt="Blending 2 Textures Based on Horizontal Screen Position (not photoshop like the previously posted blends)" width="150" height="150" /></a><p class="wp-caption-text">Blending 2 Textures Based on Horizontal Screen Position (not photoshop like the previously posted blends)</p></div>
<div id="attachment_67" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo17.jpg"><img class="size-thumbnail wp-image-67" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo17-150x150.jpg" alt="Very Dark Blend( not sure why I took this, lets just pretend it's a nightime scene)" width="150" height="150" /></a><p class="wp-caption-text">Very Dark Blend( not sure why I took this, lets just pretend it&#39;s a nightime scene)</p></div>
<div id="attachment_68" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo18.jpg"><img class="size-thumbnail wp-image-68" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo18-150x150.jpg" alt="Blend Using Yellowness Of Overlay Texture" width="150" height="150" /></a><p class="wp-caption-text">Blend Using Yellowness Of Overlay Texture</p></div>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=65</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Editor Engine Switch</title>
		<link>http://andrewritchie.net/college/?p=63</link>
		<comments>http://andrewritchie.net/college/?p=63#comments</comments>
		<pubDate>Wed, 24 Jun 2009 02:38:37 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=63</guid>
		<description><![CDATA[After developing the low level engine components of the demo framework I went back to working on the editor interface.  Trying to figure out what I was doing nearly 4 weeks ago when I first wrote it was a bit confusing as large chunks were &#8220;potential&#8221; features that won&#8217;t ever be developed.
What I did instead [...]]]></description>
			<content:encoded><![CDATA[<p>After developing the low level engine components of the demo framework I went back to working on the editor interface.  Trying to figure out what I was doing nearly 4 weeks ago when I first wrote it was a bit confusing as large chunks were &#8220;potential&#8221; features that won&#8217;t ever be developed.</p>
<p>What I did instead was figured out what could be kept and ported it to my demo framework engine.  I wanted to use OpenGL as a foundation for the node graph rendering and real time previews but the feature set of wxWidgets goes well above and beyond, most of which essentially gets in the way.  By using the framework I&#8217;ve come up with new library design.  The framework has an Editor mode built in to it that loads an intermediate library that handles GUI for the PrEditor TK stuff and loads up the core PrEditor libraries.  This should hopefully simplify the development since it&#8217;ll be bare bones.</p>
<p>The port didn&#8217;t take much of today and left me a bit of time to mess around with implementing and wrapping GLSL shaders.  Tomorrow I&#8217;m going to sit down and create the technical diagrams for the editor module, the run time module and the plugin system for the runtime module.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=63</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Demo Model Library</title>
		<link>http://andrewritchie.net/college/?p=48</link>
		<comments>http://andrewritchie.net/college/?p=48#comments</comments>
		<pubDate>Fri, 19 Jun 2009 04:12:11 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://andrewritchie.net/college/?p=48</guid>
		<description><![CDATA[Today was spent mostly on messing around with meshes and their formatting.  I decided that it&#8217;d be best to try and create a format that is fairly flexible and create a loading library.  I ported yesterdays mesh code over to the static library and played around with some of the formats I&#8217;d been able to [...]]]></description>
			<content:encoded><![CDATA[<div class="mceTemp mceIEcenter" style="text-align: left;">Today was spent mostly on messing around with meshes and their formatting.  I decided that it&#8217;d be best to try and create a format that is fairly flexible and create a loading library.  I ported yesterdays mesh code over to the static library and played around with some of the formats I&#8217;d been able to save in.  Unfortunately the application I am using to convert the games assets to more accessible formats doesn&#8217;t allow for much useful exporting without paying for it.</div>
<div class="mceTemp mceIEcenter" style="text-align: left;">What I ended up doing was scowering the many output formats it exports to and found 2 that contained features I wanted.  The first was Vertex, Texture Coordinates and Face information in sequential ASCII lists and the other was an XML format that contained Vertex, Face and Texture file data.  I thought the 3d convertor tool would be usable but I spent a lot of time just finding a format that would contain UV coords in the export.  I then wrote a little merging application that took the XML and ASCII models and extracted the data needed from both.  It then saves out as a custom format that I came up with. Below are some images of the work I&#8217;d gotten done.</div>
<div id="attachment_49" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo9.jpg"><img class="size-thumbnail wp-image-49" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo9-150x150.jpg" alt="Textured Composite Helmet From SWG" width="150" height="150" /></a><p class="wp-caption-text">Textured Composite Helmet From SWG </p></div>
<div id="attachment_50" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo8.jpg"><img class="size-thumbnail wp-image-50" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo8-150x150.jpg" alt="Textured Rancor from SWG" width="150" height="150" /></a><p class="wp-caption-text">Textured Rancor from SWG</p></div>
<p>After getting the models from Star Wars Galaxies rendering I set about cleaning up the storage medium and process.  The above renders still contained model specific hacks to get them running.  At this point I got talking to a friend who works as a professional environment artist and tried to find out the formats that he would use most often.  These turned out to be the Wavefront obj and AutoDesk fbx formats.  I decided to drop trying to get a usable format for the SWG assets and focus on an OBJ loader.  As I progressed with the obj loader I noticed several things that would be problematic but also some ways to improve my existing mesh data structuring.  Using that I reworked the format and it is now simpiler to work with and easier to manage.  However issues with OpenGL&#8217;s array drawing abilities have held up fully implementing them.  Below is a sample of the current OBJ loader.  The model has the general shape it&#8217;s meant to but is still far to much of a poly soup to be recognisable.</p>
<div id="attachment_53" class="wp-caption aligncenter" style="width: 160px"><a href="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo10.jpg"><img class="size-thumbnail wp-image-53" src="http://andrewritchie.net/college/wp-content/uploads/2009/06/demo10-150x150.jpg" alt="Polysoup of CityDemo.obj" width="150" height="150" /></a><p class="wp-caption-text">Polysoup of CityDemo.obj</p></div>
<p>I also finally got the Demo Applications sandboxed.  They run inside of an engine that is within the engine of the demo frame work.  This seperates the demo content from the core content and makes things a lot easier to shut off and destroy.  They are also very self contained with almost all loading, operating and destruction being managed autonomously.</p>
<p>During the day I had to spend a bit of time with my server too.  The machine that I run my SVN server on was compromised by a virus.  I don&#8217;t know how long it had been there  or whether the Anti Virus had managed to block it prior.  Once i realised the compromise i backed up my SVN repository and reinstalled the machine.  I&#8217;d needed to clean it up anyway but I&#8217;d rather it hadn&#8217;t been like that.  I&#8217;m thinking of virtualising the main envrionment on the server so that I can run the SVN service on the native OS but then use the PC through a virtual machine.  That way if it ever gets compromised again it&#8217;ll most likely be in the VM and that&#8217;s much less dangerous to wipe than the actual machine.</p>
<p>Tomorrow, other than going through and changing all my login details for this I access through my server, I&#8217;m going to look at bringing some procedural things into the terrain demo app.  I&#8217;m also going to try and do the rought design of the PrEditor run time library that will provide the ability to create things on the fly by loading graphs created within the editor.  I plan on starting with generic generators connecting to generic outputs.  Such as a mesh generator that takes parameters for segments and spacing and a mesh output that provides an interface to an array and index buffer.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewritchie.net/college/?feed=rss2&amp;p=48</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
