{"id":661,"date":"2009-08-22T22:48:42","date_gmt":"2009-08-22T12:48:42","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=661"},"modified":"2009-08-23T10:40:55","modified_gmt":"2009-08-23T00:40:55","slug":"my-head-hurts","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2009\/08\/22\/my-head-hurts\/","title":{"rendered":"My head hurts"},"content":{"rendered":"

I’ve been quite sick for most of the week, but am finally starting to feel well enough to write a little bit of code again. \u00a0Today, I’ve added a few improvements to the dynamic geometry generation code.<\/p>\n

First, I’ve fixed up some problems regarding the generation of normals on the geometry (which makes the lighting work better on the generated geometry), and I’ve fixed things so that on towers, I can have horizontal hard edges, instead of only vertical hard edges. \u00a0(And vice versa, on walls which are extruded along the ground).<\/p>\n

Here’s a pair of images showing what I mean (old is on the left, new is on the right):<\/p>\n

\"Old\"<\/a>\"New\"<\/a><\/p>\n

Sorry that the lighting isn’t the same in the two images; \u00a0I was a little careless while taking screenshots. \u00a0If you can ignore that difference, you should still see how the new behaviour correctly makes the “cap” on the top look properly flat, instead of smearing the lighting from the sides across the top of the object, and the tops of the gear pieces are now far more “crisp” than they were originally, because they have hard creases at the edges, which weren’t possible using my old system of generating this geometry.<\/p>\n

For anybody with a technical bent, It’s worth mentioning that I made these improvements to the “vsMeshMaker” class inside the public VectorStorm engine; \u00a0with these changes, a “vsMeshMaker” can now calculate normals for your models automatically inside the VectorStorm engine code, instead of requiring your game code to manually provide normals, and it automatically finds places where you should have creases in the geometry, and handles duplicating and merging vertices as required in order to set up those normals for you. \u00a0Once I migrate those changes back into the VectorStorm trunk, the code which resulted in the difference between these two screenshots will be visible to anybody who’s interested to see how it’s done.<\/p>\n

If I’m still feeling halfway decent tomorrow, I might actually make a start on getting simulated subscribers into the codebase. \u00a0But it’s a big task, and I’m really going to need my wits about me when I start on it! \u00a0:)<\/p>\n","protected":false},"excerpt":{"rendered":"

I’ve been quite sick for most of the week, but am finally starting to feel well enough to write a little bit of code again. \u00a0Today, I’ve added a few improvements to the dynamic geometry generation code. First, I’ve fixed up some problems regarding the generation of normals on the geometry (which makes the lighting…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[24,25],"tags":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/po9WK-aF","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/661"}],"collection":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/comments?post=661"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/661\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=661"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=661"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}