tag:blogger.com,1999:blog-29428777530972969132024-03-13T15:55:28.245+01:00Core Engine DevelopmentDevelopment blog about Core Engine - 3D XNA Game Engine.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.comBlogger104125tag:blogger.com,1999:blog-2942877753097296913.post-26508304038548300842012-11-23T20:17:00.000+01:002012-11-23T20:17:11.585+01:00XNA 3D Gizmo v2.0.0I've just released a new version of the XNA 3D Gizmo! The updated source has been available on CodePlex for a while, but I never got around to add the final touches and create a release.<br />
<br />
As the name suggests (2.0) it involves a major change compared to 1.0 which was released well over a year ago. The new release provides a much improved framework and simplified code while adding customization options if more advanced usage is desired. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-WLCsq7unDsc/UK_LRoHHafI/AAAAAAAABe4/EzuY6u7Co4M/s1600/gizmo2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="192" src="http://4.bp.blogspot.com/-WLCsq7unDsc/UK_LRoHHafI/AAAAAAAABe4/EzuY6u7Co4M/s640/gizmo2.png" width="640" /></a></div>
<br />
<br />
<br />
<br />
The following is a snippet from the release notes:<br />
<i><br /></i>
FOR EXISTING USERS: If you are already using v1.0 you may choose to leave this release alone unless you require additional customization options or more advanced features which have been added in this release (see notes below for all additions)<br />
<br />
- Quaternion support.<br />
- Built-in vertex lists replacing fbx models (easier implementation for new users),<br />
- ITransformable interface to add transformation support to anything in the scene (example: vertices inside an editable mesh that lives inside the 3d scene)<br />
- A lot of framework simplifications and no more dependancies on Engine class or any other outside classes.<br />
- Gizmo is now a standalone DLL (class files can still be placed in any other engine project without a hitch if standalone DLL is not preferred)<br />
- Support for custom Select functionality (ITransformable.Select(ray) to allow users to define their own selection methods (triangle precision or bounding box etc.)<br />
- Improved internal code for readability.<br />
- Transformation is now done through event handlers, allows much more customization options on how to apply transformations in your own editor. For example it allows you to support a undo/redo system.<br />
- You can now set different 'selection pools' this allows you to select and/or ignore certain object types by only passing a pool of a specific type (example: pass a pool of 3d entities or a pool of selectable vertices)<br />
<i><br /></i>
<b>You can get the latest version <a href="http://xnagizmo.codeplex.com/releases/view/98182" target="_blank">right here!</a></b>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com1tag:blogger.com,1999:blog-2942877753097296913.post-22960601272496409502012-08-28T14:07:00.000+02:002012-08-28T14:07:12.826+02:00Junior Tools Programmer at Guerrilla Games<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://4.bp.blogspot.com/-NR_feKwpO5o/UDyzu_BqH9I/AAAAAAAABeg/fMe0Wa4fBVI/s1600/Killzone3face_feature.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="280" src="http://4.bp.blogspot.com/-NR_feKwpO5o/UDyzu_BqH9I/AAAAAAAABeg/fMe0Wa4fBVI/s640/Killzone3face_feature.jpg" width="640" /></a></div>
<div style="text-align: center;">
I've recently started work as Junior Tools Programmer at Guerrilla Games in Amsterdam! (Creators of Killzone)</div>
<div style="text-align: center;">
Grim caught their attention when it appeared on <a href="http://www.control-online.nl/gamesindustrie/2012/05/21/nieuws-studententeam-morepolygons-bouwt-online-shooter-grim-in-vijf-maanden/" target="_blank">control-online.nl</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
I should have some spare time once I'm fully settled in to work on hobby projects that include</div>
<div style="text-align: center;">
C# and perhaps my engine. I have a new portfolio coming up (work in progress, but pretty close to completion) I'm not sure yet where I'll post the new updates (if they're not directly Core Engine related) </div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
I will make an announcement when my new portfolio is online.</div>
Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com1tag:blogger.com,1999:blog-2942877753097296913.post-17910746056580929182012-06-09T19:06:00.000+02:002012-06-09T19:06:02.372+02:00Gameplay Metrics for Grim (Screenshots)<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><div style="text-align: left;">
As shown a while ago, we have our proprietary metrics tool to review our playtests and look for unintended behavior and opportunities to improve the game. One example of where the metrics directly help us is to look for Leap events to see if players are having difficulty making certain jumps as a result of platforms being too distant from one another. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I'm in the process of creating a short video, for now I've included some screenshots to give you an idea of what it currently looks like.</div>
<br /><a href="http://2.bp.blogspot.com/-u6oh-m3P5j4/T9N9-vymlqI/AAAAAAAABak/4sALkeQ_vPI/s1600/ClimbOverview.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="358" src="http://2.bp.blogspot.com/-u6oh-m3P5j4/T9N9-vymlqI/AAAAAAAABak/4sALkeQ_vPI/s640/ClimbOverview.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">"Climb" the level used with the metric shots below.</td></tr>
</tbody></table>
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-81ocOYceMTc/T9N87Gg4PvI/AAAAAAAABaM/5iHOpbIXVD8/s1600/titangameplaymetrics+2012-06-09+18-27-16.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://4.bp.blogspot.com/-81ocOYceMTc/T9N87Gg4PvI/AAAAAAAABaM/5iHOpbIXVD8/s640/titangameplaymetrics+2012-06-09+18-27-16.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Unfiltered shot of the full match with 6 players. </td></tr>
</tbody></table>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-RQ2jSWjNmTQ/T9N8_bmeF6I/AAAAAAAABaU/8KvAGHEzbyE/s1600/titangameplaymetrics+2012-06-09+18-27-38.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-RQ2jSWjNmTQ/T9N8_bmeF6I/AAAAAAAABaU/8KvAGHEzbyE/s640/titangameplaymetrics+2012-06-09+18-27-38.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Red indicates low Energy resource for player.</td></tr>
</tbody></table>
<br />
<br />
<br />Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-28589415963997151582012-05-17T20:17:00.000+02:002012-05-17T20:17:17.742+02:00Second trailer of "Grim"We've just finished the second trailer of our game. It features our second level "Climb" which was created for our Breach gametype. The "Mateba" our multi-purpose weapon (with both short and long range capabilities) and Leap our primary ability are all included in this new video.<br />
<br />
<object height="360" width="640"><param name="movie" value="http://www.youtube.com/v/ENM9TD77mp0?version=3&hl=en_GB&rel=0">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/ENM9TD77mp0?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />
As always, the most recent updates on our development are available at our website: http://grim.morepolygons.comTomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com2tag:blogger.com,1999:blog-2942877753097296913.post-13664687516583632452012-05-11T01:10:00.000+02:002012-05-11T01:10:33.457+02:00Development of Grim: Weapon Particle FX<object height="360" width="640"><param name="movie" value="http://www.youtube.com/v/21CXHAQOgTA?version=3&hl=en_GB&rel=0">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/21CXHAQOgTA?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-37696799688442955152012-05-05T15:13:00.002+02:002012-05-05T15:13:30.493+02:00Gameplay Trailer of "Grim"Our first gameplay trailer for "Grim"! It mainly features our first deathmatch level "Outpost" along with Deathmatch itself. In future updates we will go into more detail about the unique elements of "Grim". Hope you enjoy!<br />
<br />
<object height="360" width="640"><param name="movie" value="http://www.youtube.com/v/cFceWAQUaos?version=3&hl=en_GB&rel=0">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/cFceWAQUaos?version=3&hl=en_GB&rel=0" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<br />Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com3tag:blogger.com,1999:blog-2942877753097296913.post-83618570565360888982012-04-14T17:44:00.000+02:002012-04-14T18:02:54.437+02:00Titan Metrics: Gameplay Analysis Tool<div class="separator" style="clear: both; text-align: center;">
<a href="http://grim.morepolygons.com/" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="222" src="http://4.bp.blogspot.com/-AjYIQbXHSPI/T4maIDnVS-I/AAAAAAAABVc/Sk5uSOamFmg/s640/metrics_banner02.png" width="640" /></a></div>
<br />
<div class="MsoNormal">
<br />
<br />
<div style="text-align: center;">
<a href="http://grim.morepolygons.com/" target="_blank">More Polygons "Grim" Homepage</a></div>
Hey guys, I have been working on a gameplay analysis tool
for our online shooter “Grim”. For the first internal release I made a short video, It
should give you an idea of what we can do with it so far. I have a bunch more
things I’d like to add (including cloud/heat maps) but first I must take some time off to work on gameplay and server browser!</div>
<div class="MsoNormal">
<br /></div>
<iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/Az2BZ5u5_1g?rel=0" width="640"></iframe><br />
<br />
It even includes my voice this time! :P Let me know what you guys think, maybe you have a cool feature request?Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com1tag:blogger.com,1999:blog-2942877753097296913.post-18707540251669278722012-04-06T01:28:00.001+02:002012-04-06T01:29:50.712+02:00Project site is online!<div class="separator" style="clear: both; text-align: center;">
<a href="http://grim.morepolygons.com" target="_blank" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="222" src="http://2.bp.blogspot.com/-Sy_cNyrjOOI/T34mW6MwC_I/AAAAAAAABVE/VGbqFwlooI8/s640/banner1.png" width="640" /></a></div>
The project site is up! Currently you will find several screenshots and videos of our game, 3D assets, information about our game design and of course the two proprietary tools I've been working on! Have a look at let me know what you guys think.<br />
<div style="text-align: center;">
<a href="http://grim.morepolygons.com/" target="_blank">More Polygons "Grim" Homepage</a></div>
Direct links:<br />
<br />
<a href="http://grim.morepolygons.com/?&content=19032012&menu=1" target="_blank">Titan Metrics - Gameplay analyzing tool </a>(Features 3D Visualization of player and match data)<br />
<a href="http://grim.morepolygons.com/?&content=19022012&menu=2" target="_blank">Titan Toolkit - Making life easier for everyday UDK Development</a><br />
<br />
Of course we will update the site on a regular basis, keep an eye out for more!Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com1tag:blogger.com,1999:blog-2942877753097296913.post-29810276200507368242012-03-18T23:17:00.000+01:002012-03-18T23:17:30.376+01:00Graduation UDK Project<br />
Hey guys, It's been a while since I uploaded any videos or blogposts. I've definitely been doing some cool stuff behind closed doors, this time with the Unreal Development Kit. We're about to reach a milestone where we will start showing our development more openly. This means I will soon start recording some videos that will include my development experiments as usual.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-QB3muOG4enY/T2ZcEXgA7zI/AAAAAAAABUk/Hq1DNH7e5Cw/s1600/artlevel01.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="325" src="http://1.bp.blogspot.com/-QB3muOG4enY/T2ZcEXgA7zI/AAAAAAAABUk/Hq1DNH7e5Cw/s640/artlevel01.png" width="640" /></a></div>
<br />
This project is for my graduation, I'm working in a team of six to build a proper first person shooter for the PC. As expected I'm the programmer, but do a lot of the design work as well. Aside from the game itself I have been busy building some UDK based tools for the team, this includes a launcher/management tool to launch UDK in every way you can think of and includes more advanced functionality such as bug reporting (automatically sends the reports to our server at Assembla) along with FTP file uploads (screenshots, crash logs) and more. A second tool will remain secret for now. I will reveal details on it later on through some videos and post some info about it here as well.<br />
<br />
For now I'll leave you with two (pre-alpha) screenshots of our project.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-JfZvd0VfW20/T2ZcMIUfGFI/AAAAAAAABUs/fvTLke6bNgs/s1600/outpostlevel01.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="325" src="http://2.bp.blogspot.com/-JfZvd0VfW20/T2ZcMIUfGFI/AAAAAAAABUs/fvTLke6bNgs/s640/outpostlevel01.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://1.bp.blogspot.com/-5KExHkcSyiE/T2ZcQQPaDPI/AAAAAAAABU0/13jYZIEXFy8/s1600/outpostlevel02.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="325" src="http://1.bp.blogspot.com/-5KExHkcSyiE/T2ZcQQPaDPI/AAAAAAAABU0/13jYZIEXFy8/s640/outpostlevel02.png" width="640" /></a></div>
<br />Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com2tag:blogger.com,1999:blog-2942877753097296913.post-38976873078621645372011-12-05T02:44:00.001+01:002012-03-18T23:19:04.812+01:00EditMesh Submode & History Panel<a href="http://1.bp.blogspot.com/-TufVYgNN-nk/TtwmWjzA9yI/AAAAAAAABPM/ITLz-14ld5U/s1600/TestEnvironment%2B2011-11-19%2B21-52-40-41.png" imageanchor="1" style="text-align: center;"><img border="0" height="360" src="http://1.bp.blogspot.com/-TufVYgNN-nk/TtwmWjzA9yI/AAAAAAAABPM/ITLz-14ld5U/s640/TestEnvironment%2B2011-11-19%2B21-52-40-41.png" width="640" /></a><br />
<br />
It was about time I posted a new video about my progress, so I decided to create a very early preview of some of the new features. This includes an early version of the history panel and the improved mesh editing feature.<br />
<br />
If you're familiar with <a href="http://neoforce.codeplex.com/" target="_blank">Neoforce</a> you may recognize it in the video video. If you don't, it's basically a Winforms-like library with tons of features for 2D menus. It has quite an exhaustive feature-list and will replace all my previous Winforms based panels/windows. One big advantage of using Neoforce is alpha support, something not easily accomplished using regular Forms. Another advantage is in its design, instead of using OnPaint events and event handlers, it has regular Update and Draw functions. This is really nice when you're creating transitions and smooth animations for your controls.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/YAH9HJY_gJ0" width="640"></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
There are some other features hidden in this video, one is still in very early development. You might have seen the screen fading from and to black several times, that is part of it ;) The best way to describe it: a method to quickly access your panels, menus, assets etc. through a single hotkey (spacebar by default) As you can see in the video, I 'pinned' the history panel to my game window, keeping it active when leaving the screen overlay. I will talk more in-depth about this video once it's more developed.</div>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com4tag:blogger.com,1999:blog-2942877753097296913.post-69827443743827633112011-11-05T06:02:00.000+01:002011-11-05T06:07:40.677+01:00Gizmo update coming soon!Hi guys, just wanted to let every XNA3DGizmo user know that a update is currently being developed. I noticed that the original implementation had some sloppy shortcuts that could make it more difficult to implement if you were unfamiliar with the code. This included references to the Engine class among other things.<br />
<br />
So I decided to improve things by removing any reference to outside classes (including InputState which is no longer required) I realized this update is necessary as even I found it difficult to implement the gizmo in a new project and wasn't a simple drag&drop operation as it should be (or as close as possible to it) this made it obvious some improvements were required to the public version.<br />
<br />
The last public update was quite a while back and I was using a modified version with already several improvements implemented (such as multiple type of objects you can select as shown in the <a href="http://youtu.be/4NdRgTwDeis">Vertex Manipulation Video</a> where I select both scene objects and vertices with the same Gizmo component)<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://2.bp.blogspot.com/-8c49abTmxN0/TrTBUNvVGmI/AAAAAAAABPA/jS3ysEvAryQ/s1600/TestEnvironment+2011-11-05+05-52-44-88.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://2.bp.blogspot.com/-8c49abTmxN0/TrTBUNvVGmI/AAAAAAAABPA/jS3ysEvAryQ/s640/TestEnvironment+2011-11-05+05-52-44-88.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
So in general the upcoming update should make it much easier for everyone to implement this gizmo into his own code/editor. <b style="text-align: -webkit-auto;">If you had trouble integrating it, please let me know.</b><span class="Apple-style-span" style="text-align: -webkit-auto;"> There is no current ETA on therelease, but I'll try to do it sooner than later...</span></div>
<a href="http://2.bp.blogspot.com/-8c49abTmxN0/TrTBUNvVGmI/AAAAAAAABPA/jS3ysEvAryQ/s1600/TestEnvironment+2011-11-05+05-52-44-88.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><br /></a>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com20tag:blogger.com,1999:blog-2942877753097296913.post-19803326814922633972011-09-23T15:28:00.000+02:002011-09-23T15:28:22.695+02:00Image CollectionI haven't made a lot of progress recently on the engine due to my internship (completed) and the start of the new school year (my last) I did make some screenshots a while back when I was working on flares and terrain texture mapping. Below a small assorted list of the things I did.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-ADYPpFbmb7A/TnyGp36-dmI/AAAAAAAABOQ/kJJsm_oHDnU/s1600/SampleGame+2011-06-12+00-55-19-48.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://3.bp.blogspot.com/-ADYPpFbmb7A/TnyGp36-dmI/AAAAAAAABOQ/kJJsm_oHDnU/s640/SampleGame+2011-06-12+00-55-19-48.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-3lvEQpK0_k4/TnyGqb3SMdI/AAAAAAAABOU/eNtsxjUl8SI/s1600/SampleGame+2011-06-12+01-59-08-68.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-3lvEQpK0_k4/TnyGqb3SMdI/AAAAAAAABOU/eNtsxjUl8SI/s640/SampleGame+2011-06-12+01-59-08-68.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-LhwVNWq4zcI/TnyGrazwtfI/AAAAAAAABOY/Mm-CivbklU0/s1600/SampleGame+2011-07-10+00-38-42-42.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-LhwVNWq4zcI/TnyGrazwtfI/AAAAAAAABOY/Mm-CivbklU0/s640/SampleGame+2011-07-10+00-38-42-42.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-N9TB8VZKaNs/TnyGtBJB9fI/AAAAAAAABOc/KDaEhRKwURQ/s1600/SampleGame+2011-07-10+15-02-42-11.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://4.bp.blogspot.com/-N9TB8VZKaNs/TnyGtBJB9fI/AAAAAAAABOc/KDaEhRKwURQ/s640/SampleGame+2011-07-10+15-02-42-11.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-OYmz-5oUyro/TnyGuNZm50I/AAAAAAAABOg/e7TN4uqNkpQ/s1600/SampleGame+2011-07-10+15-02-58-65.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-OYmz-5oUyro/TnyGuNZm50I/AAAAAAAABOg/e7TN4uqNkpQ/s640/SampleGame+2011-07-10+15-02-58-65.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-_WPUo3yBCP0/TnyGveAEYPI/AAAAAAAABOk/yY1I72zoLJg/s1600/SampleGame+2011-07-10+15-03-05-48.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://2.bp.blogspot.com/-_WPUo3yBCP0/TnyGveAEYPI/AAAAAAAABOk/yY1I72zoLJg/s640/SampleGame+2011-07-10+15-03-05-48.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-cBqA8vhN36s/TnyGwaaMjoI/AAAAAAAABOo/9nHoQdlSs1E/s1600/SampleGame+2011-07-10+15-19-37-07.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://2.bp.blogspot.com/-cBqA8vhN36s/TnyGwaaMjoI/AAAAAAAABOo/9nHoQdlSs1E/s640/SampleGame+2011-07-10+15-19-37-07.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-aEVcWnmBjT4/TnyGy56kQtI/AAAAAAAABOs/e_-nmxXintI/s1600/SampleGame+2011-07-10+15-25-32-75.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-aEVcWnmBjT4/TnyGy56kQtI/AAAAAAAABOs/e_-nmxXintI/s640/SampleGame+2011-07-10+15-25-32-75.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-0OtxhZe0diU/TnyGz_mZ1xI/AAAAAAAABOw/SBHwVkdu6Mk/s1600/SampleGame+2011-07-10+16-31-57-11.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://3.bp.blogspot.com/-0OtxhZe0diU/TnyGz_mZ1xI/AAAAAAAABOw/SBHwVkdu6Mk/s640/SampleGame+2011-07-10+16-31-57-11.png" width="640" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-sDP5KtecuIY/TnyG0t8S8kI/AAAAAAAABO0/yzOqcdTW3ms/s1600/SampleGame+2011-07-10+19-38-13-24.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://3.bp.blogspot.com/-sDP5KtecuIY/TnyG0t8S8kI/AAAAAAAABO0/yzOqcdTW3ms/s640/SampleGame+2011-07-10+19-38-13-24.png" width="640" /></a></div>With the terrain texturing I tried to minimize stretching on steep surfaces without using the tri-planar technique, there were some difficulties and I don't have a finalized method yet. The red/green colors on the terrain indicate UV coordinates, the lines are the surface normals and the yellow text displays the vertex number in the VertexBuffer. I hope this can at least somewhat fill the major gap in between posts recently, hopefully I can do some cool stuff again soon like working on the mesh editor from my previous post.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-70244653202761855462011-07-04T00:32:00.000+02:002012-06-22T04:43:32.883+02:00Vertex Manipulation [Compound objects]Just a short update on what I've been working on this time. It started when I was playing CoD:WaW this afternoon and I noticed a lot of debris and broken walls which got me thinking about how they managed these kinds of assets. This intrigued me, so I started drawing up some ideas on how I could potentially add this to the toolset, with little knowledge on mathmatical geometry or destruction calculations I tried to start things simple and look for existing online resources.<br />
<br />
I will go into much more detail on this topic at a later time, for now I'd just like to share a few images and give notes on what you see.<br />
<br />
<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://3.bp.blogspot.com/-JHk-z83vZX4/ThDqCn76rFI/AAAAAAAABNQ/cd-lwn_Jp0Q/s1600/SampleGame+2011-07-03+20-55-27-63.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-JHk-z83vZX4/ThDqCn76rFI/AAAAAAAABNQ/cd-lwn_Jp0Q/s640/SampleGame+2011-07-03+20-55-27-63.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>ray vs. triangle collision. white lines visualize an array of lines from the camera eye colliding with the geometry.</b></td></tr>
</tbody></table>
<br />
<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://3.bp.blogspot.com/-6xwZ5i_sa0A/ThDqErf-aXI/AAAAAAAABNU/I87ATNJIY9M/s1600/SampleGame+2011-07-03+23-22-39-68.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-6xwZ5i_sa0A/ThDqErf-aXI/AAAAAAAABNU/I87ATNJIY9M/s640/SampleGame+2011-07-03+23-22-39-68.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>The box-mesh on the left was used to cut 4 holes into the plane-shape.</b></td></tr>
</tbody></table>
<br />
<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://3.bp.blogspot.com/-sGIyshbG4so/ThDqG2-7EeI/AAAAAAAABNY/M2IhZ9tO9R4/s1600/SampleGame+2011-07-03+23-22-43-59.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-sGIyshbG4so/ThDqG2-7EeI/AAAAAAAABNY/M2IhZ9tO9R4/s640/SampleGame+2011-07-03+23-22-43-59.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>The wireframe of the same scene, visualizing the triangles of the triangulated plane.</b></td></tr>
</tbody></table>
<br />
<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://3.bp.blogspot.com/-OVQQaem-Oek/ThDqIAxOaKI/AAAAAAAABNc/ha7xFy0gbYQ/s1600/SampleGame+2011-07-03+23-27-00-92.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-OVQQaem-Oek/ThDqIAxOaKI/AAAAAAAABNc/ha7xFy0gbYQ/s640/SampleGame+2011-07-03+23-27-00-92.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>A hole cut by defining 5 vertices by colliding a ray with the plane, these were defined at runtime from the camera-eye.</b></td></tr>
</tbody></table>
<br />
I'm also looking into 'bridging' (users of 3D Studio Max may know what I'm talking about) to fill the gap between two planes of a wall (its back and front) after cutting a hole with the triangulator. Some basic box uv-mapping and a noisy texture to simulate broken concrete (or any other material) and you should have the basics to quickly create holes in walls or break chunks of the scene's meshes. The resources I used are listed below. Much more on this at a later time, there is still a lot to do and even more to talk about :)<br />
<br />
<b>Resources</b><br />
<br />
<a href="http://create.msdn.com/en-US/education/catalog/sample/picking_triangle">App Hub - Triangle Picking Sample</a><br />
<br />
<a href="http://triangulator.codeplex.com/">Nick Gravelyn's Triangulator</a> (2D)<br />
<br />
<a href="http://www.geometrictools.com/Documentation/TriangulationByEarClipping.pdf">Triangulation By Ear Clipping</a> - by David Eberly<br />
<div>
<br /></div>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com5tag:blogger.com,1999:blog-2942877753097296913.post-45751704855999545432011-07-03T02:23:00.000+02:002011-07-03T02:23:06.349+02:00Input & Hotkey ManagementInput management is one of those things I never really paid a lot of attention to, using simple if-statements inside an <i>Update() </i>or <i>HandleInput()</i> function worked fine is most cases, until recently. Recently I started to notice my input handling got scattered throughout my code-base and a lot of coupling was required to make sure it was handled properly.<br />
<br />
To prevent hotkey-clutter (especially when modifiers (ctrl, shift, alt) get involved) I started working on a <span class="Apple-style-span" style="background-color: white; color: #3d85c6;">HotkeyManager</span> that handles groups of Hotkeys in an easily maintanable way. Initially it was supposed to assign a <span class="Apple-style-span" style="color: #3d85c6;">HotkeyGroup </span>to one or more 'editor-states', like <i>'only-use-this-hotkey-while-in-editmeshmode'</i>, I soon realized this wasn't going to be very helpful and I would have to continuously add new states to keep it up to date...so this was scrapped and replaced by a simpler, but more powerful feature - <span class="Apple-style-span" style="color: #3d85c6;">Predicate</span><i><</i>T<t><t><t><i>></i>. Using predicates enables the manager/hotkey to activate only if a predefined condition is met (i.e. if <i>gizmo.IsActive == true</i> -> execute the hotkey-function) it can contain more than one statement such as <i>gizmo.IsActive == true && Camera.IsMoving == false</i> for example...if both conditions are met, the hotkey may execute with the associated <span class="Apple-style-span" style="color: #3d85c6;">Action </span>(the method assigned to the hotkey) The code-snippet below should be able to illustrate its use.</t></t></t><br />
<t><t> <br />
</t></t><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-oaOJ5O0-A7I/Tg-v62ajzfI/AAAAAAAABNM/RsIt0piStms/s1600/gizmo_codesnippet1.png" imageanchor="1"><img border="0" height="262" src="http://4.bp.blogspot.com/-oaOJ5O0-A7I/Tg-v62ajzfI/AAAAAAAABNM/RsIt0piStms/s640/gizmo_codesnippet1.png" width="640" /></a></div><br />
<br />
<br />
You may have noticed the above code refers to the <span class="Apple-style-span" style="color: #3d85c6;">GizmoComponent </span>class. <i>SetSelectionPool(<span class="Apple-style-span" style="color: #3d85c6;">IEnumerable</span><<span class="Apple-style-span" style="color: #3d85c6;">ISelectable</span>></i><iselectable><i><span class="Apple-style-span" style="color: #3d85c6;"> </span>selectables)</i> is a new function I've added to more easily support custom collections and to assign new collections at runtime, in my case this is used to switch between vertex- and object-selection more easily. I will add this along with many other improvements to the open-source gizmocomponent at codeplex at some point.<br />
<br />
Back to the hotkeys...within <i>InitializeHotkeys()</i> there is a <span class="Apple-style-span" style="color: #3d85c6;">HotkeyGroup </span>class, this class holds a collection of hotkeys that belong to the same component or share similar functionality. These groups are passed to the manager and will be updated automatically. The <span class="Apple-style-span" style="color: #3d85c6;">Hotkey </span>class is the main class and has several parameters including key (supports all <span class="Apple-style-span" style="color: #3d85c6;">Keys</span>, <span class="Apple-style-span" style="color: #3d85c6;">MouseButtons </span>and <span class="Apple-style-span" style="color: #3d85c6;">GamepadButtons</span>) a <span class="Apple-style-span" style="color: #3d85c6;">KeyPressState </span>(press, release, hold) a <span class="Apple-style-span" style="color: #3d85c6;">KeyModifier </span>(control, shift, alt or a combination - not illustrated in img), the parent (used by the Predicate<istateswitch> to verify the conditions) and the <span class="Apple-style-span" style="color: #3d85c6;">Action </span>to execute after the key is pressed and all conditions are met.<br />
<br />
A quick search revealed there are no suitable Input/Hotkey managers (I didn't like any of the libraries available on Codeplex) so I might turn this into an open-source component/library if enough people are interested in such a library.</istateswitch></iselectable><br />
<iselectable><istateswitch><br />
</istateswitch></iselectable><br />
<i>Actions and Vertex manipulations are also still WIP, I made some progress on both these tasks and should have some something new to blog about soon enough.</i>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-21378716685697991632011-06-26T16:21:00.004+02:002011-06-26T18:59:49.234+02:00Vertex Manipulation (Mesh-editing)Editing models inside my engine has been something I wanted to support for a long time now. Especially when you're not the one creating the assets, but do have to work with them inside the editor it can be time consuming to send back a model with incorrect material names or a mesh that should be split to optimize rendering, or vice versa. With this tool I will eliminate the need to have artists re-export their models because of tiny mistakes/changes and should provide a much cleaner pipeline in general.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-A1fkzUCavW0/TgdBOFKbe_I/AAAAAAAABNE/7WD9V3wSjmU/s1600/SampleGame+2011-06-26+16-20-32-11.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://2.bp.blogspot.com/-A1fkzUCavW0/TgdBOFKbe_I/AAAAAAAABNE/7WD9V3wSjmU/s640/SampleGame+2011-06-26+16-20-32-11.png" width="640" /></a></div><br />
Currently only the very core of this feature has been implemented (as seen in the video) and a lot of other stuff is still to follow, I will give a brief overview of how the fully functional tool should work once its complete. When any new model (.fbx or .x) is imported, it's processed by the content pipeline and turned into an .xnb file, an .xml file will be attached to the source (model) file that contains all changes to the model and will be processed during build-time. By default this .xml file is empty and nothing altered, during run-time a mesh can be converted to Editable Mesh (trying to keep this similar to 3D Studio Max's naming conventions) which allows vertex and triangle selection with support for any type of transformation that is supported by the gizmo component (translate, rotate, scale in local- and world-space) these transformations are stored inside Actions (I will talk about Actions a lot more at a later time, but it's basically what you use to support undo/redo in any kind of editing software) and written to the model Xml. The model is then re-build the next time the project is build and the actions are applied, this can hold any type of alteration including material renaming, splitting meshes and deleting / adding new vertices alongside vertex transformations.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
Because the source model remains untouched, whenever the model is re-exported from any DCC-tool like 3D Studio Max or Maya the model will still build with all transformations and alterations applied. An example: A material named '<i>#46 Material</i>' is renamed at run-time to '<i>corridor_floor</i>', if the artist then changes the name of '<i>#46 Material</i>' to '<i>corridor_floor</i>' or something else in the source model, the run-time change is ignored because the original material name (<i>#46 Material</i>) can no longer be found... in a worst-case scenario this ignores the material properties you stored for the original name (material properties are stored elsewhere, so no data is actually lost) so even in the worst case, you are only a small step away from re-applying your previous changes (A warning dialog with failed conversions should help with this, making it potentially very quick and painless to manually re-assign the changes that are never lost, just ignored till resolved) The same applies to vertex transformations, but these can be a bit more difficult to keep track of once the indices of a certain mesh change inside the .fbx source file.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
There is still a significant amount of work that has to be completed before this feature takes it full shape, with this first proof of concept up and running I believe it will be a very valuable tool to have available, and a lot of fun to create :)<br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="390" src="http://www.youtube.com/embed/4NdRgTwDeis?rel=0&hd=1" width="640"></iframe><br />
<br />
It proved to be quite easy to convert the gizmo to support vertex manipulation (and selection) I will add these changes to the codeplex project at some point in the future...Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com7tag:blogger.com,1999:blog-2942877753097296913.post-54460029531958883682011-06-15T21:10:00.000+02:002011-06-15T21:10:30.249+02:00Updated blog layoutI had plans to do this a while ago, but never got around actually doing it. Last night I kind of stumbled upon a new, wider template that still looked pretty similar to the old one. Most noticeable benefit is the extra space available for bigger images and videos and I'm pretty glad about how the new template turned out.<br />
<br />
In lack of other news I dug up some screenshots of Project Sunburn.<br />
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://3.bp.blogspot.com/-Rp6uIqa4TiU/TfkBeyGDXMI/AAAAAAAABM8/ON9s8jTv5p4/s1600/ps_leveloverview01.jpg" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="352" src="http://3.bp.blogspot.com/-Rp6uIqa4TiU/TfkBeyGDXMI/AAAAAAAABM8/ON9s8jTv5p4/s640/ps_leveloverview01.jpg" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>An objective-based level from Project Sunburn</b></td></tr>
</tbody></table><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://2.bp.blogspot.com/---dIszeTwdE/TfkB_ZTYiQI/AAAAAAAABNA/eh6CEhVW8LQ/s1600/Test+Environment+2010-10-31+21-41-46-50.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://2.bp.blogspot.com/---dIszeTwdE/TfkB_ZTYiQI/AAAAAAAABNA/eh6CEhVW8LQ/s640/Test+Environment+2010-10-31+21-41-46-50.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Enemy drone firing at the player in one of our test setups.</b></td></tr>
</tbody></table><br />
Let me know what you think about this new layout in the comment section :)Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com2tag:blogger.com,1999:blog-2942877753097296913.post-48519972128248438852011-06-14T23:39:00.001+02:002011-06-15T00:10:26.742+02:00Environment Mapping (w/ Normal Maps)A while ago I was trying to get Environment maps (aka Cube-maps) to work with SunBurn's Deferred renderer with reasonable success. Last week I had a go at it again, this time in my own renderer, because the normal-mapping information was already available inside the shader it was relatively easier to do this time around (along with all the problems I have already solved the first time) <br />
It was supposed to be a transparent (forward)-effect for windows etc, but somehow turned into an opaque cube-mapped deferred shader...Not sure how that happened :)<br />
<br />
Below you can see what the shader looks like at the moment, where the first two images show the 'forward' shader and the last two use the deferred shader (which includes pointlights, specularity etc.) The forward shader will be modified so it supports alpha-mapping, what it was originally designed for anyway.<br />
<br />
<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://3.bp.blogspot.com/-s2lymO7Ofo0/TffPLtglvdI/AAAAAAAABMs/YgXgZFX7VpU/s1600/SampleGame+2011-06-12+23-16-56-10.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://3.bp.blogspot.com/-s2lymO7Ofo0/TffPLtglvdI/AAAAAAAABMs/YgXgZFX7VpU/s640/SampleGame+2011-06-12+23-16-56-10.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Forward shader - environment map, with normal map and simple directional light.</b></td></tr>
</tbody></table><br />
<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://4.bp.blogspot.com/-ajUcv6ZTsBI/TffPWvGoskI/AAAAAAAABMw/1kpJy3Tade8/s1600/SampleGame+2011-06-13+01-59-17-69.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://4.bp.blogspot.com/-ajUcv6ZTsBI/TffPWvGoskI/AAAAAAAABMw/1kpJy3Tade8/s640/SampleGame+2011-06-13+01-59-17-69.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Forward shader - similar setup as above.</b></td></tr>
</tbody></table><br />
<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://4.bp.blogspot.com/-UGC81OPc7Qw/TffPoySNpXI/AAAAAAAABM0/G7ilPGbCsVo/s1600/SampleGame+2011-06-13+15-54-55-90.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://4.bp.blogspot.com/-UGC81OPc7Qw/TffPoySNpXI/AAAAAAAABM0/G7ilPGbCsVo/s640/SampleGame+2011-06-13+15-54-55-90.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>The deferred shader - with pointlight on the left and right (with very strong colors to highlight the effect)</b></td></tr>
</tbody></table><br />
<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://1.bp.blogspot.com/-06XV1gq_74k/TffPxN2fCGI/AAAAAAAABM4/BFJOjNEiNLA/s1600/SampleGame+2011-06-13+15-56-52-52.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://1.bp.blogspot.com/-06XV1gq_74k/TffPxN2fCGI/AAAAAAAABM4/BFJOjNEiNLA/s640/SampleGame+2011-06-13+15-56-52-52.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><b>Deferred shader - with the deferred rendertargets (LoR: color, normals,depth,lighting)</b></td></tr>
</tbody></table><br />
The next step is to further develop the forward rendering pass, for transparency mostly. This includes depth-sorting of the objects along with Composite Lighting that calculates approximate lighting for objects that don't support deferred shading.<br />
<br />
<b>Resources:</b><br />
<br />
<b><a href="http://create.msdn.com/en-US/education/catalog/sample/custom_model_effect">Custom Model Effect XNA Sample</a></b> - Source for the cube-map processor and the basics for the environment mapping shader.<br />
<b><a href="http://blogs.msdn.com/b/shawnhar/archive/2008/03/04/cubemaps-the-salt-of-computer-graphics.aspx">Shawn Hargraves on Cube-mapping</a></b> - Some interesting bits about cube-mapping, closely tied to the XNA sample above.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-84259347482111389712011-06-05T02:35:00.002+02:002011-06-15T00:51:54.783+02:00A new (Deferred) Renderer [Part 1]<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: left;">For a long time I have used SunBurn as my primary rendering solution. This helped a great deal while developing <a href="http://tomlooman.com/previous-projects/needle-juice-game/">Needle Juice</a>, <a href="http://tomlooman.com/current-projects/game-over-night/">Over Night </a>and more recently: <a href="http://tomlooman.com/current-projects/game-project-sunburn/">Project Sunburn</a>. With no new game projects lined up with <i>Core Engine</i>, I have decided to experiment with my own rendering solution, based on Catalin’s Deferred Rendering sample along with information from many other sources including a <a href="http://www.google.nl/url?sa=t&source=web&cd=1&ved=0CBQQFjAA&url=http%3A%2F%2Fwww.guerrilla-games.com%2Fpublications%2Fdr_kz2_rsx_dev07.pdf&ei=zMrqTbSiCcXNswaxp9ToCg&usg=AFQjCNGr55AoaZud-nPtnrx8YLC90AZeCA&sig2=EMEv8acqWc2ivNCylnFX2Q">Killzone 2 presentation</a> from 2007.</div><br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-RuoVTYRh-wE/Teq7UVwSN8I/AAAAAAAABMY/VlfL8R6wGJA/s1600/deferredshading101.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://3.bp.blogspot.com/-RuoVTYRh-wE/Teq7UVwSN8I/AAAAAAAABMY/VlfL8R6wGJA/s640/deferredshading101.png" width="640" /></a></div><br />
<br />
The above images shows the most recent unit-test of filling the hardware DepthBuffer with the Gbuffer-depth to draw post-deferred geometry (i.e. using forward rendering for transparent surfaces) and other visuals such as vertex-lines. This is done during the final combining pass of the geometry data and lighting using the ‘DEPTH’ semantic. This fills the depth-buffer as all depth is lost after switching RenderTargets (something that can be prevented on the PC using PreserverContents, but does not work on the Xbox - this solves the problem entirely)<br />
<br />
Some other experiments include texture projection as seen below.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-ZPTBqJOyi5w/Teq8AMMtn6I/AAAAAAAABMg/tuMjDyjuVeQ/s1600/lpp_textureprojection2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://1.bp.blogspot.com/-ZPTBqJOyi5w/Teq8AMMtn6I/AAAAAAAABMg/tuMjDyjuVeQ/s640/lpp_textureprojection2.png" width="640" /></a></div><br />
<br />
Texture projection has several great uses, including Deferred Decals, light shapes and video projection on the scene's geometry (as seen in <i>Splinter Cell: Conviction</i>) Back while developing Over Night we used shadow-mapping in places where texture projection could have been much cheaper. A good example of this is the blue light coming from outside through the shaded window, covering most of the room as seen below. The second image uses a texture to simulate a similar effect, without having to re-draw the entire shadowmap every frame, instead simply sampling from the texture and projecting it into screen-space.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-q45F7pqj_D0/Teq7sSyIALI/AAAAAAAABMc/E4fiusjl2VQ/s1600/lpp_textureprojection.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://2.bp.blogspot.com/-q45F7pqj_D0/Teq7sSyIALI/AAAAAAAABMc/E4fiusjl2VQ/s640/lpp_textureprojection.png" width="640" /></a></div><a href="http://3.bp.blogspot.com/-Yi9ChUhqO9Q/Teq8trxBmhI/AAAAAAAABMo/MXb-KrmYJgI/s1600/securityroom_HQ.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="360" src="http://3.bp.blogspot.com/-Yi9ChUhqO9Q/Teq8trxBmhI/AAAAAAAABMo/MXb-KrmYJgI/s640/securityroom_HQ.png" width="640" /></a><br />
<br />
Looking back at Needle Juice, where we used a directional light with shadows to draw light coming through the windows, another place where texture projection would have been a cheaper and more elegant solution to our problem (also preventing light-leaking, which is very common with directional lighting)<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div><table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://4.bp.blogspot.com/-GtUGiuW1GA0/Teq8UeP4jyI/AAAAAAAABMk/LEdC7S_ioL4/s1600/needlejuice_window2.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" height="360" src="http://4.bp.blogspot.com/-GtUGiuW1GA0/Teq8UeP4jyI/AAAAAAAABMk/LEdC7S_ioL4/s640/needlejuice_window2.png" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Needle Juice: directional-light coming through the window, required shadow-mapping.</td></tr>
</tbody></table><br clear="both" /><br />
I will continue working on the renderer for the time to come, with such a wealth of presentations, papers and samples on deferred rendering (and graphics programming in general) it will keep me busy for a while…Until next time! :)<br />
<div><br />
</div>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com9tag:blogger.com,1999:blog-2942877753097296913.post-53890477646137533002011-05-21T22:59:00.001+02:002011-06-15T20:46:35.757+02:00'Depth Dependent Halos' for Wireframe rendering [Part 3]It took a while to upload (on 56k wireless connection) but the video is finally available on YouTube. If you haven't seen the previous posts about this topic, the effect is based on UDK's implementation of 'Depth Dependent Halos' to increase readability of wireframes in complex scenes.<br />
<br />
<iframe width="640" height="390" src="http://www.youtube.com/embed/eUALswfvwPs?rel=0&hd=1" frameborder="0" allowfullscreen></iframe><br />
<br />
After I managed to get the desired effect I could simplify it significantly. Moving from two render-passes to one and from 18 texture look-ups to 'just' 9. This was possible by removing the normal 'diffuse' pass which is nothing more than the regular colored wireframe you can see in the video (when the halos are toggled-off), and instead using the information available inside the depth-buffer to construct the wireframe. This is pretty easy if you take into account that <i>if (depth == 1)</i> there is no geometry, where <i>if (depth < 1)</i> there is in fact a line that was drawn when constructing the depth-buffer. From this you create a colored wireframe and the halo inside the post-processor. The same data can be used to determine intersecting lines...removing the need for 9 texture lookups that sampled data from the original wireframe in the first prototype and instead re-using the sampled depth.<br />
<br />
The result can be seen above...Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com4tag:blogger.com,1999:blog-2942877753097296913.post-16687820532283723512011-05-21T13:23:00.000+02:002011-05-21T13:23:27.539+02:00'Depth Dependent Halos' for Wireframe rendering [Part 2]I have been working on getting the depth buffer to generate properly and using it to post-process the wires (i.e. creating the outline around the wireframe) and so far I'm quite satisfied...it's still a work in progress, but progress is going well...<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-cxgynDvxrZU/TdecT_DckiI/AAAAAAAABMQ/PkVj0AOejbM/s1600/wireframe_halos.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="http://3.bp.blogspot.com/-cxgynDvxrZU/TdecT_DckiI/AAAAAAAABMQ/PkVj0AOejbM/s400/wireframe_halos.png" width="400" /></a></div><br />
<i>This is the result so far, with the depth buffer drawn in the top-left corner and the final image in the middle. </i><br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-HXQFJXPL148/TdecUzHqQwI/AAAAAAAABMU/xF9-wW74Xdo/s1600/wireframe_halos_cropped.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="323" src="http://2.bp.blogspot.com/-HXQFJXPL148/TdecUzHqQwI/AAAAAAAABMU/xF9-wW74Xdo/s400/wireframe_halos_cropped.png" width="400" /></a></div><br />
<i>A zoomed-in version of the first image, the effect is visible around the characters head where you see a clear outline being formed, disconnecting it from the other character underneath it. </i><br />
<br />
For comparison I used a color similar to UDK <i>(see first image of previous post)</i><br />
<br />
4 more texture-lookups will be added which adds improved support for diagonal lines - that would bring the total lookups to <b>14</b>...which is quite a lot for a single effect, but since the geometry will never been drawn with fancy shaders while in this 'mode' (nor any other post-process effect) I don't expect it to be a problem. This effect provides the most benefit when moving around with the camera, I hope to upload a short video of this after I finalized the effect.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-14535698040481165792011-05-21T01:33:00.000+02:002011-05-21T01:33:07.954+02:00'Depth Dependent Halos' for Wireframe rendering'Depth Dependent Halos' is something I read on the UDK site a while ago, it's for their 'new' (by now pretty old...) wireframe rendering that increases readability of the lines for complex scenes. I was kind of wondering how they accomplished this and wanted to try this out myself (I was working on a wireframe-mode anyway, so it was the right time to experiment)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="http://2.bp.blogspot.com/-qdHFe1HxVAk/Tdb2EDACpXI/AAAAAAAABMI/naimu4-XSYM/s1600/depthdependenthalos_udk.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="226" src="http://2.bp.blogspot.com/-qdHFe1HxVAk/Tdb2EDACpXI/AAAAAAAABMI/naimu4-XSYM/s400/depthdependenthalos_udk.png" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: left;">This is the effect I am trying to replicate. Black halos are drawn around the wireframe lines to provide a better understanding of depth differences between these lines.</div><br />
I went through a few different approaches and ended up with a small post-processing shader that applies the halo around the wireframe lines. It took a few iterations to get the desired results, but I did end up with something that is pretty close to what I am looking for...<br />
<br />
The first step was to create my regular wireframe and letting the post-processor create a small single pixel halo around these lines using a different color. The second step (still have to start on this one) will require a depth-buffer and use the depth information to determine if the outline/halo should be drawn with halos being drawn on top of lines underneath them, creating discontinuities between lines that intersect and are underneath others.<br />
<br />
Some of the iterations I went through:<br />
<div class="separator" style="clear: both; text-align: center;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-13GK2hM3u-o/TdbzRucBCzI/AAAAAAAABMA/DPxqE0s6Tcg/s1600/SampleGame+2011-05-21+00-16-10-35.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="http://3.bp.blogspot.com/-13GK2hM3u-o/TdbzRucBCzI/AAAAAAAABMA/DPxqE0s6Tcg/s400/SampleGame+2011-05-21+00-16-10-35.png" width="400" /></a></div><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: left;"><i>Trying to find out the correct pixel offset and coloring by finding edges and applying a different color to each direction (up/down/left/right in screen-space)</i></div><div style="text-align: left;"><i><br />
</i></div><div class="separator" style="clear: both; text-align: center;"><a href="http://4.bp.blogspot.com/-ieR-o4N4Rnk/TdbzXLmZ4lI/AAAAAAAABME/Kpv7DbQS-_M/s1600/SampleGame+2011-05-21+00-14-57-31.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="http://4.bp.blogspot.com/-ieR-o4N4Rnk/TdbzXLmZ4lI/AAAAAAAABME/Kpv7DbQS-_M/s400/SampleGame+2011-05-21+00-14-57-31.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: left;"><i>This is the current state of the code, and resembles the desired effect (of step 1) quite closely.</i></div><div class="separator" style="clear: both; text-align: left;"><i><br />
</i></div><div class="separator" style="clear: both; text-align: left;"><i></i><a href="http://3.bp.blogspot.com/-P0ACI35FTwY/Tdby3rxLJeI/AAAAAAAABL8/0vGOwWpRHps/s1600/SampleGame+2011-05-21+00-49-17-74.png" imageanchor="1" style="clear: left; display: inline !important; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="http://3.bp.blogspot.com/-P0ACI35FTwY/Tdby3rxLJeI/AAAAAAAABL8/0vGOwWpRHps/s400/SampleGame+2011-05-21+00-49-17-74.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;">I have also been working on some additional scene navigation features. These are best shown in a video, but since I currently get my connection through a painfully slow USB stick - that will have to wait...</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: left;"><i>bonus image...(this result was less then expected, but looks pretty cool)</i></div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="http://1.bp.blogspot.com/-14ADVPKmJ3g/Tdb3XQXePBI/AAAAAAAABMM/nP9kWxHrGls/s1600/SampleGame+2011-05-21+00-28-29-86.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="225" src="http://1.bp.blogspot.com/-14ADVPKmJ3g/Tdb3XQXePBI/AAAAAAAABMM/nP9kWxHrGls/s400/SampleGame+2011-05-21+00-28-29-86.png" width="400" /></a></div><div class="separator" style="clear: both; text-align: center;"><a href="http://3.bp.blogspot.com/-P0ACI35FTwY/Tdby3rxLJeI/AAAAAAAABL8/0vGOwWpRHps/s1600/SampleGame+2011-05-21+00-49-17-74.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a><a href="http://3.bp.blogspot.com/-P0ACI35FTwY/Tdby3rxLJeI/AAAAAAAABL8/0vGOwWpRHps/s1600/SampleGame+2011-05-21+00-49-17-74.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a><a href="http://3.bp.blogspot.com/-P0ACI35FTwY/Tdby3rxLJeI/AAAAAAAABL8/0vGOwWpRHps/s1600/SampleGame+2011-05-21+00-49-17-74.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br />
</a></div>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-1635290374335574352011-05-14T19:33:00.000+02:002011-05-14T19:33:40.311+02:00Prototype: Orientation-Adapative Grid"Orientation adaptive Grid" is a concept I drew up earlier this week and I finally turned it into a working prototype yesterday. There really isn't a lot to talk about - It reacts to the orientation of the camera and shows/hides the three available grids. The video below demonstrates this in a few seconds...<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="257" src="http://www.youtube.com/embed/m7yK1bhKgi0?rel=0&hd=1" width="400"></iframe><br />
<br />
(watch is high-quality to see the lines)<br />
<br />
I'm not quite sure if I will be using this in the later stages of my editor - so far it goes look kinda cool and doesn't seem too distracting - it will require some more tuning (of the alpha values) and once the ViewCube (seen in the top-right corner) is complete I will revisit this concept as they play pretty well together.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com2tag:blogger.com,1999:blog-2942877753097296913.post-34415022771663499102011-05-02T00:10:00.000+02:002011-05-02T00:10:53.072+02:00Editor Tool: ViewCube (Camera Orientation helper)Got to work on a new tool today and to users of 3D Studio Max or Maya it may look very familiar. It's called the ViewCube and it helps you orientate your camera in the scene. The video below demonstrates the basic system, Right now it's still only a prototype I made earlier this evening and I will finish it at a later time. The final tool will interpolate to the new position/orientation and the tool itself will be available in the top-right corner of the screen (and will have greatly improved visuals of course ;)).<br />
<br />
Since I only have one viewport available in my editor, this can theoratically be a replacement for the standard dedicated Top/Side/Front-viewports. I might add an easy toggle for perspective-to-orthographic so you would not longer need/have 4 viewports on your screen at the same time...<br />
<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="257" src="http://www.youtube.com/embed/uuW6Cz-h0t8" width="400"></iframe>Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com3tag:blogger.com,1999:blog-2942877753097296913.post-74644851238435364262011-05-01T02:05:00.000+02:002011-05-01T02:05:21.094+02:00Engine RestructuringSo I have actually had the time to work on the engine again and been experimenting with some design patterns. Since the deadline of our latest project (<a href="http://tomlooman.com/current-projects/game-project-sunburn/">Project Sunburn</a>) has passed a while ago I have been doing some experimental stuff, mostly to try and fix issues and concerns that were bugging me for a while. Since there are currently no new projects/games scheduled to use the engine I am basically free to experiment and try out new things.<br />
<br />
A pretty major annoyance is '<i>one-frame-lag</i>', it's fairly common and can easily happen when you don't own full control over the optimal update-order of your components. This type of lag most commonly occurs when object-A affects object-B, but B has already updated himself that frame. It will then take another frame for the full-effect to be applied. The same thing can happen when different objects query information from a object that itself gets affected several times during a frame, this ends up being messy and will have unexpected results and <i>one-frame-lag</i>.<br />
<br />
However, I believe to have found a pretty solid solution, since it a bit experimental I will first test it against more complex components. More on that later...<br />
<br />
The latest version of Core Engine was also lacking a proper Game-State management framework, which wasn't a problem for a long time since we generally didn't use 2D menus for our prototypes, but I am currently figuring out a good way to re-integrate this into the engine (from scratch) The 'standard' frameworks really don't work for me as they easily make your framework very complex and put a lot of extra strain on iteration speed, it should be a lot simpler and that's exactly what I'll be trying to accomplish.<br />
<br />
A small note on the <b><i>Gizmo </i></b>for those of you who may be using it - I might release an update soon fixing some of the integration issues people might experience when they don't have a similar framework set-up. I will try to completely decouple the component which makes it a lot easier to integrate into your own editor. (If you experienced any other issues, let me know and I will see if I can fix is along with the rest)<br />
<br />
With all the other stuff going on I did not spend a single minute on <b><i>V-script</i></b> (Except for a presentation I did, I might talk about it some other time) So there is not much news on that I'm afraid.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com0tag:blogger.com,1999:blog-2942877753097296913.post-46352317911539599012011-04-03T14:24:00.000+02:002011-04-03T14:24:36.783+02:00Starting my Internship (at Trinigy, Germany)Some of you may know I was recently accepted as Intern Software Engineer at Trinigy, Germany. I arrived in Engingen (near Stuttgart) yesterday (on April 2nd) and I will start my internship tomorrow. It lasts 6-months which is quite extensive, but I expect to learn a lot from this experience.<br />
<br />
I don't know what effect this will have on my personal (XNA)projects. I might be able to work on them whenever I have some spare time available. One of the projects is V-script which I recently talked about. I'm considering making it open-source, but have not made my decision yet. It all depends on the quality of the end-result. If you're interested in seeing the V-script (or 'Node-graph Framework') as open-source, leave your comment and let me know if you have any specific features you would be interested in... (I will publish a feature-list soon)<br />
<br />
I was going to publish a video of the assignment I had to complete in order to get accepted, but I'm not sure if that is allowed. If I'm able to publish it, I will upload a video about it soon.Tomhttp://www.blogger.com/profile/03144304858050762127noreply@blogger.com7