<\/a>So today I’ve been trying a couple of different ideas. \u00a0First, I spent some time optimising the “painted terrain” calculations, and basically cut their cost in half. \u00a0The best bit about this optimisation was that it’s actually a pair of optimisations inside the VectorStorm library; \u00a0one is purely internal (and so will automatically benefit any game which uses dynamic models), and the other exposes a new API which allows dynamic models to specify changing vertex data in a more efficient manner. \u00a0If I was to go back and recompile Lord (which I have no desire to do), it’d run substantially faster now.<\/p>\nThe other thing I’ve been playing with has been trying to figure out how to make a nice editing interface; \u00a0particularly, a way to adjust how large an area you’re going to modify. \u00a0That part was actually really easy; \u00a0I’ve got it wired up so that the player can use his mouse wheel to increase and decrease the size of the brush. \u00a0The hard part is letting the user see how big that brush is.<\/p>\n
I’ve tried a couple of options, and haven’t really found one that I like, yet. \u00a0I’ve tried little projected circles (which clip into the terrain terribly), and I’ve tried a scaling translucent sphere (pictured here), but none of them really give you a sense of precisely which vertices you’d be affecting; \u00a0it’s just really imprecise, and it can be difficult to tell what the sphere is touching, and what it’s merely sitting in front of.<\/p>\n
Maybe I shouldn’t be thinking about it as showing a sphere or circle, but instead be using a more traditional 3D program approach, and actually hiliting the specific vertices that would be adjusted, as you move your cursor around. \u00a0That might be better, maybe.. \u00a0though it can be a lot of vertices; \u00a0at the current maximum brush size (a sphere 200 meters in diameter), it’d be nearly 2,000 vertices \u00a0being moved around at once. \u00a0I might try that next, though. \u00a0See just how bad the performance really is.<\/p>\n","protected":false},"excerpt":{"rendered":"
So today I’ve been trying a couple of different ideas. \u00a0First, I spent some time optimising the “painted terrain” calculations, and basically cut their cost in half. \u00a0The best bit about this optimisation was that it’s actually a pair of optimisations inside the VectorStorm library; \u00a0one is purely internal (and so will automatically benefit any…<\/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-gS","_links":{"self":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1046"}],"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=1046"}],"version-history":[{"count":0,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/posts\/1046\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/media?parent=1046"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/categories?post=1046"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.vectorstorm.com.au\/wp-json\/wp\/v2\/tags?post=1046"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}