<?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>Photogabble &#187; tutorial</title>
	<atom:link href="http://photogabble.co.uk/tag/tutorial/feed" rel="self" type="application/rss+xml" />
	<link>http://photogabble.co.uk</link>
	<description>photoblog of simon dann</description>
	<lastBuildDate>Sun, 25 Dec 2011 14:19:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Googles quake2-gwt-port.</title>
		<link>http://photogabble.co.uk/featured/googles-quake2-gwt-port.html</link>
		<comments>http://photogabble.co.uk/featured/googles-quake2-gwt-port.html#comments</comments>
		<pubDate>Sat, 03 Apr 2010 20:08:14 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[chromium]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Quake]]></category>
		<category><![CDATA[quake2-gwt-port]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=3461</guid>
		<description><![CDATA[Well I am so very glad that this was not a clever April Fools on Google&#8217;s part, because running quake 2 in your browser within the HTML5 canvas tag using a version of OpenGL amongst other cutting edge technologies, aside from being one more nail in flash&#8217;s coffin is absolutely amazing and something many &#8220;techies&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>Well I am so very glad that this was not a clever April Fools on Google&#8217;s part, because running quake 2 in your browser within the HTML5 canvas tag using a version of OpenGL amongst other cutting edge technologies, aside from being one more nail in flash&#8217;s coffin is absolutely amazing and something many &#8220;techies&#8221; have seen coming for a long time but up until now had now way of explaining it to the common man!</p>
<p>The <a href="http://code.google.com/p/quake2-gwt-port/wiki/BuildingAndRunning">quake2-gwt-port</a> was released yesterday April the 1st and like many I was dubious as to its reality due to it almost being something too good to be true, however after three hours of pain-staking building I managed to finally get it working. Due to the difficulties I encountered getting it working both under Debian with the 2.6.26-2-686 kernel and those simple problems found when doing the same within OSX, I have documented my findings here to help others in their quest at deciphering googles (at the moment) poor documentation on getting this to work!</p>
<h2>Disclaimer</h2>
<p>The information contained within this article is a journalised version of the notes I made while I went through the process of installing quake2-gwt-port, they have been published here for informal purposes only and you follow them at your own risk. I can not be held liable if your following the below in any way breaks your computer, just because it didn&#8217;t break mine, doesn&#8217;t mean it wont break yours. In other words getting this to work on your system can only really be done if you know what you are doing.</p>
<h2>Compiling quake2-gwt-port under Debian</h2>
<p>The first problem I ran into when attempting this under debian on my test server was the fact that java was not previously installed so running the following command quickly sorted that out, however it did take a few hours of searching and downloading 100MB+ files from the official JAVA website before I noticed that the second post on the google code page gave the answer.</p>
<p><tt>apt-get install openjdk-6-jdk</tt></p>
<p>Once java has been installed you need to install vorbis-tools and lame as these packages contain dependences that enable audio within the port, however while vorbis-tools will install through apt-get with no problems, the same can unfortunately not be said for lame. To get apt-get to install lame I had to update my /etc/apt/sources.list file with an additional source as documented within the <a title="Debian install lame multimedia codecs" href="http://wiki.debian.org/MultimediaCodecs">debian wiki here</a> and then run the following commands to update apt-get cache and install lame and vorbis-tools.</p>
<pre><code>apt-get update
apt-get install lame
apt-get install vorbis-tools
</code></pre>
<p>As a side-effect of the aforementioned additional source added to the <tt>apt-get</tt> sources list, <tt>apt-get</tt> kicks up the following fuss when you update it following the changes to <tt>/etc/apt/sources.list</tt>:</p>
<pre><code>W: GPG error: http://www.debian-multimedia.org lenny Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 07DC563D1F41B907
W: You may want to run apt-get update to correct these problems
</code></pre>
<p>I would ignore these, and simply remove the additional source from <tt>/etc/apt/sources.list</tt> once lame has been installed as we know it&#8217;s something we have done to cause the error, and its not stopped anything from working (yet, as far as I know).</p>
<p>Finally so that you can download the source from google code, you should also install <tt>mercurial</tt>, this can be done within debian and many other Linux distributions through the following <tt>apt-get</tt> command as <a title="How to install mercurial" href="http://mercurial.selenic.com/downloads/">documented here</a>.</p>
<pre><code>apt-get install mercurial</code></pre>
<p>For some reason on my version of debian the shell variable <tt>JAVA_HOME</tt> was not set up by the installation of Java (<tt>openjdk-6-jdk</tt>), therefore I had to crack open nano and edit <tt>/etc/profile</tt> to include the following just before the line that reads <tt>unmask 022</tt>:</p>
<pre><code>JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
export JAVA_HOME</code></pre>
<p>If <tt>JAVA_HOME</tt> is not set then the compile process of Quake II will fail and you would have waisted 12 minutes waiting for the command line to tell you that.</p>
<p>Once you have followed the aforementioned you should now have the  following required packages installed <tt>mercurial, openjdk-6-jdk, </tt><tt>lame  and vorbis-tools.</tt> Your now ready to download and build Quake II for debian using the following simple steps:</p>
<ol>
<li>Load up your shell and <tt>cd</tt> into your home directory or other such workspace where your comfortable and run the following command to get a fresh copy of the code from google code:<br />
<tt>hg clone https://quake2-gwt-port.googlecode.com/hg/  quake2-gwt-port</tt></li>
<li><tt>cd</tt> into the newly formed <tt>quake2-gwt-port directory</tt></li>
<li>Run <tt>./build-dedicated-server</tt> this will build the tools and the client and server code.</li>
<li>Next Run <tt>./install-resources</tt> which will download, unpack, and convert the  original Quake II demo resources, for reasons of copyright respect these have to be downloaded from their source and cant be packaged on google code.</li>
<li>Due to a glitch in the way the above two commands install the code, you then have to copy the created <tt>gwtquake </tt>from <tt>maven-build/server/target/gwtquake/war/gwtquake</tt> to <tt>/war/gwtquake</tt> using the following command: <tt>cp -r maven-build/server/target/gwtquake/war/gwtquake war/qwtquake</tt></li>
<li>Everything is now ready to run using the command <tt>./run-dedicated-server [port]</tt></li>
</ol>
<p>On my debian set-up I encountered several [WARNING] notices during the resource install but those where mostly related to character encodings and did not halt or impair the install. As I installed this on my server I have not been able to test it works within a browser due to a lack of time, however the install under osx is a much simpler affair.</p>
<h2>Compiling quake2-gwt-port under OSX</h2>
<p><strong>Please Note</strong>: you must have OSX developer tools installed before you can compile anything.</p>
<p>As OSX does not come with <tt>vorbis-tools</tt> or <tt>lame</tt> installed you have to grab them yourself, fortunately with the fact that OSX is basically Linux with a pretty user interface doing so is very easy. To install the additional components required for the compiling of quake2-gwt-port under OSX I would recommend installing <a title="Get homebrew for OSX" href="http://github.com/mxcl/homebrew/tree/">homebrew</a>,over the much bloated MacPorts as given within the google code instructions. Installing homebrew is a very simple task indeed, first read through the online <a title="How to install Homebrew" href="http://wiki.github.com/mxcl/homebrew/installation">install instructions</a> so you know what your doing then simply run the following two lines of commands:</p>
<pre><code>sudo chown -R $USER /usr/local
curl -Lsf http://github.com/mxcl/homebrew/tarball/master | tar xvz -C/usr/local --strip 1
</code></pre>
<p>Once that has completed installing the required items for compiling the quake2-gwt-port is as simple as running the following lines of commands within OSX terminal:</p>
<pre><code>brew install vorbis-tools
brew install lame
brew install mercurial
</code></pre>
<p>Once that is done you can continue with the instructions 1 to 6 above under the debian install guide.</p>
<h2>Playing quake2-gwt-port under OSX</h2>
<p>Hopefully the install went smoothly and you are now ready to play with your new toy, unfortunately just sending any old browser to <tt>http://localhost:8080/GwtQuake.html</tt> wont work as almost all modern day browsers are not compatible with HTML5, or if they are its only half an implementation due to the protocols still being on the drawing board. Two browsers that are <a title="Compatible browsers with quake2-gwt-port" href="http://code.google.com/p/quake2-gwt-port/wiki/CompatibleBrowsers">compatible</a> with the <tt>quake2-gwt-port</tt> are Google&#8217;s own <a title="Download Chromium" href="http://build.chromium.org/buildbot/continuous/mac/LATEST/">Chromium</a> browser and <a title="Download Webkit" href="http://nightly.webkit.org/">Webkit</a> (click on links for download pages), which I presume to be the developers version of Safari due to its icon but I may be mistaken.</p>
<p>To get Webkit to play the game you first have to run the following command in terminal to enable webGL to be utilised by HTML5:</p>
<pre>
<code>defaults write com.apple.Safari WebKitWebGLEnabled -bool YES</code>
</pre>
<p>To get Chromium to play the game you have to first pass it a set of variables as you start it up, to do this, in your terminal <tt>cd</tt> to the applications folder where you have saved Chromium and run the following command to load Chromium with WebGL enabled:</p>
<pre><code>./Chromium.app/Contents/MacOS/Chromium --enable-webgl --no-sandbox
</code></pre>
<h2>Review of Game-play in Chromium and Webkit</h2>
<p>At the moment I am unable to get the game to run in Chromium with sound, however with Webkit while audio played amazingly well as did single player, when I set it up to run the demo it crashed every time. The performance in Webkit was also noticeably better than in Chromium, with Webkit hitting 40fps at one point while Chromium lagged behind with an average of just 10fps! I have included below some screen shots of each browser playing the game and shall post updates when I get the version installed on my server working multi-player with some systems in my house.</p>
<p><img class="aligncenter size-medium wp-image-3487" title="quake2-gwt-port working with webkit" src="http://photogabble.co.uk/wp-content/uploads/2010/04/GWTQuakeII_webkit-520x405.jpg" alt="quake2-gwt-port working with webkit" width="520" height="405" /></p>
<p><img class="aligncenter size-medium wp-image-3488" title="quake2-gwt-port working with chromium" src="http://photogabble.co.uk/wp-content/uploads/2010/04/GWTQuakeII_chromium-520x379.jpg" alt="quake2-gwt-port working with chromium" width="520" height="379" /></p>
<p>If you have attempted getting this to work, like the article or have  something to say, please add your comment below; I always try to respond  to all comments posted here.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/featured/googles-quake2-gwt-port.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Monitorix under debian.</title>
		<link>http://photogabble.co.uk/technical/installing-monitorix-under-debian.html</link>
		<comments>http://photogabble.co.uk/technical/installing-monitorix-under-debian.html#comments</comments>
		<pubDate>Mon, 10 Nov 2008 15:07:16 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[monitorix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=1041</guid>
		<description><![CDATA[Monitorix appears to be the most basic server monitor graphing application I can find, seeing that all I am interested in is bandwidth in/out and server load over time it is still a lot more than is needed but with out coding my own package which would take days its the best at hand. So [...]]]></description>
			<content:encoded><![CDATA[<p>Monitorix appears to be the most basic server monitor graphing application I can find, seeing that all I am interested in is bandwidth in/out and server load over time it is still a lot more than is needed but with out coding my own package which would take days its the best at hand. So that I have documentation of the process by which I installed monitorix and because a google for documentation provided nothing; here is what happened when I did it.</p>
<p>First things first monitorix requires <a href="http://packages.debian.org/etch/rrdtool">rrdtool</a> and <a href="http://packages.debian.org/etch/librrds-perl">librrds-perl</a>, these can be installed with the following lines in shell:</p>
<pre>apt-get install rrdtool
apt-get install rrdtool-perl</pre>
<p>Once done and it should only take a few seconds, I moved o to the <a href="http://www.monitorix.org/downloads.html">download page</a> at the monitorix project. The latest package to date for Debian is the any platform linux <a href="http://www.monitorix.org/monitorix-1.2.1.tar.gz">distro monitorix-1.2.1.tar.gz</a>. I moved to my user space and the used wget to download the package to the server without having to mess with ftp, then I extracted the archive using gzip:</p>
<pre>cd /
wget http://www.monitorix.org/monitorix-1.2.1.tar.gz
gzip -dc ./monitorix-1.2.1.tar.gz | tar -x</pre>
<p>Unfortunately there is no automatic apt-get script for Debian, however the monitorix group have been kind enough to simplify things by creating an install script which is as simple to run as:</p>
<pre>cd monitorix-1.2.1
./install.sh</pre>
<p>After that the install script asks you which system your installing it on press three for Debian (or if your reading this for another distro which ever number equals your os), next check the paths it gives and press enter if ok. I don&#8217;t know what they should be and no manual is written that will tell me so I press enter and hope for the best, you&#8217;re then issued with a Last chance to stop the installation cross your fingers hit &#8216;y&#8217; and press return. If all goes well you should end up with something that looks like the following:</p>
<pre>Installation successfully finished.

Now you have to edit the configuration file /etc/monitorix.conf
in order to setup correctly Monitorix to your operating system.

Then you'll can start Monitorix executing the init script:

/etc/init.d/monitorix.sh [start|stop|status]

and finally go to http://localhost/monitorix/ to start to see results.

NOTE: As a crond-based application, the root user will receive emails
about Monitorix execution errors. Please check the root email..</pre>
<p>If so your now ready to setup monitorix, there are few things you need to set here unless your a more advanced user an in that case why are you even reading this, you guys are like god. In any case I use trusty old nano for the task of text editing and then start the service.</p>
<pre>nano /etc/monitorix.conf
/etc/init.d/monitorix.sh start</pre>
<p>Now if your server <strong>isn&#8217;t</strong> running <a href="http://www.nsa.gov/selinux/">SE-linux</a> then when you go to http://your.domain/monitorix/ and see pretty things, however your like me and unlucky enough to be running a secure server the damn thing don&#8217;t work and simply throws up the following:</p>
<pre>Starting Monitorix: ERROR: while creating /var/lib/monitorix/cpu.rrd: creating '/var/lib/monitorix/cpu.rrd': No such file or directory... Failed</pre>
<p>Where as previous people seem to stop there and either disable SE-Linux to get it working, something which I believe is akin to running windows 3.1 on an unsecured network &#8211; you just shouldn&#8217;t do it, even if it works. I simply logged in as root and created the directory it so eagerly wanted to create using mkdir before retrying the start the process and being hit again with a different error:</p>
<pre>mkdir /var/lib/monitorix/
 /etc/init.d/monitorix.sh start
Starting Monitorix: print() on closed filehandle OHTML at /usr/bin/monitorix.pl line 705.
readline() on closed filehandle IHTML at /usr/bin/monitorix.pl line 797 ... Ok</pre>
<p>That <strong>Ok</strong> at the end doesn&#8217;t give me much hope, however it is a sign that something has worked and in a way which didn&#8217;t involve disabling server security. The problem now however is that Apache doesn&#8217;t have enough file rights to modify the $BASE_WWW directory, the $ meaning its a fixed variable not the directory name itself. I don&#8217;t know how to find this out so a further google search is needed, it would appear that the issue has been fixed for ubuntu users <a href="http://apps.ouwu.com/confluence/display/pb/How+to+install+Monitorix+in+Ubuntu">via here</a>, so I believe I should be able to follow their instructions to fix this issue. The problem here is a little similar to that shown on apps.ouwu.com however it is simply down to a setup step I didn&#8217;t follow through correctly. Within the monitorix.conf file there is the following line:</p>
<pre>our $OSTYPE="Linux-Debian";             # choose your OS type (see below)</pre>
<p>Linux-Debian isn&#8217;t the default, and it needs to be changed to it otherwise none of the directories setup for your debian install will be used, it will instead default to something else. A little silly if you ask me but a quick fix. Upon restarting the monitorix process all works fine.</p>
<pre># /etc/init.d/monitorix.sh stop
Stopping Monitorix:
# /etc/init.d/monitorix.sh start
Starting Monitorix:  ... Ok</pre>
<p>Now you have the process running fine, you will notice that the rrd files in /var/lib/monitorix/ are not being updated every minute or so, a quick fix for this as see in steps five to seven at <a href="http://apps.ouwu.com/confluence/display/pb/How+to+install+Monitorix+in+Ubuntu">apps.ouwu.com</a> is to simply do the following:</p>
<pre class="code-java">mv /etc/cron.d/monitorix.sh /etc/cron.d/monitorix
chmod +x /etc/cron.d/monitorix
ls -l /<span class="code-keyword">var</span>/lib/monitorix/</pre>
<p>Repeating the last line a couple of times over the next few minutes should show that the files are being updated and you can take a sigh of relief. One last thing you may notice is that by going to http://your.domain/monitorix gives a 404, that could be because your domain is set within apache config to another directory within /var/www/ such as would be the case if you have a lot of domains hosted on that server my /var/www/ directory contains many sub directories each for one of my domains.Therefore you may want to set up a subdomain to forward to it, or simply set up a symlink pointing to /var/www/monitorix from your /var/www/domain.dir.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/technical/installing-monitorix-under-debian.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to model a room in Cinema 4D [Revised]</title>
		<link>http://photogabble.co.uk/uncategorized/how-to-model-a-room-in-cinema-4d-revised.html</link>
		<comments>http://photogabble.co.uk/uncategorized/how-to-model-a-room-in-cinema-4d-revised.html#comments</comments>
		<pubDate>Sun, 13 Apr 2008 02:36:38 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[cinema 4d]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://photogabble.co.uk/?p=46</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a title="Walls and Doors" rel="lightbox[pics46]" href="http://photogabble.co.uk/wp-content/uploads/2008/04/final_01.jpg"><img class="attachment wp-att-48 centered" src="http://photogabble.co.uk/wp-content/uploads/2008/04/final_01.jpg" alt="" width="500" height="375" /></a></p>
<p style="text-align: center;"><a title="final_02" rel="lightbox[pics46]" href="http://photogabble.co.uk/wp-content/uploads/2008/04/final_02.jpg"><img class="attachment wp-att-50 centered" src="http://photogabble.co.uk/wp-content/uploads/2008/04/final_02.jpg" alt="" width="500" height="375" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/uncategorized/how-to-model-a-room-in-cinema-4d-revised.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Modeling a pipe using hyperNURBS in Cinema 4D</title>
		<link>http://photogabble.co.uk/design/modeling-a-pipe-using-hypernurbs-in-cinema-4d.html</link>
		<comments>http://photogabble.co.uk/design/modeling-a-pipe-using-hypernurbs-in-cinema-4d.html#comments</comments>
		<pubDate>Thu, 21 Jun 2007 18:05:07 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tutorials & How To's]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[cinema 4d]]></category>
		<category><![CDATA[hyperNURBS]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.photogabble.co.uk/2007/06/21/modeling-a-pipe-using-hypernurbs-in-cinema-4d/</guid>
		<description><![CDATA[This tutorial is a day late, but that&#8217;s because I spent yesterday researching and experimenting myself so as to provide you with a top quality tutorial. The first part of today&#8217;s tutorial will explain how to model a pipe in Cinema 4D and weight it using hyperNURBS with the second part describing how to create [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial is a day late, but that&#8217;s because I spent yesterday researching and experimenting myself so as to provide you with a top quality tutorial. The first part of today&#8217;s tutorial will explain how to model a pipe in Cinema 4D and weight it using hyperNURBS with the second part describing how to create an amazing looking translucent glass texture your sure to love. The second half of this tutorial is also an English translation of this German tutorial <a title="design express" href="http://www.designexpress.be/NL/Tutorials/03.htm">viewable here</a>.</p>
<p style="text-align: center;"><a title="Extrude box" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0011.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0011.jpg" alt="Extrude box" width="450" height="311" /></a></p>
<p>Firstly open up cinema 4D and hit the F5 key so as to bring up the multi angle view then create a new primitive cube and make it editable by pressing C. Next select the choose polygons button and select the top face of the now editable cube, right click and select extrude after which then press and hold the left mouse button anywhere within the selection and drag the mouse right (shown step by step above). Alternatively you can just enter a number into the offset value in the tools browser (shown in image below). For this tutorial I extruded each of the faces of the cube however to give a smooth transition for each bend you have to extrude a short way and then a longer way as shown in the image below.<span id="more-504"></span></p>
<p style="text-align: center;"><a title="Example and extrude preferences" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0031.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0031.jpg" alt="Example and extrude preferences" width="450" height="272" /></a></p>
<p>Once you have a model looking something like the above image, create a new hyperNURBS object (step one in figure below) and place the modified cube as a child of it (step two in figure below). This will result in a smoother version of the model before.</p>
<p style="text-align: center;"><a title="hyperNURBS" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0041.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0041.jpg" alt="hyperNURBS" width="450" height="297" /></a></p>
<p>Now what we need to do is place a weighting on the ends of the pipes so as to flatten them. Weighting as a way of telling the hyperNURBS where to apply its modifications. To apply this weighting you need to select the edges of the modified cube using the edge selection tool (numbered one in the below image), then to enable the hyperNURBS attribute you need to select the pointer tool (numbered two in the below image). When selecting the edges of the face you might find it easier to press shift while selecting and then if you select the wrong edge press CTRL and select the wrongly selected edge to deselect it (method numbered three below).</p>
<p style="text-align: center;"><a title="Select edges for weighting" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0051.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0051.jpg" alt="Select edges for weighting" width="450" height="341" /></a></p>
<p>Once you have selected all four edges of the face, you should be able to see the hyperNURBS preferences in the pointers preference panel (shown below) set the strength to 100% and press set, then repeat for all the other faces so that you have four pipes extruding out from a central point.</p>
<p style="text-align: center;"><a title="hyperNURBS pointer preferences and result" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0061.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0061.jpg" alt="hyperNURBS pointer preferences and result" width="450" height="264" /></a></p>
<p>Now we have half finished the model as well as learnt in detail how to use the hyperNURBS function. As the second half of this tutorial focuses on creating a translucent glassy texture we need to now hollow out our model so that the texture will work. To do so copy and paste the hyperNURBS object and rename the two inside and outside respectively ready for using a Boole for the hollowing. The material I am going to later show you how to make works best when the walls of the container are 1m thick or less so the inside object will need to be precisely resized so that it is within this parameter.</p>
<p style="text-align: center;"><a title="Extrude the inside objects edges" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0071.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0071.jpg" alt="Extrude the inside objects edges" width="450" height="274" /></a></p>
<p>Before we begin with resizing the inside object we need to first extrude its pipes so that when resized and booled they extend out of the outside object thus carving out the pipes inside completely. So as shown in the above image extrude each of the faces of the inside object. Once done select the inside cube object in the object browser then the polygon select tool and press CTRL + A to select all polygons in the inside cube (as shown below as step 3), then right click and select Normal Scale (step 4 below) and enter 99% into its preferences and press enter (step 5 below).</p>
<p style="text-align: center;"><a title="Steps for resizing the inside." rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0081.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0081.jpg" alt="Steps for resizing the inside." width="450" height="375" /></a></p>
<p>This will result in the shell being 99% the width of the model which is just what we want, next place the inside and outside objects into a Boole in the correct order so that you have a hollow pipe structure as shown below.</p>
<p style="text-align: center;"><a title="Final Model finished ready for texture." rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0091.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0091.jpg" alt="Final Model finished ready for texture." width="450" height="246" /></a></p>
<p>Before I begin with showing you how to create this texture, I must first begin with explaining a little how it works. This texture uses Cinema4D&#8217;s subsurface scattering shader which takes a light input from a light within the scene and uses it to manipulate the luminescence of the material absorbing the light. This makes it a most excellent shader for producing glass materials which respond realistically when lit from the inside such as a glass lighting fixture. So the first thing to do before creating the new material is to create the light source which its going to reacting to. When you create the new light object it should automatically be placed in the centre of your model, unless you have moved the model around from its original position, just make sure its near enough centre if you have. Next go to the materials browser and create a new material and apply it to the Boole containing our model.</p>
<p style="text-align: center;"><a title="Step by step selecting subsurface scattering" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0101.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0101.jpg" alt="Step by step selecting subsurface scattering" width="450" height="346" /></a></p>
<p>Within the new material deselect the colour and specular attributes and select the luminance one, within the luminance preferences click the arrow button for the texture preference and select Subsurface scattering (as shown step by step in the above image). When rendered your model will now look like the below image, as you can see the material is reacting to the light, absorbing it and emitting it again, while luminescence depends upon the thickness of the walls.</p>
<p style="text-align: center;"><a title="Example render of defaults with subsurface scattering" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0111.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0111.jpg" alt="Example render of defaults with subsurface scattering" width="450" height="297" /></a></p>
<p>We now need to customise the material to the needs of our model as its default settings wont take into consideration our models maximum thickness amongst other things. Therefore, click on the button now labled Subsurface scattering and enter the below settings, you can choose any colour here (step one in below image) however if you like the orange shown here then its RBG values are R255 G182 B0.</p>
<p style="text-align: center;"><a title="Subsurface Scattering prferecnces." rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/0121.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/0121.jpg" alt="Subsurface Scattering prferecnces." width="450" height="266" /></a></p>
<p>Next select specular colour and give it a slightly lighter colour than the one you chose before and then select Specular and enter the settings shown below.</p>
<p style="text-align: center;"><a title="Specular Preferences" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/013.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/013.jpg" alt="Specular Preferences" width="450" height="266" /></a></p>
<p>Once rendered you should have something which looks like the below figure as you can see the walls where all the pipes connect are a little too thin this can be remidied by simply resizing the inside object to say 95% of it original size. Also as this is a low polygon model the render will look a little blocky, you can play around and experiment with things to change this.</p>
<p style="text-align: center;"><a title="Final Render" rel="lightbox[pics453]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/014.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/014.jpg" alt="Final Render" width="450" height="337" /></a></p>
<p>I hope that this tutorial has helped you in some way, if you have any questions or comments then feel free to post them using the form below.</p>
<p>Original German Tutorial of which this is a partial translation of <a href="http://www.designexpress.be/NL/Tutorials/03.htm">viewable here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/design/modeling-a-pipe-using-hypernurbs-in-cinema-4d.html/feed</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>How to model a room in Cinema 4D</title>
		<link>http://photogabble.co.uk/design/how-to-model-a-room-in-cinema-4d.html</link>
		<comments>http://photogabble.co.uk/design/how-to-model-a-room-in-cinema-4d.html#comments</comments>
		<pubDate>Tue, 19 Jun 2007 22:36:36 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Tutorials & How To's]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[cinema 4d]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[room]]></category>
		<category><![CDATA[slider]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.photogabble.co.uk/2007/06/19/how-to-model-a-room-in-cinema-4d/</guid>
		<description><![CDATA[The only thing that annoys me about cinema 4D is that there are limited free tutorials and &#8220;how to&#8217;s&#8221; on the internet and that if you really want to get into the programs more advanced features you have to either spend hours searching the net or go out and buy an expensive book. Like most [...]]]></description>
			<content:encoded><![CDATA[<p>The only thing that annoys me about cinema 4D is that there are limited free tutorials and &#8220;how to&#8217;s&#8221; on the internet and that if you really want to get into the programs more advanced features you have to either spend hours searching the net or go out and buy an expensive book. Like most people I don&#8217;t have the money to be spent on expensive books, nor the free  time to spend searching the net for hard to find how-to&#8217;s which have been relegated to page 550 of googles search results because the pay for sites are much better at SEO.</p>
<p>So without much further ado I bring you the first in my series of Cinema 4D tutorials, you might find the titles or subjects quite odd but then again they are subjects which I have searched google for and come up with nothing so I thought I would share how I went about doing what I had hoped to be shown how to do.</p>
<p style="text-align: center;"><a title="Perspective Views" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/001.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/001.jpg" alt="Perspective Views" width="450" height="296" /></a></p>
<p><span id="more-489"></span>First things first, open up Cinema 4D and press F5. This brings up the following four viewpoints in the main screen (in Clockwise order) Perspective, Top, Right and Front. This is most useful for getting things aligned right and knowing how they will look along all three axis. If you then press the middle mouse button on any of these views then it will enlarge to take up the entire view upon which pressing the middle mouse button again returns to the four view, view.</p>
<p style="text-align: center;"><a title="First Cube Atributes" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/002.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/002.jpg" alt="First Cube Atributes" width="450" height="172" /></a></p>
<p>Next select a new cube and select its attributes, as you can see (above) I have made it 100m tall and a width and breadth of 250m. I also changed its vertical position to 50m so that it is flush to where the X and Y planes meet. This cube will be the outside walls of our room therefore rename it to &#8220;outside&#8221; by double clicking on its name within the objects browser. The next step is to produce the shell of the room and the inside wall, we shall be using a Boole element for this.</p>
<p style="text-align: center;"><a title="Seccond Cube and the Boole" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/003.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/003.jpg" alt="Seccond Cube and the Boole" width="450" height="204" /></a></p>
<p>Duplicate the outside wall and then create a Boole element. You can duplicate an object simply by selecting it and then pressing Ctrl + C followed by Ctrl + V, well it&#8217;s the only way I know of. Rename this duplicate outside cube, inside. Then change its size so that you have a 10m thick wall and that its height is 10m taller (that is X=240, Y=110 &amp; Z=240 if your too lazy to think). Next place both cubes within the Boole using the objects browser the outside wall being on top of the inside wall as shown above, when quickly rendered you should result in something looking like the image below.</p>
<p style="text-align: center;"><a title="Initial Render, example of the rooms shell." rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/004.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/004.jpg" alt="Initial Render, example of the rooms shell." width="450" height="294" /></a></p>
<p>Now you have the basic walls of your model, you need to give it a floor. For this you could simply raise up the inside cube by 10 meters and then later on paint a texture on the floor face for the carpet, wood veneer, etc. Or if your lazy just produce another cube resize it to the dimensions of the inside wall and have it so its height is 10m and place it on the floor. I choose the first option for this tutorial as it allows me to fit in showing how to do selective texturing as well as being the most efficient so far as render times go.</p>
<p style="text-align: center;"><a title="Window settings" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/005.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/005.jpg" alt="Window settings" width="450" height="278" /></a></p>
<p>Now the room has a floor and four walls, it needs a door and some windows to finish it off before we texture it. These can be done much in the same way as the room was created. Therefore rename the Boole element &#8220;Walls&#8221; and place it within another Boole element, then create another cube and resize it to the dimensions you want your window to be at and place it on top of the walls Boole in this new Boole. Sounds complex but it really isn&#8217;t the above image shows you what mine looks like and the below image is the rendered result.</p>
<p style="text-align: center;"><a title="Rendered Windows" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/006.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/006.jpg" alt="Rendered Windows" width="450" height="300" /><br />
</a></p>
<p>Now I&#8217;m sure you are able to make some more windows and a door without my guidance, so I shall leave you to that and continue with the tutorial. To texture our room we need to first make it editable, so the first thing to do is select the inside and outside objects and press C to make them editable (as shown in the below image).</p>
<p style="text-align: center;"><a title="Example No. 7" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/007.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/007.jpg" alt="Example No. 7" width="450" height="310" /></a></p>
<p>Next select the button marked number 2 in the above image so you can begin to select the faces of your model to be textured. You might have to spin the perspective view to underside the room to be able to select the boxes floor rather than its top &#8211; or at least I had to. Now you should have the bottom face of the inside cube selected the perimeter of which will be shown as red. Now from the Selection drop down choose set selection (see #1 in image below).</p>
<p style="text-align: center;"><a title="Making selection for texture." rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/008.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/008.jpg" alt="Making selection for texture." width="450" height="388" /></a></p>
<p>Now you have the floor selected within your object browser double click upon it and rename it to floor. Now create or load a texture and drag it onto the inside object within the object browser and double click on its icon once it appears there. Then within the selection text space enter &#8220;floor&#8221; or what ever you named the face selection. Now when rendered you should get something similar to what you see in the below image, just the floor texture being rendered.</p>
<p style="text-align: center;"><a title="Texture selection settings." rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/009.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/009.jpg" alt="Texture selection settings." width="450" height="280" /></a></p>
<p>You can use the above technique to texture the rest of the room, having different textures for different walls, etc. A rug can also be placed in a similar fashion, but I shall cover that in a separate tutorial i&#8217;m going to write tomorrow.</p>
<p style="text-align: center;"><a title="Material Settings" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/010.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/010.jpg" alt="Material Settings" width="450" height="449" /></a></p>
<p>As a bonus I shall now continue with some radiosity rendering to make the scene look ultra cool. First off you need a floor and sky element in the3D world. Now as this is a mock up you don&#8217;t need to use any form of detailed sky texture for the sky, as they take ages to render and when your just mocking up anything longer than 60 seconds is an age so save all the detailed texturing until you have finished the room and filled it with what ever you think of filling it with. Create a new material and give it the same settings as shown in the image above, the brightness is set to 170% because it provides the final image with a lot more dynamic range, for more information see <a title="Radeosity tutorial" href="http://planetpixelemporium.com/tutorialpages/global.html">this tutorial here</a>. Next go to render settings and select Radiosity, the following settings are best chosen to give the highest quality render with the largest dynamic range and least amount of incorrect visible artefacts.</p>
<p style="text-align: center;"><a title="Radiosity settings." rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/011.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/011.jpg" alt="Radiosity settings." width="450" height="296" /></a></p>
<p>Just incase you cant make out the settings shown in the above image they are as follows: Strength:100%, Accuracy: 90%, Prepass Size: 1/1, Diffuse Depth: 1, Stochastic Samples: 300, Min. Resolution: 20 and Max. Resolution: 150. You will also need to go into the Options within the render settings (four down from the Radiosity in the above image) and turn off Auto Light. Now your ready to render, this will take a while and Radiosity has to make a lot of calculations but the end result it worth it. My version took 4 minutes to render, that is with just one texture and at 640&#215;480 but the quality of the render is ultra high and well worth the wait. The time to render will increase the more object you include into the scene and the more complex the textures you use, but overall the wait is really worth it in the end. Below you can see my final render and the end of this tutorial.</p>
<p style="text-align: center;"><a title="My Final Render of the room. Love the floor!" rel="lightbox[pics440]" href="http://photogabble.co.uk/wp-content/uploads/2007/06/012.jpg"><img class="imageframe imgaligncenter" src="http://photogabble.co.uk/wp-content/uploads/2007/06/012.jpg" alt="My Final Render of the room. Love the floor!" width="450" height="337" /></a></p>
<p>I hope this has helped someone, if you have followed this tutorial then please leave a comment. Also if you have any questions or ideas for tutorials that you cant find anywhere then please leave them below in the comments section and I shall have a go <img src='http://photogabble.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/design/how-to-model-a-room-in-cinema-4d.html/feed</wfw:commentRss>
		<slash:comments>44</slash:comments>
		</item>
		<item>
		<title>Some PHP tutorials</title>
		<link>http://photogabble.co.uk/php/some-php-tutorials.html</link>
		<comments>http://photogabble.co.uk/php/some-php-tutorials.html#comments</comments>
		<pubDate>Wed, 09 Aug 2006 16:22:38 +0000</pubDate>
		<dc:creator>simon</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.photogabble.co.uk/2006/08/09/some-php-tutorials/</guid>
		<description><![CDATA[Not so much tutorial than some random code I just wrote to help me with somthing else&#8230; &#60;?php error_reporting(E_ALL ^ E_NOTICE); /* set some vars */ $n = 0; $max = $_GET['max']; if (isset($_GET['current'])){ $min = $_GET['current']; }else{ $min = 0; } if (!isset($max)){ $max = 10; } /* lets get some data to work [...]]]></description>
			<content:encoded><![CDATA[<p>Not so much tutorial than some random code I just wrote to help me with somthing else&#8230;</p>
<pre><code>
&lt;?php
error_reporting(E_ALL ^ E_NOTICE);

/*
set some vars
*/

$n = 0;
$max = $_GET['max'];

if (isset($_GET['current'])){

$min = $_GET['current'];

}else{

$min = 0;

}

if (!isset($max)){

$max = 10;

}

/*
lets get some data to work with.
fills an array with 1000 items.
*/

$entries = array();

for ($i = 1; $i &lt;= 1000; $i++) {
$entries[$i] = $i;
}

/*
print the current results
*/

foreach($entries as $entry){

if ($n &lt;= ($max-1)){

if (!($n &lt; $min)){

echo $entry;

}

$n++;
}

}

/*
if we are not on first page of results
show a back button
*/

if ($n &gt; 10){
echo "&lt;br/&gt;";
$min = $n-20;
$bmax = $max - 10;
echo '&lt;a href="?current=' . $min . '&amp;max=' . $bmax  . '"&gt;Previous&lt;/a&gt;';
}
/*
print link to get next ten entries
*/

echo "&lt;br/&gt;";
$max = $max + 10;
echo '&lt;a href="?current=' . $n . '&amp;max=' . $max  . '"&gt;Next&lt;/a&gt;';

?&gt;
</code></pre>
]]></content:encoded>
			<wfw:commentRss>http://photogabble.co.uk/php/some-php-tutorials.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

