{"id":1503,"date":"2010-09-04T22:10:43","date_gmt":"2010-09-04T11:10:43","guid":{"rendered":"http:\/\/www.vectorstorm.org\/?p=1503"},"modified":"2010-09-04T22:45:01","modified_gmt":"2010-09-04T11:45:01","slug":"faster","status":"publish","type":"post","link":"https:\/\/www.vectorstorm.com.au\/2010\/09\/04\/faster\/","title":{"rendered":"Faster"},"content":{"rendered":"

\"\"<\/a>Here’s something I’ve been trying to figure out for a while — how to make the procedural geometry render faster.<\/p>\n

The problem is that this geometry is made up of lots of hierarchical objects. \u00a0These rough tree models, for example, each contain about 40 or 50 individual objects; \u00a0one for every branch. \u00a0This means that each tree model ends up submitting about 40 separate batches of geometry to the graphics card. \u00a0Clearly, the thing to do was to merge all of the geometry down into a single blob which could be sent all at once. \u00a0The trouble was figuring out how to actually do that, within the confines of the VectorStorm library.<\/p>\n

Well, it took a bit of doing, but I finally worked it and implemented it today, and the difference is stunning. \u00a0Compare the length of the green timing bar in this screenshot against the one from before these changes<\/a>, to see just how much of a difference it’s made.<\/p>\n

In theory, I could make it even faster by drawing these trees as instances; \u00a0in effect, telling the video card “draw this object in these two hundred places”, instead of telling it to “draw this object here” two hundred times. \u00a0A subtle distinction, but an important one for optimum performance. \u00a0 \u00a0I imagine that I’ll eventually need to do that. \u00a0But for now, this is a huge boost in speed; \u00a0I’m really pleased with it!<\/p>\n","protected":false},"excerpt":{"rendered":"

Here’s something I’ve been trying to figure out for a while — how to make the procedural geometry render faster. The problem is that this geometry is made up of lots of hierarchical objects. \u00a0These rough tree models, for example, each contain about 40 or 50 individual objects; \u00a0one for every branch. \u00a0This means that…<\/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\/so9WK-faster","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1503"}],"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=1503"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1503\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}