<?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>notes from the bigfug &#187; GLU</title>
	<atom:link href="http://www.bigfug.com/tag/glu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bigfug.com</link>
	<description>programming light and other strange tales</description>
	<lastBuildDate>Mon, 07 Jun 2010 13:47:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding FreeType2 support to PatchBox</title>
		<link>http://www.bigfug.com/2009/06/05/adding-freetype2-support-to-patchbox/</link>
		<comments>http://www.bigfug.com/2009/06/05/adding-freetype2-support-to-patchbox/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 16:50:09 +0000</pubDate>
		<dc:creator>Alex May</dc:creator>
				<category><![CDATA[PatchBox]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[freetype2]]></category>
		<category><![CDATA[GLU]]></category>
		<guid isPermaLink="false">http://www.bigfug.com/2009/06/05/adding-freetype2-support-to-patchbox/</guid>
		<description><![CDATA[It?s well overdue, but am finally getting around to adding font support to PatchBox.&#160; Rather than using bitmap based fonts, I thought it would be fun to use the font outlines and create proper 3D models.&#160; Here?s how it went:
&#160;
Having extracted the glyph outline using FreeType2, let?s draw it with GL_LINES? ah?
GL_LINE_STRIP isn?t correct either?
Ah, [...]]]></description>
			<content:encoded><![CDATA[<p>It?s well overdue, but am finally getting around to adding font support to PatchBox.&#160; Rather than using bitmap based fonts, I thought it would be fun to use the font outlines and create proper 3D models.&#160; Here?s how it went:</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050002.png"><img title="2009-06-05 - 0002" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="188" alt="2009-06-05 - 0002" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050002-thumb.png" width="244" border="0" /></a>&#160;</p>
<p>Having extracted the glyph outline using FreeType2, let?s draw it with GL_LINES? ah?</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050006.png"><img title="2009-06-05 - 0006" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0006" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050006-thumb.png" width="244" border="0" /></a></p>
<p>GL_LINE_STRIP isn?t correct either?</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050007.png"><img title="2009-06-05 - 0007" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0007" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050007-thumb.png" width="244" border="0" /></a></p>
<p>Ah, good old GL_LINE_LOOP?</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050005.png"><img title="2009-06-05 - 0005" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0005" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050005-thumb.png" width="244" border="0" /></a>&#160; </p>
<p>Initially, adding conic and cubic curves didn?t go quite as planned?</p>
<p><img title="2009-06-05 - 0008" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0008" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050008-thumb.png" width="244" border="0" /></p>
<p>Better, but FreeType2 uses long?s to position data, resulting in the rather wobbly lines.</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050009.png"><img title="2009-06-05 - 0009" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0009" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050009-thumb.png" width="244" border="0" /></a></p>
<p>Converting to double?s does the trick nicely?</p>
<p><img title="2009-06-05 - 0010" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="184" alt="2009-06-05 - 0010" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050010-thumb.png" width="244" border="0" /></p>
<p>Now, lets? fill the outlines using gluTesselate() ? oh, FreeType2 uses NONZERO winding by default, whereas GLU uses ODD?</p>
<p><a href="http://www.bigfug.com/wp-content/uploads/2009/06/200906050013.png"><img title="2009-06-05 - 0013" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="172" alt="2009-06-05 - 0013" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050013-thumb.png" width="244" border="0" /></a></p>
<p>That?s looking better, but there?s still a problem?</p>
<p><img title="2009-06-05 - 0014" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="161" alt="2009-06-05 - 0014" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050014-thumb.png" width="244" border="0" /></p>
<p>Some characters are being drawn weirdly!&#160; Turns out to be a problem with my GLU_TESS_COMBINE_DATA routine.&#160; I?m using a custom vertex format, which I thought was what you returned from your combine callback, but no, you have to return an allocated GLdouble[ 3 ] and remember it so it can be freed later.</p>
<p><img title="2009-06-05 - 0015" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="174" alt="2009-06-05 - 0015" src="http://www.bigfug.com/wp-content/uploads/2009/06/200906050015-thumb.png" width="244" border="0" /></p>
</p>
<p>The finished result!&#160; All nice and smooth and stored away in vertex array ready for dumping to a VBO?</p>
<p>Next up will be creating a whole string, then multiple lines, then adding depth, colours, textures, etc!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigfug.com/2009/06/05/adding-freetype2-support-to-patchbox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Statues Alive: Boy &amp; Dolphin Diorama</title>
		<link>http://www.bigfug.com/2008/06/12/statues-alive-boy-dolphin-diorama/</link>
		<comments>http://www.bigfug.com/2008/06/12/statues-alive-boy-dolphin-diorama/#comments</comments>
		<pubDate>Thu, 12 Jun 2008 15:30:45 +0000</pubDate>
		<dc:creator>Alex May</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GLU]]></category>
		<guid isPermaLink="false">http://www.bigfug.com/test/?p=33</guid>
		<description><![CDATA[While generally my focus is on projections, there are certain challenges with the Statues Alive project that have spilled over into adding physical modifications to the sculpture space.
The primary challenge is that most of the statues we are projecting on are made of dark material that certainly doesn?t make for an ideal surface.
Early on we [...]]]></description>
			<content:encoded><![CDATA[<p>While generally my focus is on projections, there are certain challenges with the Statues Alive project that have spilled over into adding physical modifications to the sculpture space.</p>
<p>The primary challenge is that most of the statues we are projecting on are made of dark material that certainly doesn?t make for an ideal surface.</p>
<p>Early on we decided the only way to resolve this was to ?add? elements to certain sculptures that will, half by design and half by necessity, radically change the form and impression of the works themselves.</p>
<p>It is certainly in line with the basis of the project, and the <a href="http://www.rbkc.gov.uk/intransit">InTransit</a> programme, that we are presenting a reinterpretation and re-telling of these well known and (in some cases!) well loved works.</p>
<p>For ?awakening? we?re putting a screen behind the statue.&#160; For the Epstein, which is actually white, I?ve got some strange kaleidoscopic ideas involving mirrors.&#160; We?ll see how that works out!</p>
<p>The only contentious issue with the project seems to be my idea of building a large, blue, glowing wire-frame cube (representative of a cube of water) around the Boy &amp; Dolphin sculpture, arguably the most well known and loved:</p>
<p><a href="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/Dolphin3.jpg"><img title="Dolphin 3" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="192" alt="Dolphin 3" src="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/Dolphin3_thumb.jpg" width="240" border="0" /></a> </p>
<p>To demonstrate and communicate my vision for how this may look, I bought some plastic toys (I couldn?t find a boy, so had to make do with a lizard!), some kebab sticks, fluorescent paint, a black light, and heated up the glue-gun.&#160; The resulting model:</p>
<p><a href="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0022.jpg"><img title="IMAG0022" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMAG0022" src="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0022_thumb.jpg" width="240" border="0" /></a> <a href="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0023.jpg"><img title="IMAG0023" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMAG0023" src="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0023_thumb.jpg" width="240" border="0" /></a> <a href="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0024.jpg"><img title="IMAG0024" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMAG0024" src="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0024_thumb.jpg" width="240" border="0" /></a> <a href="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0025.jpg"><img title="IMAG0025" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="180" alt="IMAG0025" src="http://www.bigfug.com/uploads/StatuesAliveBoyDolphinDiorama_CBEC/IMAG0025_thumb.jpg" width="240" border="0" /></a> </p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
</p>
<p>I couldn?t quite achieve the same cantilever result, hence the supporting piece, but it serves!</p>
<p>My plan is to have two black lights, one each side, to reduce shadowing, and there will be projections on either side of the plinth.&#160; In addition there will be a water effect light on the sculpture itself.&#160; I think it looks rather intriguing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigfug.com/2008/06/12/statues-alive-boy-dolphin-diorama/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PatchBox r161</title>
		<link>http://www.bigfug.com/2007/12/17/patchbox-r161/</link>
		<comments>http://www.bigfug.com/2007/12/17/patchbox-r161/#comments</comments>
		<pubDate>Mon, 17 Dec 2007 12:32:12 +0000</pubDate>
		<dc:creator>Alex May</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GLU]]></category>
		<category><![CDATA[lua]]></category>
		<category><![CDATA[PatchBox]]></category>
		<guid isPermaLink="false">http://www.bigfug.com/test/?p=16</guid>
		<description><![CDATA[Yesterday was a good coding day.  Rested and replete from some serious mince pie and hot chestnut ingestion the day before, I sat down and added LUA support.
For years the plan was to have the entire internal system of PB available for scripting.  Previously I&#8217;ve messed about with various approaches but have settled [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday was a good coding day.  Rested and replete from some serious mince pie and hot chestnut ingestion the day before, I sat down and added LUA support.</p>
<p>For years the plan was to have the entire internal system of PB available for scripting.  Previously I&#8217;ve messed about with various approaches but have settled on a hierarchical tree of named wxVariant objects.</p>
<p>This benefits me in three ways:</p>
<ol>
<li>it&#8217;s instantly ready to be tied into OSC as the naming conventions are exactly the same</li>
<li>using wxVariant saves having lots of classes for each type</li>
<li>using the OSC addressing scheme in LUA reduces the need for a lot of class specific functions and provides a quick way to access new functionality without having to write a lot of supporting glue code</li>
</ol>
<p>At the moment there are only global functions as I&#8217;m just using light user data so the code looks like this:</p>
<pre>-- test_000.lua</pre>
<pre>root = pb.getroot();      -- returns the object that the script was dragged 'n' dropped on</pre>
<pre>var_alpha = pb.getchild( root, 'alpha' );</pre>
<pre>pb.setvalue( var_alpha, 0.5 );</pre>
<p>Which is obviously pretty long winded and confusing.  Have already partially written the code for using LUA objects instead but just need to make sure it&#8217;s going to be workable without introducing class dependence.</p>
<p>Bolstered by that success I also turned my hand to adding OpenGL shader support.  I&#8217;m almost ashamed to admit I&#8217;ve not really gotten into shader programming as yet.  Have been too busy pushing pixels around with the CPU, and besides I haven&#8217;t been using any visual software that supported them.  Until now!</p>
<p>My original thinking was that shaders would act a bit like textures: you can drag and drop them onto geometry but reading up and refining my understanding of how they worked I realised there may be some interesting possibilities for not only shifting off workload to the GPU, but also expanding on the flexibility of the application.</p>
<p>At the moment PB supports multitexturing and the default blending modes &#8211; this is added in the code, but by moving that part into the shader, and just expanding the properties system to be able to drag and drop textures into the configuration of the shader, I can get rid of that hard coded functionality, reduce the amount of GL instructions I need to call per frame, and get much more flexibility.  Sounds like a plan to me!</p>
<p />
]]></content:encoded>
			<wfw:commentRss>http://www.bigfug.com/2007/12/17/patchbox-r161/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gig Report &#8211; A Club Called Spud &#8211; 9th May 2007</title>
		<link>http://www.bigfug.com/2007/05/11/gig-report-a-club-called-spud-9th-may-2007/</link>
		<comments>http://www.bigfug.com/2007/05/11/gig-report-a-club-called-spud-9th-may-2007/#comments</comments>
		<pubDate>Fri, 11 May 2007 01:59:20 +0000</pubDate>
		<dc:creator>Alex May</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[GLU]]></category>
		<category><![CDATA[PatchBox]]></category>
		<guid isPermaLink="false">http://www.bigfug.com/test/?p=7</guid>
		<description><![CDATA[I was a bit late getting to the gig last night.&#160; The taxi I ordered never showed so was standing outside with four bags packed with laptops, projectors, cables, and blu-tac looking a bit flummoxed.&#160; Shan&#8217;t be using that taxi company again!&#160; Finally waved&#160;down a&#160;cab and, after a short journey, arrived and tumbled out of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bigfug.com/uploads/GigReportAClubCalledSpud9thMay2007_D15/gig_084.jpg" atomicselection="true"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 10px 10px 0px; border-right-width: 0px" height="240" src="http://www.bigfug.com/uploads/GigReportAClubCalledSpud9thMay2007_D15/gig_08_thumb2.jpg" width="180" align="left" border="0"></a>I was a bit late getting to the gig last night.&nbsp; The taxi I ordered never showed so was standing outside with four bags packed with laptops, projectors, cables, and blu-tac looking a bit flummoxed.&nbsp; Shan&#8217;t be using that taxi company again!&nbsp; Finally waved&nbsp;down a&nbsp;cab and, after a short journey, arrived and tumbled out of the door slightly stressed, phone glued to my ear speaking to Martin who was telling me about our next <a title="Belle Atmos" href="http://www.belleatmos.com">Belle Atmos</a> gig (19th May).&nbsp; Mark, whose night it was, helped me with the bags but only as far as the door, which were still locked as no one had turned up to unlock them.&nbsp; A couple of guys from the band were waiting too, the four of sheltered in the doorway from the harsh sea winds.&nbsp; Fortunately the man with the keys turned up shortly after and we bustled downstairs, bags in tow.</p>
<p>It was already getting on for eight o&#8217;clock, almost an hour later than we had anticipated.&nbsp; I set to work placing the two projectors, running cables, and laying down the gaffer tape.&nbsp; The part of the club I had originally thought of setting up in was unfortunately too near a fire exit so I ended up being at the back of the stage.&nbsp; Though I was working as fast as I could, and working up a sweat as I climbed up and down ladders, and plugged boxes into boxes into boxes, I needed a bit of a hand with the projectors.&nbsp; Fortunately Charles (<a href="http://www.myspace.com/vjspank">VJ Spank</a>) was only a phone call away and kindly offered to come down and help out.&nbsp; Also there was Mary who helped out applying blu-tac to the corners of a pile of A4 paper that I was planning to use as screens.</p>
<p>With the projectors in place I kicked PatchBox into action and began drawing out areas on the walls to use as screens, matching them to the various configurations of paper attached to the wall.&nbsp; I didn&#8217;t have as long as I&#8217;d like to spend on this part of the set up, and could&#8217;ve done with another hour of fiddling about, but people were starting to come in as I hurriedly put up the last few sheets.&nbsp; On top of the eleven video screens, I added three or four spot lights for the band, enabling us to kill the normal stage lighting and achieve a much more interesting environment.</p>
<p>Once set up, everything worked really well and had lots of people interested and impressed by the visuals.&nbsp; Saw one guy quickly waving his hand in front of one of the projectors trying to figure out how it was all working.</p>
<p>It&#8217;s quite a liberation not working to a 4:3 screen, and as my brother (who took the photos) pointed out, it didn&#8217;t detract from the band &#8211; as sometimes a large screen can do &#8211; rather it helped create the ambience, which is something that I&#8217;m very keen on developing when working with performers.</p>
<p>The next stage for PatchBox is to add masking to the screens so they can achieve any shape (even animated masks) and add the ability to group screens so that a single image can be spread across them like a matrix.</p>
<p>Met and had a nice chat with <a href="http://www.jfb.gvoid.com/">JFB</a> too, who was playing in the band.&nbsp; Hope to go and see him do his turntablism thing a week on Friday at the <a href="http://www.concorde2.co.uk/">Concorde 2</a>.</p>
<p>So a good night, all in all.&nbsp; Must just say special thanks to Charles for the projectors and being on hand to help out, and Mark for the gig and making sure I had everything I needed.</p>
<p>More photos of the night available at <a title="bigfug's flickr" href="http://www.flickr.com/photos/bigfug/">flickr</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.bigfug.com/2007/05/11/gig-report-a-club-called-spud-9th-may-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
