More editor progress

World Editor

Last night I finished almost all of the items on my to-do list for another world editor update.  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.  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.  This is handy for making big changes, then coming back to fine tune things.
  • Smooth terrains.  I don’t really like the smoothing functionality right now, but it does work.  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.  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.  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.  I tried doing it this way but ran into some issues with the lerp function in THREE.js.  In any case, it works okay for now and I can improve this later.
  • Flatten terrains.  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.  Eventually it would be nice to have the option to set the desired flattening height, but that’s definitely a job for another day.

I did NOT make any improvements to the selection tool within the world editor.  I looked at DecalGeometry but didn’t really like it.  I did some research on shaders but quickly realized I don’t even know the basics of shaders.  This doesn’t seem like a feature that should hold up progress so I’m going to leave it for now, but this is something I want to improve eventually and I think learning more about GLSL would be time well spent.

These are some nice improvements but I still have miles and miles to go.  I think the next feature to add is the ability to place assets into a scene and save out a map file.  I’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.  Hopefully this will only take a few days, and I’ll post again when it’s done.

Leave a Reply

Your email address will not be published. Required fields are marked *