<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-548473872866737238</id><updated>2024-08-31T16:51:06.997+03:00</updated><category term="assets pipeline"/><category term="CryEngine 3"/><category term="GPU occlusion culling"/><category term="color correction"/><category term="debugging"/><category term="game editor"/><category term="move rotate scale manipulator"/><category term="shaders development"/><category term="tools"/><title type='text'>Engine tales</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-3456993032543880963</id><published>2012-12-10T12:29:00.001+02:00</published><updated>2012-12-10T12:29:57.149+02:00</updated><title type='text'>CART cache implementation.</title><content type='html'>I&#39;ve created Google Code project to share my implementation of CART caching strategy. It has better characteristics than LRU and is fully thread safe. Kind of &#39;memcached&#39; inside your C++ application. I&#39;m using it, as example,&amp;nbsp;for Memory Mapped Files to map only limited number of 16MB chunks to avoid&amp;nbsp;enormous&amp;nbsp;virtual memory consumption on very large files (10Gb+). Cache in this case decide&amp;nbsp;which&amp;nbsp;pages to evict from memory, keeping frequently used ones.&lt;br /&gt;
&lt;br /&gt;
You can find implementation here:&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/cart-cache/&quot;&gt;http://code.google.com/p/cart-cache/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/3456993032543880963/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2012/12/cart-cache-implementation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/3456993032543880963'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/3456993032543880963'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2012/12/cart-cache-implementation.html' title='CART cache implementation.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-4978430095086820345</id><published>2012-01-12T01:29:00.000+02:00</published><updated>2012-01-12T01:29:28.962+02:00</updated><title type='text'>Derivative maps.</title><content type='html'>Another interesting reading about derivative maps:&lt;br /&gt;
&lt;a href=&quot;http://www.rorydriscoll.com/2012/01/11/derivative-maps/&quot;&gt;http://www.rorydriscoll.com/2012/01/11/derivative-maps/&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
Author solved the original problem with closeups by doubling bump map storage requirements. Looks pretty cool to me.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/4978430095086820345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2012/01/derivative-maps.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4978430095086820345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4978430095086820345'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2012/01/derivative-maps.html' title='Derivative maps.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-7720905905449983875</id><published>2010-06-14T10:40:00.002+03:00</published><updated>2010-09-30T18:07:49.831+03:00</updated><title type='text'>Morphological Anti-Aliasing.</title><content type='html'>&lt;div style=&quot;font-family: inherit;&quot;&gt;I&#39;ve ported &lt;a href=&quot;http://igm.univ-mlv.fr/%7Ebiri/mlaa-gpu/&quot;&gt;recent implementation&lt;/a&gt; of Morphological Anti-Aliasing to HLSL. Anyone interested might compare it to classic edge blurring technique with this &lt;a href=&quot;https://docs.google.com/leaf?id=0B0dwg_M3CwwnZmU4NGFkNzMtNTkzNy00N2VkLWI5NjktMjE2ZTY3MzAwZjFm&amp;amp;sort=name&amp;amp;layout=list&amp;amp;num=50&quot;&gt;build&lt;/a&gt;.&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Edit&lt;/b&gt;: added build that is not requiring PhysX System Software to run.&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;To play with AA, open Editor, select any game module (Materials shows it best), select &lt;b&gt;&lt;i&gt;Appearance&lt;/i&gt;&lt;/b&gt;-&amp;gt;&lt;b&gt;&lt;i&gt;Edit Profile&lt;/i&gt;&lt;/b&gt;-&amp;gt;&lt;b&gt;&lt;i&gt;Anti-Aliasing&lt;/i&gt;&lt;/b&gt;. Change &lt;b&gt;&lt;i&gt;Anti-Aliasing type&lt;/i&gt;&lt;/b&gt; there. For stable FPS just hover rendering window for UI updates to not interfere with it.&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;To fly, press &lt;i&gt;right-mouse&lt;/i&gt; plus &lt;i&gt;WSAD&lt;/i&gt;. Use &lt;i&gt;Shift&lt;/i&gt; and &lt;i&gt;Ctrl&lt;/i&gt; to control flying speed.&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;Ported version of the shader is in archive as well:  &lt;u style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;GEMData\Shaders\D3D9\AntiAlias.shader&lt;/b&gt;&lt;/u&gt;.&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: inherit;&quot;&gt;Enjoy. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/7720905905449983875/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/06/morphological-anti-aliasing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/7720905905449983875'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/7720905905449983875'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/06/morphological-anti-aliasing.html' title='Morphological Anti-Aliasing.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-5200976707422271683</id><published>2010-06-03T22:05:00.003+03:00</published><updated>2010-06-04T15:20:29.309+03:00</updated><title type='text'>Bump-mapping VS Normal-mapping.</title><content type='html'>Morten S. Mikkelsen posted recently a &lt;a href=&quot;http://jbit.net/%7Esparky/sfgrad_bump/mm_sfgrad_bump.pdf&quot;&gt;technical paper&lt;/a&gt; describing method of perturbing the surface normal on GPU with &lt;i&gt;bump-mapping technique&lt;/i&gt;, used widely in offline rendering world. Main advantage over classic for realtime rendering &lt;i&gt;normal-mapping technique&lt;/i&gt; is one-versus-three channels required to store perturbation info. Also you don&#39;t need to carry with you all this tangent/binormal stuff in vertex buffers and shaders. Looked like a silver bullet to me.&lt;br /&gt;
&lt;br /&gt;
Of course I&#39;ve copy-pasted the code from &lt;u&gt;Listing 1&lt;/u&gt; to give it a try. After few experiments and suggestion from Morten in &lt;a href=&quot;http://www.gamedev.net/community/forums/topic.asp?topic_id=572450&quot;&gt;this thread&lt;/a&gt; I&#39;ve got it working by scaling bump input value (coefficient 0.007 worked for me). The only thing that prevented me to merge this to trunk was moire. It polluted the solution pretty heavily. And again (thanks Morten!) author suggested a solution. It was just an usage of sampler instead of gradient instructions:&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;float2 TexDx = ddx(IN.stcoord.xy);&lt;br /&gt;
float2 TexDy = ddy(IN.stcoord.xy);&lt;br /&gt;
&lt;br /&gt;
float Hll = height_tex.Sample(samLinear, IN.stcoord).x;&lt;/span&gt;  &lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;br /&gt;
float dBs = (height_tex.Sample(samLinear, IN.stcoord+TexDx).x - Hll);&lt;br /&gt;
float dBt = (height_tex.Sample(samLinear, IN.stcoord+TexDy).x - Hll);&lt;/span&gt;&lt;/blockquote&gt;Guess what? Moire is gone! And I was able to compare two methods, which looks pretty much the same visually. Bump-mapping technique looks a bit more crisp, though:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbaJCGPfS-dd7Si2jWTQ3Dvoxbfj0sXc95U0znmePyUPaUpjHNcrOqmCRYBIemFal4uDY8W0N-HRhIsHMWFY8fBmrZ5ew7DbTexeJ0kKT7uX-LM8buOeDoLxwjB4c5U7eASLMBwk6Du2o/s1600/BumpMapVsNormalMap.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbaJCGPfS-dd7Si2jWTQ3Dvoxbfj0sXc95U0znmePyUPaUpjHNcrOqmCRYBIemFal4uDY8W0N-HRhIsHMWFY8fBmrZ5ew7DbTexeJ0kKT7uX-LM8buOeDoLxwjB4c5U7eASLMBwk6Du2o/s320/BumpMapVsNormalMap.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
The end of normal mapping era?&lt;br /&gt;
&lt;br /&gt;
P.S. New method works a bit faster for me.&lt;br /&gt;
&lt;br /&gt;
P.P.S. Added another view:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9URQ0vCwStTCbXQZyWexw-TY7MXRxUlmlYs2WptS19vGgdNPBe96JvJZ7rVunpMQKdRV1eaM-nqI1myahqXZy4iSrm6VJnZOGs94PgWXaO8SldYz4-cotyvIHqCikQ3hsguVepch68M/s1600/ProofOrNeverHappens.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgo9URQ0vCwStTCbXQZyWexw-TY7MXRxUlmlYs2WptS19vGgdNPBe96JvJZ7rVunpMQKdRV1eaM-nqI1myahqXZy4iSrm6VJnZOGs94PgWXaO8SldYz4-cotyvIHqCikQ3hsguVepch68M/s320/ProofOrNeverHappens.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
P.P.P.S. Added &lt;a href=&quot;https://docs.google.com/leaf?id=0B0dwg_M3CwwnYzA0NWJjZDYtOTM4My00NmNkLThlYTYtYTdhMDIyMjQwZWJm&amp;amp;hl=en&quot;&gt;two builds&lt;/a&gt; to compare.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/5200976707422271683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/06/bump-mapping-vs-normal-mapping.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/5200976707422271683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/5200976707422271683'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/06/bump-mapping-vs-normal-mapping.html' title='Bump-mapping VS Normal-mapping.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbaJCGPfS-dd7Si2jWTQ3Dvoxbfj0sXc95U0znmePyUPaUpjHNcrOqmCRYBIemFal4uDY8W0N-HRhIsHMWFY8fBmrZ5ew7DbTexeJ0kKT7uX-LM8buOeDoLxwjB4c5U7eASLMBwk6Du2o/s72-c/BumpMapVsNormalMap.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-4110093510636246414</id><published>2010-05-26T00:58:00.002+03:00</published><updated>2010-05-26T09:26:10.832+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="move rotate scale manipulator"/><title type='text'>Move/Rotate/Scale manipulator.</title><content type='html'>Some time ago I&#39;ve got an idea of all-in-one manipulator to perform move/rotate/scale transformations without constantly jumping to mode buttons or using shortcuts.&lt;br /&gt;
&lt;br /&gt;
Idea is pretty simple - it&#39;s just two cubes:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Exterior one has flipped normals and controls rotation. Each side allows to rotate around single axis.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Interior cube controls movement and scale. Movement automatically restricted to axis or plane when you hover over different areas. In GEM I don&#39;t have non-uniform scaling (because of compact  quaternion/translate/scale representation with 8 floats), so corners simply  control uniform scale. But you can adjust this for your needs.&lt;/li&gt;
&lt;/ul&gt;It feels pretty natural and obvious to someone who sees it for the first time. You can see it in action below (sorry for mouse cursor position bug - capturing software issues, editor shows everything in place):&lt;br /&gt;
&lt;object height=&quot;344&quot; width=&quot;425&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/R1ID8KBZBCA&amp;hl=en&amp;fs=1&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;/param&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;/param&gt;&lt;embed src=&quot;http://www.youtube.com/v/R1ID8KBZBCA&amp;hl=en&amp;fs=1&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;425&quot; height=&quot;344&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9OKuHD0TasXltSNYMAViSLntP7tE6kxaBpRsNkyCeq4DQjH-R7_fsV2hp7EAb8lW1hyphenhyphenAMSFIt7GjXOqOG_yI4Wfw9HhNIyJXqvi-j1f1tyt3h2z_MWp1TbcJWHSQ-fqysHv9wGk5Gr8/s1600/GEM_MRS_Manipulator.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9OKuHD0TasXltSNYMAViSLntP7tE6kxaBpRsNkyCeq4DQjH-R7_fsV2hp7EAb8lW1hyphenhyphenAMSFIt7GjXOqOG_yI4Wfw9HhNIyJXqvi-j1f1tyt3h2z_MWp1TbcJWHSQ-fqysHv9wGk5Gr8/s200/GEM_MRS_Manipulator.png&quot; width=&quot;183&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Feel free to ask on &quot;max.dyachenko [at] gmail.com&quot; if you want to get mesh/texture/manipulator code.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/4110093510636246414/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/05/moverotatescale-manipulator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4110093510636246414'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4110093510636246414'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/05/moverotatescale-manipulator.html' title='Move/Rotate/Scale manipulator.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9OKuHD0TasXltSNYMAViSLntP7tE6kxaBpRsNkyCeq4DQjH-R7_fsV2hp7EAb8lW1hyphenhyphenAMSFIt7GjXOqOG_yI4Wfw9HhNIyJXqvi-j1f1tyt3h2z_MWp1TbcJWHSQ-fqysHv9wGk5Gr8/s72-c/GEM_MRS_Manipulator.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-291327271236506303</id><published>2010-04-25T17:49:00.001+03:00</published><updated>2010-04-25T20:27:49.150+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="GPU occlusion culling"/><title type='text'>Occlusion culling, part 1.</title><content type='html'>I want to share some results from my recent experiments with GPU-based occlusion culling. I&#39;ve decided to not to use occlusion visibility queues as they have lag and scalability problems. Basically you should be able to use them in production with some clever optimizations and tricks, but I wanted to make &lt;i&gt;fast&lt;/i&gt; implementation.&lt;br /&gt;
&lt;br /&gt;
So I&#39;ve choose rasterization and hierarchical Z. It&#39;s easy to implement if you already have Z-fill path, easy to test and easy to debug because of very simple concept. And I was a bit inspired by &lt;a href=&quot;http://www.selfshadow.com/talks/rwc_gdc2010_v1.pdf&quot;&gt;this&lt;/a&gt; presentation from Ubisoft Montreal studio. I&#39;ve seen more detailed internal presentation from them and it was pretty cool. I&#39;ll give here some high level ideas for you to not to read whole thing.&lt;br /&gt;
&lt;br /&gt;
Basically they are rendering &lt;i&gt;good occluders&lt;/i&gt; geometry to small viewport and build Z-buffer from this. Z-buffer then converted into hierarchical representation (higher levels containing only largest Z depth). All tested objects then converted into point sprites vertex stream containing post-projected bounding boxes information. Pixel shader fetches hierarchical Z and performs simple Z tests, outputting visibility queries result to it&#39;s render target. Render target then is read by CPU for visibility results to be used in scene processing. Guys are trying to keep pixel shader performance under control by testing whole bounding box with only one Z sample by selecting best fit layer.&lt;br /&gt;
&lt;br /&gt;
While on X360 this scheme can perform enormous amount of tests in very small time frame, it has one major drawback. You need to sync with GPU to read back results. And GPU will be idle while you are building jobs lists for it. This is not a big deal for X360, though.&lt;br /&gt;
&lt;br /&gt;
I&#39;ve prototyped my implementation on PC, so read back quickly became a problem for me. In test scene with pretty heavy shaders and a lot of simple objects (~20K) CPU&amp;lt;-&amp;gt;GPU synchronization spent like 2.5 - 5 ms in GetRenderTargetData() call - time needed for GPU to complete it&#39;s task. I&#39;ve expected lockable render targets rotation will solve the issue but for me AMD driver still sync with GPU on LockRect() even for surfaces rendered few frames behind. So bottleneck seems unavoidable and will degrade performance for simple scenes.&lt;br /&gt;
&lt;br /&gt;
For this implementation I&#39;ve used GPU only for Z-buffer construction and parallelized CPU loops (&lt;a href=&quot;http://www.threadingbuildingblocks.org/&quot;&gt;TBB&lt;/a&gt;) for Z-hierarchy and post-projected bounding boxes tests.&lt;br /&gt;
&lt;br /&gt;
You can see the final result &lt;a href=&quot;http://docs.google.com/leaf?id=0B0dwg_M3CwwnYzAyNGI1N2ItYmMzMC00YzI0LTkwYWEtMTNhMTViZWJiOThh&amp;amp;hl=en&quot;&gt;here&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
In next implementation I will add software rasterizer to compare. Stay tuned.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/291327271236506303/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/04/occlusion-culling-part-1.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/291327271236506303'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/291327271236506303'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/04/occlusion-culling-part-1.html' title='Occlusion culling, part 1.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-1777581255201936046</id><published>2010-04-08T17:16:00.002+03:00</published><updated>2010-04-08T17:16:50.335+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CryEngine 3"/><title type='text'>Instant pipeline.</title><content type='html'>CryTek showed their Sandbox for CryEngine 3 and you can see it here: &lt;br /&gt;
&lt;a href=&quot;http://nvidia.fullviewmedia.com/gdc2010/14-sean-tracy.html&quot;&gt;http://nvidia.fullviewmedia.com/gdc2010/14-sean-tracy.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Iterations are really fast and this is really cool. More iterations for the same budget! =)&lt;br /&gt;
&lt;br /&gt;
I&#39;m not really happy with their method of creating sandbox functionality - it&#39;s programmers driven and workflow is not good because of this in some places. Still, tool as a whole is &lt;b&gt;great&lt;/b&gt;!&lt;br /&gt;
&lt;br /&gt;
I&#39;ll share some interesting thoughts on interface and workflow design for such tools later, implemented in my pet engine.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/1777581255201936046/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/04/instant-pipeline.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/1777581255201936046'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/1777581255201936046'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/04/instant-pipeline.html' title='Instant pipeline.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-8819700004600273584</id><published>2010-03-25T15:52:00.003+02:00</published><updated>2010-03-25T16:44:58.792+02:00</updated><title type='text'>Collision detection trick.</title><content type='html'>Imagine you need to collide large groups of soldiers that moves all the time. Use of spatial structures in this case became a pain because of update times. To overcome this we&#39;ve developed simple solution (I believe it used widely in modern physics engines for broad phase).&lt;br /&gt;
&lt;br /&gt;
Consider picture below (we are looking on 2D version, but algorithm will work in 3D as well). We want to collide two circles:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqP2yfev0yP-wcVPIzuazxG7hwQnKl0rYG5PowBGX3K-1YNwv9j0wMdA6ThhLFaa1UcAvZD7kkTt5yjjnGORpPqCzdq7q5W-I0aJ8n-rI3XZPZXhyiS80rlVpX-TS6SV2fCo012kiVzM4/s1600/AxisDivision.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqP2yfev0yP-wcVPIzuazxG7hwQnKl0rYG5PowBGX3K-1YNwv9j0wMdA6ThhLFaa1UcAvZD7kkTt5yjjnGORpPqCzdq7q5W-I0aJ8n-rI3XZPZXhyiS80rlVpX-TS6SV2fCo012kiVzM4/s320/AxisDivision.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Simple radius check is good enough in this case. But if you want to collide 1K circles - it will just become impractical. So, what about this colored lines on picture?&lt;br /&gt;
&lt;br /&gt;
Red lines represent &lt;b&gt;left&lt;/b&gt; bounds of each object on each axis and green lines represent &lt;b&gt;right&lt;/b&gt; bounds. To detect &lt;i&gt;possible&lt;/i&gt; collision between all objects on grid, we can perform the following.&lt;br /&gt;
&lt;br /&gt;
Push all bounds to two arrays, one for each axis. Sort arrays by bound position. Iterate through arrays with logic:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;For each &lt;b&gt;left&lt;/b&gt; bound consider object as &lt;i&gt;open&lt;/i&gt;.&lt;/li&gt;
&lt;li&gt;For each &lt;b&gt;right&lt;/b&gt; bound consider object as &lt;i&gt;closed&lt;/i&gt;. &lt;/li&gt;
&lt;li&gt;For &lt;b&gt;any&lt;/b&gt; bound met -&amp;gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt;For each &lt;i&gt;opened&lt;/i&gt; object -&amp;gt;&lt;/li&gt;

