tag:blogger.com,1999:blog-59144198898150867382024-02-19T09:06:14.201-03:00Distant Souls Development BlogMatias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-5914419889815086738.post-37421518555140399602013-06-15T12:52:00.000-03:002013-06-15T12:52:25.608-03:00New website!I've been having it for a while (mainly just to store royalty free music), but now I decided to join everything in one place:<br />
<div style="text-align: center;">
<a href="http://www.yosoygames.com.ar/"><span style="font-size: large;">www.yosoygames.com.ar</span></a></div>
<br />
Ogre Meshy, Royalty Free Music, Distant Souls & the blog.<br />
It's easier for me to manage by keeping everything together. I'll be updating that blog more often (particularly during GSoC) from now on.<br />
I'd wish I had the time to upload more music. There's around 100 pieces waiting for mastering & uploading in my HDD.<br />
<br />
This blog won't be closed to keep as archives of the old stuff.Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-402086450248577932013-05-05T17:33:00.000-03:002013-05-05T18:36:59.426-03:00GCN's Performance Tips 26 to 50 from Nick Thibieroz<i>This is a follow up from <a href="http://distantsoulsdev.blogspot.com.ar/2013/03/gcns-25-performance-tips-from-nick.html">GCN's 25 Performance Tips from Nick Thibieroz</a></i><br />
<br />
I intended to update the original post, but changing the post name would invalidate links, and the post was already huge, so I decided it was wiser to split it.<br />
<br />
<blockquote class="tr_bq">
#26: Coalesce reads and writes to Unordered Access Views to help with memory accesses.<br />
<br />
#27: Render your skybox last and your first-person geometry first (should be a given by today's standards :)).<br />
<br />
#28: Using D16 shadow maps will provide a modest performance boost and a large memory saving.<br />
<br />
#29: Avoid unnecessary DISCARD when Map()ping non-CB resources; some apps still do this at least once a frame.<br />
<br />
#30: Minimize GS input and output size or consider Vertex Shader-instancing solutions instead.<br />
<br />
#31: A dedicated thread solely responsible for making D3D calls is usually the best way to drive the API.<br />
<br />
#32: Avoid sparse shader resource slot assignments, e.g. binding resource slot #0 and #127 is a bad idea.<br />
<br />
#33: Thread Group Shared Memory accesses are subject to bank conflicts on addresses that are multiples of 32 DWORD.<br />
<br />
#34: The D3DXSHADER_IEEE_STRICTNESS shader compiler flag is likely to produce longer shader code.<br />
<br />
#35: Use D3D11_USAGE_IMMUTABLE on read-only resources. A surprising number of games don’t!<br />
<br />
#36: Avoid calling Map() on DYNAMIC textures as this may require a conversion from tiled to linear memory.<br />
<br />
#37: Only use UAV BIND flag when needed. Leaving it on for non-UAV usage will cause perf issues due to extra sync.<br />
<br />
#38: Don’t pass SV_POSITION into a pixel shader unless you are going to use it.<br />
#38v2: Passing interpolated screenpos can be better than declaring SV_POSITION in pixel shader especially if PS is short.<br />
<br />
#39: Ensure proxy and predicated geometry are spaced by a few draws when using predicated rendering.<br />
<br />
#40: Fetch indirections increase execution latency; keep it under control especially for VS and DS stages.<br />
<br />
#41: Dynamic indexing into a Constant Buffer counts as fetch indirection and should be avoided.<br />
<br />
#42: Always clear MSAA render targets before rendering.<br />
<br />
#43: With cascaded shadow maps use area culling to exclude geometry already rendered in finer shadow cascades<br />
<br />
#44: Avoid over-tessellating geometry that produces small triangles in screen space; in general avoid tiny triangles.<br />
<br />
#45: Create shaders before textures to give the driver enough time to convert the D3D ASM to GCN ASM.<br />
<br />
#46: Atomic operations on a single TGSM location from all threads will serialize TGSM access.<br />
(TGSM = Thread group shared memory).<br />
<br />
#47: Improve motion blur performance by POINT sampling along motion vectors if your source image is RGBA16F.<br />
<br />
#48: MIPMapping is underrated - don't forget to use it on displacement maps and volume textures too.<br />
<br />
#49: Trilinear is up to 2x the cost of bilinear. Bilinear on 3D textures is 2x the cost of 2D. Aniso cost depends on taps<br />
<br />
#50: Avoid heavy switching between compute and rendering jobs. Jobs of the same type should be done consecutively.</blockquote>
<br />
<h2>
Personal notes</h2>
These are my personal notes on the tips. Remember, I do not work at AMD and I'm human, I could be wrong:<br />
<blockquote class="tr_bq">
#31: A dedicated thread solely responsible for making D3D calls is usually the best way to drive the API. </blockquote>
There's A LOT of information regarding this tip in his <a href="http://developer.amd.com/wordpress/media/2013/04/DX11PerformanceReloaded.ppsx">GDC 2013 slides "DirectX 11 Performance Reloaded"</a><br />
(slides 12 & 13 regarding this tip in particular)<br />
<br />
<blockquote class="tr_bq">
#38: Don’t pass SV_POSITION into a pixel shader unless you are going to use it.<br />
#38v2: Passing interpolated screenpos can be better than declaring SV_POSITION in pixel shader especially if PS is short.</blockquote>
Tip 38 was done twice because it was rephrased (tip #38 was misleading, so tip #38 v2 replaced it)<br />
Actual quote: "SV_POSITION will actually get removed from pixel shader stage if not used. Will rephrase this tip."<br />
<br />
<blockquote class="tr_bq">
#43: With cascaded shadow maps use area culling to exclude geometry already rendered in finer shadow cascades</blockquote>
<br />
While not entire related, <a href="https://twitter.com/AndrewLauritzen">Andrew Lauritzen</a> suggested his old <a href="http://visual-computing.intel-research.net/art/publications/sdsm/">SDSM Paper (Sample Distribution Shadow Maps)</a>, which long story short, it's a way of PSSM that dynamically adjust the frustum corners (i.e. the "limits") of each split, instead of having custom ones.<br />
If memory serves well, it uses Compute Shaders to analyze the ideal split limits, which was the main reason I never ported it to Ogre :(<br />
<br />
<br />
Last but not least, something from an older tip #23:<br />
<blockquote class="tr_bq">
#23: GetDimensions() is a TEX instruction; prefer storing texture dimensions in a Constant Buffer if TEX-bound.</blockquote>
<a href="https://twitter.com/BlindRenderer">Pope Kim</a> was interested in this function and since it's a TEX instruction, if the result would be cached and <a href="https://twitter.com/nthibieroz">Nick Thibieroz</a> made an important clarification:<br />
"<b>TEX instructions will be grouped together but no caching since no texcoords are provided in GetDimensions()</b>"<br />
I thought this was really worth mentioning.<br />
<br />
<h2>
The End</h2>
Well, Nick Thibieroz said tip #50 would conclude the series of Twitter tips and he was planning into wrapping them up into a single document. I would be looking forward to see it.<br />
I enjoyed reading those tips, as I learned a lot from the insights of new architecture.<br />
It may do good thinking on this generation of GPUs onwards as just cpu-like architectures (i.e. TextureUnits is just an address pointer to ram with a header in ram describing filtering method and texture bpp) rather than the old fashioned fixed function, state machine they used to be.<br />
<br />
If you're a hardcore HW fan who wants to know more about GCN's GPU, you may want to check out <a href="http://developer.amd.com/wordpress/media/2012/10/PoweringTheNextGenerationOfGraphics_AMD_GCN_Architecture2.ppsx">this slide</a>.Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com2tag:blogger.com,1999:blog-5914419889815086738.post-39846822774707506462013-03-30T14:42:00.000-03:002013-03-30T14:51:08.816-03:00Adventures in branchless min-max with VS2012So, I'm researching the fastest ways to perform min & max because it's very used in Ogre.<br />
<br />
I decided to perform a test between the following versions:<br />
<ul>
<li>std::min & std::max</li>
<li>inline min & max using pure C</li>
<li>inline min & max using SSE intrinsics</li>
</ul>
The C version:<br />
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<span style="color: blue;">inline const float</span>& min( <span style="color: blue;">const float</span> &a, <span style="color: blue;">const float</span> &b )<br />
{<br />
<span style="color: blue;">return</span> a < b ? a : b;<br />
} </blockquote>
The SSE version:<br />
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<span style="color: blue;">inline const float</span> min( <span style="color: blue;">const float</span> &left, <span style="color: blue;">const float</span> &right )<br />
{<br />
<span style="color: blue;">float</span> retVal;<br />
_mm_store_ss( &retVal, _mm_min_ss( _mm_set_ss( left ), _mm_set_ss( right ) ) );<br />
<span style="color: blue;">return</span> retVal;<br />
} </blockquote>
<br />
Before I continue, a couple notes:<br />
<ul>
<li>Everything compiled with /arch:SSE2. Not setting it produced the same code. Setting /arch:IA32 produced ugly & long x87 code.</li>
<li>/O2 was enabled.</li>
<li>/LCGT was disabled. </li>
<li>The same tests were applied to "max" versions, as well as their double counterparts. I got the same results.</li>
<li>VS2012 Express Edition</li>
<li>This was a win32 build, not x64 </li>
</ul>
<br />
<h2>
<span style="font-size: x-large;">
The Test</span></h2>
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<span style="color: blue;">int</span> main( <span style="color: blue;">int</span> argc, <span style="color: blue;">char</span> **argv )<br />
{<br />
<span style="color: blue;">float</span> a = *(<span style="color: blue;">float</span>*)( &argv[0][0] );<br />
<span style="color: blue;">float</span> b = *(<span style="color: blue;">float</span>*)( &argv[0][1] );<br />
<span style="color: blue;">float</span> c = *(<span style="color: blue;">float</span>*)( &argv[0][2] );<br />
<span style="color: blue;">float</span> result = min( (-1.0f + 20.5f), a * b + c );<br />
result = max( result, c );<br />
<br />
std::cout << result;<br />
<br />
<span style="color: blue;">return</span> 0;<br />
}</blockquote>
I cout the result to ensure the compiler doesn't wipe the whole code. I cast argv to ensure the compiler doesn't do constant propagation. I could use atof, but that only clutters the assembly output. I'm not interested in whether the floats are nans or the pointers are valid.<br />
Additionally, I even do a constant operation to ensure constant propagation still works as expected (which does).<br />
<h2>
<br />
<span style="font-size: x-large;">
Using std::min</span></h2>
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<br />
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PROC</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: green;"><span style="font-size: x-small;"><span style="font-weight: normal;">;
COMDAT</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>sub</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">8</span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_argv</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__real@419c0000</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>mulss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
</div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>addss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1100742656</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: green;"><span style="font-size: x-small;"><span style="font-weight: normal;">;
419c0000H</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_c</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>cmovbe</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_result</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_c</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>cmovbe</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_result</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>call</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z</span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>xor</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>pop</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ret</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">0</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">ENDP</span></span></span></span></div>
</blockquote>
VS2012 is using comiss + cmovbe to perform conditional movement. Definitely an improvement over previous compiler which generated jumps.<br />
<h3>
The good: </h3>
<ul>
<li>Code is branchless</li>
</ul>
<h3>
The bad:</h3>
<ul>
<li>There's an interleave of xmm& gpr registers in the process. The data is also copied to two locations in RAM. Interleaving like this plus moving to memory back and forth doesn't look good at all. </li>
</ul>
<br />
<h2>
<span style="font-size: x-large;">
The inline C version</span></h2>
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PROC</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: green;"><span style="font-size: x-small;"><span style="font-weight: normal;">;
COMDAT</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>sub</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">8</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_argv</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1100742656</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: green;"><span style="font-size: x-small;"><span style="font-weight: normal;">;
419c0000H</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>mulss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>addss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_c</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__real@419c0000</span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$T1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>cmovbe</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_c</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>lea</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_result</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>cmovbe</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_result</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>call</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>xor</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>pop</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ret</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">0</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
ENDP</span></span></span></span></div>
</blockquote>
The generated assembly is almost identical to std::min case, with the exception that it saves one instruction by executing <i>comiss</i> directly on memory instead of caching the value first in an xmm register. This value by the way, is -21.5, which is the constant arithmetic we did in the C++ code.<br />
I haven't checked whether the actual binary size of the instructions is equal. Also note some instructions are following a different order, which may pipeline better/worse.<br />
<br />
<h3>
Important remarks:</h3>
If the code is changed so that the arguments are not references, but rather copy by value, a jump is generated:<br />
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<span style="color: blue;">inline const float</span> min( <span style="color: blue;">const float</span> a, <span style="color: blue;">const float</span> b )<br />
{<br />
<span style="color: blue;">return</span> a < b ? a : b;<br />
} </blockquote>
Note the lack of '&'. If compiled with that definition...<br />
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PROC</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: green;"><span style="font-size: x-small;"><span style="font-weight: normal;">;
COMDAT</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_argv</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__real@419c0000</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>mulss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>addss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ja</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">SHORT</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$LN6@main</span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movaps</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">$LN6@main</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>:</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>comiss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ja</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">SHORT</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
$LN10@main</span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movaps</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">$LN10@main</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>:</b></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>call</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z</span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>xor</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>pop</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ret</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">0</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">ENDP</span></span></span></span></div>
</blockquote>
<h3>
The good</h3>
<ul>
<li>No mixing between general purpose & SSE registers. Everything stays whithin xmm regs. That's much better.</li>
</ul>
<h3>
The bad</h3>
<ul>
<li>Code contains jumps (branches)</li>
</ul>
On a personal note, I think it's counterintuitive that copying by reference and by value produce such different results.<br />
<br />
<h2>
<span style="font-size: x-large;">Using SSE2 intrinsics</span></h2>
This is the assembly output from using _mm_min_ss & _mm_max_ss:<br />
<blockquote class="tr_bq" style="background: #F0F0F0; color: black;">
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;">_main
</span></span><span style="color: #0080ff;"><span style="font-size: x-small;">PROC</span></span><span style="color: black;"><span style="font-size: x-small;">
</span></span><span style="color: green;"><span style="font-size: x-small;">;
COMDAT</span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
_argv</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>$[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>push</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>mov</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ecx</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_?cout@std@@3V?$basic_ostream@DU?$char_traits@D@std@@@1@A</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">1</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>mulss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>+</b></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">2</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>]</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>addss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movaps</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__real@419c0000</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>minss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movaps</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movaps</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm2</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="background-color: #f9cb9c;"><span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>maxss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm0</b></span></span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<span style="background-color: #fff2cc;"><br /></span>
</div>
<span style="background-color: #fff2cc;">
</span>
<br />
<div style="margin-bottom: 0cm;">
<span style="background-color: #fff2cc;"><span style="color: black;"> </span><span style="background-color: #ffe599;"><span style="font-family: Arial, sans-serif;"><span style="color: #804000;"><span style="font-size: x-small;"><b>movss</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>[</b></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>esp</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>],</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>xmm1</b></span></span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>call</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>DWORD</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">PTR</span></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
__imp_??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z</span></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>xor</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span><span style="color: navy;"><span style="font-size: x-small;"><b>,</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>eax</b></span></span></span></div>
<div style="font-weight: normal; margin-bottom: 0cm;">
<br /></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>pop</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #8080ff;"><span style="font-size: x-small;"><b>ebp</b></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="color: black;"> </span><span style="font-family: Arial, sans-serif;"><span style="color: blue;"><span style="font-size: x-small;"><b>ret</b></span></span><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">
</span></span></span><span style="color: #ff8000;"><span style="font-size: x-small;"><span style="font-weight: normal;">0</span></span></span></span></div>
<div style="margin-bottom: 0cm;">
<span style="font-family: Arial, sans-serif;"><span style="color: black;"><span style="font-size: x-small;"><span style="font-weight: normal;">_main
</span></span></span><span style="color: #0080ff;"><span style="font-size: x-small;"><span style="font-weight: normal;">ENDP</span></span></span></span></div>
</blockquote>
Sweet! That's exactly what we were aiming for. The code translates to minss & maxss instructions.<br />
I was also afraid that the compiler wouldn't do this efficiently (i.e. store xmm0's result from the first minss unnecessarily into stack and then load it back) but note that it writes to memory after the second one, maxss, is executed!<br />
<br />
Not only that, the code is also smaller. It couldn't have gone better. All advantages, no disadvantage.<br />
Completely branchless, no exchange with gpr registers, no conditional moves either!<br />
<br />
<h2>
<span style="font-size: x-large;">Doubles</span></h2>
I won't post the results from using doubles, because it's the same: instead of comiss, comisd is used. Instead of minss, minsd is generated.<br />
<br />
<br />
<h2>
<span style="font-size: x-large;">Specializing std::min & std::max</span> </h2>
<span style="font-size: small;">I tried specializing <span style="font-size: small;">std functions <span style="font-size: small;">for float & double to use the SSE<span style="font-size: small;">2 intri<span style="font-size: small;">nsics. This actually worked and produced same o<span style="font-size: small;">ptimal </span>assembly with minss & maxss. However, <span style="font-size: small;">std::min <span style="font-size: small;">returns by <span style="font-size: small;">reference. Not by value.</span></span></span></span></span></span></span></span><br />
<br />
<span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;"><span style="font-size: small;">The only way to implement it is using a local variable which is where </span></span></span></span></span></span></span></span>_mm_store_ss will send the result.<br />
But then the compiler warns that we're returning the address of a local variable. Which can be very dangerous, since "const float &r = std::min( a, b )" is valid, and would cause undefined behavior.<br />
<br />
<h2>
<span style="font-size: x-large;">Conclusion</span></h2>
Given what I found, I will be using Ogre::min & Ogre::max to replace std::min & std::max (where floats & doubles are involved).<br />
On x86 architectures, it will use the SSE2 intrinsics as it translates to optimum assembly. On non-x86 architectures, it will default to the inline C version (or an architecture variant, ie. Neon intrinsics)<br />
We still have to measure what happens with GCC though.Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com3tag:blogger.com,1999:blog-5914419889815086738.post-80577777755002865402013-03-16T13:06:00.001-03:002013-05-05T18:36:12.719-03:00GCN's 25 Performance Tips from Nick Thibieroz<blockquote class="tr_bq">
<i><b>Update:</b> <a href="http://distantsoulsdev.blogspot.com.ar/2013/05/gcns-performance-tips-26-to-50-from.html">Tips 26 to 50</a> were published.</i></blockquote>
<br />
<a href="https://twitter.com/nthibieroz">Nicolas Thibieroz</a> from AMD has been posting a daily series of "Performance Tips" through his Twitter account.<br />
<br />
These performance tips refer to the GCN architecture, which stands for "Graphics Core Next" that can be found in the ATI Radeon HD 7000 series.<br />
<br />
I do <b>NOT</b> work at AMD, and I thought it would be a shame if all these tips would be lost in the Twitterverse as it is not the most reliable place to keep long term documentation nor tips. They will just get lost forever or become sparsed.<br />
<br />
So, I've gathered all of them and posted here. I will try to keep this page up to date as he keeps posting more of them.<br />
Before you start reading, if you're really new to how GPUs work or some of these tips leave you with "wth is he talking about??" I highly recommend Emil Persson's <a href="http://developer.amd.com/wordpress/media/2012/10/ATI_Radeon_HD_2000_programming_guide.pdf">ATI Radeon HD 2000 programming guide</a> & <a href="http://developer.amd.com/wordpress/media/2012/10/Depth_in-depth.pdf">Depth In Depth.</a> Also reading NVIDIA's old <a href="http://developer.download.nvidia.com/GPU_Programming_Guide/GPU_Programming_Guide_G80.pdf">GPU Programming Guide GeForce 8 & 9 Series</a> is also very enlightening and can constrast differences.<br />
It's note worthy that many old tips still apply, and that some of the new tips are also general advices (apply to many other archs as well, including old ones).<br />
<br />
Ok, here you go:<br />
<blockquote class="tr_bq">
#1: Issues with Z-Fighting? Use D32_FLOAT_S8X24_UINT format with no performance or memory impact compared to D24S8.<br />
<br />
#2: Binding a depth buffer as a texture will decompress it, making subsequent Z ops more expensive.<br />
<br />
#3: Invest in DirectCompute R&D to unlock new performance levels in your games.<br />
<br />
#4: On current GCN DX11 drivers the maximum recommended size for NO_OVERWRITE dynamic buffers is 4Mb.<br />
<br />
#5: Limit Vertex and Domain Shader output size to 4 float4/int4 attributes for best performance.<br />
<br />
#6: RGBA16 and RGBA16F are fast export, use those to pack G-Buffer data and avoid ROP bottlenecks.<br />
<br />
#7: Design your game engine with geometry instancing support from an early stage.<br />
<br />
#8: Pure Vertex Shader-based solutions can be faster than using the GS or HS/DS.<br />
<br />
#9: Use a ring of STAGING resources to update textures. UpdateSubresource is slow unless texture size is <4Kb.<br />
<br />
#10: DX11 supports free-threaded resource creation, use it to reduce shader compilation and texture loading times.<br />
<br />
#11: Use the smallest Input Layout necessary for a given VS; this is especially important for depth-only rendering.<br />
<br />
#12: Don't forget to optimize geometry for index locality and sequential read access - including procedural geometry.<br />
<br />
#13: Implement backface culling in Hull Shader if tessellation factors are on the high side.<br />
<br />
#14: Use flow control in shaders but watch out for GPR pressure caused by deep nested branches.<br />
<br />
#15: Some shader instructions are costly; pre-compute constants and store them in constant buffers (e.g. reciprocals).<br />
<br />
#16: Use [maxtessfactor(X)] in Hull Shader declaration to control tessellation costs. Max recommended value is 15.<br />
<br />
#17: Filtering 64-bit texture formats is half-rate on current GCN architectures, only use if needed.<br />
<br />
#18: clip, discard, alpha-to-mask and writing to oMask or oDepth disable Early-Z when depth writes are on.<br />
<br />
#19: Writing to a UAV or oDepth disables both Early-Z and Hi-Z unless conservative oDepth is used.<br />
<br />
#20: DispatchIndirect() and Draw[Indexed]InstancedIndirect() can be used to implement some form of conditional rendering.<br />
<br />
#21: Use a multiple of 64 in Compute Shader threadgroup declaration. 256 is often a good choice.<br />
<br />
#22: Occlusion queries will stall the CPU if not used correctly.<br />
<br />
#23: GetDimensions() is a TEX instruction; prefer storing texture dimensions in a Constant Buffer if TEX-bound. <br />
<br />
#24: Avoid indexing into arrays of shader variables - this has a high performance impact.<br />
<br />
#25: Pack Vertex Shader outputs to a float4 vector to optimize attributes storage.</blockquote>
<br />
<h2>
Personal notes</h2>
These are my personal notes on the tips. Remember, I do not work at AMD and I'm human, I could be wrong:<br />
<blockquote class="tr_bq">
#1: Issues with Z-Fighting? Use D32_FLOAT_S8X24_UINT format with no performance or memory impact compared to D24S8.</blockquote>
Interestingly, <span style="color: #990000;">AMD</span> was <b>not</b> recommending DXGI_FORMAT_D24_UNORM_S8_UINT <b>for shadow maps</b> in 2008. They recommended instead to use DXGI_FORMAT_D16_UNORM (better) or DXGI_FORMAT_D32_FLOAT (slower)<br />
<span style="color: #38761d;">NVIDIA</span>, on the other hand, recommended DXGI_FORMAT_D24_UNORM_S8_UINT and noted that DXGI_FORMAT_D32_FLOAT has lower ZCULL efficiency. And unlike AMD, they completely disregarded DXGI_FORMAT_D16_UNORM as it will not save memory or increase performance<br />
<br />
<span style="font-size: x-small;"><i>Source:</i> <i><a href="http://developer.download.nvidia.com/presentations/2008/GDC/GDC08-D3DDay-Performance.pdf">GDC 08 DirectX 10 Performance</a></i></span><br />
<br />
<blockquote class="tr_bq">
#6: RGBA16 and RGBA16F are fast export, use those to pack G-Buffer data and avoid ROP bottlenecks.</blockquote>
<br />
According to Thibieroz in 2011 export costs should be calculated as follow:<br />
<span style="color: #990000;">AMD:</span> Total Export Cost = ( Num RTs ) * ( Slowest RT )<br />
<span style="color: #38761d;">NVIDIA</span>: Total Export Cost = Cost( RT0 ) + Cost( RT1 ) + Cost( RT2 ) +...<br />
<br />
I don't know if the same formula still applies for GCN architecture. <br />
<br />
<span style="color: #990000;">AMD</span> was discouraging the use of RGBA16 back then, so probably GCN improved in this aspect.<br />
<span style="color: #38761d;">NVIDIA </span>said cost is proportional to bit depth except:<br />
<ul>
<li><32bpp same speed as 32bpp</li>
<li>sRGB formats are slower</li>
<li>1010102 & 111110 are slower than 8888</li>
</ul>
<span style="font-size: x-small;"><i>Source:</i> <a href="http://developer.amd.com/wordpress/media/2012/10/Deferred%20Shading%20Optimizations.pps">GDC 2011 Deferred Shading Optimizations </a></span><br />
<br />
<blockquote class="tr_bq">
#12: Don't forget to optimize geometry for index locality and sequential read access - including procedural geometry.</blockquote>
<a href="http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/amd-tootle/">AMD Tootle</a> is an excellent tool for that. There was also a paper in which Tootle was inspired from (or was it backwards?) so you should look for it if you want to do your own implementation.<br />
It's worth noting this tip is even more important for Mobile GPUs.<br />
<br />
<blockquote class="tr_bq">
#17: Filtering 64-bit texture formats is half-rate on current GCN architectures, only use if needed.</blockquote>
When asked further about it by <a href="https://twitter.com/dougbinks">Doug Binks</a>, Thibieroz clarified he meant that 64-bit bilinear filtering is half the rate of 64-bit point filtering. I had the same doubt, so I thought it was worth mentioning.<br />
<br />
<blockquote class="tr_bq">
#18: clip, discard, alpha-to-mask and writing to oMask or oDepth disable Early-Z when depth writes are on.</blockquote>
<a href="https://twitter.com/won3d">Won Chun</a> asked "Oh, only clip/mask/discarded fragments are affected, not subsequent fragments that land on the same pixel. Cool." to which Thibieroz replied "Correct :)"<br />
This is important. IIRC some old hardware, when using clip/discard; they would not only prevent Early-Z, but they would also prevent Early-Z for any next draw call even if subsequent passes didn't use discard at all.<br />
<br />
As a further note, it looks like GCN is a step backwards in comparison to ATI Radeon HD 2000. According to Persson's Depth In Depth, page 2 and 3, Early Z was enabled for the discard/clip cases. May be the documentation was incorrect. May be it's a step backwards. Bummer.<br />
<br />
<blockquote class="tr_bq">
#24: Avoid indexing into arrays of shader variables - this has a high performance impact.</blockquote>
<br />
I asked whether he was referring to constant waterfalling. To those who don't know, Constant Waterfalling happens when indexing constant variables as an array. When many vertices that are being processed together try to index a different portion of the constant register, operations have to be serialized (i.e. HW skinning & some forms of instancing). Therefore, you should be arranging/sorting the vertices in a way that they all read the same index sequentially to reduce serialization. Constant Waterfalling doesn't happen if all your vertices access the same indices in the same order (i.e. likely when doing lighting calculations)<br />
<br />
Anyway, he wasn't referring to that, he answered: "Referring to declaring (and indexing into) arrays of <b>temp</b> variables. Those increase GPR usage and affect latency hiding".<br />
Well, that one's new for me!<br />
<br />
<br />
<div style="text-align: right;">
<b>Last Updated: 2013-03-16</b></div>
Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com6tag:blogger.com,1999:blog-5914419889815086738.post-18520915710852149652013-02-20T12:44:00.001-03:002014-02-01T16:05:24.220-03:00This is not Motion Blur<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1SfzYja9xMn9Y39iUu2zK1J8304lH4NYBUIPaXx13hoDajbun-ROoPbbBJDEy3gsvBwOou6oOr27O3gJzuZC-TiegTdoVMqyXFMDDbu3T-rr0_jqWQOkgfts-CFpaibGoYXRYI_HJULX/s1600/01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1SfzYja9xMn9Y39iUu2zK1J8304lH4NYBUIPaXx13hoDajbun-ROoPbbBJDEy3gsvBwOou6oOr27O3gJzuZC-TiegTdoVMqyXFMDDbu3T-rr0_jqWQOkgfts-CFpaibGoYXRYI_HJULX/s640/01.jpg" height="360" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8AF-Ja2AfFjGLFPpFZosFsezzcMX70IXcOIcl-bvhjTjH5hy5R9jHRybYbfBnK68FdU4sPHYPAkPQGz4hwHbPyZBHBRZ4BmwR5FIDaAwHkBMLiX8n4fY7Yyp2DQbQsDwgQUahDMcR1P4Q/s1600/02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8AF-Ja2AfFjGLFPpFZosFsezzcMX70IXcOIcl-bvhjTjH5hy5R9jHRybYbfBnK68FdU4sPHYPAkPQGz4hwHbPyZBHBRZ4BmwR5FIDaAwHkBMLiX8n4fY7Yyp2DQbQsDwgQUahDMcR1P4Q/s640/02.jpg" height="240" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH2soX-wBU00v6kKu39v1I7Z8RJ_KtWbM68gdN58d6ZckDUcoHueuEZ-XIUv0mg7b0GcYi3fVAJfSyV3umCvhlCI1tmIJii8-PMcr1a7I_VmFSg1FmfhenNbeg_5ESNkntfja_X5gfDZ2X/s1600/03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgH2soX-wBU00v6kKu39v1I7Z8RJ_KtWbM68gdN58d6ZckDUcoHueuEZ-XIUv0mg7b0GcYi3fVAJfSyV3umCvhlCI1tmIJii8-PMcr1a7I_VmFSg1FmfhenNbeg_5ESNkntfja_X5gfDZ2X/s640/03.jpg" height="400" width="640" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQV4YBuU1DDzW8E4T20-F7J9u_xarOphDeTmYjlROCRfk5tpI_ZUBUGer7k_YxjTK35v838njRVzTcEemP4AfUN0-J4Hjs0o87TfBE7wnk_4v6OteKWrdwri8nmAIWZL_MhdlL5aQgVra/s1600/04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkQV4YBuU1DDzW8E4T20-F7J9u_xarOphDeTmYjlROCRfk5tpI_ZUBUGer7k_YxjTK35v838njRVzTcEemP4AfUN0-J4Hjs0o87TfBE7wnk_4v6OteKWrdwri8nmAIWZL_MhdlL5aQgVra/s640/04.jpg" height="360" width="640" /></a></div>
<br />
This motion blur approximation provokes me motion sickness so
hard I have to disable it. The problem is, often these games only
give the option to disable all kinds of motions blur (radial blur,
ping pong motion blur, artistic blur) while all I want is to <i><b>only</b></i>
disable per-pixel motion based/velocity based motion blur<br />
<br />
<br />
<h1 class="western">
The origin</h1>
Velocity based motion blur probably became famous after Crysis
implemented it. They weren't the first though, this kind of
technology was already <a href="https://www.youtube.com/watch?v=z8j5fQhKI8I&list=UUR_UuCjXbs7J0qD5aHoJhrA&index=10">showcased</a>
by the ill-fated <a href="http://en.wikipedia.org/wiki/Offset_Software">Offset
engine</a>. And they weren't the first either.<br />
<br />
<h2 class="western">
How it works</h2>
The standard way of doing it is described in <a href="http://http.developer.nvidia.com/GPUGems3/gpugems3_ch27.html">GPU
Gems 3</a> using textures containing velocity vectors. It is also
explained on <a href="http://content.gpwiki.org/index.php/D3DBook:Motion_Blur">D3D10
Book "Programming Vertex, Geometry, and Pixel Shaders"</a>,
and also there's a demo in <a href="http://mynameismjp.wordpress.com/samples-tutorials-tools/motion-blur-sample/">MJP's
blog</a>.<br />
Basically a textures holds where and how much the pixel moved from
the previous frame, and start blending this pixels with all other
pixels along the line traced by this vector.<br />
I don't have actually anything against this approximation
technique. <u><b>Where I differ though, is in the blending formula</b></u>.<br />
<br />
<br />
<h1 class="western">
A look at a real camera's blur</h1>
<h2 class="western">
How cameras work</h2>
Motion blur on camera's is mainly controlled by the ISO speed &
shutter speed (and to a lesser extend, aperture).<br />
<br />
<h3 class="western">
The shutter speed</h3>
The name is misleading because it should be called “shutter
time”. The shutter speed controls how long the camera sensor is
exposed to incoming light. Low shutter speeds can reach 1000th's of a
second, while high values can be sustain more than half a minute.<br />
Low shutter speeds produce very crisp images images, while high
shutter speeds produce very blurry pictures. Extremely long exposure
times are often used to produce “light paintings” or overworldy,
surreal effects. There is a whole “<a href="https://www.google.com/search?hl=en&client=firefox-a&hs=naJ&rls=org.mozilla:es-ES:official&q=Long%20exposure%20photography&um=1&ie=UTF-8&tbm=isch&source=og&sa=N&tab=wi&ei=WuIiUbrIBoTY9AS5zIDgBQ&biw=1056&bih=538&sei=XOIiUdzGE5PC9gSd4oHQCg">Long
exposure photography</a>” sub-culture that can absorb your
attention for a few hours.<br />
Low shutter speeds on the other hand, are very useful for action scenes or for focusing on fast moving objects.<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK21rIoAwzaQB4otkaETJe1oAPYSjQUWQ76c9iPqBRLOJs4Yj5g3zln1F7_RqJrQ7Wuw51blc3xUJdkgThjSOW-JSSpNXY6smyB1RRtfdTQ35fDL1M80rTXZh5PCg8Ea3uS2nNFGHMYX85/s1600/Elakala_Waterfalls_Swirling_Pool_Mossy_Rocks.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK21rIoAwzaQB4otkaETJe1oAPYSjQUWQ76c9iPqBRLOJs4Yj5g3zln1F7_RqJrQ7Wuw51blc3xUJdkgThjSOW-JSSpNXY6smyB1RRtfdTQ35fDL1M80rTXZh5PCg8Ea3uS2nNFGHMYX85/s400/Elakala_Waterfalls_Swirling_Pool_Mossy_Rocks.jpg" height="308" width="400" /></a></div>
<br />
<div style="text-align: center;">
<i>High shutter speed time, Source: ForestWander Nature Photography, <a href="http://www.forestwander.com/">www.ForestWander.com</a></i>
<i>Under CC SA license.</i></div>
<h3 class="western">
The ISO speed</h3>
The ISO controls how sensitive the camera is to incoming light.
Low ISO is very useful in very bright scenes, while higher ISOs are
needed in low light conditions to get good shots. However high ISOs
may result in noisier images (those coloured dots in digital cameras)
or images with noticeable <a href="http://en.wikipedia.org/wiki/Film_grain">film
grain</a> (analog cameras).<br />
<br />
In old analog cameras, the ISO was directly proportional to the
density of the layer of silver salts in the photographic film. Lower
ISO equals less layer density, which results in a film that needs
less photon beams to produce a meaningful reaction to leave a “print”
(called <a href="http://en.wikipedia.org/wiki/Latent_image">latent
image</a>). It's like trying to sculpt on paper with light beams. The
bigger the density (i.e. “thickness”) the more beams you need to
sculpt it.<br />
In digital cameras, the ISO speed is controlled by how the CCD is
calibrated. An engineer specialized in photography could probably
give a more technically detailed response, but this should suffice.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjNdgbV3Bjim0ldS2pXGBie1vpdXA2Uxt-it0WZQarDOR4m6noZ_7Yb1FzPMIRKtXnYZPwiNDG7t2xV-Pl2M1MYwohyphenhyphenAWo1yMIaf50EsDnr48q-0rDmF6bZarF-N44Qm86FA5h3QA26aFy/s1600/free_down.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjNdgbV3Bjim0ldS2pXGBie1vpdXA2Uxt-it0WZQarDOR4m6noZ_7Yb1FzPMIRKtXnYZPwiNDG7t2xV-Pl2M1MYwohyphenhyphenAWo1yMIaf50EsDnr48q-0rDmF6bZarF-N44Qm86FA5h3QA26aFy/s640/free_down.jpg" height="265" width="640" /></a></div>
Picture with noticeable film grain (high ISO). Watch the <a href="http://holygrain.com/downloads.html">original here</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdPgYZf-7RloejQz2LugbfL4vSZXYML0FdlQ3qVCJuW-r9gZammxPiEUtItKyZ0rA0Kr69U8cpeCTHktCQO2b1QplQ9uG0_V30ND6HW5FnmvefaXGmcJuCct0ZAwxZpRaIM9Ga5DUfZBVr/s1600/DSC00814.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdPgYZf-7RloejQz2LugbfL4vSZXYML0FdlQ3qVCJuW-r9gZammxPiEUtItKyZ0rA0Kr69U8cpeCTHktCQO2b1QplQ9uG0_V30ND6HW5FnmvefaXGmcJuCct0ZAwxZpRaIM9Ga5DUfZBVr/s400/DSC00814.JPG" height="300" width="400" /></a></div>
Picture with noticeable noise (high ISO 3200, 6.25ms shutter speed, digital camera)<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEU0CLtbN0NIveBXM6V64Plzd567D_lflv-YuiKb_V3hg2owLFH8wGT53BgunCaBqAgEiPhiop4nKCMb1DNR8SXXPeYm0MHG7GdH-c6j9E-1fMEibJMolUZBZw4aljPTRkdR4D_-ZDbMGq/s1600/DSC00820.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEU0CLtbN0NIveBXM6V64Plzd567D_lflv-YuiKb_V3hg2owLFH8wGT53BgunCaBqAgEiPhiop4nKCMb1DNR8SXXPeYm0MHG7GdH-c6j9E-1fMEibJMolUZBZw4aljPTRkdR4D_-ZDbMGq/s400/DSC00820.JPG" height="300" width="400" /></a></div>
Same picture with almost no visible noise (low ISO 100, 200ms shutter speed, digital camera)<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
You may have realized by now, ISO & Shutter speed are tied. Low shutter speed time will allow less light to go through. As a result, a high ISO is required. ISO & Shutter speed are in fact so tied together, that this is why high ISOs are called "fast".<br />
High shutter speed times on the other hand, will allow plenty of light to go through the sensor/film. If you're not using a low ISO, it can quickly overexpose. This is why low ISOs are called "slow".<br />
<br />
<br />
<h3 class="western">
Aperture</h3>
I won't go into much detail on this one. Basically aperture controls how much the camera opens and lets the light go through. It is measured in f-stop. An f-stop of f/1 makes the lens wide open, while an apperture of f/22 makes the lens to be very tight closed (the area of the circle is smaller).<br />
Apperture controls the depth of field in the camera. Close shots needs wide open lens (apperture close to f/1), while far shots require a tightly closed lens (f as smaller as possible, like f/22)<br />
<br />
Needless to say, a wide open lens allows more light to go through, thus causing less film grain and reducing the need of having longer shutter speeds (reduces motion blur).<br />
A closed lens instead, has very far depth of field but needs more time to gather enough light, thus getting more blurry pictures, or noisier images if you choose a bigger ISO and less shutter speed.<br />
<br />
<b>In terms of rendering, we could say the apperture is controlled indirectly by the value of the far plane, and directly by your depth of field shader effect, if you have one.</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPgYbN2mEsHsi0JY5wS0b-ZltaJJJbrFDeAdwrv_zjziuT1UXx6GQQAtqSlA_aLS2M5ztMqwSQtEv3HXvljiUszK3A1bMSnRyoeEytFutp-HHrlqz_5DPvftgtiU7TQLoT4IfASycavbQc/s1600/HighApperture.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjPgYbN2mEsHsi0JY5wS0b-ZltaJJJbrFDeAdwrv_zjziuT1UXx6GQQAtqSlA_aLS2M5ztMqwSQtEv3HXvljiUszK3A1bMSnRyoeEytFutp-HHrlqz_5DPvftgtiU7TQLoT4IfASycavbQc/s320/HighApperture.JPG" height="300" width="400" /></a></div>
Apperture <b>f / 13 </b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv7Fdn79K_aXVaXjiQEKL-TDR9y1TzX4V6tKJsDBtCHNk5u37TIUBX1TuohFmjS2hWnGGVsKbXRTUJPKn2jkecIwum54Zg0J7DGZExdeO1itZjiheSI8vDM83mQNA-zSRKVJUjwdw8Jgnw/s1600/LowApperture.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiv7Fdn79K_aXVaXjiQEKL-TDR9y1TzX4V6tKJsDBtCHNk5u37TIUBX1TuohFmjS2hWnGGVsKbXRTUJPKn2jkecIwum54Zg0J7DGZExdeO1itZjiheSI8vDM83mQNA-zSRKVJUjwdw8Jgnw/s400/LowApperture.JPG" height="300" width="400" /></a></div>
<div style="text-align: right;">
Apperture <b>f / 14 </b></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: center;">
Both pictures were taken with the same ISO 400 & shutter speed 5ms. Notice how the noise (film grain for analog cameras) in the background is more noticeable with smaller appertures. Click on the picture to enlarge.</div>
<br />
<br />
These three elements, Shutter speed, ISO speed, and Apperture are called the "<a href="http://www.cambridgeincolour.com/tutorials/camera-exposure.htm">exposure triangle</a>"<br />
<br />
<h2>
What we've learned so far</h2>
<ul>
<li><span style="font-size: large;"><b>Film grain and motion blur are inversely proportional.</b></span></li>
<ul>
<li>Film grain is more frequent when using high ISOs.</li>
<li>Film grain is hence also more likely in low light conditions.</li>
<li>But motion blur appears when using low ISOs!</li>
<li>At least one of the games listed at the start is using too much of both effects at the same time!!</li>
</ul>
<li><span style="font-size: large;"><b>Close<span style="font-size: large;">-</span>focused DoF produces less motion blur and less film grain.</b></span> </li>
<ul>
<li>A wider apperture increases the amount of light going through, thus forcing us to reduce the shutter speed and the ISO without their disadvantages.</li>
<li>This is very important if you have a cutscene with DoF. Don't make a close up shot and have lots of blur and film grain.</li>
</ul>
<li><span style="font-size: large;"><b>Far-focused DoF produces <span style="font-size: large;">more</span> motion blur <span style="font-size: large;">and/</span>or more film grain</b></span> </li>
<ul>
<li>A smaller apperture decreases the amount of light going through, thus forcing us to reduce to either increase the exposure time needed (increase shutter speed time -> more motion blur) or increase the ISO (more film grain), or both.</li>
</ul>
<ul>
</ul>
</ul>
Having all effects active can be an artistic touch, but if your goal is aiming towards photorealistic rendering, keep these in mind.<br />
Furthermore we're living in an era where the idea seems to try to blind the player with <a href="http://www.vgcats.com/comics/?strip_id=222">bloom</a>, <a href="http://www.screencuisine.net/hlcomic/index.php?date=2005-10-05">slow hdr eye adaptation</a>, <a href="http://mynameismjp.wordpress.com/2011/06/09/lens-flares/">gigantic lens flares</a>, and almighty god rays (ok I'm guilty of that one).<br />
So.. since DoF is rarely used and knowing that you should lower your motion blur when film grain is kicking in is a good hint, given the same apperture. You don't have to throw everything together to the player to show off how awesome your postprocessing shaders are and how ree3al!! it looks. It's tempting, I know. But please fight it. Turning on every effect you know doesn't make it more realistic.<br />
<br />
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5R8Rfq-PG94EBMIweKqzAI_72dRq45jG-1ZqzfYlz33Tcfubk43Fk1xaH3NKu0Yn3xLv5SiRWBRZX6gJMBw-t-HbK8DVygJE337p_Y6BGG9LksMtuHqA-npeiC02uD026fcoC-hfkPqBH/s1600/DSC00815.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg5R8Rfq-PG94EBMIweKqzAI_72dRq45jG-1ZqzfYlz33Tcfubk43Fk1xaH3NKu0Yn3xLv5SiRWBRZX6gJMBw-t-HbK8DVygJE337p_Y6BGG9LksMtuHqA-npeiC02uD026fcoC-hfkPqBH/s400/DSC00815.JPG" height="300" width="400" /></a></div>
<div style="text-align: left;">
VERY FAST rotating camera. High ISO 3200, 10ms shutter. Notice a lot of noise and some blur</div>
</div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaU5VJPxwAC-irHwgwozqijsVKnIzVjQxuCp8JDb2zE_najee4zedFcjN2ioEIXdM_or9v6LtYd_ldFrpqMagrc14olZQhJSLoI5oGsqItlzyM7jf6fBNzen-evbxo_kw-M_TuaMSfp1St/s1600/DSC00816.JPG" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaU5VJPxwAC-irHwgwozqijsVKnIzVjQxuCp8JDb2zE_najee4zedFcjN2ioEIXdM_or9v6LtYd_ldFrpqMagrc14olZQhJSLoI5oGsqItlzyM7jf6fBNzen-evbxo_kw-M_TuaMSfp1St/s400/DSC00816.JPG" height="300" width="400" /></a></div>
Camera rotating at the same speed, low ISO 100, 333ms shutter. Notice the lack of noise/grain, and extreme motion blurriness.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<h1 class="western">
The motion blur</h1>
Ok, enough with the rant. Back to the original topic, the point of all this is that motion blur is caused by light breaking it's way through the lens to the sensor and <i>adding</i> itself to what's there already.<br />
Note the word "add". I didn't say "average". I said <i><u><b>ADD</b></u></i><br />
Motion blur is additive, not an average. But this is relative, because using a lower ISO is roughly the mathematical equivalent of dividing all images that are going to be added by a constant factor; in which case it starts to look more like an average.<br />
<br />
Let's look at some real camera shots, purposely shaken to enhance the motion blur effect. Notice the <b>light streaks </b>are blurrier than the rest of the image (darker spots) and leave a larger trail.<br />
Most of them were taken with ISO-400<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtyF_At9bHaYN35MLkeV99qlqPE74w3lw2SLOPbc5fd0B47fr36EI_dH8L38C58Yw-bB-_pe3-ztUiikNuC3YUeYWs-Ol5d7ebC0EALpQcL4iBisQT2R-QpjkT3nHnFpJpD0GeaCcdCk6s/s1600/DSC00835.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtyF_At9bHaYN35MLkeV99qlqPE74w3lw2SLOPbc5fd0B47fr36EI_dH8L38C58Yw-bB-_pe3-ztUiikNuC3YUeYWs-Ol5d7ebC0EALpQcL4iBisQT2R-QpjkT3nHnFpJpD0GeaCcdCk6s/s320/DSC00835.JPG" height="240" width="320" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtqR-snLiyT9nEIUQKEHuLq_u95Oi9eSNVpPl4rjh6GUMxS_K8NSFTQA2T0SJdn_yUZ0rR-09-CIFSbYpaK4nRoY3-L7LWtJEdHQ2QL8eLJbPxo0bNGYzwUpu-oMj0VoF3567i7H2zAhmr/s1600/DSC00833.JPG" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtqR-snLiyT9nEIUQKEHuLq_u95Oi9eSNVpPl4rjh6GUMxS_K8NSFTQA2T0SJdn_yUZ0rR-09-CIFSbYpaK4nRoY3-L7LWtJEdHQ2QL8eLJbPxo0bNGYzwUpu-oMj0VoF3567i7H2zAhmr/s320/DSC00833.JPG" height="240" width="320" /></a>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrLMKTC4ap-cNY5TRn7YZneRTxAGn_Nu5anlG_lnUWWZWnY1sX2du-xa8DdBDHOu5vjI5EB1BZqfkimFClFwXXK_2MkFumOQot-MUStf0gp9BVFCerc__nT7bLXD18gBZZSIGBkVrLqNZ/s1600/DSC00843.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHrLMKTC4ap-cNY5TRn7YZneRTxAGn_Nu5anlG_lnUWWZWnY1sX2du-xa8DdBDHOu5vjI5EB1BZqfkimFClFwXXK_2MkFumOQot-MUStf0gp9BVFCerc__nT7bLXD18gBZZSIGBkVrLqNZ/s400/DSC00843.JPG" height="300" width="400" /></a></div>
<br />
Now let's try to mimic that effect. I will try to present a different blending formula that tries to emulate that behavior. Note: This is an empirical method based on observation, I haven't based the formula in some mathematical or physically accurate model.<br />
<br />
Below is the typical motion blur postprocessing formula:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1_BmiIHcWtLrUUQET_sTuchb9JVHwb4WGzvrR0TaKSrIHVUSWakGl98Wnvf4TmjbTGwbJWgWVY_6-W3uMrZka0PW3GHs86tSHkFjB-5AuumsJTrTThH_qG3ZfY7vNhskauS9WtJZTL41D/s1600/Formula01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1_BmiIHcWtLrUUQET_sTuchb9JVHwb4WGzvrR0TaKSrIHVUSWakGl98Wnvf4TmjbTGwbJWgWVY_6-W3uMrZka0PW3GHs86tSHkFjB-5AuumsJTrTThH_qG3ZfY7vNhskauS9WtJZTL41D/s640/Formula01.png" height="166" width="640" /></a></div>
Where:<br />
<ul>
<li>RGB is the final output.</li>
<li>HDR() is the hdr tonemapping operation</li>
<li>x is the current pixel location (whether in texels or pixels)</li>
<li>v is the velocity vector</li>
<li>n is the number of sample steps</li>
<li>pixel[] is the pixel being addressed. </li>
<li>f() is the motion blur operation</li>
</ul>
<br />
<br />
While this is a more correct (IMHO) motion blur formula:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmSTdmFLVCxaPfboZb5kDtHsl35iT8hu0Zjy5A-eOP3C-Yl2MoHfSPr_oJatTpno7qm7VoEoYSu0FBE18JwviBFiboNRtwlLRyrYah2mE8ccJX0p9mtr75_ySAAv8Ci2SRAkzClvIvl-M8/s1600/Formula02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgmSTdmFLVCxaPfboZb5kDtHsl35iT8hu0Zjy5A-eOP3C-Yl2MoHfSPr_oJatTpno7qm7VoEoYSu0FBE18JwviBFiboNRtwlLRyrYah2mE8ccJX0p9mtr75_ySAAv8Ci2SRAkzClvIvl-M8/s640/Formula02.png" height="232" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Where:<br />
<ul>
<li>RGB is the final output.</li>
<li>HDR() is the hdr tonemapping operation</li>
<li>x is the current pixel location (whether in texels or pixels)</li>
<li>v is the velocity vector</li>
<li>n is the number of sample steps</li>
<li>p[] is the pixel being addressed. </li>
<li>C is a constant factor in the range (0; 1]</li>
<li>
D is a constant factor in the range (0; 1], typically 1-C</li>
<li>f() is the motion blur operation</li>
</ul>
<blockquote class="tr_bq">
Note: I used the X and * signs indistinctly for multiplication. It was an inconsistency typo. There are no cross products involved.</blockquote>
<h3>
Some notable differences & remarks:</h3>
1. HDR is done <i>after</i> the motion blur. This ensures that the motion blur result stays in the correct range when C != n. This also matches a real life camera closer.<br />
<br />
2. C is a constant (arbitrary) factor to simulate the ISO speed. When C = n, it's a simple average.<br />
<br />
3. D is a constant (arbitrary) factor to simulate the shutter speed speed. Normally it should be inversely proportional to C. So probably either D = 1 - C or D = 1 / (C + 1) <br />
<br />
4. C is inside the loop. Although putting it outside could be considered a performance optimization, take in mind you're adding hdr values. If you're using real life values, the sky can easily have large numbers like "5000". Just using a R16FG16FB16F render target with a surprisingly not very high step count can easily overflow the result to infinity.<br />
You'll most likely blur all samples in one pass and convert them to 32-bit floats, thus you can safely put C outside. But if you're in DX 9.0 hardware, beware of not using half, otherwise some hardware (G60, G70, Intel cards) will perform the arithmetic in F16 precision (overflow) while other hardware (G80+, Radeon HD 2000+) will always perform the arithmetic in F24 or F32 precision (no apparent overflow)<br />
<br />
5. For similar reasons in 4.; you may want to clamp the result before outputting the float to the render target. Chances are, you're going to do another pass to calculate the average luminance in order to perform the HDR tone mapping, you probably don't want to overflow to infinity.<br />
Because not all 16-bit float GPUs are IEEE compliant, clamp to sane high value, like 64992, or 32000 (should be multiple of 32).<br />
<br />
6. Clamping to avoid overflow is not a bad thing per-se. If you notice the three pictures earlier, one of them has a highly saturated light source the camera can't handle, unless I use a lower ISO. In a similar fashion, just use a lower C value to allow HDR to gracefully handle the saturation.<br />
<br />
<h3>
Nothing new</h3>
This isn't new, nor is rocket science. In fact, <a href="http://www.crytek.com/cryengine/presentations/secrets-of-cryengine-3-graphics-technology">Crysis 2 talks about it in SIGGRAPH 2011</a> ("Secrets of CryEngine 3 Graphics technology") that their motion blur is done in linear space before
tone mapping, using 24 taps for in PC, 9 taps in consoles; and says
“Bright stakes are kept and propagated” citing Debevec 1998.<br />
Obviously, I wasn't the first one to notice the order of
operations was wrong.<br />
<br />
The reason of why it works is quite obvious. In an extremely bright scene with some extremely dark objects, Blurring two bright pixels: 5000 + 5000 = 10000; while blurring one dark with one bright: 5000 + 10 = 5010; which is almost the same pixel it was before.<br />
When blurring the two dark pixels, 10 + 10 = 20. Which is 100% different, very blurry. However if the scene is very bright, it will favour all pixels with >very high luminance because of the avg. luminance.<br />
After tonemapping, the bright pixels 10000 will map to the value "1"; the not-as-bright pixels 5010 & 5000 will both map to roughly the same value (~0.5) and the dark pixels 10 & 20 will probably map to the exact same low value due to rounding, which you won't notice the difference (0.00392 ~ 0.00784 if you're using an RGBA8888 framebuffer)<br />
<br />
<h2>
Where's the sample code? Results?</h2>
Unfortunately, I'm too busy on too many projects right now to be testing this formula. I'm usually not keen on releasing something without proof (besides it convinces people quickly!) A test application would require me to implement vector based motion blur, DoF & HDR. I've done these several times in the past, but for different clients under NDAs, so I would have to make another one from scratch. And due to my motion sickness with this particular effect, I have never been been much interested in vector based motion blur to begin with.<br />
I've only got into this when I saw that every game I've been shown lately is shipping with this horrible effect, so I felt I needed to write something about it. 5 years ago it could be turned off because it was too expensive for most GPU cards, so the option was there. But it appears today consumer cards are able to handle this effect with no problem, thus less games allow the effect to be turned off.<br />
As much as I admire Wolgang Engel (who wrote the D3D10 book, and
also worked on Alan Wake) and Emil Persson (who worked on Just Cause
2), I cannot stand that horrible motion blur effect going on there.<br />
<br />
What Crytek is doing is probably not very different from this approach, and they do have pictures and a working implementation that may be worth watching. <br />
<br />
<a href="http://www.paradise-studios.net/">I know someone</a> who's recently implemented his own version of v-based motion blur, so I may be able to convince to try this approach instead and share the results.<br />
<br />
If the math formula jargon scared you away, here's a Cg implementation so you can understand. Warning: Untested code.<br />
<br />
<style scoped="" type="text/css">
.codebox
{
border: 2px solid green ;
background-color: #CCCCCC;
}
</style>
<br />
<div class="codebox">
<span style="color: black;">
<span style="color: #38761d;">//Remember to do the hdr tonemapping AFTER you've done the motion blur. rtTex is assumed to be sampled in linear space. Do *not* compile this code with a flag that turns all float into half; unless you move the multiplication against isoFactor inside the loop.</span><br />
<span style="color: blue;">float4</span> motionBlur( <span style="color: blue;">float2</span> uv, <span style="color: blue;">uniform sampler2D</span> rtTex, <span style="color: blue;">uniform sampler2D</span> rtVelocities, <span style="color: blue;">int</span> numSteps, <span style="color: blue;">float </span>isoFactor, <span style="color: blue;">float </span>shutterFactor )<br />
{<br />
<span style="color: blue;">float4</span> finalColour = 0.0f;<br />
<span style="color: blue;">float2</span> v = tex2D( rtVelocities, uv ).xy;<br />
<span style="color: blue;">float </span>stepSize = shutterFactor / numSteps;<br />
<span style="color: blue;">for</span>(<span style="color: blue;"> int</span> i = 0; i < numSteps; ++i )<br />
{ <br />
<span style="color: #38761d;">// Sample the color buffer along the velocity vector. </span><br />
finalColour += tex2D( rtTex, uv );<br />
uv += v * stepSize;<br />
} <br />
<br />
<span style="color: #38761d;">//Clamp the result to prevent saturation when stored in 16 bit float render targets.</span><br />
<span style="color: blue;">return</span> min( finalColour * isoFactor, 64992.0f );<br />
}</span></div>
Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com5tag:blogger.com,1999:blog-5914419889815086738.post-33264278291769722332013-02-16T13:27:00.001-03:002013-02-16T13:31:16.704-03:00Premultiplied Alpha: Online Interactive demoSo, how does it work? Just move the sliders. Premultiplied alpha
blending on the left, regular alpha blending on the right. It requires HTML5, you
should use a good browser like Firefox 18, Chrome or Opera 12.<br />
<link href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" rel="stylesheet"></link>
<script src="http://code.jquery.com/jquery-1.8.3.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<script>
function hexFromRGB(r, g, b) {
var hex = [
Math.floor(r).toString( 16 ),
Math.floor(g).toString( 16 ),
Math.floor(b).toString( 16 )
];
$.each( hex, function( nr, val ) {
if ( val.length === 1 ) {
hex[ nr ] = "0" + val;
}
});
return hex.join( "" ).toUpperCase();
}
function refreshSwatch() {
//First the backgrounds
var red_bg = $( "#bgR" ).slider( "value" ),
green_bg = $( "#bgG" ).slider( "value" ),
blue_bg = $( "#bgB" ).slider( "value" ),
hex_bg = hexFromRGB( red_bg, green_bg, blue_bg );
$( "#swatch_bg" ).css( "background-color", "#" + hex_bg );
$( "#swatch_bg_alpha" ).css( "background-color", "#" + hex_bg );
//Now foregrounds
var red = $( "#fgR" ).slider( "value" ),
green = $( "#fgG" ).slider( "value" ),
blue = $( "#fgB" ).slider( "value" ),
alpha = $( "#fgA" ).slider( "value" ) / 255.0;
//Emulate premultiplied alpha
var final_r = Math.min( 255, red + red_bg * (1 - alpha) ),
final_g = Math.min( 255, green + green_bg * (1 - alpha) ),
final_b = Math.min( 255, blue + blue_bg * (1 - alpha) ),
hex_premul = hexFromRGB( final_r, final_g, final_b );
$( "#swatch" ).css( "background-color", "#" + hex_premul );
//Emulate alpha blending
final_r = Math.min( 255, red * alpha + red_bg * (1 - alpha) );
final_g = Math.min( 255, green * alpha + green_bg * (1 - alpha) );
final_b = Math.min( 255, blue * alpha + blue_bg * (1 - alpha) );
var hex_alpha = hexFromRGB( final_r, final_g, final_b );
$( "#swatch_alpha" ).css( "background-color", "#" + hex_alpha );
}
$(function() {
$( "#fgR, #fgG, #fgB, #fgA, #bgR, #bgG, #bgB" ).slider({
orientation: "vertical",
range: "min",
max: 255,
value: 127,
slide: refreshSwatch,
change: refreshSwatch
});
$( "#fgR" ).slider( "value", 255 );
$( "#fgG" ).slider( "value", 140 );
$( "#fgB" ).slider( "value", 60 );
$( "#fgA" ).slider( "value", 255 );
$( "#bgR" ).slider( "value", 255 );
$( "#bgG" ).slider( "value", 255 );
$( "#bgB" ).slider( "value", 255 );
});
</script>
<br />
<div>
<style scoped="" type="text/css">
.group {
float: left;
width: 200px;
height: 200px;
margin: 15px;
}
.group2 {
float: left;
width: 240px;
margin: 5px;
}
#fgR, #fgG, #fgB, #fgA, #bgR, #bgG, #bgB {
float: left;
width: 15px;
height: 150px;
margin: 15px;
}
#swatch, #swatch_alpha {
width: 50%;
height: 50%;
margin-top: 18.75%;
margin-left: 25%;
background-image: none;
border-radius: 20px;
z-index:1;
}
#swatch_bg,#swatch_bg_alpha {
float: left;
width: 240px;
height: 200px;
margin-top: 18px;
margin-left: 0px;
background-image: none;
border-radius: 30px;
position:relative;
z-index:0;
}
.clear{
clear: left;
}
#fgR .ui-slider-range { background: #ef2929; }
#fgR .ui-slider-handle { border-color: #ef2929; }
#fgG .ui-slider-range { background: #8ae234; }
#fgG .ui-slider-handle { border-color: #8ae234; }
#fgB .ui-slider-range { background: #729fcf; }
#fgB .ui-slider-handle { border-color: #729fcf; }
#fgA .ui-slider-range { background: #cccccc; }
#fgA .ui-slider-handle { border-color: #cccccc; }
#bgR .ui-slider-range { background: #ef2929; }
#bgR .ui-slider-handle { border-color: #ef2929; }
#bgG .ui-slider-range { background: #8ae234; }
#bgG .ui-slider-handle { border-color: #8ae234; }
#bgB .ui-slider-range { background: #729fcf; }
#bgB .ui-slider-handle { border-color: #729fcf; }
</style>
<br />
<div class="group">
<div class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding: 4px;">
<span class="ui-icon ui-icon-pencil" style="float: left; margin: -2px 5px 0 0;"></span>
Foreground
</div>
<div id="fgR">
</div>
<div id="fgG">
</div>
<div id="fgB">
</div>
<div id="fgA">
</div>
</div>
<div class="group">
<div class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding: 4px;">
<span class="ui-icon ui-icon-pencil" style="float: left; margin: -2px 5px 0 0;"></span>
Background
</div>
<div id="bgR">
</div>
<div id="bgG">
</div>
<div id="bgB">
</div>
</div>
<div class="clear">
</div>
<div class="group2">
<div class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding: 4px;">
Premultiplied Alpha</div>
<div class="ui-widget-content ui-corner-all" id="swatch_bg">
<div class="ui-widget-content ui-corner-all" id="swatch">
</div>
</div>
</div>
<div class="group2">
<div class="ui-state-default ui-corner-all ui-helper-clearfix" style="padding: 4px;">
Regular Alpha blending</div>
<div class="ui-widget-content ui-corner-all" id="swatch_bg_alpha">
<div class="ui-widget-content ui-corner-all" id="swatch_alpha">
</div>
</div>
</div>
</div>
<div class="clear">
</div>
<br />
<div style="text-align: right;">
<span style="font-weight: normal;">Not showing up? Try downloading the <a href="http://sites.google.com/site/darksylinc/home/PremultipliedAlphaDemo.tar.bz2?attredirects=0&d=1">offline version</a>.</span></div>
<br />
<h2 class="western">
What is premultiplied alpha?</h2>
There's a lot of resources about it, but they're all too technical
and not artist-friendly. Still a good read, namely:<br />
<ul>
<li><a href="http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx">http://blogs.msdn.com/b/shawnhar/archive/2009/11/06/premultiplied-alpha.aspx</a><br />
</li>
<li><a href="http://blogs.msdn.com/b/shawnhar/archive/2009/02/17/motogp-particles.aspx">http://blogs.msdn.com/b/shawnhar/archive/2009/02/17/motogp-particles.aspx</a><br />
</li>
<li><a href="http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[Premultiplied%20alpha]]">http://home.comcast.net/~tom_forsyth/blog.wiki.html#[[Premultiplied%20alpha]]</a><br />
</li>
<li><a href="http://www.teamten.com/lawrence/graphics/premultiplication/">http://www.teamten.com/lawrence/graphics/premultiplication/</a><br />
</li>
<li><a href="http://www.quasimondo.com/archives/000665.php">http://www.quasimondo.com/archives/000665.php</a><br />
</li>
</ul>
<b>Long story short:</b><span style="font-weight: normal;"> It's a
different way of doing transparency, which looks better, removes
those ugly black edges that sometimes appear in alpha blended images,
naturally behaves more like transparency does in the real world,
compresses better when using DXT1, and is also very useful to perform
neat tricks in particle personal effects to save performance. Also,
some people (including myself) believe premultiplied alpha is the
</span><i><span style="font-weight: normal;">right way </span></i><span style="font-style: normal;"><span style="font-weight: normal;">of
performing alpha blending.</span></span><br />
<div style="font-weight: normal;">
Does it have disadvantages? Yes, it's
harder to understand at first, and some textures may undergo quality
degradation when not using dxt compression. But seriously, those are
very small prices to pay for huge advantages. It's a win win.</div>
<br />
Coincidentally, NVIDIA came with an
interesting article
<a href="https://developer.nvidia.com/content/alpha-blending-pre-or-not-pre">https://developer.nvidia.com/content/alpha-blending-pre-or-not-pre</a>
at the time of writing. However, they make emphasis on the filtering
artifacts, while I'll be focusing in another point.
<br />
<br />
<h2 class="western">
Why it behaves more “natural” to real life</h2>
To answer that question, we need to compare how both methods work:<br />
<br />
<h3 class="western">
How regular alpha blending works:</h3>
Regular alpha blending is easier to understand than premultiplied
alpha. In regular alpha blending, take a value called “alpha” and
mix two colours. Alpha of 0% means background is fully shown and
foreground is fully transparent. Alpha of 50% means half background,
half foreground then mix together. Alpha 100% means foreground is
fully opaque, the background is being occluded. Easy piecy<br />
<br />
<h3 class="western">
How premultiplied alpha blending works</h3>
Premul. alpha just doesn't work like that. “Transparency” is
no longer controlled by one value. <b>It's controlled by all four</b>
(RGBA)<br />
This is because Alpha only controls “how opaque” the surface
is. But <b>not being opaque does not mean it's transparent!</b><br />
<br />
<div style="text-align: center;">
Take a moment, breath in,
breath out. Relax. Now think it again, “not being opaque does not
mean it's transparent”</div>
<div style="text-align: center;">
<br /></div>
<span style="font-weight: normal;">
At this moment you may be thinking
“Whaaaa??” -Ok let me give you an example. Think of light shafts
going through a window. You can see the light. But the light isn't
opaque, yet you're seeing it, so it can't be transparent either. This
is the same. This happens because the light beam isn't blocking the
incoming light from it's background (it isn't opaque) but it also
contributes with it's own light (hence it's not transparent)</span>
<span style="font-size: x-small;"><br />Well
technically it is blocking some light, but just some and besides,
premul. alpha can mimic this too</span>
<br />
<blockquote class="tr_bq">
Premultiplied alpha works with the concept that when alpha = 0,
the surface is no longer opaque, so <b>it contributes</b> light to
the scene. In photoshop terms, when alpha = 0, it's the same as
having the layer blending mode set to “add”.<br />
<b>In order to be fully transparent, alpha has to be 0, but also
the RGB colour has to be black</b><span style="font-weight: normal;">,
so that it doesn't contribute any light either.</span><br />
<div style="font-weight: normal;">
The bigger the alpha, the more it
blocks incoming light from behind, however it never stops
contributing/adding light unless you turn the RGB down.</div>
</blockquote>
<div style="font-weight: normal;">
Get it?</div>
No? Ok let's see some pictures:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibdCUXDFBeTY6GCMYVvyXBWgiPR2UaH5CzgH1MdJiyUHtJCJ5FngtCQOVL6_Ww9y2LNy9wdRLwKyuQqr6f3vtcRUZz7yGc2LHNfskKBYqsbYZaIwiKrnV_P1vbMH1zKrjalsWTBR5FnP-H/s1600/01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibdCUXDFBeTY6GCMYVvyXBWgiPR2UaH5CzgH1MdJiyUHtJCJ5FngtCQOVL6_Ww9y2LNy9wdRLwKyuQqr6f3vtcRUZz7yGc2LHNfskKBYqsbYZaIwiKrnV_P1vbMH1zKrjalsWTBR5FnP-H/s640/01.png" width="594" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjYPKqWB4nCcH2pIg7I6B_EUQHDw4rmvzJKZ7zhSdlKmoY_5n93L42ktujMcx4Y_T9NrHPtPV90uYAuW8oo-cqBR4SrTmNnZt5GA9d8IQdJCH_eFmX0R6EIkCeq7zLnrrJgvQx9XxXU3uU/s1600/01_b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjYPKqWB4nCcH2pIg7I6B_EUQHDw4rmvzJKZ7zhSdlKmoY_5n93L42ktujMcx4Y_T9NrHPtPV90uYAuW8oo-cqBR4SrTmNnZt5GA9d8IQdJCH_eFmX0R6EIkCeq7zLnrrJgvQx9XxXU3uU/s640/01_b.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV350-74pouQOYHhBlo6fYaglrgxinbNgN1dfI9sC-PWCngG0Yls4a8dMciveHlvFT5SVJmdXw6GunOX39oVGSgZucbqDmelRcZVGL2fpDwTqoZDy86IHPo_ZAPhvHJv5UcmIjxFLx3Dp_/s1600/02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="578" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV350-74pouQOYHhBlo6fYaglrgxinbNgN1dfI9sC-PWCngG0Yls4a8dMciveHlvFT5SVJmdXw6GunOX39oVGSgZucbqDmelRcZVGL2fpDwTqoZDy86IHPo_ZAPhvHJv5UcmIjxFLx3Dp_/s640/02.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ew_HEiT3UmKNx0yVAb3cnxmOmsfac7cF_8jGr6YqUvJgse9M0p_5u7q2YhPK3p0aEaNZHmGWPVGKV0CcbuV4kCHTSsFq8_zn3eJ-9PfbDrhEbl5gzn0yC7UzLXq1mJC0IN4R6rwBpUEN/s1600/03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="596" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2ew_HEiT3UmKNx0yVAb3cnxmOmsfac7cF_8jGr6YqUvJgse9M0p_5u7q2YhPK3p0aEaNZHmGWPVGKV0CcbuV4kCHTSsFq8_zn3eJ-9PfbDrhEbl5gzn0yC7UzLXq1mJC0IN4R6rwBpUEN/s640/03.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2f2gVEyVM9Ww_KjcDGf-7ZKPwKHqrpSMLasud_WXHnu3SKm4GhyphenhyphenpeJ5if5vhTFH4s6YT0m0aZIfVXGOj4sVTRYXlJbELBwjVmKP3WipU0HwgiLoqhIkuLI4BTWXVO0P5-WEbl0nfPLmg-/s1600/04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2f2gVEyVM9Ww_KjcDGf-7ZKPwKHqrpSMLasud_WXHnu3SKm4GhyphenhyphenpeJ5if5vhTFH4s6YT0m0aZIfVXGOj4sVTRYXlJbELBwjVmKP3WipU0HwgiLoqhIkuLI4BTWXVO0P5-WEbl0nfPLmg-/s640/04.png" width="624" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJcqovQOyt43BeKLR3HOycitZfmxHLfcBw2Uw2jC9c3Z8NxRANTLV3N1ICrTORJNnzAicG7R1HlADmiS19UIUiGx9jLpn_qL2g-piQUZtl5PCfh0t93RGRic6bolyg3ngvA0LeNMQDFOtr/s1600/05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJcqovQOyt43BeKLR3HOycitZfmxHLfcBw2Uw2jC9c3Z8NxRANTLV3N1ICrTORJNnzAicG7R1HlADmiS19UIUiGx9jLpn_qL2g-piQUZtl5PCfh0t93RGRic6bolyg3ngvA0LeNMQDFOtr/s640/05.png" width="574" /></a></div>
<br />
<br />
<div style="font-weight: normal;">
In photorealistic rendering, the best results are achieved with HDR, because the
whole “I block half of the background and contribute my own light”
effect can be appreciated more easily.<br />
<blockquote class="tr_bq">
<b>Example:</b> A premultiplied alpha
window from a house is contributing some light, when looked from
outdoors in a bright day the window will appear opaque, because the
window's contributing lighting is higher than the light from inside
passing through it.<br />
However when looking from indoors, the window looks almost
transparent, because the light coming from outside is higher than the
window's own light. Coincidentally this matches real world behavior,
where you can't look what's in the other side of the window if the
brightness in your end is much higher than the brightness on the
other side.</blockquote>
Regular alpha blending can't match this by a long shot. You will
always get 50% window's own colour + 50% what's behind it, or
whatever the alpha ratio is, the result will be completely unnatural
and unrealistic. In worst cases it will blow up your automatic exposure adjustment because averaging completely distorts the actual luminance the object should be using.</div>
<br />
<br />
<br />
<br />
<div style="font-weight: normal;">
What's inside the darker room? Who knows. All I see is a window (try to ignore the reflection, sorry I couldn't take a better screenshot).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhEdcPkPPXYWKS4CyCLbsbSaHSHObtpPGwkzxIcD1Yf0P0bUt9puKwv73DS0_-ibAs7cRxKWygSKOP8TdvIC67DXiKi4BF12_5QsT7dL88z3owPIT4n4k4P4n0FyHGWU_rCte9VmQAi9m/s1600/IMG_1451.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhEhEdcPkPPXYWKS4CyCLbsbSaHSHObtpPGwkzxIcD1Yf0P0bUt9puKwv73DS0_-ibAs7cRxKWygSKOP8TdvIC67DXiKi4BF12_5QsT7dL88z3owPIT4n4k4P4n0FyHGWU_rCte9VmQAi9m/s640/IMG_1451.JPG" width="640" /></a></div>
<br />
<br />
What's outside in the bright outdoor? That's crystal clear!</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhndvAXFMwN8bhtWGD5tblGIbH9R_Sf6-dO7oIiXdpyRTMCU6SQQaWmZ3AkBN5h2JgXiHyo2Il4NPdW7zgEIQ6DEC8pX90CBLRRG44WFGekSzuE9YPT3CG5IbbDHxHPuUwXqmAa0ka4ZWKq/s1600/IMG_1444.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhndvAXFMwN8bhtWGD5tblGIbH9R_Sf6-dO7oIiXdpyRTMCU6SQQaWmZ3AkBN5h2JgXiHyo2Il4NPdW7zgEIQ6DEC8pX90CBLRRG44WFGekSzuE9YPT3CG5IbbDHxHPuUwXqmAa0ka4ZWKq/s640/IMG_1444.JPG" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcgE32fHxReOIaO_SKNpojzyQa2YojV4CQSIJb9Abr-JLYOIsvGuvPH201yHM_7E6S3ZTZTeU1jdDUaAd7FnVc2SAtroumXM_9Rk7bDuar8RXccKtCq9ICzfad2l_No2MH7zcaM3MLsILY/s1600/IMG_1444.JPG" imageanchor="1"><br /></a></div>
<br />
This picture was taken with my camera. I admit I should've cleaned the window, but it makes a perfect example on how to use premultiplied alpha effectively:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwTPmbnDLSb5qrHsM4EEd_wVYPsXyFubmWoHu4NrryRSUpLi8ZiC-33X0kXBiS8cDsjzd4k80QzyJ2IrnsjK8cZhsOspH4zZzhY60l_j-oJ1y3hJ2P4K9dYT7YvkoMhIreDQRQbEdtL6h/s1600/IMG_1454.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFwTPmbnDLSb5qrHsM4EEd_wVYPsXyFubmWoHu4NrryRSUpLi8ZiC-33X0kXBiS8cDsjzd4k80QzyJ2IrnsjK8cZhsOspH4zZzhY60l_j-oJ1y3hJ2P4K9dYT7YvkoMhIreDQRQbEdtL6h/s640/IMG_1454.JPG" width="640" /></a></div>
<br />
When the specular component is very high (depends on view angle and sun's position) the dirt spots will appear bright, making the window very dirty (while the clean spots will remain clean). However when the specular component is very low, all spots, whether clean or not, will almost be transparent, giving the illusion of a clean window. Which is exactly how real life works.<br />
<br />
<br />
<div style="font-weight: normal;">
So that's about it (artist friendly explanation). I'll let you keep
playing with the interactive online demo above.<br />
Experiment on how the alpha slider affects the “opaqueness”
without affecting it's transparency, and compare the result with
regular alpha blending.</div>
<br />
<br />
<br />
<h2 class="western">
When is alpha blending useful</h2>
<div style="font-weight: normal;">
Regular alpha blending is still useful. Like I said, it's easier
to imagine and visualize. It's usually great for GUI & icon
design. Also, fade in & out becomes harder when you have to tweak
all RGBA sliders at the same time instead of just fading one. For these types of jobs, regular alpha blending "just works"</div>
<br />
<br />
<h2 class="western">
Other neat tricks</h2>
<div style="font-weight: normal;">
This has been repeated to death. So I will be brief.<br />
Being able to switch between being opaque and additive blending is
a very neat property. The most common example is fire. Fire is by
nature fully additive (alpha = 0) while the smoke it emits is almost
completely opaque (alpha close to 1).<br />
All it takes is to fade the alpha value close to 1 and we get fire
effects that darkens until it becomes smoke; for free (no need for a
2nd draw call, render state change, or another texture) This is
purely a performance optimization. And also a pretty handy ability,
since it's easier to tweak & animate the alpha value in most
particle effects middleware than adding a second spawner/emitter or a
texture change.<br />
Another neat property is that premul. alpha doesn't produce black
halos surrounding the edges. The reason behind this is very
technical, so I won't explain why, you just need to know what it
does, not why it works.</div>
<br />
<br />
<br />
<br />
<span style="font-size: large;">Quick! Spread the word, and hopefully some day
everyone will be using premultiplied alpha. And bug your technical
artist if the game engine doesn't use it. Are you already a
programmer? Then read the goddam links at the beginning. Don't be
lazy!</span>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com2tag:blogger.com,1999:blog-5914419889815086738.post-74534291223510226122013-02-06T14:59:00.000-03:002013-02-27T00:10:09.603-03:00Polycount vs Vertex count<div style="margin-bottom: 0cm; text-decoration: none;">
I was asked this
question too often by junior artists, so I should address it. There
is some talking about in <a href="http://wiki.polycount.com/PolygonCount">Polycount.com</a>
but I should make it very clear.<b>This article has mainly been written for artists<u><br /></u></b></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
<h2 class="western">
How I should measure the cost of my models, by
polycount, triangle count??</h2>
Short answer: <b>VERTEX COUNT!!! </b>The poly- or triangle
count says <strike>nothing</strike> very little about the cost of your model.<br />
<div style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal;">
Long answer: For GPUs, all that
matters is how many vertices need to be processed, and how much of
the screen the triangle will be covering.</div>
<div style="font-weight: normal;">
It's true that 4 vertices may form 2
triangles, or it may form up to 4 triangles (i.e. overlapping each
other) and the latter will cause the GPU to process the same 4
vertices more times. However modern GPUs have large enough caches
that will store the result of the vertex, making this problem
meaningless. Any decent exporter (or even the modeling application)
will be arranging the vertices in a cache-friendly way. It's not
something the artist has to worry about.</div>
If the exporter isn't
rearranging the vertices, introduce your tools programmer to the
wonderful <a href="http://developer.amd.com/resources/archive/archived-tools/gpu-tools-archive/amd-tootle/">AMD
Tootle</a><br />
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
As for N-Gons, it is just for
Maya/Max/Blender. It eases modeling and textures for the artist, but
when it's exported to a game engine, <b>everything is
converted to triangles</b>. Everything, even quads.<br />
<div style="font-weight: normal;">
That's because all the GPU can process
are triangles. GPUs that can natively render quads haven't been
popular since the Sega Saturn.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
<h2 class="western">
What if told you, a cube can be made with 36
vertices, 24 vertices, or 8?</h2>
The vertex count that Max/Maya/Blender show you is not the vertex
count that really cares, although sometimes it can be a rough
estimate times a factor (that factor will depend on each model)<br />
For example, Nathan's model from Distant Souls is 12.959 vertices
in Blender (22.876 tris for those not yet used to it), but once
exported it's 14.003 vertices.<br />
<br />
<br />
So, why is that? Because every time there is a <b>discontinuity</b> between two triangles, <i><b>the vertex must be duplicated</b></i>. Normals are stored per vertex, not per face. Strong differences between the normals of two faces means the same vertex has two different normals, which equals two duplicated vertex: Same position, different normal.<br />
<div style="font-weight: normal;">
Let's take a look at the following
cube, it's 8 vertices, and 6 faces (obviously!):</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVdTj2yxP1V_eFpnCI0XYj42mqCOgpIeFq6Y2dIO-CKtBOqzYFIwnu4-HGBV5Ig-u0IId82-Mrc825Vj2fQD4EFcccUxdkBjC2BRsVssDTMPPaoSjDHiXm1l5Kk51I5kfQprRjMhI8fgq/s1600/Cube01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="439" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIVdTj2yxP1V_eFpnCI0XYj42mqCOgpIeFq6Y2dIO-CKtBOqzYFIwnu4-HGBV5Ig-u0IId82-Mrc825Vj2fQD4EFcccUxdkBjC2BRsVssDTMPPaoSjDHiXm1l5Kk51I5kfQprRjMhI8fgq/s640/Cube01.png" width="640" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="font-weight: normal;">
So, you would assume that's 8
vertices, right? Guess again. If exported correctly, it should be 24.
If badly exported, it will be 36.</div>
<div style="font-weight: normal;">
Let's see bad case, how it could be 36 vertices:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuf8cDo6RjHIKf0v17KtWs5ojQoJMdlYjT6MCNqkeGco6Q1dht9eHL2v4kCOd0E_8lyoxMobRSg5FAGfNTSjggICrewzIgw6tLF19V2O6m72IYuAw-7bq6yF5iblGtn7GA5cjjk6zRKIjj/s1600/Cube02_a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuf8cDo6RjHIKf0v17KtWs5ojQoJMdlYjT6MCNqkeGco6Q1dht9eHL2v4kCOd0E_8lyoxMobRSg5FAGfNTSjggICrewzIgw6tLF19V2O6m72IYuAw-7bq6yF5iblGtn7GA5cjjk6zRKIjj/s640/Cube02_a.png" width="640" /></a></div>
<div style="font-weight: normal;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgJY09fIyvmPD4t99kZyVlM-s9VnvmgwoVvdyguJYLWa66GeTl4uEV-hovyK0e2filKtlb36Us5JBny7clSh-JMMVwRD_IIeUAdTTHxpwsFqTat7fLBl5tC69LTNPFvYNxsiIBPKzHJz0A/s1600/Cube02_b.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgJY09fIyvmPD4t99kZyVlM-s9VnvmgwoVvdyguJYLWa66GeTl4uEV-hovyK0e2filKtlb36Us5JBny7clSh-JMMVwRD_IIeUAdTTHxpwsFqTat7fLBl5tC69LTNPFvYNxsiIBPKzHJz0A/s640/Cube02_b.png" width="640" /></a></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
<div style="font-weight: normal;">
The exporter sees we're using flat
shading/hard edges, so it just goes the easy routes and makes one
vertex for each triangle. Quick 'n dirty. The cube has 6 faces, 2
triangles per face. That means 12 triangles. Because there are 3
vertices per triangle, 12x3 = 36</div>
<blockquote class="tr_bq">
<div style="font-weight: normal;">
6 faces x 2 triangles per face x 3 vertices per face = 36</div>
</blockquote>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
<div style="font-weight: normal;">
But let's get a little smarter, we can
reuse a few vertices:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Gf9wndIhXdrb3GwAXRYgYYYb7ytxIezSs3ZcxEW2ROl5LFiXx_O8UnDbmDuvDxoe6INN8YU5Hhrk_w3k9LH0jx-Hpz0L1cee-mIDTcOh5tZpILwIIxJh4IXU3CwvnX8x69OyuamF3QAJ/s1600/Cube03_a.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8Gf9wndIhXdrb3GwAXRYgYYYb7ytxIezSs3ZcxEW2ROl5LFiXx_O8UnDbmDuvDxoe6INN8YU5Hhrk_w3k9LH0jx-Hpz0L1cee-mIDTcOh5tZpILwIIxJh4IXU3CwvnX8x69OyuamF3QAJ/s640/Cube03_a.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpNBitzMjy6c3jWhYRdHRfPbVbTdc7cinPePqKW1L59oG9jZmuk1-BPsBvhcOAGoiR8KymqNk4eIRvEtUcz_rHz3t04iJT3oP5iIhYMjE-nsfa5jwFBsIw_3u8GUsMRRdDHHxUgi0rMTgT/s1600/Cube03_b.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpNBitzMjy6c3jWhYRdHRfPbVbTdc7cinPePqKW1L59oG9jZmuk1-BPsBvhcOAGoiR8KymqNk4eIRvEtUcz_rHz3t04iJT3oP5iIhYMjE-nsfa5jwFBsIw_3u8GUsMRRdDHHxUgi0rMTgT/s640/Cube03_b.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKOQo3AC4tGLUnHqrviz940fCcKKGTUbk9C1vg7SDwqfMvAdmWiUkkW8TqkMgmkF623OLMuwG6swwgegZ4JaBMZC2n0eje-SK09aCY5LAmPCVls2ti9nJGnxpkeLd8XHquDetWREr1PHOI/s1600/Cube03_c.png" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKOQo3AC4tGLUnHqrviz940fCcKKGTUbk9C1vg7SDwqfMvAdmWiUkkW8TqkMgmkF623OLMuwG6swwgegZ4JaBMZC2n0eje-SK09aCY5LAmPCVls2ti9nJGnxpkeLd8XHquDetWREr1PHOI/s640/Cube03_c.png" width="640" /></a></div>
<div style="font-weight: normal;">
</div>
<div style="font-weight: normal;">
As seen in the picture, 2 vertices
from each triangle share the same normal, hence we don't need to
duplicate them. That leaves us with 4 vertices per face. Every other
face doesn't share the same normal, so we'll need to duplicate the
vertices. What we get is:</div>
<blockquote class="tr_bq">
6 faces x 4 vertex per
face = 24
</blockquote>
<div style="font-weight: normal;">
</div>
<div style="font-weight: normal;">
And finally goes smooth shading, due
to the way the normals are placed, it gives a soft look, since it's
trying to mimic a round ball lighting:</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1oY0G0zASKgOoowRdRfPP9WAZS8RCwCov3geNmRzJ31GREwUUqWsh66wsQK6c-xQpMwkHZvLM7SscBdw7OpCwpBaEC4xDhPU0FeeI-QIHDvlHkHyKGuXA2eynqw1j3v1KQudZLHxURpel/s1600/Cube04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1oY0G0zASKgOoowRdRfPP9WAZS8RCwCov3geNmRzJ31GREwUUqWsh66wsQK6c-xQpMwkHZvLM7SscBdw7OpCwpBaEC4xDhPU0FeeI-QIHDvlHkHyKGuXA2eynqw1j3v1KQudZLHxURpel/s640/Cube04.png" width="640" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs3R27HVcAmCbWv7yNtHKMS1S8vIa7rWVgjSDP88XbHTmK3C1nU05OeZg2rfgZYRFd2t52Z1T_T-M7grj3sSwictwVYm6RigfDVOFpWkA2SbZD6VRAT5gnAVov0sSTX3vuhETN5K3zzI7I/s1600/Cube05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgs3R27HVcAmCbWv7yNtHKMS1S8vIa7rWVgjSDP88XbHTmK3C1nU05OeZg2rfgZYRFd2t52Z1T_T-M7grj3sSwictwVYm6RigfDVOFpWkA2SbZD6VRAT5gnAVov0sSTX3vuhETN5K3zzI7I/s640/Cube05.png" width="640" /></a></div>
<div style="font-weight: normal;">
Here, <b>every vertex from each triangle
has the same normal</b>, hence no need to duplicate anything. From a
technical standpoint, it's the best case scenario. Not only they're
less vertices, but <b>they're also shared</b> which allows the GPU to
better utilize the post vertex cache (it's a cache that reuses the
output from a vertex shader for a different triangle, so that the
shader doesn't have to process it again)</div>
<div style="font-weight: normal;">
From an artistic standpoint, whether
this is good will depend on the look you're trying to achieve.</div>
<blockquote class="tr_bq">
<div style="font-weight: normal; text-align: left;">
Anyway, the result is <b>8
vertices total</b>.</div>
</blockquote>
<div style="font-weight: normal;">
In a real world scenario, practice
tells us even this smoothly shaded cube won't be 8 vertices, probably
12-16. This is because unwrapping the UV <b>will</b> generate a
discontinuity at some point unless you use an extremely distorted UV
mapping:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR80aF42sDu_26pHBIO-A3gScBw0yrC6zc7kX_cj-5UZi6TA8cLLZmwk6gx3Eo2ohoTyE-WfVNRUp5h6_FGq3AX7XyhDbMQPf3xYpcsvuUahHDogzV6eKoW_R4x14-naSqyh7AbTjDmviX/s1600/Cube_UV.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="554" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR80aF42sDu_26pHBIO-A3gScBw0yrC6zc7kX_cj-5UZi6TA8cLLZmwk6gx3Eo2ohoTyE-WfVNRUp5h6_FGq3AX7XyhDbMQPf3xYpcsvuUahHDogzV6eKoW_R4x14-naSqyh7AbTjDmviX/s640/Cube_UV.png" width="640" /></a></div>
<div style="font-weight: normal;">
</div>
<div align="CENTER" style="font-weight: normal;">
When exporting this cube
using smooth shading with this UV layout, it contains 14 vertices.
Still better than 24.</div>
<div align="CENTER" style="font-weight: normal;">
Green: Duplicated
vertices.</div>
<div align="CENTER" style="font-weight: normal;">
Yellow: The original
vertices that presented a discontinuity.</div>
<div align="CENTER" style="font-weight: normal;">
<br /></div>
<div style="font-weight: normal; text-align: left;">
</div>
<h2 class="western" style="font-style: normal; text-decoration: none;">
Causes for vertex duplication / discontinuities?</h2>
<div style="font-style: normal; text-decoration: none;">
There are many
factors that can cause a discontinuity. For example:</div>
<ul>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Using flat shading. Use smooth shading instead when possible.</div>
<ul>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Called “hard edges” in Maya (use smooth edges)</div>
</li>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Using multiple, faceted “smoothing groups” in 3DS Max</div>
</li>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Called “Flat shading” in Blender</div>
</li>
</ul>
</li>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Too many UV islands. If the vertex has U=0,5 for one face, and U=0.7
for another face, the vertex can't have two U values at the same
time, it has to be duplicated</div>
<ul>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Note that multiple UV sets are fine as long as they keep continuous
(which can be rarer to keep in harmony the more sets you use)</div>
</li>
</ul>
</li>
<li><div style="font-style: normal; font-weight: normal; text-decoration: none;">
Using different Material Ids. Try to batch everything into one
material.</div>
</li>
</ul>
<div style="font-style: normal; text-decoration: none;">
<a href="http://wiki.polycount.com/Framerate%20Optimization%20Tips">Polycount
already covers this</a> in excellent detail. There is no need to keep
repeating what is said there.</div>
<div style="font-weight: normal; text-align: left;">
<br /></div>
<div style="font-weight: normal; text-align: left;">
</div>
<h2 class="western">
Common misconception: Why is the GPU so dumb?</h2>
A common misconception that confuses many junior artists is <b>why the GPU is dumb?</b> In the example given above (let's forget about UVs) it's clearly smarter to just store 8 vertices with 6 face normals. Why does the GPU need 24 vertices? Why store per vertex normals? The first reaction I get is “That's insane”<br />
The answer is simply because <i><u>that's how GPUs work</u></i>. GPUs are all about <b>raw power</b>. In simple terms, the main difference between a CPU & GPU is that one tries to be smart, while the other tries to brute force everything.<br />
<blockquote class="tr_bq">
Think an analogy: Suppose the Hulk wants to enter a house. The smart thing to do is knock on the door, wait until someone opens it, then close it again. But he's the Hulk. It's clearly easier for him to just smash the whole wall. You wouldn't expect the Hulk not to do that. Even something as simple as opening door or knocking would be hard for him. Same goes for GPUs.</blockquote>
3DS Max, Maya & Blender all of them will internally store 8 vertices and 6 face normals. This is because it's storage efficient. Imagine those packages saving a file that is 3 to 6 times their current size. Also from an artist point of view, it is much easier to just work face normals, so the internal representation matches the artist's normal workflow.<br />
<br />
<i><b>But here's one little secret:</b></i> When they have to display it on the viewport, they have to convert the model <i>on the fly</i>. That perfect 8-vertex cube with 6 face normals gets converted to 24 vertices. That's why you may have noticed modifying one single vertex in an object with 10 million vertices is so painfully slow even in high end machines. Also another big reason modeling packages such as Maya/Max/Blender can't match the framerate of a game engine. They either convert the whole model on the fly, or sacrifice real time performance for incremental updates so that editing doesn't become so slow.<br />
<div style="font-style: normal; text-decoration: none;">
<br />
<br /></div>
<h2 class="western">
This is going to change in the future, right?</h2>
Well, it's been like this for more than 20 years. So don't keep
hope. You can try teaching the Hulk to knock on doors. He will keep
preferring to break the wall.<br />
There are progress in alternatives to rasterization for real time
applications, mainly using Compute Shaders, and sometimes they
include good ol' raytracing. But nothing ground breaking so far yet
(limited use cases right now), so 8-vertex cube with hard edges may
become feasible in ?? years.<br />
<br />
It's worth mentioning that there <b>is </b>a
way to use hard edges with just 8 vertices (but still needs to
duplicate due to UVs) in Direct3D & OpenGL, which is simply
called “Flat shading” (of course!). This feature has been there
since the dawn of time.<br />
<div style="font-weight: normal;">
The reason the tool's programmer
doesn't ever want you to know that is because:</div>
<ul>
<li><div style="font-weight: normal;">
It's an all or nothing – Either
everything is flat shaded, or smooth shaded. You can't mix.</div>
</li>
<li>The order in which vertex
are submitted to the GPU becomes <b>very </b> important
to achieve correct lighting otherwise the wrong normal will be used.
And it's a major PITA for the exporter to guarantee that correct
order. Sometimes there is not enough information and becomes
practically (but not theoretically) impossible to export the right
order, unless we resort to duplicating a few, which is what we were
trying to avoid. It's easy for standard primitives (box, sphere,
pyramid) but analyzing complex surfaces' triangle indexing to get
the right order is challenging.<br />
</li>
</ul>
<div style="font-weight: normal;">
If accurate lighting can be
sacrificed, or the programmer who wrote the exporter is a genius, and
you don't need smooth triangles in your mesh, then flat shading is a
feasible alternative. Note that using UVs and other causes for vertex
discontinuity will still force to duplicate vertices.</div>
<h2 class="western">
</h2>
<h2 class="western">
<a name='more'></a> Conclusion</h2>
So here you go. This explanation covers why the <b>vertex count</b>
of the <b>final</b> exported model is far more important than the
vertex count or the poly count that Maya/Max/Blender will show you. A
good pipeline workflow should allow you to quickly export &
iterate so that you can experiment with the vertex count. Be sure
that your model is always “export ready” and have a tool ready
that can show you the vertex count.<br />
It's nearly impossible for the human brain to calculate how many
more vertices will need to be duplicated, at least for more complex
models. The best way is “just try” and follow the hints: Use
smooth normals, avoid UV seams, avoid UV islands, use as fewer
material Ids as possible, etc. A
rule of thumb is that your vertex count will be somewhere between
“vertex count” (according to Maya/Max/Blender) and “Number of
tris * 3”, since there's no excuse for having more than
three vertices per triangle. If there are N-Gons, you'll need to
triangulate them to get an estimate.<br />
<div style="font-weight: normal; text-align: left;">
<br /></div>
Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com2tag:blogger.com,1999:blog-5914419889815086738.post-35908670496134776432013-01-29T15:45:00.000-03:002013-01-29T15:45:18.469-03:00No, it's not the polycount what matters<h1 class="western">
</h1>
So, after our
little sudden clarity moment of <a href="http://distantsoulsdev.blogspot.com.ar/2013/01/ogremax-exports-too-many-vertices.html">reexporting
every asset we had</a> due to OgreMax miss-configuration. Some of our
artists were wondering why the game's framerate didn't improve much.
<br />
<div style="margin-bottom: 0cm; text-decoration: none;">
I told them
“it's because we're heavily CPU bottlenecked”. Reapeating that
phrase multiple times didn't work, so they were obviously not getting
it.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
PCs consists in
two parts: The CPU & GPU. Both are similar and yet different.
They both do math and read and write memory. And they work in
parallel, at the same time. One does (usually) the heavy physics and
logic, while the other handles graphics rendering.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
The thing is, if
one of them finished too early, it will keep idle waiting for the
other to finish. Taking off jobs from the idle chip won't make it any
faster. You need to take away work from the work from the overloaded
system, which is the CPU in our case.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<h2 class="western">
It's best explained with an analogy:</h2>
<div style="margin-bottom: 0cm; text-decoration: none;">
It's like
surfing the web with a bad provider, terrible bandwidth and painfully
slow latency (lag).</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
You will think
the “computer” is slow. So you go and defrag the PC. That doesn't
work. Then you add more RAM. It didn't work either. You try all major
browser, same result. The list of what you can try goes on.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
You may even get
the best machine money can buy, like a 32-core Xeon CPU with 32GB of
RAM, and 6 RAID0 SSDs harddrives. All that is not going to matter.
Web surfing will still be awfully slow, and you may still think “that
computer” is too slow.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<b>In reality
what you need to do is to move a better ISP and fix the network</b>.
Once you have decent bandwidth and latency, you will start noticing
web browsing is suddenly instant-fast.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
And now it's
time to start talking about the PC's power: Javascript performance,
which browser is more responsive, available RAM, impact of antivirus
and other software running in the background.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
In the analogy,
the the network is the bottleneck. In TDL, it's the CPU. Once it's
fixed, factors like polycount, vertex count, number of lights, screen
resolution, will start becoming a bigger factor. But for the time
being, the problem is somewhere else, deep in C++ code.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
So, there it is.
The problem sometimes doesn't lie in vertex count or in more
aggressive Lod, or shorter view distance.</div>
Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-44938866384833291582013-01-20T16:11:00.000-03:002013-01-20T16:31:34.536-03:00OgreMax exports too many vertices!OgreMax is the preferred Ogre mesh file
exporter for both Maya and 3DS Max.<br />
<br />
<div style="margin-bottom: 0cm;">
<u>The problem is, it is exporting
around 4x the required vertex count!</u> Note this problem affects both versions of the plugin (Maya & 3DS Max)</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
Geoff asked us
to look at the corn field because it was having a terrible framerate.
I took a look with Jeff, the modeler responsible of it, and it
wasn't exactly the most expensive model ever invented, to be
generating such slowdown.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
So, I took a
deeper look with <a href="http://sourceforge.net/projects/ogremeshy/">Ogre
Meshy</a>, and the vertex count (around 1100) seemed too high to be
true. Even more suspicious was that <span style="font-style: normal;">the
vert</span><span style="font-style: normal;">ex count was </span><i>exactly</i><span style="font-style: normal;">
the index count</span>.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
I ask Jeff to
handle me the obj file so I could export it in Blender. <b>And the
resulting vertex count went down to 442!!!</b> I thought it could be
a problem with the smoothing groups, as flat shading causes a lot
more vertices to be generated (vertices with different normals need
to be duplicated).</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
I reexported
with flat shading this time, vertex count was now around 700, still
lower than the exported mesh from OgreMax!</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
As we played
with OgreMax settings, we found out the culprit is a setting named
“<b>REMOVE DUPLICATED VERTICES</b>” <u><b>which is turned off by
default</b></u>!!</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
After
re-exporting with this option on, OgreMax' exported model matched the
vertex count from Blender (442)</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
This is very
bad, because not only the amount of vertices is increased, but it's
also the <b>worst possible scenario</b><span style="font-weight: normal;">:
Every vertex is not being shared and thus can't be reused. This
leaves the post vertex cache completely useless. I don't know why the
default option is left unchecked, I can only think of very few
possible scenarios where having 1:1 vertex - index ratio could be
useful.</span></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
We proceeded to
reexport all of our assets in, most important big ones first. <b>The
zombie vertex count went down 4.1x</b>.</div>
<div style="margin-bottom: 0cm; text-decoration: none;">
<br /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
Thanks to our
buddy <a href="https://twitter.com/JRMac3D">Jeff</a> who took the
screenshts for us:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-exe-TH4nJmF0k2a99ihKgXu0yHAeHaDBKPW2qPENs7CITQQEz_KuojdkrXKel9_45yN9-RFKHXOvikokijDe6spJrDbFYipS365FkEYVZPinYl-5sugYWLmuyVOsWmXlPN2JVKQ1kJSq/s1600/OgremaxSettings1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-exe-TH4nJmF0k2a99ihKgXu0yHAeHaDBKPW2qPENs7CITQQEz_KuojdkrXKel9_45yN9-RFKHXOvikokijDe6spJrDbFYipS365FkEYVZPinYl-5sugYWLmuyVOsWmXlPN2JVKQ1kJSq/s1600/OgremaxSettings1.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-exe-TH4nJmF0k2a99ihKgXu0yHAeHaDBKPW2qPENs7CITQQEz_KuojdkrXKel9_45yN9-RFKHXOvikokijDe6spJrDbFYipS365FkEYVZPinYl-5sugYWLmuyVOsWmXlPN2JVKQ1kJSq/s320/OgremaxSettings1.jpg" width="245" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxaO-S5SUZ2a5SN5VvozNXoL97biiJ5LrsZtM9boIot9XbJ9bU3FQ0XzD4_PV1lNgnpCklOxMqk_lt8C8fJCyCMa-JoCxpBpYt495A9tQWZQ5yF2F1BR-Rj29zdHf9QZxnf_yCRC1ER8vP/s1600/OgremaxSettings2.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><br /></a><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxaO-S5SUZ2a5SN5VvozNXoL97biiJ5LrsZtM9boIot9XbJ9bU3FQ0XzD4_PV1lNgnpCklOxMqk_lt8C8fJCyCMa-JoCxpBpYt495A9tQWZQ5yF2F1BR-Rj29zdHf9QZxnf_yCRC1ER8vP/s400/OgremaxSettings2.jpg" width="352" /></div>
<div style="margin-bottom: 0cm; text-decoration: none;">
</div>
<br />
<br />Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-35565847798361854642012-10-20T16:31:00.001-03:002012-10-20T17:05:28.424-03:00How to enable UV correction when using Loop Cut in Blender 2.6xWhile I was working with Blender a few days doing the light volume data for the flaslights; I've noticed that in Blender 2.49 Loop cut kept the UVs correct, <b>while in Blender 2.6x it gets stretched</b>. This was annoying. Even after downloading Blender 2.64a, I saw this problem still persists.<br />
<br />
A quick google <a href="http://projects.blender.org/tracker/?func=detail&atid=498&aid=29771&group_id=9">returns a cryptic solution</a> saying that it's not a bug and can be turned on & off. Because I prefer visual solutions, here's how to turn it back on:<br />
<br />
Go to the User Preferences (Ctrl+Alt+U; alternatively "File->User Preferences..."), then to the Input mapping options:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK751pgsjl3NOJz1rrIk8xw3MtFnfFETG8WItd6zagM2owdm5n24VcZVGmdoEeLFqGYzbLUt1anCVaeMKvsTU9bIWclUIvEOEDyaq65YbY4EyuDe7m19YylKrW45V6EUn2lBFbzLVGalFt/s1600/BlenderUI_loopcut01.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK751pgsjl3NOJz1rrIk8xw3MtFnfFETG8WItd6zagM2owdm5n24VcZVGmdoEeLFqGYzbLUt1anCVaeMKvsTU9bIWclUIvEOEDyaq65YbY4EyuDe7m19YylKrW45V6EUn2lBFbzLVGalFt/s640/BlenderUI_loopcut01.png" width="596" /></a></div>
<br />
Then find the "Loop Cut and Slide" key binding:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4aNxox5Nv37WQa4fSmlLwa-NBdRInV6MSGkQS1GfuPshY7wfWkioEN2GOBUZ2xFCIYnp0OSz_vbbsSxC_lDLktIlxsGzFP8IqOWhJtj7wYOnlTF0J_Rbac2j-0ipJLBCfRPeABppB-VYb/s1600/BlenderUI_loopcut02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4aNxox5Nv37WQa4fSmlLwa-NBdRInV6MSGkQS1GfuPshY7wfWkioEN2GOBUZ2xFCIYnp0OSz_vbbsSxC_lDLktIlxsGzFP8IqOWhJtj7wYOnlTF0J_Rbac2j-0ipJLBCfRPeABppB-VYb/s640/BlenderUI_loopcut02.png" width="611" /></a></div>
Open it and make sure "Correct UVs" are checked. You're done :)<br />
Quick fix to a very annoying problem. I hope this visual description helps a lot more than that cryptic message over the bug tracker.<br />
<br />
Note that apparently there may be <a href="http://projects.blender.org/tracker/index.php?func=detail&aid=31581&group_id=9&atid=498">a rare bug in which Correct UV may completely screw up your UVs</a> which may be the reason the default was changed to unchecked in the first place. That seems to be something much harder to solve and the developers are working hard on fixing it. Keep an eye if that happens to you. You've been warned.<br />
<br />
That's all for today! Have a good day. Now back to work.Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com1tag:blogger.com,1999:blog-5914419889815086738.post-22565547132505444362012-08-19T20:04:00.000-03:002012-08-19T20:24:04.031-03:00Updates<h2>
<span lang="en-US"><span style="font-size: large;">Distant Souls</span></span></h2>
<span lang="en-US">I've been working a lot since the last time the
pre-alpha demo was released. I've been doing improvements overall
based on the feedback from testers. I'm trying to get a new demo
ready so that more testers can be engaged into the play mechanics.
There were two big elements that were present but were very
overlooked in the last release: combats & platforming.</span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img607.imageshack.us/img607/3582/screenshot4ym.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img607.imageshack.us/img607/3582/screenshot4ym.png" width="640" /></a></div>
<span lang="en-US"><br /></span>
<span lang="en-US"><br /></span>
<br />
<div lang="en-US">
Additionally, I've noted there was something lacking,
and I believe there was some sort of customization factor. Players
are now have an inventory! They're able to wear equipment to become
stronger, loot items Diablo II-style, and even level up. It looks
like an easy feat but trust me, it takes a lot of time!!! There's a
lot of gotchas: what happens if I unequip an item that was allowing
another item to be equipped? Should that item be also unequipped? And
what happens if there's a domino effect? What happens if the
inventory was full? Should the item be dropped? But what if the
player was just experimenting? Wouldn't it be frustrating if all it's
gear wears off?</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img232.imageshack.us/img232/8158/items1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://img232.imageshack.us/img232/8158/items1.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img820.imageshack.us/img820/5158/items2f.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="http://img820.imageshack.us/img820/5158/items2f.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img155.imageshack.us/img155/3286/screenshot24v.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img155.imageshack.us/img155/3286/screenshot24v.png" width="640" /></a></div>
<div lang="en-US">
<br /></div>
<div lang="en-US">
<br /></div>
<div lang="en-US">
Combat is now balanced (or at least, not so
unbalanced as it was before); but there's still missing a subtle but
straightforward introduction to the combat mechanics. Combos were
included in the previous demo, but most of players didn't even notice
or figure it out. I need to work on that.</div>
<br />
<br />
<h3>
Aesthetics revamp</h3>
I dedicated some time to adjust contrast, brightness,
HDR exposure, colour balance, sun's size (it was huuuuuge). All stuff
I've been delaying until I eventually got used to it being wrong.
Good thing players keep reminding you to them. With these
corrections, it's much easier to note the cloud shadows (which are
very cool)<br />
<br />
<div lang="en-US">
There are also new 3D models, and a new enemy
character. Furthermore, I've significantly improved the normal
mapping on the terrain. The close ups are unbelievable detailed.</div>
<div lang="en-US">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img13.imageshack.us/img13/4885/screenshot42d.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img13.imageshack.us/img13/4885/screenshot42d.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img528.imageshack.us/img528/7094/screenshot33u.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img528.imageshack.us/img528/7094/screenshot33u.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<h3 style="text-align: left;">
Towards multiplayer</h3>
<div style="text-align: left;">
Even the first demo supports multiplayer, it's just disabled and
hidden. However this time I'm working both gameplay-design and code
towards full multiplayer integration, matches are already possible;
but there's no GUI to setup the connection yet.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Distant Souls supports both PvP as well as team quests.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<h2 class="western" style="text-align: left;">
<span style="font-size: large;">The Dead Linger</span></h2>
<div style="text-align: left;">
I joined <a href="http://www.sandswept.net/">Sandswept Studios'
team</a>! I'll be working with them to take their Graphics to the
next-gen. They're working really hard towards an alpha release of <a href="http://www.thedeadlinger.com/">The
Dead Linger</a> and I'm going to make it look good(tm).</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Naturally, this will impact in the development of Distant Souls by
slowing it down (as I'll only be working on it in my little free
time), but it's for the best for everyone.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
The project data is downloading as I write this post, once I get
to the code I should be able to buff up their graphic tech
considerably :)</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<h2 class="western" style="text-align: left;">
<span style="font-size: large;">Final words</span></h2>
<div style="text-align: left;">
There's a lot I didn't talk about, but there's not enough room or
sometimes I don't even remember every improvement detail! There's a
lot more to come, but as I said, for the time being my main focus
will now be in The Dead Linger. Enjoy the pictures!</div>
<div style="text-align: left;">
You can view all of them in full resolution through the <a href="http://img259.imageshack.us/slideshow/webplayer.php?id=screenshot11vn.png">web player</a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img59.imageshack.us/img59/8535/screenshot14m.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img59.imageshack.us/img59/8535/screenshot14m.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img259.imageshack.us/img259/8024/screenshot11vn.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img259.imageshack.us/img259/8024/screenshot11vn.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img402.imageshack.us/img402/487/screenshot12bw.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img402.imageshack.us/img402/487/screenshot12bw.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img208.imageshack.us/img208/6837/screenshot2osu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img208.imageshack.us/img208/6837/screenshot2osu.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img43.imageshack.us/img43/5110/screenshot22a.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img43.imageshack.us/img43/5110/screenshot22a.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img545.imageshack.us/img545/5088/screenshot1fz.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img545.imageshack.us/img545/5088/screenshot1fz.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img228.imageshack.us/img228/71/screenshot13ba.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img228.imageshack.us/img228/71/screenshot13ba.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img337.imageshack.us/img337/2992/screenshot32go.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img337.imageshack.us/img337/2992/screenshot32go.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img37.imageshack.us/img37/696/screenshot43ji.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img37.imageshack.us/img37/696/screenshot43ji.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img195.imageshack.us/img195/3541/screenshot44o.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img195.imageshack.us/img195/3541/screenshot44o.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img69.imageshack.us/img69/8455/screenshot10obv.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img69.imageshack.us/img69/8455/screenshot10obv.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img255.imageshack.us/img255/8093/screenshot9g.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img255.imageshack.us/img255/8093/screenshot9g.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img109.imageshack.us/img109/8920/screenshot7ry.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img109.imageshack.us/img109/8920/screenshot7ry.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img507.imageshack.us/img507/8341/screenshot6uc.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img507.imageshack.us/img507/8341/screenshot6uc.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img18.imageshack.us/img18/2514/screenshot62yg.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img18.imageshack.us/img18/2514/screenshot62yg.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img163.imageshack.us/img163/8268/screenshot5gl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="http://img163.imageshack.us/img163/8268/screenshot5gl.png" width="640" /></a></div>
<div lang="en-US">
<br /></div>
<h3>
</h3>
Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-33001870760800067312012-06-24T19:18:00.001-03:002012-06-24T19:36:01.432-03:00How to design a massive boss battle<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
Initially I wanted to get ready an introduction scene and a boss
battle. Shortly after I realized the timeframe wouldn't allow me to
do both. I had to choose. So which one would more badass and
entertain more? I went for the boss. And I'm glad I did.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
In case you have no idea what I'm walking about, you can <a href="http://www.youtube.com/watch?v=stZ4tLqeEV0"><span style="font-size: large;">watch the video here</span></a>. Or <a href="http://distantsoulsdev.blogspot.com.ar/2012/05/download-demo.html"><span style="font-size: large;">download the game demo from here</span></a>.<br />
<br /></div>
<h2 class="western" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
Creating the boss battle</h2>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
I had an idea of a giant enemy. Something <b>BIG</b>(*). something
that would cause impact in many senses. This boss presented a lot of
challenges:</div>
<ol style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<li>Physics representation was enormous (Sphere radius was of
roughly 80m). Havok isn't prepared for something that big unless
it's static. And you were supposed to to hop on it while it's
moving?<br />
</li>
<li>A lot of animation data was in this boss. Therefore the
physics need to interact accordingly.<br />
</li>
<li>Not only is it big, but some movements are fast. Due to it's
size, some velocities reached the order of 1.000 m/s. Again, Havok
isn't used to such operating conditions.<br />
</li>
<li>Even with continuous physics enabled, using mesh shapes
resulted in lots of bullet-through paper glitches. Too often the
player would end up stuck inside Turtarian's shell.<br />
</li>
<li>The engine's code needed to be improved too. How the camera
handles tracking of such a large object, the allies & foes' AI
was going nuts with him, a custom AI had to be made to script the
boss battle, the lock-on system was buggy, etc. Placing this object
in scene revealed a lot of small bugs or limitations that needed
fixing.<br />
</li>
<li>All of this while the game is running internally @60 fps.<br />
</li>
</ol>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<br /></div>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; font-family: "Helvetica Neue",Arial,Helvetica,sans-serif; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="http://img838.imageshack.us/img838/6721/distantsouls.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="250" src="http://img838.imageshack.us/img838/6721/distantsouls.jpg" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://img838.imageshack.us/img838/6721/distantsouls.jpg">Standing on top while still running at 60 fps and no glitches wasn't easy.</a></td></tr>
</tbody></table>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
Once it started to work, it seemed reminiscent of Shadow of the
Colossus®, <b>even though
I've never played it</b>. So, I started to watch more Youtube videos
about SotC, God of War III®,
and Castlevania: Lord of Shadows®,
all of them featuring gigantic bosses.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
I liked more the idea behind SotC & Castlevania: LoS, rather
than God of War's. In the latter, giant boss battles were limited to
“face the enemy straight and smash the attack button”; where in
the former two, there was a more strategic and patient approach. What I really missed was to ditch the climbing elements present in SotC and Castlevania, which are very fun when the boss is moving. Originally, when I first starting coding the engine, I wasn't thinking of large scale-enemies. It was a happy coincidence that worked far more than I expected.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<br /></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
(*) Rule #1 of scale: <b>if everything's big, nothing's big</b>. Just
because your 3D model software says it's huge, doesn't make it so. A
giant must be in contrast in a place where almost everything is tiny,
in </div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<br />
<br /></div>
<h2 class="western" style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
How the solution was approached</h2>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
I tried several solutions before ending up with something I liked
and worked:</div>
<ul style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<li>A dummy object is used for character controller. Everything
else (shell, head, claws, tail) is controlled setting Havok's motion
types to Keyframed.<br />
</li>
<li><b>The main shell is a mesh shape</b>, based from the same
object that is rendered, but previously decimated.</li>
</ul>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://img812.imageshack.us/img812/4630/turtarian01.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="186" src="http://img812.imageshack.us/img812/4630/turtarian01.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://img812.imageshack.us/img812/4630/turtarian01.jpg">Physics shell (left) vs Final version used to render (right)</a></td></tr>
</tbody></table>
<span id="goog_89066530"></span><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="http://img607.imageshack.us/img607/120/turtarian04phantom.jpg"><img border="0" height="185" src="http://img607.imageshack.us/img607/120/turtarian04phantom.jpg" style="margin-left: auto; margin-right: auto;" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://img607.imageshack.us/img607/120/turtarian04phantom.jpg">Phantom inside the shell to prevent getting inside</a></td></tr>
</tbody></table>
<div style="text-align: right;">
<a href="http://img607.imageshack.us/img607/120/turtarian04phantom.jpg"><span id="goog_89066547"></span></a><span id="goog_89066548"></span></div>
<span id="goog_89066531"></span><br />
<ul style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<li>Using the mesh shape caused lots of bullet-through paper.
Since you're not supposed to be inside it; multiple phantom shapes
had to be placed inside the shell, teleporting you out of it as soon
as you get in contact with it. Due to time constraints, I was unable
to refine their placement, therefore some players may still
experience a few glitches for a few moments if they try hard to get
inside.</li>
</ul>
<br />
<ul style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<li><b>The claws, tail, neck and head are all native shapes.
Mostly capsules, and a few boxes & spheres</b>. All of them are
compund objects. Each compund object was attached to a bone. A
blender script exported the shape's definitions, as well as the
correct parameters to make a perfect alignment when attached to the
bone.<br />
</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img444.imageshack.us/img444/7024/turtarian07compund.jpg"><img border="0" height="186" src="http://img444.imageshack.us/img444/7024/turtarian07compund.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://img811.imageshack.us/img811/1259/turtarian05compund.jpg"><span id="goog_89066513"></span></a><span id="goog_89066514"></span></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
Capsules boxes and spheres were used for the physics representation (left). They don't exhibit bullet through paper like the shell, because of they're native and closed method. On these objects, bullet through paper would only appear if a velocity is so big that between two frames, the character goes from one point to the other of the capsule. This isn't a problem when your objects are this big. Think of it as having native objects being filled, while Mesh objects instead being thin and hollow.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
Blender supports Bullet physics. Since Bullet & Havok are ridiculously similar, the Logic pane was used to set the Physics shape information correctly, using parenting to define compound linkage.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://img811.imageshack.us/img811/1259/turtarian05compund.jpg"><img border="0" height="186" src="http://img811.imageshack.us/img811/1259/turtarian05compund.jpg" style="margin-left: auto; margin-right: auto;" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://img811.imageshack.us/img811/1259/turtarian05compund.jpg">Blender's cursor was very useful for synchronizing the shape's position and orientation and the bone's starting position, (Shift+S in Blender). Workflow was very straightforward.</a></td></tr>
</tbody></table>
<br /></div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
I admit, Turtarian's boss battle experience may not be yet on par
to SotC or Castlevania's, I'd love to be proven wrong by gamers, but
I know there's a lot of room for improvement, and I can do it much
better.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
It was my first giant boss
fight. And <b>I</b>
<b>learned a lot</b>.
Plus, now I have the tools development, and a stable code that can
handle it.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
As with all games, <b>a
lot</b> <b>of
ideas were cut</b>.
Furthermore, the more I played with Turtarian, the more ideas kept
popping out. Specially ideas on how to climb big bosses while using
current mechanics. It's very common to think of using gameplay
mechanics from <i>other</i>
games, some of which are not even implemented or would be difficult
to do. That's why it's very important to test, test, test.</div>
<div style="font-family: "Helvetica Neue",Arial,Helvetica,sans-serif;">
New ideas will keep coming
that will match <i>your</i>
mechanics.<br />
Other ideas included additional environment models where you could climb to hop easier to Turtarian. Even interacting with the city walls was very interesting, because they were more or less the same height.<br />
Even <b><i>more</i></b> ideas kept coming after I tried Turtarian in the final terrain, which has uneven heights. For a long time, I only tested the boss battle in a flat terrain. Getting your character on elevated ground gives you an advantage, while being in great disadvantage if you stayed on lower grounds. Furthermore difficulty suddenly increased when the tail (which at some point becomes a weakpoint you need to hit) was burried underground because of a sand hill, therefore you first needed to attract Turtarian by running off that place.<br />
<br />
<br />
Thanks for reading!<br />
Matias /signing off </div>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com1tag:blogger.com,1999:blog-5914419889815086738.post-23430169228983322952012-05-22T11:57:00.000-03:002012-05-31T22:52:45.862-03:00DOWNLOAD DEMO!First, there's bad news: Distant Souls failed to run on the spec. machines from Intel Level Up contest! :(<br />
Therefore, it's disqualified.<br />
<br />
<br />
Now let's change the subject:<br />
There's a <b>DEMO AVAILABLE FOR DOWNLOAD!!!</b><br />
<br />
<h2>
GO CHECK IT OUT!</h2>
<ul>
<li>MEDIAFIRE: <a href="http://www.mediafire.com/?a2il6auap4g6dcj">PART I</a>, <a href="http://www.mediafire.com/?6dhgjbbjjtyqh9o">PART II</a></li>
<li>DROPBOX: <a href="http://goo.gl/IIyWS">SINGLE FILE</a>.</li>
<li>IndieDB: <a href="http://www.indiedb.com/games/distant-souls/downloads/distant-souls-demo">SINGLE FILE</a></li>
</ul>
<span style="font-size: x-small;"><i>Update: Uploaded new version SVN 608, which fixes incompatibility issues with Intel 4 Series & nForce 6150. Thanks for your feedback!</i></span> <br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/stZ4tLqeEV0?feature=player_embedded' frameborder='0'></iframe><iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/M3TVduNmZOw?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<br />
<h3>
<i class="bbc">System requirements:</i></h3>
<ul class="bbc">
<li>Windows XP/Vista/7</li>
<li>Intel Core 2 Duo 2.2 GHz or better/AMD Athlon 64 X2 5000+</li>
<li>2 GB RAM</li>
<li>NVIDIA Geforce 8 series or better / ATI Radeon HD 2000 series or better (Shader Model 3.0 compliant with full VTF support)</li>
</ul>
<h3>
<i class="bbc">Unsupported Hardware:</i></h3>
The following hardware is known not to work. And it's really hard to support them, this list not likely to be reduced:<br />
<br />
<ul class="bbc">
<li>ATI Radeon X1000 series</li>
<li>Intel GMA 950 series</li>
<li>GeForce 6200 (??? needs confirmation)</li>
</ul>
<h2>
<b class="bbc">Ways you can help:</b></h2>
<ul class="bbcol decimal">
<li>Share! Follow! Subscribe to my videos :) </li>
<li>Does
it run in your machine? Post all your 5 Logs, they are in the file
%AppData%\Distant Souls. Also post all your *.rpl files there so I can
reproduce your bug.</li>
<li>What do you think about the game?:<br />
<ul class="bbc">
<li>Do you like it?</li>
<li>Is it fun?</li>
<li>Was there something you spent too much time to figure out?</li>
<li>were you stuck?</li>
<li>Did you enjoy it?</li>
</ul>
</li>
</ul>
Didn't enjoy it? Then tell me! You won't hurt my feelings! Games are an
iterative process. We will work on it as many times as possible until
we're all 24hs addicted.<br />
This is valuable feedback and please post your results!<br />
<br />
IF YOU OWN AN INTEL HD 3000 PLEASE SHARE YOUR EXPERIENCE WITH US!!! I'm
99% sure the game didn't run in the contest because of that GPU, even
though, it's ought to be capable to run it. I need to fix that!<br />
<br />
<span rel="lightbox"><img alt="Posted Image" class="bbc_img" height="360" src="http://img502.imageshack.us/img502/6480/34940312.jpg" width="640" /></span><br />
<span rel="lightbox"><img alt="Posted Image" class="bbc_img" height="360" src="http://img580.imageshack.us/img580/844/97672095.jpg" width="640" /></span><br />
<br />
<a class="bbc_url" href="http://img204.imageshack.us/i/81947126.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img204.imageshack.us/img204/3899/81947126.th.jpg" /></a><a class="bbc_url" href="http://img205.imageshack.us/i/38048699.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img205.imageshack.us/img205/1996/38048699.th.jpg" /></a><a class="bbc_url" href="http://img17.imageshack.us/i/80376800.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img17.imageshack.us/img17/6808/80376800.th.jpg" /></a><br />
<a class="bbc_url" href="http://img825.imageshack.us/i/84788696.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img825.imageshack.us/img825/7079/84788696.th.jpg" /></a><a class="bbc_url" href="http://img846.imageshack.us/i/87801160.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img846.imageshack.us/img846/705/87801160.th.jpg" /></a><a class="bbc_url" href="http://img641.imageshack.us/i/90363343.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img641.imageshack.us/img641/8588/90363343.th.jpg" /></a><br />
<a class="bbc_url" href="http://img14.imageshack.us/i/96095156.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img14.imageshack.us/img14/1879/96095156.th.jpg" /></a><a class="bbc_url" href="http://img94.imageshack.us/i/37800939.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img94.imageshack.us/img94/7751/37800939.th.jpg" /></a><a class="bbc_url" href="http://img824.imageshack.us/i/72678279.jpg/" rel="nofollow external" title="External link"><img alt="Posted Image" class="bbc_img" src="http://img824.imageshack.us/img824/2637/72678279.th.jpg" /></a><br />
<br />
<h2>
Plot Summary</h2>
Distant Souls takes place in the historical events in Dyrvingahl. Long before the start of the game, a dark being killed Nathan's parents, destroyed his entire village, and started a war between the Three Proud Nations.<br />
15 years later little is known about the dark being and those few who track him down call themselves hunters; each hunting it for it's own personal motive.<br />
Today, the world is in complete turmoil, many factions constantly form alliances to take over cities; lasting their control as short as the alliance was formed; while hunters have to make it's way through to reach their ultimate goal.<br />
Player's hunters will have to face with the decision to involve in local affairs or stay distant as much as they can.Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-43081545369363550902012-04-07T21:12:00.002-03:002012-06-14T20:42:46.044-03:00Crowdfunding... and taxes???So, I was reading a few forums today, and crossed <a data-cke-saved-href="http://forums.tigsource.com/index.php?topic=25156.0" href="http://forums.tigsource.com/index.php?topic=25156.0">around this page</a>, about the tax implications of crowdfunding.<br />
<br />
I don't know how it's currently being handled. Probably the way it's been suggested by the posters.<br />
<br />
I'm
not in the US, nor am I familiar with their tax laws, but I am familiar
with the one's in my country and Taxation Theory in general. I would
like to develop further on the concept; since my soon-to-be accountant
mind can't stop guessing about it:<br />
<br />
The problem with crowdfunding, as I addressed previously <a data-cke-saved-href="http://www.gamedev.net/blog/1172/entry-2254172-double-fine-success-intrigues/" href="http://www.gamedev.net/blog/1172/entry-2254172-double-fine-success-intrigues/">in another post</a>, is that it's not well defined what it actually is. And hence, it's hard to tell how it should be taxed.<br />
<br />
It
looks like a pre-sale on most aspects, except that if the project isn't
delivered, the money is lost; which is why it also shares some aspects
with an investment, because backers take a risk. Or it could be seen as a simple donation.<br />
<br />
<u>Note:</u> When I speak about "some laws" I'm referring to "laws in different countries".<br />
<br />
<h3 style="font-weight: normal;">
<b><span style="font-size: 18px;">Is it a pre-sale?</span></b></h3>
If
it's a presale, then the company is owing something. In accountancy
terms, that money doesn't constitute accrued revenues yet.<br />
Some
tax laws impose the obligation to pay the tax the moment the money
enters the company's pocket, but most of the time, the obligation comes
when the revenue becomes accrued.<br />
<br />
This means the tax will be paid <b>the moment the game is sold</b>
(or when the project gets cancelled, unless the money could somehow be
handed back to their backers. Although this would bankrupt any start up
company)<br />
<br />
<h3>
<span style="font-size: 18px;">Is it a donation?</span></h3>
If
it is, then the moment to pay is when the money enter's the company's
pockets unless it's a non-profit organization. Seemingly easy case.<br />
<br />
Except
when the company then "gives away" their game to their backers, it
constitutes a donation (which is actually a delievery of what's been
promised), this time from the company to the backers.<br />
<br />
The
thing is, some laws prevent or impose limits to substracting donations
from their Gross profit, resulting in higher gross profit(*). Therefore
such "donation" is taxed again. <b>This constitutes double-taxation</b>, so proper care must be taken to explain your local Country's IRS of the situation.<br />
<br />
Another approach to the <b>double-taxation </b>problem is that it's not a donation at all, but rather a <i>necessary cost to sustain the Source of Earnings</i>, therefore the limits to substract donations from net sales don't apply.<br />
<br />
(*)
I simplified it since most of the readers aren't tax experts. Donations
are actually substracted from gross profit, resulting in higher net
income. Doesn't really change the point of the discussion.<br />
<br />
<h3>
<span style="font-size: 18px;">Is it an investement?</span></h3>
A long discussed argument. I won't go into why it is, and why it is not.<br />
But if it is, then investments aren't taxed. The moment the investors pay their revenues varies <i><b>wildly</b></i> per country. Normally, variations include:<br />
<ul>
<li>Investors pay their taxes when they receive their dividends.</li>
<li>Investors pay their taxes when the distribution of dividends has been decided.</li>
<li>Investors don't pay, because the Company already paid for them.<br /><ul>
<li>The company is not allowed to substract dividends from their Gross profit, resulting in higher Net income. Paying a tax on the dividends would be double-taxation, so nothing is done.</li>
<li>The company is allowed to substract dividends from their Gross profit.
The tax is separately paid by the company either when the dividends
have been approved or when the investors actually receive the money.</li>
</ul>
</li>
<li>There are also hybrid models (investors pay a portion of the tax, the company pays the other part)</li>
<li>etc....</li>
</ul>
<br />
The thing is, <i>none of the backers receive dividends</i>. Therefore the money they put in, is never taxed; but we could do a bit more reasoning behind it:<br />
<ul>
<li>If the final game is worth more than the ammount the backer "invested", that
difference is a taxable result. Thing is, unless some law says
otherwise (i.e. for the sake of simplicity), it is the backer the one
who should pay the tax, not the company! It should be noted though, the company ought to be able to deduce that difference from their gross profit (see donations above); in which case the total ammount the Government receives is cancelled. <b>As a result, tax laws should consider not to pay in this case; as it doesn't make sense to spend effort on this. But unless there's a law allowing it, it is the backer who ought to pay the tax.</b></li>
<li>If the final game is worth less than the ammount the backer "invested", that difference is also a taxable result! The company received more money than it should and must pay taxes for that.
As for the backer, unless he makes games for a living (the backer is
either another game company or an indie developer), he probably can't
substract that donation (depends on the each law). <b>This difference is a taxable result</b>.</li>
</ul>
Since the only way crowdfunding can be taxed is, in this line of thought,
when the final game is worth less than the ammount the backer invested;
this is clearly the worst option for the Government, and the most
beneficial to videogame companies and the "investor"; from a taxation
perspective of course.<br />
<br />
<br />
<br />
My personal
opinion, crowdfunding resembles a lot like pre-sales, and should be
taxed as such. The alternatives are way too complex; while the pre-sale
method of handling taxes is widely used and well understood. Furthermore
it is the most fair and provides incentives for start up companies,
since tax payment is delayed until the game is produced & released,
allowing a company to use funds obtained from crowdfunding with more freedom; provided there's an exception for start ups in case they fail to deliver the project.<br />
<br />
<br />
Well,
this ended up being longer than expected, but I think I fully covered
the issue. Hopefully we'll start seeing some more serious debate about
it.<br />
I'm hoping to see some feedback, as well as some of you sharing your stories or your a view from your Country's legislation in the comments.<br />
<br />
Cheers!<br />
Don't forget to subscribe!Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com11tag:blogger.com,1999:blog-5914419889815086738.post-36815517467958893412012-03-19T00:29:00.000-03:002012-03-19T00:32:05.584-03:00Demo finally submitted to Intel Level Up contest!<div style="text-align: justify;">
3 months in crunch mode, 2 sleep-less weeks and a fully playable
demo has been developed. Evertyhing has been made under a very <b>tight</b> scheduled and
I'm glad I was able to meet it.</div>
<div style="text-align: justify;">
It requires a lot of sacrifice and self-discipline. Indie game
development is not for everyone and there are a few articles already
about it.</div>
<div style="text-align: justify;">
Everything's now up to the Level Up 2011 judges. All I hope is
that they have a lot of fun when playing the game.<br />
<br /></div>
<h2 class="western" style="text-align: justify;">
What to include in the demo?</h2>
<div style="text-align: justify;">
Initially I wanted to get ready an introduction scene and a boss
battle. Shortly after I realized the timeframe wouldn't allow me to
do both. I had to choose. So which one would more badass and
entertain more? I went for the boss. And I'm glad I did.</div>
<div style="text-align: justify;">
In the next weeks I'll be writing about how this boss was made
some other time.<br />
<br /></div>
<h2 class="western" style="text-align: justify;">
The importance of contests</h2>
<div style="text-align: justify;">
The contest's prizes sure are juicy. They're quite motivational.
But it's not just that what makes a contest so important. They impose
you a deadline. You're against the clock and you know that by certain
date, you need to have a fully playable demo. <b>And better have it
polished</b>.</div>
<div style="text-align: justify;">
“But it's a tech/prototype demo, right? Judges will take into
account”. Yes, they probably will, may be they won't. But I believe
a more polished, professional-looking game will be at an <i>advantage</i>
over those that don't. This doesn't mean that an unconventional
prototype-state competitor appears to be too fun has less chance to
win. Additionally, here was my logic:</div>
<div style="text-align: justify;">
Among all the contest prizes, whether it was the first or the last
prize, one of them is that the demo will be featured in the Steam's
'Demos' page. May be they'll ask the winners to polish a bit more
before publishing the demo (i.e. create an installer); or maybe they
won't. After all, the demos don't require to meet the quality
standards that full-featured games have (Steam integration,
leaderboards, achievements, etc)</div>
<div style="text-align: justify;">
If they won't... I asked myself, <b>“Do I really want my game to
look unprofessional when it goes to the demos page? Judges may be
forgiving on prototypes, but gamers/consumers aren't”</b></div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="font-weight: normal; text-align: justify;">
And there it goes. A driving force as
how polished a game should be. I had already noticed this advantage
from entering a contest when I was doing Derby Attack.<br />
<br />
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXys2v12AYa6t3d4En9eY34ZSWi0A-OSQ1yIMJ-YsrThjlUsy2fvhNtpExOp5qe3-PzGLI64OWo1wLuKSxxh5njNQzJOSreqrFfS5h52VABTo3AYpL1gzzLKmmQE4ZKfk4d2cgcQRpYg15/s1152/City01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXys2v12AYa6t3d4En9eY34ZSWi0A-OSQ1yIMJ-YsrThjlUsy2fvhNtpExOp5qe3-PzGLI64OWo1wLuKSxxh5njNQzJOSreqrFfS5h52VABTo3AYpL1gzzLKmmQE4ZKfk4d2cgcQRpYg15/s1152/City01.jpg" width="640" /></a></div>
<h2 class="western" style="text-align: justify;">
</h2>
<h2 class="western" style="text-align: justify;">
Last 2 weeks... /CRUNCH MODE: MAX</h2>
<div style="text-align: justify;">
Just like in traditional game programming, when you're approaching
deadline, development(*) consumes your whole life.</div>
<div style="text-align: justify;">
That may sound awful, but very good things came out of it:</div>
<ol style="text-align: justify;">
<li>The GUI was developed in those 2 weeks. I finally have GUI.
Wheeee!! Now I can change game settings on the fly without having
to edit a Lua file. I can also make interfaces for controlling live
values in real time.<br />
</li>
<li>Levels can be restarted over & over again. At first
frequent crashes appeared, and some engine weakpoints were revealed.
But almost everything is well now; and I can change a Lua file using
hotspot and reload the level without having to reload all resources
again.<br />
</li>
<li>It looks professional the whole time. Now everytime I'll need
to demo the game (i.e. to potential investors) I can ship it as is,
with latest modifications & enhancements.<br />
</li>
<li>Fixed small bugs & details that where being delayed.
Those are flagged for “fix later”. Two or three bugs have been
there since... a year ago!<br />
</li>
</ol>
<div style="text-align: justify;">
These are the sort of details that one doesn't push unless there's
goal to achieve, as when it happens when there's a contest deadline.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
(*) Note that I prefer saying “<i>develop</i>” rather than
“<i>programming</i>”, as I've been doing all kinds of
non-programming tasks that take me an equal amount of time: 2D &
3D modeling, game design, sound fx recording & layering, testing.</div>
<div style="text-align: justify;">
<br />
<br /></div>
<div style="text-align: justify;">
That's all for now.</div>
<div style="text-align: justify;">
Don't forget to subscribe!</div>
<div style="text-align: justify;">
/crunch mode: off</div>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-62040154988228271662011-10-31T23:08:00.000-03:002011-11-01T00:10:26.700-03:00New stuff, new screenshots, better lighting, more models. More everything<br />
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
It
has been a while since the last post. A lot has been done and I just
happen to have little time to be writing blog. Development is
steadily progressing and despite the quiet blog. there's a lot going
on.</div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<h2 align="JUSTIFY" class="western">
Adrianne was finnished</h2>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8gwiv2y8yXbieUmQhtfHzl9W-BJxfSZ9LS_1lEccWj55bkEu1Wl9s7BJIk5aJEbh9w1hibxHM_0MxS20cBiOLEIXAwdUniK7XTBlr9KfluwkQxFrETj-wdSJwFKWjlEtmZkVqGkLlvIX/s1600/NewLighting07.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8gwiv2y8yXbieUmQhtfHzl9W-BJxfSZ9LS_1lEccWj55bkEu1Wl9s7BJIk5aJEbh9w1hibxHM_0MxS20cBiOLEIXAwdUniK7XTBlr9KfluwkQxFrETj-wdSJwFKWjlEtmZkVqGkLlvIX/s320/NewLighting07.jpg" width="320" /></a>The
main female protagonist/antagonist wasn't finished at the time of
writing my last post. Her gameplay mechanics of one of those I like
most. She can control the wind to her advantage, making enemies hard
to move freely and while throwing environmental objects to them.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Xxn9f3Ho6-gbX-l6_yFnkGNxiMBKjNpqB_Xm0o6DQAQi_EQoBf-yHHnaH5g-Di9DxReeLIfqEsgIi06UGXQ0f_Us0mVNTye0udUg7U_-z4rtKOw6A-MBVG8QB-uSyEM2vToOrCUlCWNL/s1600/Adrianne01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1Xxn9f3Ho6-gbX-l6_yFnkGNxiMBKjNpqB_Xm0o6DQAQi_EQoBf-yHHnaH5g-Di9DxReeLIfqEsgIi06UGXQ0f_Us0mVNTye0udUg7U_-z4rtKOw6A-MBVG8QB-uSyEM2vToOrCUlCWNL/s640/Adrianne01.jpg" width="640" /></a></div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrqgbhKYw1JYqhCi6-Y8A7X7QPTvUghIo3o8Bh14_gmDuC6-J5mqfxR7rVTeySNNNYCgD40Ho_BoBLXUoEtNQe7U7jGO0_kSvYEirKxHTp-Iol9HT1xmyk6VYvUehnQZfyayiC6B5DUr2f/s1600/NewLighting02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrqgbhKYw1JYqhCi6-Y8A7X7QPTvUghIo3o8Bh14_gmDuC6-J5mqfxR7rVTeySNNNYCgD40Ho_BoBLXUoEtNQe7U7jGO0_kSvYEirKxHTp-Iol9HT1xmyk6VYvUehnQZfyayiC6B5DUr2f/s640/NewLighting02.jpg" width="640" /></a></div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<h2 align="JUSTIFY" class="western">
Revamped animation system</h2>
<div align="JUSTIFY">
Animation system was updated, took a couple of days
but now works better with particle effects triggering at the right
time. It's also easier to write.</div>
<div align="JUSTIFY">
<br />
<br /></div>
<h2 align="JUSTIFY" class="western">
Lua Hotspot and Particle FX
reloading</h2>
<div align="JUSTIFY">
For Lua, I created what I call the “hotspot”.
Basically it consists in three Lua files the engine monitors
constantly for file changes. If it finds out it has been updated, it
will automatically execute it's contents. This is great for rapid
prototyping, without having to restart the game for each small change
while, at the same time, having the comfort of your favourite IDE.
The hotspot works over a network. If you have an extra PC, you can
control the game from one machine and play on the other, without
having to Alt+Tab all the time.</div>
<div align="JUSTIFY">
The three files have the following behavior:</div>
<ul>
<li><div align="JUSTIFY">
Const.lua: The engine will open this file,
execute it's contents, then close the file.</div>
</li>
<li><div align="JUSTIFY">
New.lua: The same as Const.lua, but the
contents of the file are removed before closing.</div>
</li>
<li><div align="JUSTIFY">
Old.lua: This file doesn't get executed. It
gets incremented with New.lua's previous contents with each
execution.</div>
</li>
</ul>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbbuAZltNL_vxStpeipMrKT7U4LzUYkFEpLkVPbDnCT3Gi9gx-15qsmbhIydt-wQ-fDtWhsywFce12hBz9QqhSnIKKNUh1WaScYSgVcRYv2gmi5BFcIedcIST7rfwwftufy1bm5BxezkBk/s1600/Intro.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbbuAZltNL_vxStpeipMrKT7U4LzUYkFEpLkVPbDnCT3Gi9gx-15qsmbhIydt-wQ-fDtWhsywFce12hBz9QqhSnIKKNUh1WaScYSgVcRYv2gmi5BFcIedcIST7rfwwftufy1bm5BxezkBk/s320/Intro.jpg" width="320" /></a></div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
At
the same time, the engine is monitoring all particle effect files
(Ogre particles means it watches for *.particle files) If they're
modified, the particles being executed are loaded again and
restarted. This greatly improves the feedback of particle changes and
their visual appeal in game.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJoo5-0yoTGrNWefmI-zVeLjuWmh3rYHeawpCE3Pa9IIvzCBPam5Ye16Z4xgqI49PubHfnE-ZzG80UDqyOJe6NYYozJUYhJB_wxt7APU4mWuVJpxoeCVB9cqgCjR2P2Hqz_mIa76ZEcpd2/s1600/Intro02.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJoo5-0yoTGrNWefmI-zVeLjuWmh3rYHeawpCE3Pa9IIvzCBPam5Ye16Z4xgqI49PubHfnE-ZzG80UDqyOJe6NYYozJUYhJB_wxt7APU4mWuVJpxoeCVB9cqgCjR2P2Hqz_mIa76ZEcpd2/s640/Intro02.jpg" width="640" /></a> </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h2 class="western">
Changed sun's position</h2>
<div align="JUSTIFY">
The sun's movement was restricted to the same YZ
plane. Very boring, creating very boring, horizontal and vertical
shadows. The sun's movement is now more realistic and more fun,
creating very dynamic, diagonal shadows in cities.</div>
<div align="JUSTIFY">
It's about perception, take a photo from a car in
45° angle and looks much more in motion, vivid and fun than the same
picture being taken straight horizontally. <a href="http://www.video101course.com/shots_17.html">This
site explains it very well</a>. I really recommend that website. It
contains great explanations about how professionals place their
cameras, lights, and edit their scenes. It's a total eye opener.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY1Lh-Fjq3eW0LES3GMtuQ-QnZcaG_Ca9ybBkIz5aIjFBCdM1dxxHS8WYP_f2BIySeWnKA8C2-8zOMO5uyWC_EGN2lV6u1Iy9owrLN9avzfES_dS8sstND_lgSfFHjFmZORqxht5caZveN/s1600/Sun04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjY1Lh-Fjq3eW0LES3GMtuQ-QnZcaG_Ca9ybBkIz5aIjFBCdM1dxxHS8WYP_f2BIySeWnKA8C2-8zOMO5uyWC_EGN2lV6u1Iy9owrLN9avzfES_dS8sstND_lgSfFHjFmZORqxht5caZveN/s640/Sun04.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitTmR72FKEOLd_Z99KCueI2hnDyS2vHA7zWD_565c0ho7bf7oAe2noU7iGYr7fTGOcTnOn55Xf1KKG8zfPlyHvQOAFg4xxzOHGX4JR_YBGpi4wAVxcei58QowsPc-zoQvOxmYLWsvu8p-I/s1600/Sun05.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitTmR72FKEOLd_Z99KCueI2hnDyS2vHA7zWD_565c0ho7bf7oAe2noU7iGYr7fTGOcTnOn55Xf1KKG8zfPlyHvQOAFg4xxzOHGX4JR_YBGpi4wAVxcei58QowsPc-zoQvOxmYLWsvu8p-I/s640/Sun05.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZyA4w8Xhr3TxEHRxpXoSIrwoYpwC-Pz05EOogmJhbZjzpxXHw7hwCa-mJE9cBrwlmxThrtcBMsoexPngYqFJfq3EwsJhgYCDn5_rpvi34DuYvdNwOlml-RYqEtD9KmXMlwMxTsRdxtWAf/s1600/Sun03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZyA4w8Xhr3TxEHRxpXoSIrwoYpwC-Pz05EOogmJhbZjzpxXHw7hwCa-mJE9cBrwlmxThrtcBMsoexPngYqFJfq3EwsJhgYCDn5_rpvi34DuYvdNwOlml-RYqEtD9KmXMlwMxTsRdxtWAf/s640/Sun03.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBl_JxGdqPPPge6Wwenay7E8atUp3lhaYl-wbvXu_g5QAs-GfP6Jem-AkMeU68KVm0NYZNvY1LTfhlMcPDKsAzZiAQ_4Hapvs1_ve-wwR9llOMo-piKXBlVDzp9lJ9Tz_AZN_EHmAGxFVB/s1600/Sun02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBl_JxGdqPPPge6Wwenay7E8atUp3lhaYl-wbvXu_g5QAs-GfP6Jem-AkMeU68KVm0NYZNvY1LTfhlMcPDKsAzZiAQ_4Hapvs1_ve-wwR9llOMo-piKXBlVDzp9lJ9Tz_AZN_EHmAGxFVB/s640/Sun02.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZYOupPkknkW719d80EkPXifTjlxmAmYCvGQevLj_9mzWCHWvD6Mibd7oABoBqaESkldhRBKe-tkEyPa04_P8ML0CDvI0ZczXtBs23FLN5uLxxT0ws7BC-tRLOSjkXjoRKK9XVfxK4vqVL/s1600/Sun01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiZYOupPkknkW719d80EkPXifTjlxmAmYCvGQevLj_9mzWCHWvD6Mibd7oABoBqaESkldhRBKe-tkEyPa04_P8ML0CDvI0ZczXtBs23FLN5uLxxT0ws7BC-tRLOSjkXjoRKK9XVfxK4vqVL/s640/Sun01.jpg" width="640" /></a></div>
<div align="JUSTIFY">
<br /></div>
<div align="JUSTIFY">
<br />
<br /></div>
<h2 class="western">
Implemented three-point-lighting setup</h2>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2SwOMhmSofYi2kt_LDr9EJHhOXT5aZwveWHiuqg803kWcxi_Mj-F04jhBzIyceRv0BZEkkjdaAAwCkr1X9WMqM0tB5jC8adAIuVBvh7VEImjMFP8HighzDEJM-7DQwLIFIPTQjPCl14gc/s1600/NewLighting05.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2SwOMhmSofYi2kt_LDr9EJHhOXT5aZwveWHiuqg803kWcxi_Mj-F04jhBzIyceRv0BZEkkjdaAAwCkr1X9WMqM0tB5jC8adAIuVBvh7VEImjMFP8HighzDEJM-7DQwLIFIPTQjPCl14gc/s320/NewLighting05.jpg" width="320" /></a></div>
<div align="JUSTIFY">
The default lighting setup is now a <a href="http://en.wikipedia.org/wiki/Three-point_lighting">3-point-lighting</a>
setup. It now looks <b>a lot</b> better, and now has this unique
feeling I felt it was previously lacking. What I really like about
this setup is that it solved a problem that had me worried: it was
too dark and “dead”. Now the outlines are clearly highlighted,
the sense of depth is much greater, and what is darkened is still
dark, but you still are aware of what's there, something that was
missing before and shadowed scenes could really just become
frustrating.</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzangR1HyQthT8ycmQ3dbS4uNIw9FuAJeMPg1NEvoYJdE8j1E2SpJ03TAVM-laFqea8h5bNRFTeJXUjMer6ySLp0u8_fbrcpz3-RTK8qqjdRU2ePGnPdfBcu2r6WPTT-jxWnXAzISIKYmO/s1600/NewLighting06.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgzangR1HyQthT8ycmQ3dbS4uNIw9FuAJeMPg1NEvoYJdE8j1E2SpJ03TAVM-laFqea8h5bNRFTeJXUjMer6ySLp0u8_fbrcpz3-RTK8qqjdRU2ePGnPdfBcu2r6WPTT-jxWnXAzISIKYmO/s640/NewLighting06.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8gwiv2y8yXbieUmQhtfHzl9W-BJxfSZ9LS_1lEccWj55bkEu1Wl9s7BJIk5aJEbh9w1hibxHM_0MxS20cBiOLEIXAwdUniK7XTBlr9KfluwkQxFrETj-wdSJwFKWjlEtmZkVqGkLlvIX/s1600/NewLighting07.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf8gwiv2y8yXbieUmQhtfHzl9W-BJxfSZ9LS_1lEccWj55bkEu1Wl9s7BJIk5aJEbh9w1hibxHM_0MxS20cBiOLEIXAwdUniK7XTBlr9KfluwkQxFrETj-wdSJwFKWjlEtmZkVqGkLlvIX/s640/NewLighting07.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX916cNfh38pKU2vemWQ5zV80qLm9F8WLWgF-aW5m3we-w7Yp12LiKxASa_S0HihT5R-jfxhiJVSKZd2svdw9nD-TL2DeD8SuFUHkP-6U_pEvhDjq5Tr0UKnaqsHQtwiBN8d3rv09vj0H8/s1600/NewLighting04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX916cNfh38pKU2vemWQ5zV80qLm9F8WLWgF-aW5m3we-w7Yp12LiKxASa_S0HihT5R-jfxhiJVSKZd2svdw9nD-TL2DeD8SuFUHkP-6U_pEvhDjq5Tr0UKnaqsHQtwiBN8d3rv09vj0H8/s640/NewLighting04.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimD96PUvuDHZLIRfsIHHFMjgePIwS2RCL6HiS-JN85ocCkz-QmD0hwzcW62-wmVqf5khgs_UCe5CzZXYKtEZ1DXPf46EFQ7ZEjRRgEXoGJU7NAI_b3sB03KVT_uvjDTUdUGrpACUyYJXIw/s1600/NewLighting03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEimD96PUvuDHZLIRfsIHHFMjgePIwS2RCL6HiS-JN85ocCkz-QmD0hwzcW62-wmVqf5khgs_UCe5CzZXYKtEZ1DXPf46EFQ7ZEjRRgEXoGJU7NAI_b3sB03KVT_uvjDTUdUGrpACUyYJXIw/s640/NewLighting03.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrqgbhKYw1JYqhCi6-Y8A7X7QPTvUghIo3o8Bh14_gmDuC6-J5mqfxR7rVTeySNNNYCgD40Ho_BoBLXUoEtNQe7U7jGO0_kSvYEirKxHTp-Iol9HT1xmyk6VYvUehnQZfyayiC6B5DUr2f/s1600/NewLighting02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrqgbhKYw1JYqhCi6-Y8A7X7QPTvUghIo3o8Bh14_gmDuC6-J5mqfxR7rVTeySNNNYCgD40Ho_BoBLXUoEtNQe7U7jGO0_kSvYEirKxHTp-Iol9HT1xmyk6VYvUehnQZfyayiC6B5DUr2f/s640/NewLighting02.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaCzxLJPfZtoGk0cpr7Il-JAjCXNsu5apRAPvvR5AwmX9Zn_CfhqV1ufCmwIox4Gj5zeyPft71l044CkxOHSN12_IFvJYufPPtOgdphwFBlltHpnD96kvP0V7JzBPvT0jtsHA9buFctkLV/s1600/NewLighting01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiaCzxLJPfZtoGk0cpr7Il-JAjCXNsu5apRAPvvR5AwmX9Zn_CfhqV1ufCmwIox4Gj5zeyPft71l044CkxOHSN12_IFvJYufPPtOgdphwFBlltHpnD96kvP0V7JzBPvT0jtsHA9buFctkLV/s640/NewLighting01.jpg" width="640" /></a></div>
<div align="JUSTIFY">
<br />
<br /></div>
<h2 align="JUSTIFY" class="western">
New site layout</h2>
<div align="JUSTIFY">
I knew the blog was looking very simple and without
much care. I finally decided to put more on effort on it, since it's
currently the visible side of my work. I was hearing a presentation
where the speaker said the website is the visible face of the
organization, and it affects how people perceives the quality of your
work. Crappy website = crappy product/service. That struck me and
urged me to do something about the site.</div>
<div align="JUSTIFY">
The mood and colour theme matches that of Distant
Souls Act I.</div>
<div align="JUSTIFY">
<br />
<br /></div>
<h2 align="JUSTIFY" class="western">
Attack Animations</h2>
<div align="JUSTIFY">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4gFURWf84E7BUXd7MHLW5JaqExQDeh4thDpG3cXySP7LYDwffKvWFBLaPQDme9GRAzTGsumhsceK2ujx5r9Pe6sIWdKK0foZcOSfU34PpZ3QqSHoAdk7Vc3paM2XBfQliB2c-F3apAD6f/s1600/Attack11.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4gFURWf84E7BUXd7MHLW5JaqExQDeh4thDpG3cXySP7LYDwffKvWFBLaPQDme9GRAzTGsumhsceK2ujx5r9Pe6sIWdKK0foZcOSfU34PpZ3QqSHoAdk7Vc3paM2XBfQliB2c-F3apAD6f/s320/Attack11.jpg" width="320" /></a>Most attack animations are done (and with it,
combos). It still needs tuning, and many of them still have particle
effects missing. Still that's the least effort and the coolest part.
Not really an issue and it's very exciting!</div>
<div align="JUSTIFY">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaRu61sPZjuHxT3S9nEnKiUHhiWyTmNpyvK-iV_LPhJCDTq02cZLc04REDa-RdpbcRNZ0w0i_uj3qslW5aJbzezI1zlDYuAxYmxozCqolaonCOEFmWboF-gFOhwJMm9R1jHYGJEiIfuguM/s1600/Attack12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaRu61sPZjuHxT3S9nEnKiUHhiWyTmNpyvK-iV_LPhJCDTq02cZLc04REDa-RdpbcRNZ0w0i_uj3qslW5aJbzezI1zlDYuAxYmxozCqolaonCOEFmWboF-gFOhwJMm9R1jHYGJEiIfuguM/s640/Attack12.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYHbNd8qhM09_F1BeWebky88FMcgM29oVZbS_c9y0jtd22zYNOYLwgY8ckgh3-5gIaYbLoc2vSJHe5nHc0wBKDeElOd6IVy2gd6xZ2iLVHvC3-VTWdlHBnjxoZkqI-wFHksk-uL3Qg8YOA/s1600/Attack13.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYHbNd8qhM09_F1BeWebky88FMcgM29oVZbS_c9y0jtd22zYNOYLwgY8ckgh3-5gIaYbLoc2vSJHe5nHc0wBKDeElOd6IVy2gd6xZ2iLVHvC3-VTWdlHBnjxoZkqI-wFHksk-uL3Qg8YOA/s640/Attack13.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ4v8NW9E-2tTgiLN3OmVaW4l6xXhYvKCTAuHMnCn8tRd2Q9gNxqqyPbdXuptspqfAOE-N49QTASu068tzAmjI8uqhgEcgt6m5HSFBij8gt7ANFwZOchqHzMKJ_2IAm8m9AfInuV_u_hKG/s1600/Attack08.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ4v8NW9E-2tTgiLN3OmVaW4l6xXhYvKCTAuHMnCn8tRd2Q9gNxqqyPbdXuptspqfAOE-N49QTASu068tzAmjI8uqhgEcgt6m5HSFBij8gt7ANFwZOchqHzMKJ_2IAm8m9AfInuV_u_hKG/s640/Attack08.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqkqXGdh2Cm-KvAn4-kOMEI1CtJMd1U932MKtSrRkzwFEsCybWXhXT1uTFrvRElWIGyzAcXmUadIFrzux7mtNj8exGeAkE7JAjLKnal59aNb4tXYpSYrgUHTP-YosBnJDpqQg09roUFZpi/s1600/Attack09.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqkqXGdh2Cm-KvAn4-kOMEI1CtJMd1U932MKtSrRkzwFEsCybWXhXT1uTFrvRElWIGyzAcXmUadIFrzux7mtNj8exGeAkE7JAjLKnal59aNb4tXYpSYrgUHTP-YosBnJDpqQg09roUFZpi/s640/Attack09.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZZAm7U9lYor5c6RQByZ8dRdEgt2fwznvxsfArgVeWZg9bjcwzcwgdKSz16xmlleYWcvUGuOD-4gV-c4XzdG7KoXP5qhy3hv5An5XXxQB5teYlH-x7MTtYtROZDYeMf2Sdc82YRJOdWf-K/s1600/Attack10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZZAm7U9lYor5c6RQByZ8dRdEgt2fwznvxsfArgVeWZg9bjcwzcwgdKSz16xmlleYWcvUGuOD-4gV-c4XzdG7KoXP5qhy3hv5An5XXxQB5teYlH-x7MTtYtROZDYeMf2Sdc82YRJOdWf-K/s640/Attack10.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpyajPqagwHGEKBDZtAMoHkPp6JvCn1_xKRuR9vMksXuMOWi6523K0wwM5q60kSEObiyI1ZToWABHbdatrfO1A9u5Utup_n11UGSPrAPe1e-mkOvo7kZbFqCzglsCQqQuqK8NC17QhCnD9/s1600/Attack03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpyajPqagwHGEKBDZtAMoHkPp6JvCn1_xKRuR9vMksXuMOWi6523K0wwM5q60kSEObiyI1ZToWABHbdatrfO1A9u5Utup_n11UGSPrAPe1e-mkOvo7kZbFqCzglsCQqQuqK8NC17QhCnD9/s640/Attack03.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDMbba-aQP_57RftD68KjemCmge72kxB_z6IqruQFSCq_Q0mE6WdTOnocaPUqC8zQwMmabkL8FUvno_THB03obNUrKCJspEZsI5A6dc_QftmHTEO-_MGPRIBlEL98C6kHj6LTuQbb5yTAu/s1600/Attack04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDMbba-aQP_57RftD68KjemCmge72kxB_z6IqruQFSCq_Q0mE6WdTOnocaPUqC8zQwMmabkL8FUvno_THB03obNUrKCJspEZsI5A6dc_QftmHTEO-_MGPRIBlEL98C6kHj6LTuQbb5yTAu/s640/Attack04.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3E1_J4U_JDC07SPg5JRC8d3Y5lovHcpUc1R_uYJqb-WfHyYac9AO4XXs0c0RaIpP0QXW0-Lwih2J8ciQ4K8rYUxkdbgvH35fvfwAgvB9ZOCgF-S_bavoB50wPbA57jTyl0An9ZozFPIO/s1600/Attack05.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjC3E1_J4U_JDC07SPg5JRC8d3Y5lovHcpUc1R_uYJqb-WfHyYac9AO4XXs0c0RaIpP0QXW0-Lwih2J8ciQ4K8rYUxkdbgvH35fvfwAgvB9ZOCgF-S_bavoB50wPbA57jTyl0An9ZozFPIO/s640/Attack05.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga8u6GUF7Xly5lMB7Usw-QH-qizgJm87qAI0yhclOlQNztpKEoZgzzICB6DQrCF41KF8ZqziR5-cX99f7H6HSuy1AP38dzsCpR3WmJcSdOAUnB6NBxALTFMSloL0n6SxNzx_MiZEvinDAW/s1600/Attack06.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga8u6GUF7Xly5lMB7Usw-QH-qizgJm87qAI0yhclOlQNztpKEoZgzzICB6DQrCF41KF8ZqziR5-cX99f7H6HSuy1AP38dzsCpR3WmJcSdOAUnB6NBxALTFMSloL0n6SxNzx_MiZEvinDAW/s640/Attack06.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhng7l4PfJX6hgcgdks2-rzzvc1H6vz05lzczDbmQx7rzVtT0jCwZ6BYz7k7Zz4P6GFteCjNPTcnga8WtL0Ux7-HvxUwzx7kPXF7CBPxeAxyTzd4LFV34dnpZ72xUoAjZ7ViN218Hmiw679/s1600/Attack07.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhng7l4PfJX6hgcgdks2-rzzvc1H6vz05lzczDbmQx7rzVtT0jCwZ6BYz7k7Zz4P6GFteCjNPTcnga8WtL0Ux7-HvxUwzx7kPXF7CBPxeAxyTzd4LFV34dnpZ72xUoAjZ7ViN218Hmiw679/s640/Attack07.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8MpimX1qYTa_1Bf642iJyTZRVd3BFy7jaksrpvDqBimzITY646Kg3tDJ1i-Um_ovA8-HRmplA1N9L03NRTIUd1uRHlZM7iU3YTQXeE-xguQcSSKpmkvjqS2o-iET9a7TjLm0gCvWSEkfm/s1600/Attack01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8MpimX1qYTa_1Bf642iJyTZRVd3BFy7jaksrpvDqBimzITY646Kg3tDJ1i-Um_ovA8-HRmplA1N9L03NRTIUd1uRHlZM7iU3YTQXeE-xguQcSSKpmkvjqS2o-iET9a7TjLm0gCvWSEkfm/s640/Attack01.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTt7__ZD3EINtGj7NrjVDnZhYyUK2K2VEaSstRKG7OyZViO6-Ii8rMi35N3b9KMBvqpDX7xMr81od7YdUXv_oKr8CYDQLKd7yUpqL1sNc02AefO2klWqmC5yPsY_TU7qSLq5Wp-0mp-Pu9/s1600/Attack02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTt7__ZD3EINtGj7NrjVDnZhYyUK2K2VEaSstRKG7OyZViO6-Ii8rMi35N3b9KMBvqpDX7xMr81od7YdUXv_oKr8CYDQLKd7yUpqL1sNc02AefO2klWqmC5yPsY_TU7qSLq5Wp-0mp-Pu9/s640/Attack02.jpg" width="640" /></a></div>
<div align="JUSTIFY">
<br />
<br /></div>
<h2 align="JUSTIFY" class="western">
New buildings</h2>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
Following
<a href="http://wiki.polycount.com/ModularMountAndBlade">these tips &
tricks</a>, I've started modeling new buildings. One floor per day.
I've done 4 floors in total. I could've made more, but studies
started delaying me this month.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsr68QOxw053GfYDJrTO1BDih0Hv63YE7_mEC-YCnZl_G57f4GVV58O-U8AnyYZNOUx8-K7KHuTvQMSEWYRR7-Tpaj4CX7bNBtOleI2YzQhl118OiSjH_InrNZ6z8My7Vrv5C_-kKEpcpm/s1600/Building01.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsr68QOxw053GfYDJrTO1BDih0Hv63YE7_mEC-YCnZl_G57f4GVV58O-U8AnyYZNOUx8-K7KHuTvQMSEWYRR7-Tpaj4CX7bNBtOleI2YzQhl118OiSjH_InrNZ6z8My7Vrv5C_-kKEpcpm/s640/Building01.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVc21BKNBEP3zge96SewzFeVY0d0XzPAWjNSlWGqrLiJM-wAc0QLL_GkeiRMRKLdTNqaoVThFZ9A6Pkm8gQZ6Z2Gov7paPoPLxnqWdewNc7XB4gwtco9FhqXHVDub5-zHS9GFRJByYXTZO/s1600/Building02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVc21BKNBEP3zge96SewzFeVY0d0XzPAWjNSlWGqrLiJM-wAc0QLL_GkeiRMRKLdTNqaoVThFZ9A6Pkm8gQZ6Z2Gov7paPoPLxnqWdewNc7XB4gwtco9FhqXHVDub5-zHS9GFRJByYXTZO/s640/Building02.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitON-jJCsc4qRIUybxdEx1rATCOO54lKn5jMaLtt5FknF1knuVCDQCpvNQmf2BFR-gcm60SAbMnQ_UzVFDdAF-3KJ6JNJlkH1V0_c0fXgWZ3X1iItr48z2kQ1E-LGD3W2xPmadnZGRjTbM/s1600/Building03.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="423" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitON-jJCsc4qRIUybxdEx1rATCOO54lKn5jMaLtt5FknF1knuVCDQCpvNQmf2BFR-gcm60SAbMnQ_UzVFDdAF-3KJ6JNJlkH1V0_c0fXgWZ3X1iItr48z2kQ1E-LGD3W2xPmadnZGRjTbM/s640/Building03.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WFV-J0_SvQ0A4aZdhWepmxZ3ITMZY7vr8OM_dljMxvw_Go33TWnM8H-neZyRWKMkCKcQMbNyA_T_fzyECUIX57BoEo9SdQw6fVG4NWZMCvtPLf2VZ3qUFaz-TDjqhQYyrmU34WKIW6Gp/s1600/Building04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WFV-J0_SvQ0A4aZdhWepmxZ3ITMZY7vr8OM_dljMxvw_Go33TWnM8H-neZyRWKMkCKcQMbNyA_T_fzyECUIX57BoEo9SdQw6fVG4NWZMCvtPLf2VZ3qUFaz-TDjqhQYyrmU34WKIW6Gp/s640/Building04.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaQnr9zryuVobOLcvWER8Y7VOe9PS10EXpVG-x_9DJIH-uGn8Hcxsr_KQdZdv4s-z0VA6TRvTQsgm70EomOXdqit9EiRcNMe143ljIKeOlBbJOxUoOJWJx6UhM478djQjfySopcuj17K_q/s1600/Building05.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaQnr9zryuVobOLcvWER8Y7VOe9PS10EXpVG-x_9DJIH-uGn8Hcxsr_KQdZdv4s-z0VA6TRvTQsgm70EomOXdqit9EiRcNMe143ljIKeOlBbJOxUoOJWJx6UhM478djQjfySopcuj17K_q/s640/Building05.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDS3HgLobCCfL_TgquBPb3ILXo28Ej4SLkIsxfbticy8ZNswLLTM2MMA7e7kaAJpnHociigItQFi4qhCj77YPUFA8JAcmNs8XlbRSTnrjp7srZsBSAqJf0p9Pl_VGGjMyD2MfDAkCymhj7/s1600/Building06.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDS3HgLobCCfL_TgquBPb3ILXo28Ej4SLkIsxfbticy8ZNswLLTM2MMA7e7kaAJpnHociigItQFi4qhCj77YPUFA8JAcmNs8XlbRSTnrjp7srZsBSAqJf0p9Pl_VGGjMyD2MfDAkCymhj7/s640/Building06.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLfUPfSG-PcsShBvYFRx3MUvwwE7JCp06XenS0okm9WvoXI0YbqA_8azLrNAoRm1aW-K-3KdccdyXRSmMV87UmgpptHwj1aNXpW02YjAIyH0kXwiVdfXR-J3rLMQmoYWWIlUY7yF2YChKJ/s1600/Building07.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLfUPfSG-PcsShBvYFRx3MUvwwE7JCp06XenS0okm9WvoXI0YbqA_8azLrNAoRm1aW-K-3KdccdyXRSmMV87UmgpptHwj1aNXpW02YjAIyH0kXwiVdfXR-J3rLMQmoYWWIlUY7yF2YChKJ/s640/Building07.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlipLFAC6mkqvhYhAkzLdwXd8qWiOMsajm4DvyCEOU6lmzcYaJZgsRHEzF2zrxX5vJGozWnsMmsgjHAYvA7_PjxD2CNYDHUABAQrEi439xdLXKJLPkrG9JN7uY66V7GOQmcVszcqAC2Ak3/s1600/Building08.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlipLFAC6mkqvhYhAkzLdwXd8qWiOMsajm4DvyCEOU6lmzcYaJZgsRHEzF2zrxX5vJGozWnsMmsgjHAYvA7_PjxD2CNYDHUABAQrEi439xdLXKJLPkrG9JN7uY66V7GOQmcVszcqAC2Ak3/s640/Building08.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwl0TC8CuwsHkK0Cek-wc_v2H8ToNNUiJjVUAbMFFSwVM5qHduRB4zgThp5HR0HEKZfH3TZlQ_89pHmyEb2ggrw5-MNiwAxdAdGKBHkB-YR9gBrjqLLwu3eC4n7V0GtJeB0QBVthlDtx5a/s1600/Building09.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwl0TC8CuwsHkK0Cek-wc_v2H8ToNNUiJjVUAbMFFSwVM5qHduRB4zgThp5HR0HEKZfH3TZlQ_89pHmyEb2ggrw5-MNiwAxdAdGKBHkB-YR9gBrjqLLwu3eC4n7V0GtJeB0QBVthlDtx5a/s640/Building09.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNgOYIuTDLrDa4BjHoNVZkQM2x20_GaCFmL9PgArFdn2lDWHPPCi2mCpOqciKEnI2zIs8cyNF5NDQMTBFBx7152WhhhjMajUGVWLsoHbY1l-fAiOkER6DYLHb5N2GTnBVdXrHeyWznYbc5/s1600/Building10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNgOYIuTDLrDa4BjHoNVZkQM2x20_GaCFmL9PgArFdn2lDWHPPCi2mCpOqciKEnI2zIs8cyNF5NDQMTBFBx7152WhhhjMajUGVWLsoHbY1l-fAiOkER6DYLHb5N2GTnBVdXrHeyWznYbc5/s640/Building10.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidc2E-UDEan8Usi_ve0KDtw-jILKXoUXvI7NZ_8NQ_y1qt9AKm7aNA86zo3evmG3tS2KsNAY0TO-Xs8LvRCrEA2xHngM28OXLHVApkAvHSl-fb27pjIo4WmNvCax7yf_qVWJnW2jivx6aS/s1600/Building11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidc2E-UDEan8Usi_ve0KDtw-jILKXoUXvI7NZ_8NQ_y1qt9AKm7aNA86zo3evmG3tS2KsNAY0TO-Xs8LvRCrEA2xHngM28OXLHVApkAvHSl-fb27pjIo4WmNvCax7yf_qVWJnW2jivx6aS/s640/Building11.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA_BrSlwolmIe1wudTI_ss3O-38WruY1xpqmMwbSWsEs0F4T5LdrhQYU9-YKlhoDiritLfjgHh10ZqwDsHcXNbYCnNRRmWufK2h7NjFBU7zz_iO5CEnejG2lhcYPmTEH9VAVR3HhVIuHO4/s1600/Building12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA_BrSlwolmIe1wudTI_ss3O-38WruY1xpqmMwbSWsEs0F4T5LdrhQYU9-YKlhoDiritLfjgHh10ZqwDsHcXNbYCnNRRmWufK2h7NjFBU7zz_iO5CEnejG2lhcYPmTEH9VAVR3HhVIuHO4/s640/Building12.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKpcI_Mxbl80vfe_K2bE5q8rb0X_e3kVWGpNPPwZpvfHimrbf6-JIGylUzHWBEaWu8tg5JfUd8BEePXeVeSPVn_5Y3BYp3wzSFBCjYy8cpsGXt1F5Ii-XTffUE7_KjOUjXJ_k7NAUwzQly/s1600/Building13.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="422" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgKpcI_Mxbl80vfe_K2bE5q8rb0X_e3kVWGpNPPwZpvfHimrbf6-JIGylUzHWBEaWu8tg5JfUd8BEePXeVeSPVn_5Y3BYp3wzSFBCjYy8cpsGXt1F5Ii-XTffUE7_KjOUjXJ_k7NAUwzQly/s640/Building13.jpg" width="640" /></a></div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<div align="JUSTIFY" style="font-style: normal; margin-bottom: 0cm;">
<br /></div>
<h2 class="western">
Next Focus</h2>
University is taking quite most of my time next weeks. I am now
focusing on having more buildings to get a vibrant city soon. It
takes little time and highly satisfying results. <span style="font-style: normal;">I'm
trying to build an intro in hopes of getting the first trailer and
some gameplay footage soon.</span><br />
<span style="font-style: normal;">I'm going to participate in the
upcoming <a href="http://software.intel.com/sites/campaigns/levelup2011/">Intel
Level Up 2011</a> contest so wish me luck.</span><br />
<span style="font-style: normal;">There's also a angel investors
meeting late November, which I intend to attend. This is quite new in
my Country, this year would be the second time this is made. I'm
somewhat both fortunate and unfortunate that the game industry is
hardly developed in my area.</span><br />
<br />
<br />
<span style="font-style: normal;">Until next time!</span><br />
<span style="font-style: normal;">Thanks for reading!</span><br />
<br />
<span style="font-style: normal;">Did you like it? Then don't forget to share! Click in <a href="http://www.blogger.com/share-post.g?blogID=5914419889815086738&postID=6204015498822827166&target=facebook" target="_blank">Share in facebook</a>, or <a href="http://www.blogger.com/share-post.g?blogID=5914419889815086738&postID=6204015498822827166&target=twitter" target="_blank">retweet</a>.</span>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-85400244752610065102011-08-08T00:28:00.000-03:002011-08-08T01:01:03.197-03:00UpdatesWhoaaaaa!! It's been a busy month. I apologize for the lack of updates, but I've been very busy lately. <p style="margin-bottom: 0cm"><br /></p> <p style="margin-bottom: 0cm; font-weight: bold;"><span style="font-size:180%;"><u>What's new?</u></span></p><p style="margin-bottom: 0cm;"><br /></p> <p style="margin-bottom: 0cm"><span style="font-size:130%;"><b>Personal stuff</b></span></p> <p style="margin-bottom: 0cm">Been studying like crazy, I passed Auditory! It's been very very hard. I'm now <i>this</i> close for graduating as accountant (<i>yes, I'm a C++ programmer, a modeler, </i><i><u>and</u></i><i> an accountant. Being versatile helps keeping oneself open minded and you learn a lot; as well as taking a business seriously</i>)</p> <p style="margin-bottom: 0cm"><br /></p> <p style="margin-bottom: 0cm"><span style="font-size:130%;"><b>Other projects</b></span></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> <a href="http://sourceforge.net/projects/ogremeshy/">Ogre Meshy hit 1.3</a> version. Three versions had been released since <a href="http://www.gamedev.net/blog/1172/entry-2250251-making-your-character-come-to-life-part-ii/">last time I posted</a>. Bones can now have their names displayed in the 3D window, better Linux integration and improved stability. Fixed crashes on some resource reloads. It now supports the latest Ogre's 1.8 skeleton format.</p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><br /></p> <p style="margin-bottom: 0cm"><span style="font-size:130%;"><b>Distant Souls</b></span></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> The juicy stuff! Best things come last. I've been working on new models for the game. They're all secondary and primary characters (aka protagonists). By reusing as most as possible, I've been doing new characters at a rate of about 7-9 days per model. This includes modeling, texturing, rigging and readapting the new animations. Each character is taking less time. Last one took me 6 days.</p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><br /></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> At the beginning I was trying to make each character unique. As a start, each character having it's own height. <b>Really bad idea!</b> Blender is terrible when scaling a skeleton (oops, they call it “armature”) as their animations may need serious adaptations. Blender doesn't have retargeting algorithms to automatize the process, so it takes one to two days in fixing these bugs.</p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> Lesson learned: From now on, use standardized sizes. One for boys, one for girls.</p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><br /></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> Note the following screenshots were taken <i>as is</i> during development. They don't reflect the quality of the end product.</p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><br /></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none;"> And now, let me introduce you to...</p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAYG1bDYCshLDofNAlVp7Rk95Wloz5VTubx1LyUTXTwXNH1ySt-4_v_JMiLs6_ZS5CLYJz0m0uUUs-scbZkCnJ4d6oOqI4Wt9qLhJpB7kQ35MTkXH8GlUliIXuLFDot6bSrrgG7nNMXcf/s1600/Rachel01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVAYG1bDYCshLDofNAlVp7Rk95Wloz5VTubx1LyUTXTwXNH1ySt-4_v_JMiLs6_ZS5CLYJz0m0uUUs-scbZkCnJ4d6oOqI4Wt9qLhJpB7kQ35MTkXH8GlUliIXuLFDot6bSrrgG7nNMXcf/s400/Rachel01.jpg" alt="" id="BLOGGER_PHOTO_ID_5638322459629249170" border="0" /></a></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none; text-align: center;"> “<i>Look at the camera sweety”</i></p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiBVlQ58lxJHwtPgpl-RU2RIgV4JtEBHZ5i17MpZh_RJa4ceAAREjl3W7L4KwxziOyFG9-ryMeYu0LJsXoI5gbrzXPkYokLzKYcrbDPOM9NBnuMreOvUNzE7NxqM9TUZidhiTRNy5REP41/s1600/Rachel03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhiBVlQ58lxJHwtPgpl-RU2RIgV4JtEBHZ5i17MpZh_RJa4ceAAREjl3W7L4KwxziOyFG9-ryMeYu0LJsXoI5gbrzXPkYokLzKYcrbDPOM9NBnuMreOvUNzE7NxqM9TUZidhiTRNy5REP41/s400/Rachel03.jpg" alt="" id="BLOGGER_PHOTO_ID_5638322860001296322" border="0" /></a></p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy9WwuiXNJYF_58UW-prLzKehTHVsFXrgYir6JAJMz7M2vCmSJyBUdhTxPWUY5BYRWZXBv9UKwes2JIcVkJb3SiKuHGHTXgLSRDlwvLrmZXJFpvFvZylHkr08n0uJysU8fwedI2Ze6XasJ/s1600/Rachel02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 364px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhy9WwuiXNJYF_58UW-prLzKehTHVsFXrgYir6JAJMz7M2vCmSJyBUdhTxPWUY5BYRWZXBv9UKwes2JIcVkJb3SiKuHGHTXgLSRDlwvLrmZXJFpvFvZylHkr08n0uJysU8fwedI2Ze6XasJ/s400/Rachel02.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323070703514898" border="0" /></a></p> <p style="margin-bottom: 0cm; font-weight: normal"></p><p style="margin-bottom: 0cm; font-weight: bold; text-decoration: none;"><span style="font-size:100%;"><i><u>Rachel!</u></i></span></p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none;"> She's young, passionate, s<span style="font-size:100%;">weet and cheerful. One of the main character's love interest. I have very special plans for this character (you'll have to wait for the game!) as a key plot element for the story. Rachel comes from a gifted family, manifested every now and then as a yin-yang symbol in her eyes instead of regular pupils. Naturally, her connection with the spirit world is stronger than most people.</span></p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"><span style="font-size:100%;"><br /></span></p> <p style="margin-bottom: 0cm; text-decoration: none; text-align: center; font-weight: bold;"></p><p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4eg59yDbRzAVjscRVUj7z6245Dyi7wCs_lK_FJipdXVgWTqapriSZtzE1swJDzzzwHvq0yhGELlPezG5b4yRnA76f6NA84K1wehzf5QLNSsxXiKHa418NFUEOOkJG8o2v0_YfVpNxi9_1/s1600/Ismael01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4eg59yDbRzAVjscRVUj7z6245Dyi7wCs_lK_FJipdXVgWTqapriSZtzE1swJDzzzwHvq0yhGELlPezG5b4yRnA76f6NA84K1wehzf5QLNSsxXiKHa418NFUEOOkJG8o2v0_YfVpNxi9_1/s400/Ismael01.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323315067850034" border="0" /></a>“<span style="font-size:100%;"><i>...”</i></span></p> <p style="margin-bottom: 0cm; font-weight: normal;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqL_BqvBJsg1NlYw9IH_kTcgTz3LgI59IqgB2c_p7aCwGybm1lpuI3y-iW08PW56ySbugvwixAZiW4QrEnbMEaIHceq6WDUTgxCDjyGMn9h0RRiIO4Krc9Z8hmrskajYwe195ycH1wrPpg/s1600/Ismael02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgqL_BqvBJsg1NlYw9IH_kTcgTz3LgI59IqgB2c_p7aCwGybm1lpuI3y-iW08PW56ySbugvwixAZiW4QrEnbMEaIHceq6WDUTgxCDjyGMn9h0RRiIO4Krc9Z8hmrskajYwe195ycH1wrPpg/s400/Ismael02.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323410022376002" border="0" /></a></p><p style="margin-bottom: 0cm; font-weight: normal"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Ll-TthwVAqo5onDGp39q0gvQKf795FbAKL3s5N6qz_Wrx5E13UfmsiGZi03YWk3s8CdTHo7LlX2zd895RBw2pPqd_-WqmBy2SM5nNF4DnEnSC4XFFjs57vIViprJ0PNd4dzvicRUCVyB/s1600/Ismael03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj2Ll-TthwVAqo5onDGp39q0gvQKf795FbAKL3s5N6qz_Wrx5E13UfmsiGZi03YWk3s8CdTHo7LlX2zd895RBw2pPqd_-WqmBy2SM5nNF4DnEnSC4XFFjs57vIViprJ0PNd4dzvicRUCVyB/s400/Ismael03.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323667904124786" border="0" /></a></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: bold; text-decoration: none;"> <span style="font-size:100%;"><i><u>Ismael</u></i></span></p><p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"><span style="font-size:100%;">Don't bully him about his girly complexion or he'll kill you. Despite his appearance he's a trained deadly assassin who went rogue. He helps the main team as much as he spends fleeing from the Hashashin order for leaving them.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">Originally, I intended him to be the “pretty boy”, with some story jokes about it. He was the first male character I did, based on the female models I've been doing. As a result, he looks very feminine. It looked far more feminine than I envisioned. But he wasn't a primary character, and I spent one week on him and wasn't noticeable until it was too late. To be honest, his design is the one I liked less. Let me rephrase... I don't even like it. He was supposed to be a bad-ass looking assassin paying tribute to the game that inspired me to make this game, with a “pretty boy” harassment. So I said “f*ck it”. He's staying so. Instead, I've slightly modified the story and he's now a rogue assassin with a psychological complex for being bullied for looking as a girl. I'm considering making him mentally unstable.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">His fellow assassin will be bad-ass when it's time for their Order to enter the story (by the way, the other are all bald)</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">By the way, Matrix-style capes may look awesome, but they're painful to animate. Unless you have a real-time soft body simulator, it gets through<i> everything. </i>It always finds it's way.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"><br /></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvaLO3kQfzkqfbLgnfxE-yoygG79yaCtQHDdx-T9JJGoRus0XRAQh1V3UfpYThtTNPsj26RGmCIKXia8qsg2rCe_4lSpg2tjo_yn4z95UAOPS0dpiJxB13fggb0t9TeZG216eL_DMKnNK2/s1600/Joseph01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 396px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvaLO3kQfzkqfbLgnfxE-yoygG79yaCtQHDdx-T9JJGoRus0XRAQh1V3UfpYThtTNPsj26RGmCIKXia8qsg2rCe_4lSpg2tjo_yn4z95UAOPS0dpiJxB13fggb0t9TeZG216eL_DMKnNK2/s400/Joseph01.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323853770569394" border="0" /></a></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none; text-align: center;"> “<span style="font-size:100%;"><i>Leave them be, it's not our problem”</i></span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1svLxPQgX_9roExv0TlMVJ2qP7W_dQZ0rDhBHWQlCcFan2_Rx-Aw_KqhxVLhSLvpJ06XvAokyepJr_fBnh7HEBJwBv-nk8II006HtQrlDSXxnivvtTlRcgY-HEelKSr42SwW9mmhwJid1/s1600/Joseph03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 241px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1svLxPQgX_9roExv0TlMVJ2qP7W_dQZ0rDhBHWQlCcFan2_Rx-Aw_KqhxVLhSLvpJ06XvAokyepJr_fBnh7HEBJwBv-nk8II006HtQrlDSXxnivvtTlRcgY-HEelKSr42SwW9mmhwJid1/s400/Joseph03.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323942578967346" border="0" /></a></p><p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzwHzvqjtV2wSVKTGC0X326PeH-UE-o0bKNYHk2idaikgD4XBn96BCFhsUeo614xpOv6-cks1ZFh6RqMd62c3-5GVzjs2FW7S2DuirBfK32EMu70uCCeyOsyRqfTqKhpJX6TXCc2YAWWS-/s1600/Joseph04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 238px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzwHzvqjtV2wSVKTGC0X326PeH-UE-o0bKNYHk2idaikgD4XBn96BCFhsUeo614xpOv6-cks1ZFh6RqMd62c3-5GVzjs2FW7S2DuirBfK32EMu70uCCeyOsyRqfTqKhpJX6TXCc2YAWWS-/s400/Joseph04.jpg" alt="" id="BLOGGER_PHOTO_ID_5638323991862661666" border="0" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF-UVP2TgyTCARXCQoMILNR3mBCINduNFUh-iblVi7T8DYgYCI4wjvn3X0WQBhcP5oByxZRf43WH2zPXvxiv79kGhktFSVacnf15jVZdMw5p4293oO-obgR2KIYB-XyDQUEYf0atR_1y5U/s1600/Joseph06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgF-UVP2TgyTCARXCQoMILNR3mBCINduNFUh-iblVi7T8DYgYCI4wjvn3X0WQBhcP5oByxZRf43WH2zPXvxiv79kGhktFSVacnf15jVZdMw5p4293oO-obgR2KIYB-XyDQUEYf0atR_1y5U/s400/Joseph06.jpg" alt="" id="BLOGGER_PHOTO_ID_5638324061250438994" border="0" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkWH_IJ4hyb4TrS6BfFx9bdGy2NwE13uAqaK4M-29YsPB3vrSUw_J5yi5RMxm1fcBwgxvRsrbVfqkJ6SXor_XHosO_COdYwHYEkGlxg-IIYRUdg-uHzTbr2JCMCKpERS8nDr8ewYuESnUN/s1600/Joseph07.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkWH_IJ4hyb4TrS6BfFx9bdGy2NwE13uAqaK4M-29YsPB3vrSUw_J5yi5RMxm1fcBwgxvRsrbVfqkJ6SXor_XHosO_COdYwHYEkGlxg-IIYRUdg-uHzTbr2JCMCKpERS8nDr8ewYuESnUN/s400/Joseph07.jpg" alt="" id="BLOGGER_PHOTO_ID_5638324110596205842" border="0" /></a></p> <p style="margin-bottom: 0cm; font-weight: bold;"><span style="font-size:100%;"><i><u>Joseph</u></i></span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">One of the main characters. Prefers avoiding battles where he is not involved or has nothing to do with it. This clashes with Nathan, which is the exact opposite. Once he is involved though, his impulses makes him quickly engage directly in battle.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">Very astute when it comes to planning. Usually cold, which is the way he hides his emptiness and despair from the harsh world they live in. He's rather pessimistic.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">I'm truly proud of his design and details. Took me 7-8 days. He was based on Ismael's model. This time my mom (yes, my mom!) helped me with the face shape. She made me notice the weaknesses in the previous model. For starter a woman's face is more rounded, and if we were to find a shape for the head, it is more like a triangle or pyramid.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">A man's face instead is a cube. Of course a rounded cube, but a cube; and with sharper, crisper details. The chin must be considerable wider. His cheeks must stand out to give his male appearance, but they must cover a big area in the face otherwise it looks like a girl's cheek, causing the opposite effect, which stand out even more but are smaller.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">As for the torso, a female's body has curves, it's looks like a parabola from both sides. A male's body is a straight triangle pointing down, or a trapezoid.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">He's probably my favourite character. Although the name “Joseph” doesn't have quite a ring to it. I'm open to suggestions to change his name.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none;"><br /></p><p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbgcJjn1qQ9f6QDRCiG3k-ASSAWWox99vbo1lguAD2TuDoY8LySTus26xZEpulQdP4N1iX62yGo4zwm_rF3s_oMHxYFX8f4F4ZXCKywg_RtNHR9PDIdNw1Dp3xiWsje6TASDl_xWjZ8Bjj/s1600/Nathan01b.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 376px; height: 400px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbgcJjn1qQ9f6QDRCiG3k-ASSAWWox99vbo1lguAD2TuDoY8LySTus26xZEpulQdP4N1iX62yGo4zwm_rF3s_oMHxYFX8f4F4ZXCKywg_RtNHR9PDIdNw1Dp3xiWsje6TASDl_xWjZ8Bjj/s400/Nathan01b.jpg" alt="" id="BLOGGER_PHOTO_ID_5638328160743836306" border="0" /></a></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none; text-align: center;"> <span style="font-style: italic;">“</span><span style="font-style: italic;font-size:100%;" >Are you looking at me? Good, that way you won't lose hope</span><span style="font-style: italic;">”</span></p><p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7lIrWwNJ2M2b8crXukcolCQ8b6T_qWpi35G8yZPa3bLc0DFuu_VIsRCUbK1xzwebmSxxJvaAwAy2knUtDCvfBxx3leEWz8Cv2w5ULHnEuEDQvAJT2w0ew2oJmG1XPHfuqYmx35XIdeer5/s1600/Nathan03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj7lIrWwNJ2M2b8crXukcolCQ8b6T_qWpi35G8yZPa3bLc0DFuu_VIsRCUbK1xzwebmSxxJvaAwAy2knUtDCvfBxx3leEWz8Cv2w5ULHnEuEDQvAJT2w0ew2oJmG1XPHfuqYmx35XIdeer5/s400/Nathan03.jpg" alt="" id="BLOGGER_PHOTO_ID_5638326419261354962" border="0" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVuiRhXglAtANGcNjnUM9oMLv4aMJhoA9lLSBjv1C4Bm9n8HFb-SoyrBxXgUcjCzQp8ffOEhTQpaBVZH_TOEtIQ8AsEz8s27mxTsGF6dDUCsdgvrkddxo8PzMiIdJ2fO0REosZnx5cK_Z/s1600/Nathan05.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVuiRhXglAtANGcNjnUM9oMLv4aMJhoA9lLSBjv1C4Bm9n8HFb-SoyrBxXgUcjCzQp8ffOEhTQpaBVZH_TOEtIQ8AsEz8s27mxTsGF6dDUCsdgvrkddxo8PzMiIdJ2fO0REosZnx5cK_Z/s400/Nathan05.jpg" alt="" id="BLOGGER_PHOTO_ID_5638326526679807186" border="0" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgezA1wdGq_jFlw0CQGwSOa1Ob09DXpXtsrjaJ3p0wxsP-jDkZh-kvXHxXg5XoXLOuAiOpBxA2nV-4jABjcnobeidwQyDKtbIMypZCJwaGlcnbhIBa9uW7N53LxwCCrGvbRJCrIYwXe392S/s1600/Nathan06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgezA1wdGq_jFlw0CQGwSOa1Ob09DXpXtsrjaJ3p0wxsP-jDkZh-kvXHxXg5XoXLOuAiOpBxA2nV-4jABjcnobeidwQyDKtbIMypZCJwaGlcnbhIBa9uW7N53LxwCCrGvbRJCrIYwXe392S/s400/Nathan06.jpg" alt="" id="BLOGGER_PHOTO_ID_5638326607621582850" border="0" /></a></p> <p style="margin-bottom: 0cm; font-weight: normal"><br /></p> <p style="margin-bottom: 0cm; font-weight: bold;"><span style="font-size:100%;"><i><u>Nathan</u></i></span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;"><i>The</i></span><span style="font-size:100%;"> main character alone with Adrianne. Nate for short, Nathaniel is actually his real name. Determined and focused. Doesn't like injustice, which makes him involved in trouble more than he needs. He understands though, to carry his mission he needs to cast away his feelings. Tries to fill his sadness with smiles and humour.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">When Adrianne is near Nate's judgment becomes clouded, causing trouble in the team.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">I wasn't sure how he was going to end up looking. I had a rough idea in my head about his clothes, but not about his face. His design wasn't as clear as Joseph's.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">In the end I like how it turned. I admit he looks rather typical 16-year-old girl's stereotype of “pretty boy”. Nevertheless it as an opportunity for appealing to part of the female audience, while I'm hoping the other part of that audience will be attracted when Adrianne is completed (She's a strong, independent, lone wolf protagonist). The story will tell a sad love story, where the protagonist has a crush on the girl but in the end... well. Talked too much already. What I will say is that it's not a tragic love story, it's a sad one. Tragic (cliche) love stories are about two love birds until one of them gets shot. This is <b>NOT</b> it. It's about complex relationships.</span></p> <p style="margin-bottom: 0cm; font-style: normal; font-weight: normal; text-decoration: none"> <span style="font-size:100%;">I was dubious whether to make him a pretty face boy who gets rejected, or a tough guy with a soft/weak spot when it comes to her. As the model ended up, pretty face boy it is.</span></p> <p style="margin-bottom: 0cm"><br /></p> <p style="margin-bottom: 0cm"><span style="font-size:130%;"><b>Budget drives plot? Sort of</b></span></p> <p style="margin-bottom: 0cm; font-weight: normal; text-decoration: none"> A plot driven by budget like the title says, sounds like it will result in a terrible story. But wait... what has budget have anything to do with the plot? Nothing is cheaper than writing a sheet of paper, unless you're paying a best seller author full-time to do it.</p> <p>Well, it boils down to time and technical constraints. The most notable example is the character “Ismael”. I've adapted his story to fit his looks, rather than spending 3-4 more days in him to make him look the way I wanted. For a more important character I would definitely spend more time until he looks just the way I envision him.</p> <p>There are other small details like height. Due to scaling the skeleton being such a PITA, the model's height doesn't always match the specification document I wrote (which has far more heterogeneous values). A few liberties have to be taken and be prepared to accept some changes in order to achieve a fully polished game in a realistic time frame.</p> <p>I'm usually an obsessive person when it comes to details. And I believe a story has to maintain certain coherence to express the author's true intention. But you have to be able to adapt to the situation, be realistic, evaluate what's important and what's not.</p> <p>This is still a fun process. It's not always “budget” constraints. During development there were a lot of bugs, wrong parameters, or even tests that failed to do what they were intended to do. Nevertheless out of that process great, original ideas are coming out. I've had lots of ideas just by thinking, and I'm afraid I will only be able to implement less than 1% of these. It even worries me the final product doesn't get to a repetitive boring game by always focusing on the same few things (Assassin's Creed 1, anyone?). I have to be watchful for it and gameplay test a lot.</p><p><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3mIjhDG8WpKpGirWGr5WBvEhwmZicLQVr5fM1pfnKXMM-KHxmn14giwU-hmCyCuCf_82_RlxBH1JO0J8kRaC2bIt8ieR1DTsPjL1ugm5cIrMoIKSYUaPJlVR7dKqKEjLRVqB6LzXqvzhK/s1600/Group01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg3mIjhDG8WpKpGirWGr5WBvEhwmZicLQVr5fM1pfnKXMM-KHxmn14giwU-hmCyCuCf_82_RlxBH1JO0J8kRaC2bIt8ieR1DTsPjL1ugm5cIrMoIKSYUaPJlVR7dKqKEjLRVqB6LzXqvzhK/s400/Group01.jpg" alt="" id="BLOGGER_PHOTO_ID_5638328864618007906" border="0" /></a></p> <p>The cool aspect of the ideas coming out of bugs and failed test (which often results in quests, innovative boss battle ideas, minigames) rather than pure thinking is that if they're already working... then I won't lose time implementing them! Just develop it a bit further, understand why it works, and include it in the game. Simple as that. The hardest aspect now becomes how it will fit in the progress of the game and story, it can't look like a just threw a minigame in the middle of nowhere, with no relevant plot relation at all.</p> <p><br /></p> <p><span style="font-size:130%;"><b>What's next?</b></span></p> <p style="font-weight: normal; text-decoration: none">This week I probably won't be doing much, I have to study for another hard exam (wish me luck!!! Thank you). Afterward I will resume development of Distant Souls. I have very specific ideas about Adrianne, so I will spend in her as much as I need, as she's very important for the game. That should take around a week. May be I'll do a few weapons, which are easy to make and are certainly lacking.</p> <p style="font-weight: normal; text-decoration: none">After Adrianne, it will be time to focus on smaller characters, like crowds, enemies, minor NPCs. Their quality will be considerably lower. We could say they're “mass produced”. All of them should take between 2 and 3 weeks (I'm hoping for less). Furthermore the current character have lots of detailed animations (Nathaniel has circa 25 different animations) while these won't have as many, only what's needed for them. Many crowd models will also probably be just a texture swap, same model, same rig.</p> <p style="font-weight: normal; text-decoration: none;">After that, it's time for attack animations (I've done a few tests so far). That may take quite a long time depending on how it goes (may be even 2 months!) They have to be done once I've done all major characters so that their attacks (times, reaction speed, invulnerability frames, hitboxes, attack combos) are all balanced.</p><p style="font-weight: normal; text-decoration: none"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioTXQn5fn8jAmtmcI36oHglIU4gzOfB8YUrSzDx_LIJzp-B8ISYF-HHwwMTPw-VArnDqF2f5fDKQKhPf4QyQCMsKhRW5bR5iE8-h262Hlv1fGQq3mP7zr0WlKJYGpSwUkNInr7v3W9YcZh/s1600/Group02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEioTXQn5fn8jAmtmcI36oHglIU4gzOfB8YUrSzDx_LIJzp-B8ISYF-HHwwMTPw-VArnDqF2f5fDKQKhPf4QyQCMsKhRW5bR5iE8-h262Hlv1fGQq3mP7zr0WlKJYGpSwUkNInr7v3W9YcZh/s400/Group02.jpg" alt="" id="BLOGGER_PHOTO_ID_5638328919064734354" border="0" /></a></p> <p style="font-weight: normal; text-decoration: none">Once that's done it would be time to deal with buildings, level layout, then quests, missions, etc. I'll wrote more about it once I get there. Once missions and levels are laid out, bosses will be modeled.</p> <p style="font-weight: normal; text-decoration: none">Some cut scenes will be done along the way, while the rest once everything is done.</p> <p style="font-weight: normal; text-decoration: none">All this and I haven't got time yet to talk about the main antagonist. He'll be feature in another post.</p> <p style="font-weight: normal; text-decoration: none">It will be a tight schedule but I'm aiming towards February 2012.</p> <p style="font-weight: normal; text-decoration: none"><br /><br /></p> <p style="font-weight: normal; text-decoration: none">I'll keep you posted!!! See you soon!!</p> <p style="text-decoration: none;">Don't forget to comment, feedback is king!</p><p style="font-weight: normal; text-decoration: none; text-align: center;"><span style="font-size:130%;"><b>Thanks for reading :)</b></span></p> <p style="font-weight: normal; text-decoration: none"><br />Dark Sylinc</p> <p style="font-weight: normal; text-decoration: none"><br /></p> <p style="font-weight: normal; text-decoration: none; font-style: italic;">PS: If you're a talented environment artist or animator and want to join the team, contact me at dark_sylinc [at] yahoo [dot] com [dot] ar Note we work on a profit share basis.</p>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-72258367969427818382011-08-08T00:26:00.001-03:002011-08-08T00:28:07.376-03:00Making your character come to lifeTwo articles have been exclusively published in Gamedev.Net, Part II was featured!<br /><br /><a href="http://www.gamedev.net/blog/1172/entry-2250221-making-your-character-come-to-life-part-i/">Making your character come to life, Part I</a><br /><a href="http://www.gamedev.net/blog/1172/entry-2250251-making-your-character-come-to-life-part-ii/">Making your character come to life, Part II</a>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-10539425773493312742011-05-12T12:00:00.000-03:002011-05-20T15:41:48.034-03:00We're looking for artists<p style="font-style: normal; font-weight: normal;">Distant Souls is in the need of artistic talents to join our team so we can speed up development. Note these aren't paid positions for the moment (based on royalties).</p><p style="font-style: normal; font-weight: normal;"><i><b>Talent needed:</b></i></p><p style="font-style: normal; font-weight: normal;">We're looking for at least one modeller, one texture artist, and one animator. Doesn't have to be 3 different people. If you can do all that stuff, that's great.<br />Be sure to read our <a href="http://sites.google.com/site/darksylinc/home/DistantSouls_Guidelines.pdf?attredirects=0&d=1"><b>Art Guidelines</b></a> to know what kind of work is needed.</p><p style="font-style: normal; font-weight: normal"><br /><i><b>3D Modeler:</b></i> </p><ul><li><b>Excellent</b> character modeling skills </li><li>Proficient creating low poly medieval, ancient, or arabian buildings </li><li>Creative, independent, motivated, disciplined. Able to follow art direction guidelines, as well as technical requirements. </li><li>Environmental art skills are a big plus (debris, ruble, pottery, boxes, leaves, straw, modeling of small items in general) </li></ul> <i><b><br />Animator:</b></i> <ul><li>Able to make complex character animations. Candidate will deal with at least 28 different animations (main characters). </li><li>Able to make looped animations </li><li>Animations include idle, walk, run, jump, jump forward, attack, etc. </li><li>Animate both centered to the engine as well as animating (see <a href="http://sites.google.com/site/darksylinc/home/DistantSouls_Guidelines.pdf?attredirects=0&d=1">Guidelines</a>) </li><li>Facial animation skills is a plus ("pose"/"shape"/"vertex" key animations) </li><li>Experience with game engines is a plus </li><li>Candidate may be required to constantly interact between the animating tool and the game engine for tweaking. </li></ul><br /><i><b>Texture artist:</b></i> <ul><li>Able to follow technical specs (Resolution, formats) </li><li>Work will consist in creating Diffuse maps, normal maps, and occasionally specular maps. </li><li>Proficient creating normal maps. Knowledge of different creation techniques (non-exclusive) </li><li>Able to tile textures when required (non-exclusive) </li></ul><br /><u><b>The following are desired in candidates, but not exclusive:</b></u> <ul><li>Blender experience is a plus </li><li>Lua script knowledge is a plus </li></ul><br />Currently all existing models (which aren't many) already have their animations. Therefore animator skills won't be used until the modeller finishes some of his/her models.<br />Nevertheless you can contact us if you're interested; we have a base model (natively modeled in Blender) with all working and tested animations, which can be used as a template or reference. You may want to try & experiment with it before getting into the real thing, and get to know how the animations can be customized inside the engine, etc.<br />We have a few building models which aren't textured yet, so that can start immediately.<br /><br />All members may eventually need to use an SVN client (We recommend TortoiseSVN for Windows users).<br /><br />Those interested send us an email at the address contact, containing a portfolio or previous works (i.e. a link to a website, CgSociety portfolio, deviantart account is fine) and expected profit percentage share.<br /><i><b><br />Compensation:</b></i> <p style="font-style: normal; font-weight: normal;">Percentage based on profits. <span style="font-style: normal"><span style="font-weight: normal">Profit sharing will be determined upfront, determined by <a href="http://sites.google.com/site/darksylinc/home/DistantSouls_Agreement_%28DRAFT%29.pdf?attredirects=0&d=1">this contract</a> (draft).</span></span> <span style="font-style: normal"><span style="font-weight: normal">The intention/purpose of the contract is to avoid any misunderstanding, presented we're actually serious in getting the project finished, maintaining certain level of professionalism within the team. This is an indie game based on revenue sharing, therefore there is no point in keeping a draft of the contract terms secret.</span></span><br /></p><p style="font-style: normal; font-weight: normal;"><i><b>Target system:</b></i> PC, Windows only<br /></p><p style="font-style: normal; font-weight: normal"><b>Currently used technologies include:</b> </p><ul><li>C++, Visual Studio Express 2008 </li><li>Ogre 1.8 </li><li>Havok 7.10 </li><li>Lua </li><li>OpenAL </li><li>Cg, Ogg Vorbis, libnoise, OIS, tolua++ </li><li>Blender, GIMP </li><li>SVN, Tortoise SVN </li><li>Asio (networking) </li></ul> <span style="font-style: italic;"><span style="font-weight: bold;"><br /></span></span><i><b>Contact:</b></i> <p style="font-style: normal; font-weight: normal;"><b>Skype:</b> dark_sylinc</p><p style="font-style: normal; font-weight: normal;"><b>e-mail:</b> dark_sylinc [at] yahoo dot com dot ar<br /></p><p style="font-style: normal; font-weight: normal;">Regular contact will be done through Skype. Once a week a Skype season will be made to keep everyone on track. It's not demanded since the position isn't paid (not until we see revenue), but it will be a regular practice.<br /><br /></p><p style="font-weight: normal; text-align: center;"><span style="font-weight: bold;font-size:130%;" ><u>FAQ:</u></span><span style="text-decoration: underline;"><span style="font-weight: bold;"><br /></span></span></p><p style="font-weight: normal;"><br /></p><p style="font-weight: normal;"><b>Why should I join Distant Souls team?</b> You would get to work with some really dedicated people and have fun developing this game. It would look good on a resume. You would also gain a lot of experience about game development along the way.</p><p style="font-weight: normal;"><br /></p><p style="font-weight: normal"><span style="font-weight: bold;">Why making Distant Souls?</span> We encourage breakage into the gaming industry. Hopefully Distant Souls will be a successfull indie game; making it a way for it's team members to get recognition and money.<br />Shall it fail, you gain a lot of experience by working in real, serious project, and you still retain ownership from all the work you did for us, which you can reuse. If you ever leave the team, you won't have the feeling of having wasted your time.<br />There's one more reason: We do this because it's <span style="font-weight: bold;">FUN</span>! We're passionate all at what we do.<br /></p><p style="font-weight: normal;"><b><br /></b></p><p style="font-weight: normal;"><b>If I were to want to join Distant Souls how would I go about doing so? Do I need a portfolio or something?</b> Yes, we're looking for talented people for making this game. You don't have to be an experienced AAA developer, but we're not looking for newbies either. We would mostly want a link to your portfolio and previous works. Best way to contact us is by sending us an email.<br /></p><p style="font-weight: normal;"><b><br /></b></p><p style="font-weight: normal;"><b>The skill requirements and the contract look very strict, that's scaring me off!</b> <span style="font-weight: normal">The required skills is a list of the ideal candidate. Like in regular job applications, you don't have to meet </span><i><span style="font-weight: normal">all</span></i> <span style="font-style: normal"><span style="font-weight: normal">the criteria. If you think you're up to it or you're confident about skills, you should contact us. The contract looks strict so that it can carefully cover most common issues when dealing with joint efforts once we start with profit sharing, legal stuff always looks like that. It's also a way of showing we've been thinking of it and we are serious about finishing the game, selling it, and making a revenue from it. If you see a team without an agreement of how the revenue will be split, they've started with the wrong foot.</span></span><br /></p><p style="font-weight: normal;"><span style="font-style: normal;"><b><br /></b></span></p><p style="font-weight: normal"><span style="font-style: normal"><b>But the contract says words like “Obligation”, and we need to stay in touch at least once once per week? Am I becoming your slave?? </b></span><span style="font-style: normal"><span style="font-weight: normal">No, not at all! This is a volunteer work, therefore you're not forced to anything. We all have lives and some of us may only be dedicating to this in our spare time. The contract says “obligation” because it's the clause where it states you're committing to apply your talent, and in exchange, you will be rewarded with profit share. If you don't apply your talent (you don't fulfill your “obligation”), you will get less (or none if you didn't contribute at all) profit share; that's all.</span></span><br /></p><p style="font-weight: normal;"><b><br /></b></p><p style="font-weight: normal;"><b>What happens with my works in this team, why does it say “you grant me your rights to... blah blah”? Looks like you're ripping me off.</b> Unlike many other projects, you retain whole ownership of what you create for Distant Souls. You can for example reuse or resell your work for whatever you want, even for another completely different game. The contract makes you grant us lots of rights over your work so that we can commercially exploit it and give your profit share without having to ask for your permission every time. Besides, we cannot use those assets if it's not for exploiting something related with Distant Souls (i.e. a sequel or spin-offs).<br /></p><p style="font-weight: normal;"><b><br /></b></p><p style="font-weight: normal;"><b>So, I can use my work freely?</b> <span style="font-weight: normal">Yes. But beware of joint works. If you've made a 3D model, and someone else textured it, you only own the 3D model. If you've painted half of a texture, and someone else painted the other half (i.e. painted over it); it's joint ownership in which case you would need the other texture artist's permission to use the texture (and viceversa). This is falling out of the scope from Distant Souls.</span><br /></p><p style="font-weight: normal;"><b><br /></b></p><p style="font-weight: normal"><b>I see you make a lot of use from Blender/GIMP, can I use my own programs (like Maya or Photoshop) instead? </b><span style="font-weight: normal">Absolutely, whatever makes you more productive and you feel more comfortable with. Some assets have been created with Blender, which makes it easier to use them as reference when in doubt when creating new ones; but even then, there are plenty of ways to import/export models between these applications.</span></p>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0tag:blogger.com,1999:blog-5914419889815086738.post-37064604511365064212011-05-10T02:24:00.001-03:002011-05-10T02:43:13.190-03:00Every story has a beginning...<p>Pheeew!!!<br /></p><div style="text-align: justify;">Finally, after three months of intense work, I'm finally able to release something eye candy about the game.<br /></div><p><br />But first let's make an introduction:<br /></p><div style="text-align: justify;">Distant Souls is a third-person, action-adventure game with gameplay mechanics and style which could be best described as in the middle between Assassin's Creed and Kingdom Hearts; playing in up to 3-member teams.<br />The story will put you in the body of 4 characters with tragic backgrounds in the pursuit of a dark being trying to take over the world. While the world is in a grim and sad state, the story will surround how people manages to overcome tragedies and find happiness, generosity and glimpses of humour.<br />The project started around beginning 2010 in my spare time spending no more than 3 hours a week, until it became full time in January this year through March. We are looking for some 3D modelers, because <span style="font-weight: bold;">it's <span style="font-style: italic;">that </span>time</span>. Most of the code is finished at this stage.<br />I've been doing all by myself (art, coding, story) but study (I'm studying economics) has slowed me down and now I need talented individuals who can help me speeding up with the artistic side.<br />Hopefully, the game will reach beta by the end of the year.<br /><br /></div><div style="text-align: justify;">Over the course of the development, I've been taking screenshots at different progression stages, which are now the ones posted below.<br /><br />You may notice the game has always the same character. That's because I'm always testing with the same model, the only one so far. This should change now that all C++ code features have been locked. It's counterproductive to have many art assets while you're constantly changing the code.<br /></div><br />These four are among my favourite screenshots. Lots of stuff is going on (HDR, Godrays, SSAO, Tree wind). Note all of them are in alpha stage, and may not represent the final quality of the finished game.<br /><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnMGrnkXm6D3ELu0Zbg5OFA1Dq5QOrzlIHh3wMqiBhyphenhyphencn6c9Cbpa6a1Kw32wlK7fZPhQd6-0AGgEpooiYwRi-rOVGG9a3ivh_Vm_NI3uNS9GOsXswtNH47okaRF3KKKzfXmt7jwUkveBoQ/s1600/screenshot_01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnMGrnkXm6D3ELu0Zbg5OFA1Dq5QOrzlIHh3wMqiBhyphenhyphencn6c9Cbpa6a1Kw32wlK7fZPhQd6-0AGgEpooiYwRi-rOVGG9a3ivh_Vm_NI3uNS9GOsXswtNH47okaRF3KKKzfXmt7jwUkveBoQ/s400/screenshot_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936262794033714" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhgRYmaxZeVwlgHi_R_1zZmedsZLiI0vJpE01wLUrkBcr83yZQfiuofw-KTeF48U7hzNI5o8QIMfHqQ52H5dDqEKOo9iUoBwwbEDtZbMH6S4bsoTRY7ps1JUDnKni6MJJvcCXZcoSnSbML/s1600/screenshot_02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhgRYmaxZeVwlgHi_R_1zZmedsZLiI0vJpE01wLUrkBcr83yZQfiuofw-KTeF48U7hzNI5o8QIMfHqQ52H5dDqEKOo9iUoBwwbEDtZbMH6S4bsoTRY7ps1JUDnKni6MJJvcCXZcoSnSbML/s400/screenshot_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936268058195154" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmB9smFDCPbI0u-KB9Xs8eaBrdtmiIyPHwktmzXE2GC0t8yP3_rhV-vrBs29Nr49l3G1s_vPjRj-g6pxm_Z0DmLlx-S5OLkI4KysOwX0St1m1lnVsPsTYl3n9bgFYUhL8yPNhgzc9gRj3a/s1600/screenshot_13.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmB9smFDCPbI0u-KB9Xs8eaBrdtmiIyPHwktmzXE2GC0t8yP3_rhV-vrBs29Nr49l3G1s_vPjRj-g6pxm_Z0DmLlx-S5OLkI4KysOwX0St1m1lnVsPsTYl3n9bgFYUhL8yPNhgzc9gRj3a/s400/screenshot_13.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936268234750562" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1y5o_1cdRUN5hyphenhyphengOguPexBRBRo3DQBO3YXIzvll3roXY6DUi70g1GbYuGsHFtFoW4yyp6t6oYclbvrPQpyVZXfQfrs5TQCVeFSmTMUxswkaI4OBu-lhrabrlh5okahHiY8UgTux0i3QbX/s1600/screenshot_14.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1y5o_1cdRUN5hyphenhyphengOguPexBRBRo3DQBO3YXIzvll3roXY6DUi70g1GbYuGsHFtFoW4yyp6t6oYclbvrPQpyVZXfQfrs5TQCVeFSmTMUxswkaI4OBu-lhrabrlh5okahHiY8UgTux0i3QbX/s400/screenshot_14.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936618745498530" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhASlC89A2lxCl6HZZqQoPSnsJvsmLCud7T0SFA5Wh2MjMzgUjRM05wWSyJZvNWo8BeX01-jA1Hc_z0AtWocA0gteZCeZY3U9UF2y3Usv6xS8kcD-xDcoM1RR049qhyLcbfVXss3uVYn4rw/s1600/screenshot_15.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhASlC89A2lxCl6HZZqQoPSnsJvsmLCud7T0SFA5Wh2MjMzgUjRM05wWSyJZvNWo8BeX01-jA1Hc_z0AtWocA0gteZCeZY3U9UF2y3Usv6xS8kcD-xDcoM1RR049qhyLcbfVXss3uVYn4rw/s400/screenshot_15.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936620013221010" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPy5Gb1v_t3bw3t3RIh17ZmODvL_aMzqZG17CUYpYO1F_t5WwAaCqIJnkiqa2BT5g3XVvmUZpGin9r4BcIecZRc5347tc7AAqIJYOIFbw-uK1xvI2umf3D8YX5mxxrWn7yL_2N1_ca5Im/s1600/screenshot_17.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKPy5Gb1v_t3bw3t3RIh17ZmODvL_aMzqZG17CUYpYO1F_t5WwAaCqIJnkiqa2BT5g3XVvmUZpGin9r4BcIecZRc5347tc7AAqIJYOIFbw-uK1xvI2umf3D8YX5mxxrWn7yL_2N1_ca5Im/s400/screenshot_17.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936621635581666" border="0" /></a><br /><br /><p>The test level where I try everything new. Loads in no time. In these photos water reflections were being tried out:</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdD3ufBN5O8xmj9bc0aoCsVkp1ExF7RJ2WxaHUN1-6mr-Em3NOaQy0vzNGYi_y3sEAyRA4LgkQFCye3H40B2pj2TUllNeXWNIJmk1vt_TtkYFMEtWiNrg0Z-WPRgcI6nF0k4mWWscCNfwh/s1600/screenshot_23.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdD3ufBN5O8xmj9bc0aoCsVkp1ExF7RJ2WxaHUN1-6mr-Em3NOaQy0vzNGYi_y3sEAyRA4LgkQFCye3H40B2pj2TUllNeXWNIJmk1vt_TtkYFMEtWiNrg0Z-WPRgcI6nF0k4mWWscCNfwh/s400/screenshot_23.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936622158885666" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDd1Ca9t5TKqTGe3nskswyKrbOvbizfmYHPZcqUG4tORh-vO0k9q3W10OoQT46tLjzB_sHnEcSsX6znQOvWqbhZpkgaGjIU4elnOMucZsTQBIg1xCXpBZ0-b3Xhjbk5linwOcM5AKAS4Ih/s1600/screenshot_27.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDd1Ca9t5TKqTGe3nskswyKrbOvbizfmYHPZcqUG4tORh-vO0k9q3W10OoQT46tLjzB_sHnEcSsX6znQOvWqbhZpkgaGjIU4elnOMucZsTQBIg1xCXpBZ0-b3Xhjbk5linwOcM5AKAS4Ih/s400/screenshot_27.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936626529645282" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4hrgR8gxwyhtpw3UJvyd7o8I2_KwIAo-Hh5TuwETJNlERR6a3wdBw0d0w_8HBh4zydBpVvuU3yFdzKDc3CGOUzEd1aJ6q-AC8XvanKgj51KCwnVrLSRfCVfP2PzSplyrCQAOtKqeTlCn2/s1600/screenshot_29.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4hrgR8gxwyhtpw3UJvyd7o8I2_KwIAo-Hh5TuwETJNlERR6a3wdBw0d0w_8HBh4zydBpVvuU3yFdzKDc3CGOUzEd1aJ6q-AC8XvanKgj51KCwnVrLSRfCVfP2PzSplyrCQAOtKqeTlCn2/s400/screenshot_29.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936806051244226" border="0" /></a><br /><br /><p>One of the first HDR tests, the overbloom is on purpose. Looks chilly:</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN9UcKMxtm5Qoa55rUg1G2YAbgMQOhyKV2YXTDceXwT1P_K4pWmPbnglKitFude0EhQWrTKCcv-wToh9yq-dAdqHki-I3oI58VaRnGbx2pHAjYT8wMdrVc-aF2chha3pUDu0JHSm-ip5Dg/s1600/Bloomed_01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN9UcKMxtm5Qoa55rUg1G2YAbgMQOhyKV2YXTDceXwT1P_K4pWmPbnglKitFude0EhQWrTKCcv-wToh9yq-dAdqHki-I3oI58VaRnGbx2pHAjYT8wMdrVc-aF2chha3pUDu0JHSm-ip5Dg/s320/Bloomed_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604932957597250850" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik1NLsCaH1BUPnt8PeCaVTxG1_sq5fTu7KIXQtN7D82nru0X8AwRf6OvEgJR0zoSSSUXZogT_8fUD-5MP85eo1E2Qca1HJrsDOfHyN_bDIXEXqhsI-H398_DTdONBCpfz7Xb96XeaoCXTp/s1600/Bloomed_02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEik1NLsCaH1BUPnt8PeCaVTxG1_sq5fTu7KIXQtN7D82nru0X8AwRf6OvEgJR0zoSSSUXZogT_8fUD-5MP85eo1E2Qca1HJrsDOfHyN_bDIXEXqhsI-H398_DTdONBCpfz7Xb96XeaoCXTp/s320/Bloomed_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604932961224544706" border="0" /></a><br /><br /><p>These screenshots were taken to test the wind system that brings life to Distant Souls:</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCX-tJy7bHHHnI3Hdbszn8dc_7kqkx5auKz6PQ5R48CDRV9m7728Zcut0FyPTOG1L_SSSrPLf3_3EKw1ScRz50bVtH3VHPDUr7R_1yByQSe1WxPmKGRLF1lcpuVBAPF7aU7YlDXyMBaQ3/s1600/WindSystem_01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjzCX-tJy7bHHHnI3Hdbszn8dc_7kqkx5auKz6PQ5R48CDRV9m7728Zcut0FyPTOG1L_SSSrPLf3_3EKw1ScRz50bVtH3VHPDUr7R_1yByQSe1WxPmKGRLF1lcpuVBAPF7aU7YlDXyMBaQ3/s400/WindSystem_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604937227856184882" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBs-mF1jeJa6A7gYp-SfYj_kB-5TYux5womDdY6mkykPWnjGznWcHN58kRqQGNGy9Snw54KohchSzFJGYmUPu7MKz5kql-aRfQDoALnxM3vi2WKEktvi52hTUQzAoCF2gKYKtPpPgXlyTD/s1600/WindSystem_03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBs-mF1jeJa6A7gYp-SfYj_kB-5TYux5womDdY6mkykPWnjGznWcHN58kRqQGNGy9Snw54KohchSzFJGYmUPu7MKz5kql-aRfQDoALnxM3vi2WKEktvi52hTUQzAoCF2gKYKtPpPgXlyTD/s400/WindSystem_03.jpg" alt="" id="BLOGGER_PHOTO_ID_5604937238674285122" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq2kaNN7qrI12H5BYzFamiNL6e-9MXQkkYUBlj4p4Y6N7lVw6dqDCeWrghDKwhVwroyhtud3WhvHhz9sHSUI6cCXMq4vVReoyxUoMoz-W9U7C5GYAcyGMj8Os8aVWNwH2-pG7b40XTpYQ6/s1600/WindSystem_02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq2kaNN7qrI12H5BYzFamiNL6e-9MXQkkYUBlj4p4Y6N7lVw6dqDCeWrghDKwhVwroyhtud3WhvHhz9sHSUI6cCXMq4vVReoyxUoMoz-W9U7C5GYAcyGMj8Os8aVWNwH2-pG7b40XTpYQ6/s400/WindSystem_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604937230757065474" border="0" /></a><br /><br /><p>Clouds are generated procedurally using libnoise and custom shaders.</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9ECLWxnc7Xovc22x_gcNBxxggui_Q_VYgugWdx1hmXRjrW8e6dd61okwS2G8XkLo7cj8x8gG2s7OaqgbKTkAVwpXD8ZJxDIH5BPLW5-dH6__N28-9dZFTKxCgf-jMInzPfepfMuhDIY_x/s1600/First_ProceduralCloud_Test_01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9ECLWxnc7Xovc22x_gcNBxxggui_Q_VYgugWdx1hmXRjrW8e6dd61okwS2G8XkLo7cj8x8gG2s7OaqgbKTkAVwpXD8ZJxDIH5BPLW5-dH6__N28-9dZFTKxCgf-jMInzPfepfMuhDIY_x/s320/First_ProceduralCloud_Test_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604932958750043586" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOQAKyhgStQRiLVnis4y1qReI8LB4a-8gT0jvsbVRMwqeB85MjuJ_pQgaVUbTd8Gq_U-v5UlabHkGZwWNRaIHs9mWdZQTA2fpC_aPE98U8tHThF-n67VQp1ar7Q038THGAqxqSs0qMhbkN/s1600/First_ProceduralCloud_Test_02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOQAKyhgStQRiLVnis4y1qReI8LB4a-8gT0jvsbVRMwqeB85MjuJ_pQgaVUbTd8Gq_U-v5UlabHkGZwWNRaIHs9mWdZQTA2fpC_aPE98U8tHThF-n67VQp1ar7Q038THGAqxqSs0qMhbkN/s320/First_ProceduralCloud_Test_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604932963247555986" border="0" /></a><br /><br /><p>Clouds can also cast shadows.</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4qLONyd4XM3JVpHCU6q91FVilR8WlTL9_PfaFeWAaVXFF9eUx1wjylZc4Ko7aHm-uaEXrRzm-9vaPBtGzNf1ilLCWLgDHv6UNJJhYgu45B2qQVrA0fhcztKMRg_1uVIKzgWs1R9BQ0nbG/s1600/TestingCloudShadows01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4qLONyd4XM3JVpHCU6q91FVilR8WlTL9_PfaFeWAaVXFF9eUx1wjylZc4Ko7aHm-uaEXrRzm-9vaPBtGzNf1ilLCWLgDHv6UNJJhYgu45B2qQVrA0fhcztKMRg_1uVIKzgWs1R9BQ0nbG/s400/TestingCloudShadows01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936814983510354" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidZUUuz0L1ErulNJ8wNYPrfB3DRGUQGcg7qHlG-v4RG2LkCU9QGMk2_k728lH4feUj-J-djXynD2q7M2sQuANn_KDOJR_scneeU7Ku3p85MimzPGNZEHgkqnNM41mRrxRfBKHghTjZNeGn/s1600/TestingCloudShadows02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidZUUuz0L1ErulNJ8wNYPrfB3DRGUQGcg7qHlG-v4RG2LkCU9QGMk2_k728lH4feUj-J-djXynD2q7M2sQuANn_KDOJR_scneeU7Ku3p85MimzPGNZEHgkqnNM41mRrxRfBKHghTjZNeGn/s400/TestingCloudShadows02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936815301875746" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinzHjo0PIJ0CpDdJXwilxbdaVY6N6IhxasW-VqbvBsjvoVbIMlNdvBGVSuqdRiUWsFRG4AT2hEASLrRciqFCU4cZqhrOpa3RPmdf5mdQ2c9BacrvR3f91U7G2QgqILGB2jUyw2eog4x9ic/s1600/TestingCloudShadows03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinzHjo0PIJ0CpDdJXwilxbdaVY6N6IhxasW-VqbvBsjvoVbIMlNdvBGVSuqdRiUWsFRG4AT2hEASLrRciqFCU4cZqhrOpa3RPmdf5mdQ2c9BacrvR3f91U7G2QgqILGB2jUyw2eog4x9ic/s400/TestingCloudShadows03.jpg" alt="" id="BLOGGER_PHOTO_ID_5604937229748698706" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTSro3flbWzdCv-a1ssaGiHIRMp3QuDMlpckN4VWfoiNrIoiPij1jkRzSzfldZIqTup8DuLqWyCsFgLTqmWNxUe5VbPpQlxlRaIGKfUGCe1fpopBiKo2CCp7QUkLzuU-E_iAETbiJtSxf4/s1600/TestingCloudShadows04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTSro3flbWzdCv-a1ssaGiHIRMp3QuDMlpckN4VWfoiNrIoiPij1jkRzSzfldZIqTup8DuLqWyCsFgLTqmWNxUe5VbPpQlxlRaIGKfUGCe1fpopBiKo2CCp7QUkLzuU-E_iAETbiJtSxf4/s400/TestingCloudShadows04.jpg" alt="" id="BLOGGER_PHOTO_ID_5604937226705312306" border="0" /></a><br /><br /><p>First time basic particle FXs were tested</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQu-rWRZ4aJWqdKENggippw5CvhZljJVQjm6-Gts2w5t7sWlfxSwIfB8bT_cnLMMNAYxMXh_XsYApe4YYPKkoPE1ZtNGDxsDU0rk1IVtYEfCFoWW9kc3KKUkg9D4qhKp0t7Cq4B2sIHbcS/s1600/SimpleParticle_FX.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 231px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQu-rWRZ4aJWqdKENggippw5CvhZljJVQjm6-Gts2w5t7sWlfxSwIfB8bT_cnLMMNAYxMXh_XsYApe4YYPKkoPE1ZtNGDxsDU0rk1IVtYEfCFoWW9kc3KKUkg9D4qhKp0t7Cq4B2sIHbcS/s400/SimpleParticle_FX.jpg" alt="" id="BLOGGER_PHOTO_ID_5604936812203562626" border="0" /></a><br /><br /><p>This is one of the latest levels. This is actually a mockup from the city of Jul Kaseem, which is the first city to be visited in the game. Still needs a lot of work.</p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMejYA_63WAYO1m3R4QjUGF4CwQZVMIyRRpwQtWcriZpriDQiHaAXRZW4l4pP0yjvRworKAlMronlP7G5Tb8p-_LiCFNPqAcxB15-7X_ku2Q5MdeMpDWuI1OHNDUFKGubd-xsE4kbkB2vw/s1600/Preface_01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMejYA_63WAYO1m3R4QjUGF4CwQZVMIyRRpwQtWcriZpriDQiHaAXRZW4l4pP0yjvRworKAlMronlP7G5Tb8p-_LiCFNPqAcxB15-7X_ku2Q5MdeMpDWuI1OHNDUFKGubd-xsE4kbkB2vw/s320/Preface_01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604932962974838210" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2Uyc2cZspjbmSh1yYjIR0djDXT4SqL2G2-5KwiyB_vEDsNuV1piOr9RKKcyYhRhUhRtEcDBtMWLbo0Qj6G-J2c71W1sST3CpGdlkMwFaG1V9THaF2Ai_yU3sob6Gt6Phi6nH7gMo73oZ/s1600/Preface_02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgA2Uyc2cZspjbmSh1yYjIR0djDXT4SqL2G2-5KwiyB_vEDsNuV1piOr9RKKcyYhRhUhRtEcDBtMWLbo0Qj6G-J2c71W1sST3CpGdlkMwFaG1V9THaF2Ai_yU3sob6Gt6Phi6nH7gMo73oZ/s400/Preface_02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604933591437286978" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlxuyRgkimoJLjAEGtf-_MQ_TiUyJlT9UoHM9OCWIPt-32mFEzrbodiJFl8SWVvnwc2O5pML9giZWiFeHk0p7KYhSWCRo769i_OhkKmpeHyaNIudsIR9DUBwreo4Ai1YtCSC1BXu_muI4k/s1600/PrefaceCity_Test+01.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlxuyRgkimoJLjAEGtf-_MQ_TiUyJlT9UoHM9OCWIPt-32mFEzrbodiJFl8SWVvnwc2O5pML9giZWiFeHk0p7KYhSWCRo769i_OhkKmpeHyaNIudsIR9DUBwreo4Ai1YtCSC1BXu_muI4k/s400/PrefaceCity_Test+01.jpg" alt="" id="BLOGGER_PHOTO_ID_5604933595751318578" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSv1bJ_6uISWozjZokTdXCXFDKQ05KG8fyE291BMWb8r2wGZFevq34s-ppokRvDRXWiDeS_HWoOXRj9VM-tCOJhmwDCunccCNgbjpLlUoAm9Lw6mQLW2qK4Drf638geqVaOsg0amAmj-x8/s1600/PrefaceCity_Test+02.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSv1bJ_6uISWozjZokTdXCXFDKQ05KG8fyE291BMWb8r2wGZFevq34s-ppokRvDRXWiDeS_HWoOXRj9VM-tCOJhmwDCunccCNgbjpLlUoAm9Lw6mQLW2qK4Drf638geqVaOsg0amAmj-x8/s400/PrefaceCity_Test+02.jpg" alt="" id="BLOGGER_PHOTO_ID_5604933592966836690" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEtaYZu6mqABWr3LDNKfOXx7wGxuiWkng2tUgGLLqeLtSgW9cnwi82GIDRsE3LeGwUGQeVJaJeaNCysHuFgSLKSHpLyBR5iW__Mt172dl0sS0fB9LMe8seGVwShEMaBnq9NNlvNIQnc88p/s1600/PrefaceCity_Test+03.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEtaYZu6mqABWr3LDNKfOXx7wGxuiWkng2tUgGLLqeLtSgW9cnwi82GIDRsE3LeGwUGQeVJaJeaNCysHuFgSLKSHpLyBR5iW__Mt172dl0sS0fB9LMe8seGVwShEMaBnq9NNlvNIQnc88p/s400/PrefaceCity_Test+03.jpg" alt="" id="BLOGGER_PHOTO_ID_5604933600053200546" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-dvokxZXd8u44kJLS3p0Qr-UHe84G3JGVHh2u3zxqQ1R-1VBS62jKSdyBustXdyNldXC9mzhCr76nfZVtCVrtgn-DcNUdjmzenMpa8UCn_AlIPjBTTUkUX0fOZBGIHlgicMbNPWhB-DR/s1600/PrefaceCity_Test+04.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhu-dvokxZXd8u44kJLS3p0Qr-UHe84G3JGVHh2u3zxqQ1R-1VBS62jKSdyBustXdyNldXC9mzhCr76nfZVtCVrtgn-DcNUdjmzenMpa8UCn_AlIPjBTTUkUX0fOZBGIHlgicMbNPWhB-DR/s400/PrefaceCity_Test+04.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934591225103314" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi196iKIs26HM6B4rWMKaCIed5J1aTifFGGWhYXjwUsCKMpca2OThnbBlNNyC0GNWxHxHwqEMueqrkxRxLM6TFJMe2bo0iGVL_2N5PyGLQ1eEBsCpXrlPKqfI3L9J0exeKGXeJm_Ih_Z2AC/s1600/PrefaceCity_Test+05.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi196iKIs26HM6B4rWMKaCIed5J1aTifFGGWhYXjwUsCKMpca2OThnbBlNNyC0GNWxHxHwqEMueqrkxRxLM6TFJMe2bo0iGVL_2N5PyGLQ1eEBsCpXrlPKqfI3L9J0exeKGXeJm_Ih_Z2AC/s400/PrefaceCity_Test+05.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934589988268594" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiavIcgsdaNd4KoA3r0mC-bWfZmxWzRwnYZwXELZXwMg-umkwVRrRkQV6Wxy4OfTaqQ_eo27akSCHxBj4SN8CHqgFJfFUhpLZrjALVMu2bjLd2wHkKEOHwSwZDUKEl3oeDCwYh5_9AHjNKD/s1600/PrefaceCity_Test+06.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiavIcgsdaNd4KoA3r0mC-bWfZmxWzRwnYZwXELZXwMg-umkwVRrRkQV6Wxy4OfTaqQ_eo27akSCHxBj4SN8CHqgFJfFUhpLZrjALVMu2bjLd2wHkKEOHwSwZDUKEl3oeDCwYh5_9AHjNKD/s400/PrefaceCity_Test+06.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934589444845506" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDeDGK8o7TFJoPJmHxqLCziz7mXam4o8OHOZtA9KA7yo84eUXEX1kCqQlcUkcBBqoR1p32h7yvfCFJYSiu8dxlcxb7uzCyRqZ14nv8Za0u1LL4skg01eLatrAB84ZT4OeUR6wgV2FGxuIh/s1600/PrefaceCity_Test+07.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDeDGK8o7TFJoPJmHxqLCziz7mXam4o8OHOZtA9KA7yo84eUXEX1kCqQlcUkcBBqoR1p32h7yvfCFJYSiu8dxlcxb7uzCyRqZ14nv8Za0u1LL4skg01eLatrAB84ZT4OeUR6wgV2FGxuIh/s400/PrefaceCity_Test+07.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934596608327298" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRmaTzHlv5nUXx3X_17qh7-OMzZiTNAQUW_r5XEZT8s1LP2GsN69ZrYaDl8UKmukpQgVOtQIedIP2O623CBfPg6T5AMJ5ySMYfynJnUtKx004PZmyowgYDFggSVE8eeeJ71kvZfmdVRmyU/s1600/PrefaceCity_Test+08.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRmaTzHlv5nUXx3X_17qh7-OMzZiTNAQUW_r5XEZT8s1LP2GsN69ZrYaDl8UKmukpQgVOtQIedIP2O623CBfPg6T5AMJ5ySMYfynJnUtKx004PZmyowgYDFggSVE8eeeJ71kvZfmdVRmyU/s400/PrefaceCity_Test+08.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934600481288146" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8tBzI5vuNdbHrqomhVsbqEMibZesynKTx1RHLMoClyOLR-U02_Md5ISS08tt4w9RGClmYT_jdv_qqlvfGgjzMnB-EIuToyxARwdOM0vPm0BBgFFtEfKV3zoBPtUU6qWXDkR6PCMBL18ii/s1600/PrefaceCity_Test+08.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8tBzI5vuNdbHrqomhVsbqEMibZesynKTx1RHLMoClyOLR-U02_Md5ISS08tt4w9RGClmYT_jdv_qqlvfGgjzMnB-EIuToyxARwdOM0vPm0BBgFFtEfKV3zoBPtUU6qWXDkR6PCMBL18ii/s400/PrefaceCity_Test+08.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934886125587058" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaWIUa-s0ui7r0kHIzxxLcPev9cNKtp8JmSCUQsB-z0f8Chsl4ghT79L5-NWxQr9ITP8q5afkgEawYKIxWRe4EeqytGlOQfuiBcT_CW_GRLUDNAQ8IPR31PKK15rp4ugDYwPqtgnym7R8e/s1600/PrefaceCity_Test+09.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaWIUa-s0ui7r0kHIzxxLcPev9cNKtp8JmSCUQsB-z0f8Chsl4ghT79L5-NWxQr9ITP8q5afkgEawYKIxWRe4EeqytGlOQfuiBcT_CW_GRLUDNAQ8IPR31PKK15rp4ugDYwPqtgnym7R8e/s400/PrefaceCity_Test+09.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934885702828082" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpDFIeMcqdUr73zH39klPndzcpvk4Dv9HjCMcKJWXtNOTQBdCvDon4yqWcuL_EfAE7HI6cHpEeOfAOd8rKzmuyp5nUFxm-Y7pLiBpPdRsz6TBYeC-NcSByIrKpbxJIeQlCzNof7kuYoOj3/s1600/PrefaceCity_Test+10.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpDFIeMcqdUr73zH39klPndzcpvk4Dv9HjCMcKJWXtNOTQBdCvDon4yqWcuL_EfAE7HI6cHpEeOfAOd8rKzmuyp5nUFxm-Y7pLiBpPdRsz6TBYeC-NcSByIrKpbxJIeQlCzNof7kuYoOj3/s400/PrefaceCity_Test+10.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934889710629506" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg34pOmYd0uxSXp36wMubsbzXqoQgn-wKeNP2nLRe_64LfkjeHDWi3wrICpQOUQiIQFmIETN4o6ML7XqsViLucHaGeu_siu1P2LxN4wXD3lZzkSoE_xXbN_Muqvjlp1X1IJujKFc5jOBBoH/s1600/PrefaceCity_Test+11.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg34pOmYd0uxSXp36wMubsbzXqoQgn-wKeNP2nLRe_64LfkjeHDWi3wrICpQOUQiIQFmIETN4o6ML7XqsViLucHaGeu_siu1P2LxN4wXD3lZzkSoE_xXbN_Muqvjlp1X1IJujKFc5jOBBoH/s400/PrefaceCity_Test+11.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934897464815042" border="0" /></a><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3fJj55ER3m0HEKSKPhLnRaEf6HQ2-AYozqCnnHNnU-BGGh0O19hnq3CGb3pDTNeVXwheJGMr5weuH6l9AOtxV5KygS0ccq6x86KrWEy1O3ZVYBa4pj9zFhMDj6koVuw3pzr_fq4L7W1qS/s1600/PrefaceCity_Test+12.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3fJj55ER3m0HEKSKPhLnRaEf6HQ2-AYozqCnnHNnU-BGGh0O19hnq3CGb3pDTNeVXwheJGMr5weuH6l9AOtxV5KygS0ccq6x86KrWEy1O3ZVYBa4pj9zFhMDj6koVuw3pzr_fq4L7W1qS/s400/PrefaceCity_Test+12.jpg" alt="" id="BLOGGER_PHOTO_ID_5604934897961059026" border="0" /></a><br /><br /><p>One of the very, very, very early screenshot of the game. I still like to keep it because it looks cool, and gives that feeling the final game should preserve. Was very impressive by the stage the engine actually was. I didn't even have my own model, so I used the green ninja that comes with Ogre.<br /></p><br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTuk1dgUHqPLjUKhT_yf9FVfmlCcgmlRtgG2O6J8mqEhDKX3a55OQryTNTphPSmOmP8xcOWi6HnAFMR2h7dxxwnql60Wt1nsqUhw-RjtIEJuOx0xlsNcxDRi6pCT3hOgPeqMrhSnpMRUI/s1600/Early_Screenshot.jpg"><img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 250px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkTuk1dgUHqPLjUKhT_yf9FVfmlCcgmlRtgG2O6J8mqEhDKX3a55OQryTNTphPSmOmP8xcOWi6HnAFMR2h7dxxwnql60Wt1nsqUhw-RjtIEJuOx0xlsNcxDRi6pCT3hOgPeqMrhSnpMRUI/s320/Early_Screenshot.jpg" /></a><br /><span style="font-style: italic;">The engine uses or supports:</span><br /><ul><li><a href="http://www.ogre3d.org/">Ogre</a> 1.8 for rendering</li><li><a href="http://www.havok.com/index.php?page=havok-physics">Havok</a> 7.10 for Physics</li><li>Supports multiplayer, using <a href="http://think-async.com/">Asio</a> as library</li><li>Uses <a href="http://www.lua.org/">Lua</a> 5.1 for scripting.</li><li><a href="http://connect.creativelabs.com/openal/default.aspx">OpenAL</a> for sound<br /></li><li>Takes full advantage of multi-cores (dual core is highly recommended)</li><li>Seamless day/night transitions.</li><li>Cloud generation, real time cloud shadows<br /></li><li>HDR, SSAO, Water Reflections & Refractions, Heat Blur, and more post processing effects.</li><li><a href="http://filmicgames.com/archives/75">Filmic tonemapping</a><br /></li><li><a href="http://filmicgames.com/archives/299">Linear Gamma</a> pipeline</li><li>Blender, GIMP, Arbaro</li><li>Ogg Vorbis, libnoise, OIS, tolua++<br /></li></ul><p>- dark_sylinc</p>Matias N. Goldberghttp://www.blogger.com/profile/02186368235104859313noreply@blogger.com0