<?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>mike&#039;s digital anthology &#187; how-to</title>
	<atom:link href="http://blog.mikepan.com/tag/how-to/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mikepan.com</link>
	<description>making visuals with technology</description>
	<lastBuildDate>Fri, 06 Aug 2010 17:19:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>SVN log parsing and analysis fun</title>
		<link>http://blog.mikepan.com/svn-log-parsing-and-analysis-fun/</link>
		<comments>http://blog.mikepan.com/svn-log-parsing-and-analysis-fun/#comments</comments>
		<pubDate>Fri, 04 Dec 2009 23:10:19 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=133</guid>
		<description><![CDATA[A few of you asked about how I got those statistics for my previous post about Blender SVN. For the inquiring minds, I got the SVN log with the following command svn log -r 25000:0 --xml https://svn.blender.org/svnroot/bf-blender/branches &#62;&#62; log.xml svn log -r 25000:0 --xml https://svn.blender.org/svnroot/bf-blender/trunk &#62;&#62; log.xml These two SVN operation fetches the SVN logs [...]]]></description>
			<content:encoded><![CDATA[<p>A few of you asked about how I got those statistics for my previous post about<a href="http://blog.mikepan.com/blender-revision-25000/"> Blender SVN</a>.</p>
<p>For the inquiring minds, I got the SVN log with the following command</p>
<pre>svn log -r 25000:0 --xml https://svn.blender.org/svnroot/bf-blender/branches &gt;&gt; log.xml
svn log -r 25000:0 --xml https://svn.blender.org/svnroot/bf-blender/trunk &gt;&gt; log.xml</pre>
<p>These two SVN operation fetches the SVN logs for both the branches and the trunk of Blender and combine them into one 8 megabyte XML file.  Please do not do this often as I imagine querying all the commit logs must put a heavy strain on the Blender SVN server.</p>
<p>Parsing the XML for the author commit frequency is done with the following python script:</p>
<pre>import xml.sax

authorList= {}

# create document handler
class SVNXMLHandler(xml.sax.handler.ContentHandler):
	def __init__(self):
		pass

	def startElement(self, name, attrs):
		self.hasAuthor = 0
		self.hasEntry = 0
		if name == "logentry":
			self.hasEntry = 1
			#print attrs.get('revision', ""),
		elif name == "author":
			self.hasAuthor = 1

	def characters(self, data):
		if self.hasAuthor:
			#print data
			try:
				authorList[data] += 1
			except:
				authorList[data] = 1

	def endElement(self, name):
		if name == "author": self.hasAuthor = 0
		if name == "logentry": self.hasEntry = 0

# load and parse log
f = open('log.xml', 'r')
xml.sax.parseString(f.read(), SVNXMLHandler())

# print to console in comma delimited format
for i in authorList:
	print i,",",authorList[i]</pre>
<p>Run the above python script like so:</p>
<pre>python logParser.py &gt;&gt; crunched.csv</pre>
<p>After a few seconds, a CSV file should be created containing all the data you need, ready to be graphed in Microsoft Office.  Yes I used Excel for the graph&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/svn-log-parsing-and-analysis-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Build Blender 2.5, a visual guide</title>
		<link>http://blog.mikepan.com/build-blender-2-5-a-visual-guide/</link>
		<comments>http://blog.mikepan.com/build-blender-2-5-a-visual-guide/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 23:03:50 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[technical]]></category>
		<category><![CDATA[x64]]></category>

		<guid isPermaLink="false">http://blog.mikepan.com/?p=179</guid>
		<description><![CDATA[Today I will present a simple graphical guide to build Blender 2.5 on a Windows computer.  A lot of the instructions just need to be done one time, once you have a building environment setup, updating the build is a *really* simple process.  But if you just want a cutting-edge daily release, you can find [...]]]></description>
			<content:encoded><![CDATA[<p>Today I will present a simple graphical guide to build Blender 2.5 on a Windows computer.  A lot of the instructions just need to be done one time, once you have a building environment setup, updating the build is a *really* simple process.  But if you just want a cutting-edge daily release, you can find those pre-compiled for you on <a href="http://www.graphicall.org/">Graphicall.org</a></p>
<p>Firstly, you will need a few piece of software: We are going to use <strong>Microsoft Visual Studio 2008</strong> and <strong>Cmake </strong>to help us build Blender, and to fetch the source code from blender.org, we&#8217;ll also need a SVN client, I will use <strong>TortoiseSVN</strong>.</p>
<p><strong>1. Get Visual Studio 2008.</strong> If you have access to a copy of Visual Studio, great!  But I heard the free <a href="http://www.microsoft.com/exPress/">Express Edition</a> works too.  I went with a custom installation and this is all the components you&#8217;ll need to build Blender.</p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/02.png"><img class="size-medium wp-image-182 alignnone" title="Custome Installation" src="http://blog.mikepan.com/wp-content/uploads/02-500x366.png" alt="Custome Installation" width="500" height="366" /></a></p>
<p>2.<strong> Get <a href="http://www.cmake.org/">CMake </a>and install it</strong>.  It&#8217;s free.</p>
<p>3. <strong>Install <a href="http://tortoisesvn.tigris.org/">TortoiseSVN</a></strong>, also free.</p>
<p>4. Once all the software are installed, we can begin to <strong>acquire the Blender source codes</strong>!  First, navigate to an empty directory and right click to do a SVN Checkout.  Use the following URL:</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;">https://svn.blender.org/svnroot/bf-blender/trunk/blender</pre>
<p>Put the source under C:\Blender\blender. Next, let&#8217;s also acquire the libraries needed to build Blender.  Do another check out with the following URL:</p>
<pre>https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows</pre>
<p>Make sure you put the files under a directory like C:\Blender\lib\Windows.  If you want to make 64bit builds, also check out the 64bit libs:</p>
<pre> https://svn.blender.org/svnroot/bf-blender/trunk/lib/win64</pre>
<p>Put that under C:\Blender\lib\Win64</p>
<div id="attachment_185" class="wp-caption alignnone" style="width: 510px"><a href="http://blog.mikepan.com/wp-content/uploads/04.png"><img class="size-medium wp-image-185" title="Use TortoiseSVN to check-out the Blender Windows Library" src="http://blog.mikepan.com/wp-content/uploads/04-500x285.png" alt="04" width="500" height="285" /></a><p class="wp-caption-text">Use TortoiseSVN to check-out the Blender Windows Library</p></div>
<p>Once you have done the 3 check-out, your directory structure should look like this, make sure all the folders and files are in the proper place, otherwise you will have a hard time building Blender:</p>
<div id="attachment_196" class="wp-caption alignnone" style="width: 307px"><img class="size-full wp-image-196" title="Folder structure" src="http://blog.mikepan.com/wp-content/uploads/folder.png" alt="Folder structure" width="297" height="614" /><p class="wp-caption-text">Folder structure</p></div>
<p>5. Now that you have all the source files, it&#8217;s time to start the <strong>building </strong>process!</p>
<p>We are going to use CMake to generate a &#8220;solution&#8221; file for Visual Studio.  A solution is what Visual Studio would open to build the entire Blender. It&#8217;s a collection of smaller project, each project is a collection of source files.</p>
<p>Now open CMake, and In the top text box, type in where you put the Blender source code. (C:\Blender\blender, in my case)</p>
<p>In the second text box below it, select a fresh directory where you want the output file to go. I am using C:\Blender\build</p>
<p>Now click on Configure, this will bring up another dialog box where it asks you which generator to pick.  We are going to use <strong>Visual Studio 9 2008</strong>, or<strong> Visual Studio 9 2008 Win64</strong>, if you want to build a 64bit Blender.</p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/cmake.png"><img class="alignnone size-medium wp-image-205" title="CMake" src="http://blog.mikepan.com/wp-content/uploads/cmake-499x352.png" alt="CMake" width="499" height="352" /></a></p>
<p>Then CMake will populate the main window with a list of options that you can disable or enable.  The default selection is good, but if you want to speed up the building process, you can deselect certain options that you are not using.</p>
<p>Certain options might also be unavailable or broken on 64bit.  For example, if you are building a 64bit release, make sure you uncheck FFMPEG, JACK, and QUICKTIME, since there is no 64bit library for these media features yet.</p>
<p><a href="http://blog.mikepan.com/wp-content/uploads/cmake2.png"><img class="alignnone size-medium wp-image-206" title="CMake Options" src="http://blog.mikepan.com/wp-content/uploads/cmake2-389x500.png" alt="CMake Options" width="389" height="500" /></a></p>
<p>For first timers, I would suggest unchecking all of these boxes to build a minimalist Blender.  It will be faster, smaller, and there is less chance of running into an error at compile time.  You can come back and re-enable these settings once your first build is successful.  <strong>Once you have made your selection, click on Configure at the bottom of the screen.  Then followed by clicking on Generate. </strong> These will generate the corresponding Visual Studio solution files in the directory you specified above.  (C:\blender\build\) in our case.  Close CMake.</p>
<p>6. Navigate to C:\blender\build, you should see the solution file you just generated.  Open &#8220;Blender.sln&#8221; with Visual Studio 2008.</p>
<p><img class="alignnone size-full wp-image-211" title="Build folder" src="http://blog.mikepan.com/wp-content/uploads/folder2.png" alt="Build folder" width="500" height="653" /></p>
<p>Once Visual Studio opens the solution, make sure you <strong>change the default build target from Debug to Release</strong>.  Otherwise you will end up with a debug build of Blender that is slower, bigger, and probably not helpful unless you are debugging.</p>
<p><img class="alignnone size-full wp-image-212" title="Visual Studio 2008" src="http://blog.mikepan.com/wp-content/uploads/vs2008.png" alt="Visual Studio 2008" width="500" height="332" /></p>
<p>After that, simply select <strong>Build Solution</strong> from the build menu.  After about 10 minutes of compiling and linking, a fully functional Blender installation should be ready under C:\Blender\build\Bin\Release.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/build-blender-2-5-a-visual-guide/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Very simple 2 player networking in Python</title>
		<link>http://blog.mikepan.com/very-simple-2player-networking-in-python/</link>
		<comments>http://blog.mikepan.com/very-simple-2player-networking-in-python/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 06:15:21 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[realtime]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://mikepan.homeip.net/blog/?p=75</guid>
		<description><![CDATA[A while ago, I posted a simple demo I made in the Blender game engine that let&#8217;s 2 player interact with each other over the internet, all it is required is a really simple networking script and the IP address of the two players.  Here is as youtube video of it in action, mouse-over the [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago, I posted a simple demo I made in the Blender game engine that let&#8217;s 2 player interact with each other over the internet, all it is required is a really simple networking script and the IP address of the two players.  Here is as youtube video of it in action, mouse-over the video to see some caption text.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/Az8C1IW5E5s&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Az8C1IW5E5s&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>The laptop on the left is physically separated from the desktop to the right, linked only by a wireless internet connection.  And as you can see, input made to the desktop computer is sent across the network to the laptop, in realtime.</p>
<p>And here is the script, I&#8217;ll try to explain everything as best I can:</p>
<pre># Simple Python UDP networking demo Created by Mike Pan
# Todo: auto-self IP detection would be nice

# the following line loads the game module used by Python
# to access the Blender Game Engine API, and assigns it the alias G
import GameLogic as G
# load the network socket python module, we'll need it later
import socket

# define own IP address, and stores it as a property under GameLogic
# essentially making it accessible as a global variable
G.ownIP = "xxx.xxx.xxx.xxx"
# define peer IP address, stores it as a property under GameLogic
# again, essentially making it accessible as a global variable
G.peerIP = "xxx.xxx.xxx.xxx"
# define the port number (arbitrary), and the socket buffer size
# (4096 is a good starting point)
G.port = 4000
G.buffer = 4096

# create an IPV4 address with the pre-defined IP and the port number
addr = (G.peerIP, G.port)

# We'll add this line to all our communication, so when debugging,
# we won't get confused as to who send the packets.
signature = "Sent from " + G.ownIP

def init():
	# create an UDP socket for **sending** datagram
	G.sender = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
	# time out is 10ms, pretty short for realworld application,
	#but enough for debugging over local network
	G.sender.settimeout(0.01)
	# this is important! by making this socket object a
	# non-blocking operation, all network stuff is run on
	# a separate thread, thus any network delay will not
	# cause the game to slow down
	G.sender.setblocking(0)

	# creates UDP socket for **receiving** datagram
	G.listener = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
	# same as above, time out is 10ms
	G.listener.settimeout(0.01)
	# same as above, we also need to make sure network operations
	# will not slow down the main application
	G.listener.setblocking(0)

	# Win32 needs the socket binded:
	try:
	 G.listener.bind((G.ownIP, G.port))
	except:
	 print "Binding Listener failed"

def comm():
	# get the object that is attached to this script
	own = G.getCurrentController().owner

 	# receive from peer
	try:
		data, port = G.listener.recvfrom(G.buffer)
		# data contains all the data that came through,
		# it's a string, and we can do whatever we want
		# like print it out
		print data.split(',')
	# if the receiving fails, print something to notify the user
	except:
		print "Receive failed"

	# send to peer
	# generate data to be sent here,
	# send the position data across the network:
	string = str(own.worldPosition)+ ',' + signature

	# going to try to send the data
	try:
		G.sender.sendto(string, addr)
		# if sending fails, notify with error message
	except:
		print "Send failed"</pre>
<p>That&#8217;s it!  To use this script, we simply need to call init() once at the start of the game, and then comm() everytime you wish to send/receive some data (perhaps every 1/30th of a second).  As mentioned, here is no &#8216;server&#8217; involved, the two peers connect direction to each other via a UDP socket.  All the user has to do is specify the two IP addresses.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/very-simple-2player-networking-in-python/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Blender source file pack</title>
		<link>http://blog.mikepan.com/blender-source-file-pack/</link>
		<comments>http://blog.mikepan.com/blender-source-file-pack/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 00:03:46 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[me]]></category>

		<guid isPermaLink="false">http://mikepan.homeip.net/blog/?p=42</guid>
		<description><![CDATA[I know I will never be a great writer, so instead of doing tutorials, I have decided to release some of the personal project I&#8217;ve worked on. The result is a 300MB folder of 22 project, including a lot of the things on my portfolio and demoreel. When I was learning Blender, I start a [...]]]></description>
			<content:encoded><![CDATA[<p>I know I will never be a great writer, so instead of doing tutorials, I have decided to release some of the personal project I&#8217;ve worked on. The result is a 300MB folder of 22 project, including a lot of the things on my <a href="http://mikepan.com/stills.htm" target="_blank">portfolio</a> and demoreel.</p>
<p>When I was learning Blender, I start a lot of personal mini-project that I never really finished, so instead of having them just sitting on my harddrive, perhaps others can find them useful in some way.  The pack contains animations, stills and a realtime game project.</p>
<p><strong>=======================Download===================  ====</strong></p>
<p><a href="http://mikepan.com/files/misc/BlenderPack2.zip">Mike&#8217;s Blender Pack v2 Zip</a> (175MB Compressed)</p>
<p><a href="http://mikepan.com/files.php">Mike&#8217;s Blender Pack v2 Individual files</a></p>
<p><strong>=======================Download===================  ====</strong></p>
<p><strong> </strong></p>
<div id="attachment_49" class="wp-caption alignnone" style="width: 312px"><strong> </strong><strong><img class="size-full wp-image-49 " style="border: 1px solid black;" title="File listing of the Blender Pack content." src="http://blog.mikepan.com/wp-content/uploads/2009/09/listing.png" alt="File listing of the Blender Pack content." width="302" height="564" /></strong><p class="wp-caption-text">File listing of the Blender Pack content.</p></div>
<p>I&#8217;ve tried my best to make sure everything is packed and ready to go. All files should work in Blender 2.49a.</p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"> </form>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/blender-source-file-pack/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		</item>
		<item>
		<title>Compile Blender 2.45 &#8211; a how to guide</title>
		<link>http://blog.mikepan.com/compile-blender-advanced/</link>
		<comments>http://blog.mikepan.com/compile-blender-advanced/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 01:28:11 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://mikepan.homeip.net/blog/?p=39</guid>
		<description><![CDATA[This guide was written for Blender 2.45.  I have an updated guide for building Blender 2.5 available HERE. 1. Acquire Blender source code and libraries - Download and install tortoisesvn from: tortoisesvn.tigris.org -created a folder named &#8220;blender&#8221; under c:\build, select the folder and click on SVN checkout, and use the following location: https://svn.blender.org/svnroot/bf-blender/trunk/blender -created a [...]]]></description>
			<content:encoded><![CDATA[<p style="background:#F66; border:1px dashed; border-color: #666; padding: 10px; color:#000">This guide was written for Blender 2.45.  I have an updated guide for <a href="http://blog.mikepan.com/build-blender-2-5-a-visual-guide/">building Blender 2.5 available HERE.</a></p>
<h3>1. Acquire Blender source code and libraries</h3>
<p>- Download and install tortoisesvn from: <a href="http://tortoisesvn.tigris.org/">tortoisesvn.tigris.org</a><br />
-created a folder named &#8220;blender&#8221; under c:\build, select the folder and click on SVN checkout, and use the following location:</p>
<pre><strong>https://svn.blender.org/svnroot/bf-blender/trunk/blender</strong></pre>
<p>-created a folder named &#8220;windows&#8221; under c:\build\lib, select the folder and click on SVN checkout, and use the following location:</p>
<pre><strong>https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows</strong></pre>
<p>Once the above 3 steps are done, you will have the most up-to-date blender source code and library in the world.</p>
<p style="background:#CCC; border:1px dashed; border-color: #666; padding: 10px; color:#000">OPTIONAL INFO: If you want to build an official release, you can grab the more stable source code (~10MB, library files are not included) from <a href="http://www.blender.org/download/source-code/">blender.org/download/source-code</a>.  Simply delete everything under C:\build\blender and then extract the tarball to the same directory.  Building from the official release ensures the Blender you compiled is stable and relatively bug-free.</p>
<h3>2. Acquire compiling softwares</h3>
<p>- Download and install Python 2.5.1 (9MB) from <a href="http://www.python.org/download/releases/2.5.1/"> www.python.org </a><br />
- Download Mingw 5.1.3 (~10MB) from <a href="http://sourceforge.net/project/showfiles.php?group_id=2435&amp;package_id=240780&amp;release_id=529741"> www.mingw.org </a>.  Run the installer, Pick any mirror, Select <strong>Current</strong> and install packages <strong>MinGW BASETOOLS</strong> and <strong>G++ COMPILER</strong>.<br />
- Download and install SCons 0.97 Windows (300KB) from <a href="http://prdownloads.sourceforge.net/scons/scons-0.97.win32.exe"> www.scons.org </a><br />
- Download the experimental GCC4.x for MinGW package from <a href="http://www.tdragon.net/recentgcc/">tdragon.net</a>.  Extract it to the place where you installed MinGW, and this will serve as a &#8216;drop in&#8217; replacement compiler.  From my own testing, GCC4 is faster than the one that comes with MinGW, but can cause trouble when compiling OpenAL.</p>
<h3>3. Environment setup</h3>
<p>- Go to Start Menu &gt;&gt; Control Panel &gt;&gt; System &gt;&gt; Advanced (Tab) &gt;&gt; Envoronmant Variables (button) &gt;&gt; System Variables scroll area double click on the PATH item<br />
- Add the following line to the end: <code style="background:#FCA; padding: 5px; color:#000">;C:\Python25;C:\mingw\bin</code></p>
<h3>4. Python stuff&#8230;</h3>
<p>Copy <strong>libpython25.a</strong> from <strong>C:\Python25\libs</strong> to <strong>C:\build\lib\windows\python\lib</strong></p>
<p><strong><br />
</strong></p>
<h3>5. Customization (Enable/disable features, add speed optimizations)</h3>
<p>- Create a new file named <strong>user-config.py</strong> under <strong>C:\build\blender\</strong><br />
- Open user-config.py with notepad and copy the following text into it.</p>
<p style="background:#FCA; padding: 5px; color:#000">WITH_BF_GAMEENGINE=&#8217;true&#8217;<br />
WITH_BF_BULLET = &#8216;true&#8217;<br />
WITH_BF_ODE = &#8216;true&#8217;<br />
WITH_BF_OPENEXR = &#8216;true&#8217;<br />
WITH_BF_FTGL = &#8216;true&#8217;<br />
WITH_BF_FMOD = &#8216;true&#8217;<br />
WITH_BF_FFMPEG = &#8216;true&#8217;<br />
WITH_BF_QUICKTIME = &#8216;false&#8217;<br />
WITH_BF_OPENAL = &#8216;false&#8217;<br />
WITH_BF_SDL = &#8216;false&#8217;<br />
BF_PYTHON_VERSION = &#8217;2.5&#8242;</p>
<p>CCFLAGS.extend( ['-march=i686', '-ftracer', '-fomit-frame-pointer', '-finline-functions', '-ffast-math'])<br />
CXXFLAGS.extend(['-march=i686', '-ftracer', '-fomit-frame-pointer', '-finline-functions', '-ffast-math'])</p>
<p>REL_CFLAGS = [ '-O3' ]<br />
REL_CCFLAGS = [ '-O3' ]</p>
<p><strong>&#8216;-march=&#8217;</strong> is probably the most important flag in this config file.  Newer Intel CPU (Pentium D, Core 2) owners are recommended to use <strong>&#8216;-march=nocona&#8217;</strong>, AMD (A64, X2) owners can try <strong>&#8216;-march=k8&#8242;</strong>.<br />
<strong>&#8216;-mmmx&#8217;, &#8216;-msse&#8217;, &#8216;-msse2&#8242;, &#8216;-msse3&#8242;</strong> are usually implied by using a valid <strong>march</strong> flag, therefore they are not included in the config file.<br />
<strong>&#8216;-ffast-math&#8217;</strong> are in general stable enough for daily use (I&#8217;ve never seen a crash), but if you are running a real production server or can not tolorate crashes, remove this flag.  It will make the binary a little slower.</p>
<p>This is how the directory should look like:<br />
<img class="alignnone size-full wp-image-161" title="build2" src="http://blog.mikepan.com/wp-content/uploads/build2.png" alt="build2" width="340" height="592" /></p>
<h3>6. Compile!</h3>
<p>- Open a command prompt window by click on Start &gt;&gt; Run &gt;&gt; type in &#8220;cmd&#8221; and hit OK.<br />
- Navigate to where the Blender source code is by typing this into the command prompt <code style="background:#FCA; padding: 5px; color:#000">cd C:\build\blender</code><br />
- Start the building process: <code style="background:#FCA; padding: 5px; color:#000">scons BF_TOOLSET=mingw BF_BUILDDIR=c:\install -j4</code><br />
- The above command should take about 5-10 minutes to process, and it helps if you have a dual-core processor!<br />
- When it finishes, (Hopefully without error), you can nagivate to <strong>C:\install\win32-mingw\</strong> and find a complete Blender installation ready to be zipped up and distributed!</p>
<h3>Where to go from here?</h3>
</p>
<p style="background:#CCC; border:1px dashed; border-color: #666; padding: 10px; color:#000">You might want to rid the blender.exe of extra useless debug data by entering the following command into the command line:<br />
<strong>strip C:\install\win32-mingw\blender.exe</strong><br />
This will reduce the size of the executable by 8mb or so without having any negative impact</p>
<p>The above &#8216;user-config.py&#8217; file will result in a full-featured Blender that is optimized for speed and should run on almost all modern processors.  To speed up the building process, you can chose to disable some of the features by replacing &#8216;true&#8217; with &#8216;false&#8217; (this will give you a blender binary without certain feaures such as gameengine, audio, etc&#8230;)<br />
<code style="padding: 5px; background: #ffccaa none repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; color: #000000;">scons clean BF_TOOLSET=mingw BF_BUILDDIR=C:\install</code><br />
can be used to clean the build data and getting ready for a new build</p>
<p><strong> </strong><br />
<strong>I also recommend</strong>: How to <a href="http://www.geneome.net/index.php/blender-tutorials/building-blender-with-msvc-using-cmake/">build Blender using Visual C++ Express Edition 2008</a> By Eugene (etr9j), MSVC produces faster binary, but takes a lot longer to setup for the first time.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/compile-blender-advanced/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Compile Blender 2.45 &#8211; an easy how to guide</title>
		<link>http://blog.mikepan.com/compile-blender-simple/</link>
		<comments>http://blog.mikepan.com/compile-blender-simple/#comments</comments>
		<pubDate>Fri, 07 Aug 2009 01:26:37 +0000</pubDate>
		<dc:creator>mike pan</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[technical]]></category>

		<guid isPermaLink="false">http://mikepan.homeip.net/blog/?p=37</guid>
		<description><![CDATA[This guide was written for Blender 2.45.  I have an updated guide for building Blender 2.5 available HERE. 1. Acquire Blender source code and libraries - Download and install tortoisesvn from: tortoisesvn.tigris.org -created a folder named &#8220;blender&#8221; under c:\build, select the folder and click on SVN checkout, and use the following location: https://svn.blender.org/svnroot/bf-blender/trunk/blender -created a [...]]]></description>
			<content:encoded><![CDATA[<p style="background:#F66; border:1px dashed; border-color: #666; padding: 10px; color:#000">This guide was written for Blender 2.45.  I have an updated guide for <a href="http://blog.mikepan.com/build-blender-2-5-a-visual-guide/">building Blender 2.5 available HERE</a>.</p>
<h3>1. Acquire Blender source code and libraries</h3>
<p>- Download and install tortoisesvn from: <a href="http://tortoisesvn.tigris.org/">tortoisesvn.tigris.org</a><br />
-created a folder named &#8220;blender&#8221; under c:\build, select the folder and click on SVN checkout, and use the following location:</p>
<pre><strong>https://svn.blender.org/svnroot/bf-blender/trunk/blender</strong></pre>
<p>-created a folder named &#8220;windows&#8221; under c:\build\lib, select the folder and click on SVN checkout, and use the following location:</p>
<pre><strong>https://svn.blender.org/svnroot/bf-blender/trunk/lib/windows</strong></pre>
<h3>2. Acquire compiling softwares</h3>
<p>- Download and install Python 2.5.1 (9MB) from <a href="http://www.python.org/download/releases/2.5.1/"> www.python.org </a><br />
- Download Mingw 5.1.3 (~10MB) from <a href="http://sourceforge.net/project/showfiles.php?group_id=2435&amp;package_id=240780&amp;release_id=529741"> www.mingw.org </a>.  Run the installer, Pick any mirror, Select <strong>Current</strong> and install packages <strong>MinGW BASETOOLS</strong> and <strong>G++ COMPILER</strong>.<br />
- Download and install SCons 0.97 Windows (300KB) from <a href="http://prdownloads.sourceforge.net/scons/scons-0.97.win32.exe"> www.scons.org </a></p>
<h3>3. Environment setup</h3>
<p>- Go to Start Menu &gt;&gt; Control Panel &gt;&gt; System &gt;&gt; Advanced (Tab) &gt;&gt; Envoronmant Variables (button) &gt;&gt; System Variables scroll area double click on the PATH item<br />
- Add the following line to the end: <code style="background:#FCA; padding: 5px; color:#000">;C:\Python25;C:\mingw\bin</code><br />
- Copy <strong>libpython25.a</strong> from <strong>C:\Python25\libs</strong> to <strong>C:\build\lib\windows\python\lib</strong></p>
<h3>4. Compile!</h3>
<p>Before you start, this is how the everything should look like:</p>
<p><img class="alignnone size-full wp-image-161" title="build2" src="http://blog.mikepan.com/wp-content/uploads/build2.png" alt="build2" width="340" height="592" /></p>
<p>- Open a command prompt window by click on Start &gt;&gt; Run &gt;&gt; type in &#8220;cmd&#8221; and hit OK.</p>
<p>- Navigate to where the Blender source code is by typing this into the command prompt <code style="background:#FCA; padding: 5px; color:#000">cd C:\build\blender</code></p>
<p>- Start the building process by:<br />
<code style="background:#FCA; padding: 5px; color:#000">scons BF_BUILDDIR=c:\install -j4</code></p>
<p>- The above command should take about 5-10 minutes to process, and it helps if you have a dual-core processor!</p>
<p>- When it finishes, (Hopefully without error), you can nagivate to <strong>C:\install\win32-mingw\</strong> and find a complete Blender installation ready to be zipped up and distributed!</p>
<h3>Where to go from here?</h3>
<p style="background:#CCC; border:1px dashed; border-color: #666; padding: 10px; color:#000">You might want to rid the blender.exe of extra useless debug data by entering the following command into the command line:<br />
<strong>strip C:\install\win32-mingw\blender.exe</strong><br />
This will reduce the size of the executable by 8mb or so without having any negative impact</p>
<p><strong>scons clean BF_BUILDDIR=C:\install</strong><br />
can be used to clean the build data and getting ready for a new build</p>
<p>Once you have successfully compiled Blender, you can try more customization by following the <a href="?compileblender">Advanced Guide.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mikepan.com/compile-blender-simple/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
