{"id":15,"date":"2010-09-05T23:21:25","date_gmt":"2010-09-06T07:21:25","guid":{"rendered":"http:\/\/www.ludicon.com.php5-14.dfw1-1.websitetestlink.com\/castano\/blog\/"},"modified":"2022-08-23T14:42:05","modified_gmt":"2022-08-23T22:42:05","slug":"projects","status":"publish","type":"page","link":"https:\/\/www.ludicon.com\/castano\/blog\/projects\/","title":{"rendered":"Projects"},"content":{"rendered":"\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h2 class=\"wp-block-heading\">Games<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The Witness &#8211; Thekla<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"233\" src=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500-700x233.png\" alt=\"\" class=\"wp-image-1189\" srcset=\"https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500-700x233.png 700w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500-267x89.png 267w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500-768x256.png 768w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500-800x267.png 800w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/1500x500.png 1499w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>I was the first programmer hired at Thekla and worked there for 10 years. My work on The Witness is one the accomplishments that I&#8217;m most proud of. I developed the engine from scratch without using any third party engines and very few support libraries. I contributed to practically every aspect of its development, but was primarily responsible of the overall rendering architecture, asset processing pipeline, tools, general infrastructure, and OSX and iOS ports.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Company of Heroes &#8211; Relic<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"394\" src=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-700x394.jpg\" alt=\"\" class=\"wp-image-1190\" srcset=\"https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-700x394.jpg 700w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-267x150.jpg 267w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-768x432.jpg 768w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-1536x864.jpg 1536w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh-800x450.jpg 800w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2019\/11\/coh.jpg 1920w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>At Relic I only worked for less than a year, but in that short period I developed a special effects engine to render particles, explosions, and other effects, based on the venerable <em>Homeworld 2<\/em>.<\/p>\n<\/div><\/div>\n\n\n\n<p>I&#8217;ve worked on at least 4 additional games and many other personal projects that were never released. Failures don&#8217;t get much recognition, but they offer valuable lessons and are paving stones to success.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Texture Processing<\/h2>\n\n\n\n<p>My interest in DXT compression started with the search for an unencumbered compression algorithm in order to open source the popular <a href=\"https:\/\/code.google.com\/p\/nvidia-texture-tools\/\">NVIDIA Texture Tools<\/a>. Around that time Simon Brown published the first version of squish. I adopted his implementation, contributed many improvements, and ported it to the GPU using CUDA. Recently I released this compressor as <a href=\"https:\/\/github.com\/castano\/icbc\">a standalone single header library (ICBC)<\/a>. <\/p>\n\n\n\n<p>While at NVIDIA I also had the honor to collaborate with Jan Paul van Waveren on the research of real-time DXT compression algorithms. We published our results in these two papers:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/Real-Time-Normal-Map-DXT-Compression.pdf\">Real-Time Normal Map DXT Compression<\/a>, February 7, 2008<\/li><li><a href=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/Real-Time-YCoCg-DXT-Compression.pdf\">Real-Time YCoCg-DXT Compression<\/a>, September 14, 2007<\/li><\/ul>\n\n\n\n<p>One of my most significant contributions to the texture processing pipeline is <a href=\"http:\/\/www.ludicon.com\/castano\/blog\/computing-alpha-mipmaps\/\">a method to compute mipmaps preserving alpha coverage<\/a>. Today, this has become the <em>de facto standard<\/em> method to compute alpha mipmaps. A description of the algorithm was included in the 4th edition of the <a href=\"http:\/\/www.realtimerendering.com\/\">Real-Time Rendering Book<\/a> and I provided a couple screenshots that showcase it better than the temporary assets in my original article:<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"289\" src=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-700x289.jpg\" alt=\"\" class=\"wp-image-1231\" srcset=\"https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-700x289.jpg 700w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-267x110.jpg 267w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-768x317.jpg 768w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-1536x634.jpg 1536w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1-800x330.jpg 800w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/alpha_mips_compare-1.jpg 1744w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/figure>\n<\/div><\/div>\n\n\n\n<p>At Thekla I also wrote an <a href=\"http:\/\/www.ludicon.com\/castano\/blog\/2017\/10\/lightmap-optimizations-ios\/\">ETC2 compressor with an optimal planar mode encoder<\/a>, specifically targeting <a href=\"http:\/\/www.ludicon.com\/castano\/blog\/2016\/09\/lightmap-compression-in-the-witness\/\">HDR lightmaps encoded as RGBM<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Mesh Processing<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Tessellation and Subdivision<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"151\" src=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-700x151.png\" alt=\"\" class=\"wp-image-1226\" srcset=\"https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-700x151.png 700w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-267x58.png 267w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-768x166.png 768w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-1536x331.png 1536w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-2048x442.png 2048w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/figure1_02-800x173.png 800w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>At NVIDIA, I was one of the designers of the GPU tessellation pipeline. Although it did not have the success we envisioned, it was a great opportunity to prototype new algorithms and explore the possibilities that it opened up. <\/p>\n\n\n\n<p>I worked closely with hardware architects, wrote the first draft of the <a href=\"https:\/\/www.khronos.org\/registry\/OpenGL\/extensions\/ARB\/ARB_tessellation_shader.txt\">OpenGL tessellation extension<\/a>, implemented a tessellation emulator that run on D3D10 hardware, developed new algorithms, and wrote the first shaders that run on tessellation hardware. I gave many presentations, published <a href=\"http:\/\/faculty.cs.tamu.edu\/schaefer\/research\/greg.pdf\">a paper at Siggraph Asia<\/a> and organized <a href=\"http:\/\/www.nitianyun.com\/sigcourse09.html\">a course at Siggraph<\/a> in collaboration with Valve and ILM.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Parameterization (UV Mapping)<\/h3>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"371\" src=\"http:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-700x371.png\" alt=\"\" class=\"wp-image-1241\" srcset=\"https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-700x371.png 700w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-267x141.png 267w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-768x407.png 768w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-1536x814.png 1536w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot-800x424.png 800w, https:\/\/www.ludicon.com\/castano\/blog\/wp-content\/uploads\/2020\/05\/xatlas-godot.png 1920w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/figure>\n\n\n\n<p>At Thekla, I wrote a <a href=\"https:\/\/github.com\/Thekla\/thekla_atlas\">mesh parameterization library<\/a> for the lightmap generation tool of The Witness. I released that code under the MIT License, and it was adopted by Godot, Filament, and used in multitude of games. This is flattering, but also a little embarrassing; I wrote that code very quickly and I was never particularly happy with it. I hope I can revisit this problem at some point.<\/p>\n\n\n<h2>Programming Languages<\/h2>\n<p>I&#8217;m dissatisfied with the evolution of the C++ language and the lack of practical alternatives for game development. Working in jai at Thekla was eye opening: Developing suitable alternatives is not that hard and the benefits in productivity and quality of life are huge.<\/p>\n<ul>\n<li><a href=\"https:\/\/github.com\/castano\/jiyu\">Jiyu<\/a><br \/>I added support for enums, flags, multiline strings, for loops with custom iterators, template function arguments, and many other small improvements.<\/li>\n<li>Thekla\/Jai<br \/>I contributed to the jai ecosystem adding new modules, libraries and small features, fixing bugs, and adding support for targeting the Nintendo Switch.<\/li>\n<li><a href=\"https:\/\/github.com\/Thekla\/hlslparser\">Thekla\/HLSLParser<\/a><br \/>I improved <span class=\"st\">Unknown Worlds<\/span>&#8216; shader parser with new features to handle all our shaders and added new backends for D3D11 and Metal. This project was later adopted by Roblox and <a href=\"https:\/\/github.com\/ConfettiFX\/The-Forge\">ConfettiFX<\/a>.<\/li>\n<\/ul>\n<p><!-- Old projects:\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>NVIDIA Texture Tools<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTo do.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>NVIDIA Mesh Tools<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTo do.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>QShaderEdit<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTo do.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>QGLUT<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTo do.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h2>NVUI<\/h2>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nTo do.\n--><\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Games The Witness &#8211; Thekla I was the first programmer hired at Thekla and worked there for 10 years. My work on The Witness is one the accomplishments that I&#8217;m most proud of. I developed the engine from scratch without using any third party engines and very few support libraries. I contributed to practically every&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":2,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-15","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/pages\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":33,"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/pages\/15\/revisions"}],"predecessor-version":[{"id":1348,"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/pages\/15\/revisions\/1348"}],"wp:attachment":[{"href":"https:\/\/www.ludicon.com\/castano\/blog\/wp-json\/wp\/v2\/media?parent=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}