{"id":505,"date":"2022-02-15T18:30:00","date_gmt":"2022-02-16T00:30:00","guid":{"rendered":"https:\/\/www.chroniclesoftright.com\/blog\/?p=505"},"modified":"2022-02-15T16:56:35","modified_gmt":"2022-02-15T22:56:35","slug":"more-editor-progress","status":"publish","type":"post","link":"https:\/\/www.chroniclesoftright.com\/blog\/2022\/02\/15\/more-editor-progress\/","title":{"rendered":"More editor progress"},"content":{"rendered":"\n<p>Last night I finished almost all of the items on my to-do list for another world editor update.\u00a0 Specifically, I can now:<\/p>\n<ul>\n<li>Zoom the camera in and out so that seeing and moving around a large map is much easier.<\/li>\n<li>Change the size and strength of the selection sphere.\u00a0 Changing the size is pretty self-explanatory, but changing strength means that vertices move up and down faster or slower (depending on the strength of the tool) when raising\/lowering the terrain.\u00a0 This is handy for making big changes, then coming back to fine tune things.<\/li>\n<li>Smooth terrains.\u00a0 I don&#8217;t really like the smoothing functionality right now, but it does work.\u00a0 The problem with it is that all the vertices within the selection sphere move toward the average height of all the selected vertices at the same rate.\u00a0 So vertices right out at the edge of the sphere move up and down by the same amount as those near the center of the selection sphere.\u00a0 Ideally I would be able to choose this behavior, or have the default that smoothing has more effect on vertices near the middle and less effect on those near the edge.\u00a0 I tried doing it this way but ran into some issues with the <a href=\"https:\/\/threejs.org\/docs\/?q=math#api\/en\/math\/MathUtils.lerp\" target=\"_blank\" rel=\"noopener\">lerp function<\/a> in THREE.js.\u00a0 In any case, it works okay for now and I can improve this later.<\/li>\n<li>Flatten terrains.\u00a0 This tool is super basic at the moment since all it does is set the y value of any vertices inside the selection sphere to 0.\u00a0 Eventually it would be nice to have the option to set the desired flattening height, but that&#8217;s definitely a job for another day.<\/li>\n<\/ul>\n<p>I did NOT make any improvements to the selection tool within the world editor.\u00a0 I looked at DecalGeometry but didn&#8217;t really like it.\u00a0 I did some research on shaders but quickly realized I don&#8217;t even know the basics of shaders.\u00a0 This doesn&#8217;t seem like a feature that should hold up progress so I&#8217;m going to leave it for now, but this is something I want to improve eventually and I think learning more about <a href=\"https:\/\/www.khronos.org\/opengl\/wiki\/OpenGL_Shading_Language#:~:text=The%20OpenGL%20Shading%20Language%20(GLSL,is%20a%20C%2Dstyle%20language.&amp;text=The%20current%20version%20of%20GLSL%20is%204.60.\" target=\"_blank\" rel=\"noopener\">GLSL<\/a> would be time well spent.<\/p>\n<p>These are some nice improvements but I still have miles and miles to go.\u00a0 I think the next feature to add is the ability to place assets into a scene and save out a map file.\u00a0 I&#8217;m not going to worry about rotation or scale right now, just getting some stuff into the world then saving out a map file that can be loaded by the engine.\u00a0 Hopefully this will only take a few days, and I&#8217;ll post again when it&#8217;s done.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last night I finished almost all of the items on my to-do list for another world editor update.\u00a0 Specifically, I can now: Zoom the camera in and out so that seeing and moving around a large map is much easier. Change the size and strength of the selection sphere.\u00a0 Changing the size is pretty self-explanatory,&hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-505","post","type-post","status-publish","format-standard","hentry","category-world-editor"],"_links":{"self":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/comments?post=505"}],"version-history":[{"count":1,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions"}],"predecessor-version":[{"id":506,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/posts\/505\/revisions\/506"}],"wp:attachment":[{"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/media?parent=505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/categories?post=505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chroniclesoftright.com\/blog\/wp-json\/wp\/v2\/tags?post=505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}