&lt;ul&gt;&lt;li&gt; Put potential collision bit into bit-table.&lt;/li&gt;
&lt;/ul&gt;&lt;/ul&gt;
&lt;li&gt;Repeat for next axis.&lt;/li&gt;
&lt;/ul&gt;If both tables are now show that there is potential collision between two objects (both bits are set) - perform radius check and report collision, if any.&lt;br /&gt;
&lt;br /&gt;
To extent this method, presort bounds of groups of objects (for example units of soldiers). To perform collision between any groups you can do cheap mix of presorted arrays to avoid sorting of very large arrays.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/8819700004600273584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/03/collision-detection-trick.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/8819700004600273584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/8819700004600273584'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/03/collision-detection-trick.html' title='Collision detection trick.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqP2yfev0yP-wcVPIzuazxG7hwQnKl0rYG5PowBGX3K-1YNwv9j0wMdA6ThhLFaa1UcAvZD7kkTt5yjjnGORpPqCzdq7q5W-I0aJ8n-rI3XZPZXhyiS80rlVpX-TS6SV2fCo012kiVzM4/s72-c/AxisDivision.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-5011433191521723137</id><published>2010-03-25T09:22:00.001+02:00</published><updated>2010-03-25T12:07:14.326+02:00</updated><title type='text'>Draw a forest.</title><content type='html'>While working on our first title in MindLink Studio (&quot;Telladar Chronicles: Decline&quot;), we&#39;ve set one very ambitious goal for that times: be able to show like 20K soldiers clashing on battlefields. With full 3D representation of everything. Back in 2002 we didn&#39;t seen anything like this yet.&lt;br /&gt;
&lt;br /&gt;
I had an &lt;span style=&quot;font-size: small;&quot;&gt;&lt;strike&gt;obvious&lt;/strike&gt;&lt;/span&gt; idea of using sprites for lowest LODs to be able to draw such a large world. After few years of development and experimentation I&#39;ve ended up with following solution.&lt;br /&gt;
&lt;br /&gt;
When you need something to be drawn at distance, you ask sprites rendering subsystem to provide you with sprite representation of this. If something already in cache - you&#39;re done.&lt;br /&gt;
&lt;br /&gt;
In opposite case subsystem considers size of the thing and selects place for it in sprites cache. This textures are divided on rows of&amp;nbsp;predefined height and it selects one with best smallest row height. It injects sprite into the row, modifying row linked list. Rows contents is&amp;nbsp;managed by subsystem like&amp;nbsp;in any&amp;nbsp;common memory manager. To wipe the row if it become too fragmented just copy it&#39;s content to another row, updating the sprites vertexes.&lt;br /&gt;
&lt;br /&gt;
After getting sprite representation, LOD system injects four vertexes into dynamic storage. Great thing about this approach - you can fire-and-forget about your sprites. As long your sprite is alive - it will be rendered in batch with others. And you can just ignore updates for distant objects for any amount of frames (nobody ever will notice this on great distances).&lt;br /&gt;
&lt;br /&gt;
To erase the sprite - ignore it when constructing your next ping-pong index buffer. To reuse the space in vertex buffer - make sure enough frames passed from the moment it was used last time.&lt;br /&gt;
&lt;br /&gt;
In this way we were able to draw forests with hundreds of thousand of trees at real time, still providing nice 3D trees at close distance.&lt;br /&gt;
&lt;br /&gt;
Soldiers was a bit tricky, as you need to animate them to look believable. After months of visual tests I&#39;ve came to conclusion that you need to provide only&amp;nbsp;2-3 frames of walking animations to &quot;shimmer&quot; on distance.&lt;br /&gt;
&lt;br /&gt;
Forest in action:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDrqTrbzGek-h0JnJDY8Bl9hhFMwwQjAbEug8b8mYvWIlhxzptSmqACX4HcqyZmrglX1W-gMhS_Ik9UviRTYWEC-tdzioewCYyffLBSZBkg3SD1SL1JTygldkYM3L9wuUiQBF5EUpmVk/s1600/Forest.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDrqTrbzGek-h0JnJDY8Bl9hhFMwwQjAbEug8b8mYvWIlhxzptSmqACX4HcqyZmrglX1W-gMhS_Ik9UviRTYWEC-tdzioewCYyffLBSZBkg3SD1SL1JTygldkYM3L9wuUiQBF5EUpmVk/s320/Forest.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Lighting is a bit outdated. Still there is something like 30K trees in viewport with 30 FPS on SM1 hardware.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/5011433191521723137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/03/draw-forest.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/5011433191521723137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/5011433191521723137'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/03/draw-forest.html' title='Draw a forest.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZDrqTrbzGek-h0JnJDY8Bl9hhFMwwQjAbEug8b8mYvWIlhxzptSmqACX4HcqyZmrglX1W-gMhS_Ik9UviRTYWEC-tdzioewCYyffLBSZBkg3SD1SL1JTygldkYM3L9wuUiQBF5EUpmVk/s72-c/Forest.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-3843652755497865906</id><published>2010-03-19T12:18:00.002+02:00</published><updated>2010-03-25T19:23:29.225+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="tools"/><title type='text'>Toolset.</title><content type='html'>Fast thought after visiting one of the numerous Ubi development studios around the globe:&lt;br /&gt;
&lt;b&gt;The only way to create exceptional game is to have&amp;nbsp;exceptional tools.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
[We thank you, Cap!]&lt;br /&gt;
[Applauds]&lt;br /&gt;
&lt;br /&gt;
Seriously. No good tools? No good AAA game for you, sorry.&lt;br /&gt;
&lt;br /&gt;
And the reason behind is pretty obvious: &lt;i&gt;less time per iteration == more iterations for the same budget&lt;/i&gt;. More iterations means greater quality. Greater quality means increased value to your customer and increased sales. Profit.&lt;br /&gt;
&lt;br /&gt;
But there is one trick involved. Interfaces and processes for this tools should be built by UI usability experts, not programmers or artists or anybody else. And the good news is - you can find plenty on IT market. I&#39;m wondering why most of the studios ignore this fact?</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/3843652755497865906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/03/toolset.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/3843652755497865906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/3843652755497865906'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/03/toolset.html' title='Toolset.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-159162869007612801</id><published>2010-01-16T16:06:00.001+02:00</published><updated>2010-04-13T22:16:26.758+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="shaders development"/><title type='text'>Shaders development.</title><content type='html'>Shaders are really important part of any graphics engine and usually a lot of work is invested into them. But shaders creation pipelines proposed by NVidia and ATI lacks one core ability - they have nothing in common with real engine shaders. You can prototype a shader to some extent using FXComposer or Render Monkey. But when it comes to engine integration - you still modify them by hands and blindly run, hoping for the best.&lt;br /&gt;
&lt;br /&gt;
If your engine has run time editor with &quot;What You See Is What You Play&quot; ability - you already has a good platform for shaders development. And the simplest form of assisting is viewing of render targets contents (which can be achieved by using NVPerfHUD for example). But to make it more interesting than just overlay rendering I&#39;ve tried the following:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHBjbg6TIuGd8lPVjbqJeybMya57E_6OvHZiap5MpEVEsaT3rh7Qk9hGrNswxaSQ1vqoXPbtzXliP9tDl0rIg76dKchZk5R9B8MoPirriyi6Z8_b4FHACWpAgt92teGMdn_8FShPbpVRU/s1600-h/RenderOutput.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHBjbg6TIuGd8lPVjbqJeybMya57E_6OvHZiap5MpEVEsaT3rh7Qk9hGrNswxaSQ1vqoXPbtzXliP9tDl0rIg76dKchZk5R9B8MoPirriyi6Z8_b4FHACWpAgt92teGMdn_8FShPbpVRU/s640/RenderOutput.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;So basically I&#39;ve attached texture exploration interface (you already need it for texture compression) to renderer outputs. In drop-down list you can select all render targets that renderer internally exposes through it&#39;s interface. This interface might look like:&lt;/div&gt;&lt;blockquote&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: x-small;&quot;&gt;virtual uint Debug_GetNumRenderOutputs() const;&lt;br /&gt;
virtual const wchar_t* Debug_GetRenderOutputName(uint index) const;&lt;br /&gt;
virtual const ITexture* Debug_RegisterForRenderOutput(const wchar_t* renderOutput);&lt;br /&gt;
virtual void Debug_UnregisterForRenderOutput(const wchar_t* renderOutput);&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;When someones registers for render output, renderer begins to capture render targets contents. Internally it looks like:&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif; font-size: x-small;&quot;&gt;void RegisterRenderOutput(const wchar_t* name, ITexture* pTexture);&lt;br /&gt;
void RegisterRenderOutput(const wchar_t* name, IDirect3DSurface9* pSurface);&lt;/span&gt;&lt;/blockquote&gt;This methods are called in some places through renderer, which checks if render output is registered for capturing. After that it copies RT contents to already created texture, returned in method &lt;i&gt;Debug_RegisterForRenderOutput()&lt;/i&gt;. This texture is then displayed by texture exploration UI.&lt;br /&gt;
&lt;br /&gt;
In this way developer can access any render target exposed by renderer, which gets updated in real time. Combined with ability to reload shaders this will create simple and powerful shaders development pipeline.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/159162869007612801/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/01/shaders-development.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/159162869007612801'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/159162869007612801'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/01/shaders-development.html' title='Shaders development.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHBjbg6TIuGd8lPVjbqJeybMya57E_6OvHZiap5MpEVEsaT3rh7Qk9hGrNswxaSQ1vqoXPbtzXliP9tDl0rIg76dKchZk5R9B8MoPirriyi6Z8_b4FHACWpAgt92teGMdn_8FShPbpVRU/s72-c/RenderOutput.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-1798513050497979081</id><published>2010-01-14T23:05:00.002+02:00</published><updated>2010-04-13T22:15:05.007+03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="color correction"/><title type='text'>Color correction.</title><content type='html'>Easiest way to control the mood of the picture is color correction. No serious team will go out without this feature inside their beloved engine. And there is a lot of cases you can&#39;t live without it. Every time your lead artist wants to change something globally - color correction is the first thing he will consider.&lt;br /&gt;
&lt;br /&gt;
From technical point of view, color remapping is really easy to implement. But the most obvious solution, use of volume texture to simply remap colors, will suffer from banding issues until resolution of this volume will be close to 8 bit precision (like 256x256x256). This is prohibitively costly in terms of memory and performance of texture cache as we need to touch every screen pixel.&lt;br /&gt;
&lt;br /&gt;
Fortunately, this can be easily solved by using signed addition instead of remap. So to transform Red (1,0,0) to Green (0,1,0) we need to use value of (-1,1,0). In this way we can use volume texture with size like 16x16x16 without any banding artifacts. Let&#39;s call this &lt;i&gt;color correction matrix&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
But technical solution is not enough. We need artist-friendly way of controlling this. After some consideration and communicating with artists I&#39;ve choose the following solution. Artist creates some arbitrary number of screenshots of the level or area he wants to use color correction on. Then he uses any color correction tool of his choice (we&#39;ve used Photoshop for prototyping) to produce derived color corrected versions of above screenshots. In this way we are not restricting him anyhow.&lt;br /&gt;
&lt;br /&gt;
After creating two sets of screenshots artist feeds them into the engine tool that builds color correction matrix from them. Processor just incrementally saves difference of colors to some table and compress it into correction matrix after all images being processed. Afterward we can add some effects to this matrix.&lt;br /&gt;
&lt;br /&gt;
Implementation note: remember that you need to correct image &lt;b&gt;before&lt;/b&gt; HDR!&lt;br /&gt;
&lt;br /&gt;
Shader code for applying correction is trivial:&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;float4 source = tex2Dlod(samplerSource, uv);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;float4 corr = tex3Dlod(samplerColorCorrection, float4(source.xyz, 0));&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;return source + (&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;corr &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;* 2.0f - 1.0f); // if you use unsigned format&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;This might look like this in reality:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6qSrwne2_ao8n-Pq2A7ZqKtJxMVaH_z8sFfHNdDSNH6vdTk0B-q-ot9Al6hA-2W-VcDNY8u0LZJ6nlafvhyphenhyphenn-Jw0wMAEfdrM4OswINUNoHEBtRWi3fB6eagaBupAelWleMxdBCB_A9o/s1600-h/CorrectionExample.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6qSrwne2_ao8n-Pq2A7ZqKtJxMVaH_z8sFfHNdDSNH6vdTk0B-q-ot9Al6hA-2W-VcDNY8u0LZJ6nlafvhyphenhyphenn-Jw0wMAEfdrM4OswINUNoHEBtRWi3fB6eagaBupAelWleMxdBCB_A9o/s640/CorrectionExample.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;There is some obvious difference between corrected image and generated by run time. Major source of this is 16x16x16 correction matrix. HDR contributes by adjusting luminosity as well. But it looks not that bad in real situations.&lt;br /&gt;
&lt;br /&gt;
You might notice unknown parameter &quot;Color shift&quot;. It used for shifting dark colors below threshold to some arbitrary color. In this way you can make shadows blueish for example. I&#39;ve seen this in CryTek sometime ago and I don&#39;t know who should be credited for this idea. Perhaps CryTek guys. ;)&lt;br /&gt;
&lt;br /&gt;
It&#39;s pretty much everything. The only valuable addition to this method might be engine ability to place zones (volumes) with arbitrary color correction on level for special effects and fake global illumination. Use your imagination.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/1798513050497979081/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/01/color-correction.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/1798513050497979081'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/1798513050497979081'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/01/color-correction.html' title='Color correction.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgV6qSrwne2_ao8n-Pq2A7ZqKtJxMVaH_z8sFfHNdDSNH6vdTk0B-q-ot9Al6hA-2W-VcDNY8u0LZJ6nlafvhyphenhyphenn-Jw0wMAEfdrM4OswINUNoHEBtRWi3fB6eagaBupAelWleMxdBCB_A9o/s72-c/CorrectionExample.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-4543583163611207820</id><published>2010-01-10T01:16:00.000+02:00</published><updated>2010-01-10T01:16:41.165+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="game editor"/><title type='text'>Editor with &quot;instant game&quot; ability.</title><content type='html'>&lt;a href=&quot;http://tridemax.blogspot.com/2010/01/engine-debugging.html&quot;&gt;Previously &lt;/a&gt;I&#39;ve discussed engines modules organization that has one nice side effect: with proper implementation engine editor can run game logic inside editor window (like in CryEngines). This is invaluable thing from game design perspective as it &lt;b&gt;really&lt;/b&gt; cuts down iteration times. To be honest, every serious engine should have this ability (and we know some really serious ones without this ;).&lt;br /&gt;
&lt;br /&gt;
Do not underestimate the power of instant iterations. Imagine level designer that tries to set up cover on level to have very specific properties. It may take 10-15 tries to setup one specific place. Multiply it with 1.5-2.0 minutes of loading time and you will get an idea of how important it can be for speed of development &lt;b&gt;and the quality&lt;/b&gt; of the final product.&lt;br /&gt;
Another good example is the weapons designer that tries to balance dozen of weapons. It can take hundreds of iterations to recheck everything. Of course it can be done using legwork of QA team. But shouldn&#39;t they concentrate on other things?&lt;br /&gt;
&lt;br /&gt;
As proof of concept find some CryEngine movies showing process of editing the level with instant jumping into action to see how it looks and plays like. You&#39;ll be impressed.&lt;br /&gt;
&lt;br /&gt;
And this is something that pretty easy to implement to work properly, if you think about this from Day 0. You still need some flag to distinguish editor and standalone mode as game code in some rare situations needs to behave differently. But in most cases code just runs, without any changes.&lt;br /&gt;
&lt;br /&gt;
Use comments below if you have specific questions about implementation.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/4543583163611207820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/01/editor-with-instant-game-ability.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4543583163611207820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4543583163611207820'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/01/editor-with-instant-game-ability.html' title='Editor with &quot;instant game&quot; ability.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-2320400646647832023</id><published>2010-01-09T09:40:00.002+02:00</published><updated>2010-01-15T11:44:13.829+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debugging"/><title type='text'>Engine debugging.</title><content type='html'>At some point of engine lifetime full debug builds become unplayable. This leads to solutions like fast debug builds and such, but they limit your ability to hunt down bugs. In some situations full debug builds is the must to do the job.&lt;br /&gt;
&lt;br /&gt;
Fortunately, there is a &lt;strike&gt;simple&lt;/strike&gt; solution.&lt;br /&gt;
&lt;br /&gt;
Dividing your engine into modules allows you to run separate modules in different modes. So you can run everything in release mode and one single module in full debug mode. With 10-12 modules slowdown from single module (except may be renderer) will be unnoticed. Bingo!&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Some details&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;br /&gt;
Divide your engine into modules, like &lt;i&gt;Rendering&lt;/i&gt;, &lt;i&gt;Physics&lt;/i&gt;, &lt;i&gt;Animation&lt;/i&gt;, &lt;i&gt;Sound&lt;/i&gt;, &lt;i&gt;Scripts&lt;/i&gt;, &lt;i&gt;UI&lt;/i&gt;, &lt;i&gt;Networking&lt;/i&gt;, &lt;i&gt;Resources&lt;/i&gt;, &lt;i&gt;Scene Management&lt;/i&gt; and one central module I&#39;m calling &lt;i&gt;Main&lt;/i&gt;. You can add more modules freely, but don&#39;t divide it too much. Like your brand new flash player can be added to &lt;i&gt;UI&lt;/i&gt; instead of creating new module.&lt;br /&gt;
&lt;br /&gt;
Compile them all as DLLs that have different names for different levels of debugging. I have four basic configurations:&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Full Debug (let&#39;s call is &lt;i&gt;Debug&lt;/i&gt;);&lt;/li&gt;
&lt;li&gt;Release with profiling code and turned off Omit Frame Pointers (let&#39;s call it &lt;i&gt;Profile&lt;/i&gt;);&lt;/li&gt;
&lt;li&gt;Full Speed release build (let&#39;s call it &lt;i&gt;Release&lt;/i&gt;);&lt;/li&gt;
&lt;li&gt;Full Speed release compiled as static library for DRM protected final builds;&lt;/li&gt;
&lt;/ol&gt;Ignore configuration number 4 at this point as it has limited use. So UI module will compile into 3 versions: &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;UI_Debug.dll&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;UI_Profile.dll&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;UI_Release.dll&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
The trick here is to add into &lt;i&gt;Main&lt;/i&gt; module the ability to load different versions of the same module by user request. In case of GEM I just show the following window when Shift is pressed on start of the &lt;i&gt;Main&lt;/i&gt; module:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4br39iTeNhlRvcOpHX4Mswtd5Wi-SxsMMhqKUBEMFn3VggrucUBbKpXFjjjqlD87_IsEJLX3KBxYtKHrLolOvTVxCEuEd9Z0u2O_TamksPCMatXGDWwtosg51o1ANkDgq-NgqgJzkYFc/s1600-h/ModuleMode.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4br39iTeNhlRvcOpHX4Mswtd5Wi-SxsMMhqKUBEMFn3VggrucUBbKpXFjjjqlD87_IsEJLX3KBxYtKHrLolOvTVxCEuEd9Z0u2O_TamksPCMatXGDWwtosg51o1ANkDgq-NgqgJzkYFc/s320/ModuleMode.png&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
This dialog is shown only in debug version of &lt;i&gt;Main&lt;/i&gt; module. Simple as that.&lt;br /&gt;
&lt;br /&gt;
For games and demos that use GEM I&#39;m creating two additional projects. &lt;i&gt;Launcher&lt;/i&gt; (exe) links with appropriate version of &lt;i&gt;Main&lt;/i&gt; module. &lt;i&gt;Game&lt;/i&gt; module contains all game logic and implements specific game interface. In this way &lt;i&gt;Game&lt;/i&gt; module can be loaded by GEM and we are getting &lt;b&gt;very nice&lt;/b&gt; bonus: ability to play the game inside the editor without any additional code (more on this later).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This approach has 3 major drawbacks:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;You need to define a lot of pure interface files as modules will interconnect only through them. But if you ask me, I think that this organization leads to much cleaner engine structure from external point of view. And you can get DX9/DX11/OpenGL/NULL renderers without much effort (yikes!). It can be frustrating to press &quot;Go to definition&quot; and get into interface file instead of implementation, though;&lt;/li&gt;
&lt;li&gt;As modules can be run in different modes you can&#39;t pass between them classes that behave differently in debug and release builds (like STL). For example std::string in release mode module can try to reallocate memory allocated in debug mode module. This will lead to crash. In practice this is not a big deal, if interfaces are defined only by limited set of people;&lt;/li&gt;
&lt;li&gt;If user changes something in say renderer module, that is used in release configuration, but current configuration in VS is set to debug - renderer module will be updated only for debug configuration and this can lead to undefined behavior. It&#39;s rare issue on practice, though.&lt;/li&gt;
&lt;/ul&gt;Good point for large scale engines from this organization is the ability of the tech team to publish engine in SDK mode. It means you compile everything into DLLs and LIBs, add interface files and publish this to game production teams. In most cases they just don&#39;t have anything to mess with inside engine code.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/2320400646647832023/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/01/engine-debugging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/2320400646647832023'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/2320400646647832023'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/01/engine-debugging.html' title='Engine debugging.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4br39iTeNhlRvcOpHX4Mswtd5Wi-SxsMMhqKUBEMFn3VggrucUBbKpXFjjjqlD87_IsEJLX3KBxYtKHrLolOvTVxCEuEd9Z0u2O_TamksPCMatXGDWwtosg51o1ANkDgq-NgqgJzkYFc/s72-c/ModuleMode.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-4417655435832971195</id><published>2010-01-07T23:09:00.001+02:00</published><updated>2010-01-15T11:44:40.189+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="assets pipeline"/><title type='text'>Instant pipeline in action.</title><content type='html'>&lt;a href=&quot;http://tridemax.blogspot.com/2009/12/assets-exporting.html&quot;&gt;After setting up FBX&lt;/a&gt; exporting scripts for 3DSMAX and Maya, I&#39;ve prototyped whole pipeline. How it looks like? You are double-clicking the MAX file in resources explorer and getting this:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwF4MLBo6PeOjJxi7_aDFKdP7EbH2pS7Jp5wWYUV_cjvbSXMPu7ZAnxGJLO_hkunj_HEGrAVx0EZNv1OH0asjTW6hTAJu9V30WAj-7CUVYiCPwax2WQnt6HSxCttbZX4eKtI69AIFrx8E/s1600-h/InstantPipeline.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwF4MLBo6PeOjJxi7_aDFKdP7EbH2pS7Jp5wWYUV_cjvbSXMPu7ZAnxGJLO_hkunj_HEGrAVx0EZNv1OH0asjTW6hTAJu9V30WAj-7CUVYiCPwax2WQnt6HSxCttbZX4eKtI69AIFrx8E/s320/InstantPipeline.png&quot; width=&quot;296&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;&amp;nbsp; &lt;br /&gt;
&lt;/div&gt;After adding desired sub-meshes to list of exported we just pressing &lt;b&gt;Export&lt;/b&gt; and viola - editor creates meta-file that contains user choices. Next time it has enough information to re-export without user interaction. This has few strong points comparing to classic exporting pipelines:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;precise selection of list of needed meshes frees artists to use any helpers he needs. No more &quot;clean version&quot; files or &quot;save selection&quot; hell to keep exported assets clean from any helpers;&lt;/li&gt;
&lt;li&gt;version control systems can contain original asset files for build machine to generate specialized asset formats for all platforms. No intermediate formats needed;&lt;/li&gt;
&lt;li&gt;editor can detect that original asset file is changed (meta-file contains date and content CRCs) and automatically re-export and reload asset into engine;&lt;/li&gt;
&lt;li&gt;new asset importing is very straightforward;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;I&#39;ve tried same principle on textures through NVidia Texture Tools. This allows artists to use original texture files in original scenes. Conversion as well is based on meta-files conception.&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Few implementation details&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
For prototyping needs I&#39;ve took the following steps:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;created Max and Maya scripts that monitors some temporary folder for files with description of what scene should be exported;&lt;/li&gt;
&lt;li&gt;when editor needs to export something, it starts Max or Maya in no-interface mode (like &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&quot;-silent -mip -U MAXScript %s&quot;&lt;/span&gt;) and then places description files in temporary folder monitored by script;&lt;/li&gt;
&lt;li&gt;script loads files one by one and exports them. When it finds special quit file it closes modeling package;&lt;/li&gt;
&lt;li&gt;editor loads exported files and perform necessarily steps;&lt;/li&gt;
&lt;/ul&gt;This works good for prototyping needs, but this way has few caveats. Editor needs to run modeling package each time it needs to export something. I&#39;ve ended up with keeping it open with empty scene after first need. Also, loading big files can be time consuming and this will ruin instant feedback we want to achieve. So for production environment we should modify scheme a bit:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;we need to create a small plugin for our favorite packages that will monitor for scene saving event and communicate to editor instance to decide if file should be exported as FBX;&lt;/li&gt;
&lt;li&gt;plugin silently runs export routine (so no additional overhead of loading scene in another modeling package instance) and signals to editor;&lt;/li&gt;
&lt;li&gt;editor loads exported file and perform necessarily steps;&lt;br /&gt;
&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/4417655435832971195/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2010/01/instant-pipeline-in-action.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4417655435832971195'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/4417655435832971195'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2010/01/instant-pipeline-in-action.html' title='Instant pipeline in action.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjwF4MLBo6PeOjJxi7_aDFKdP7EbH2pS7Jp5wWYUV_cjvbSXMPu7ZAnxGJLO_hkunj_HEGrAVx0EZNv1OH0asjTW6hTAJu9V30WAj-7CUVYiCPwax2WQnt6HSxCttbZX4eKtI69AIFrx8E/s72-c/InstantPipeline.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-8815674581762989395</id><published>2009-12-29T00:25:00.000+02:00</published><updated>2010-01-15T11:44:40.189+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="assets pipeline"/><title type='text'>Assets exporting.</title><content type='html'>&lt;a href=&quot;http://tridemax.blogspot.com/2009/12/blog-post.html&quot;&gt;Here&lt;/a&gt; we&#39;ve discussed instant pipeline for our engine. To achieve this goal we need exporting tool compatible with our favorite modeling packages. Starting from ground up is not an option for us, as we want this part to be defined ASAP.&lt;br /&gt;&lt;br /&gt;Some time ago I&#39;ve used modified Microsoft&#39;s X File exporter for 3DSMAX and Maya. It can be extended if you need something specific, but it&#39;s not very practical when you want to get every bit of info about scene. Supporting it for different versions of modeling packages is another &lt;span style=&quot;font-size:78%;&quot;&gt;scary&lt;/span&gt; story. So I&#39;ve dropped it.&lt;br /&gt;&lt;br /&gt;After some research I&#39;ve got two good candidates: &lt;span style=&quot;font-style: italic;&quot;&gt;COLLADA &lt;/span&gt;and &lt;span style=&quot;font-style: italic;&quot;&gt;FBX&lt;/span&gt;. And &lt;span style=&quot;font-style: italic;&quot;&gt;COLLADA &lt;/span&gt;seemed much more interesting option for me: open format, XML based, supported almost everywhere. One of our internal projects started &lt;span style=&quot;font-style: italic;&quot;&gt;COLLADA &lt;/span&gt;import/export pipeline implementation and I&#39;ve watched closely on their progress. After few months of development I&#39;ve got first impression from the team. It was a disaster. There was a lot of different implementations of &lt;span style=&quot;font-style: italic;&quot;&gt;COLLADA&lt;/span&gt; exporters, but none of them seemed working properly with all possible resources types we need for modern games development. Autodesk implementation didn&#39;t even were able to import scene it exported seconds ago. It was clear that you need to build custom solution and this is something we actually don&#39;t want to do.&lt;br /&gt;&lt;br /&gt;So I&#39;ve changed my mind and selected &lt;span style=&quot;font-style: italic;&quot;&gt;FBX &lt;/span&gt;for our task. And it worked like a charm.&lt;br /&gt;&lt;br /&gt;To be continued.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/8815674581762989395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2009/12/assets-exporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/8815674581762989395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/8815674581762989395'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2009/12/assets-exporting.html' title='Assets exporting.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-548473872866737238.post-9057516885485365503</id><published>2009-12-28T23:28:00.000+02:00</published><updated>2010-01-15T11:44:40.189+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="assets pipeline"/><title type='text'>Instant pipeline.</title><content type='html'>So, we are about creating brand new shiny engine. Where should we start? I&#39;ve seen a lot of different opinions. Someone starts from renderer design, someone starts from basic things like math and core framework. If you will ask me, we should start from defining the pipeline. We should get clear view on how our assets will get into engine, how we will create our levels and how we will create platform specific builds from all this.&lt;br /&gt;&lt;br /&gt;No magic here, this was solved zillion of times. But we will add one new thing to this equation: pipeline should be &lt;span style=&quot;font-weight: bold;&quot;&gt;instant&lt;/span&gt;. No &quot;Export&quot; button in your favorite modeling package. Artist should get updated model in engine right after he pressed Ctrl-S and Alt-Tabbed into game editor. If he has dev console connected, model changes should instantly appear on console as well.</content><link rel='replies' type='application/atom+xml' href='http://tridemax.blogspot.com/feeds/9057516885485365503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://tridemax.blogspot.com/2009/12/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/9057516885485365503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/548473872866737238/posts/default/9057516885485365503'/><link rel='alternate' type='text/html' href='http://tridemax.blogspot.com/2009/12/blog-post.html' title='Instant pipeline.'/><author><name>Maksym Diachenko</name><uri>http://www.blogger.com/profile/10776345457828119470</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBM9g77d14cLJi5OFZq1Zjdk0UMVwD7rfy_6lABcMUREScQy1hA6lYSYWoTRpkkofl3fMRnRfrzOOmPtq-wGQfMf833Og3at_TOc1vCaJRexQLQjNeVpsdjWo3PxuFKg/s220/TriDeMAX2.jpg'/></author><thr:total>0</thr:total></entry></feed>