I’m continuing to improve the terrain editing functionality of the scene editor. Now when you click on a terrain object instead of changing the emissive value so that the terrain glows, a black wireframe is laid over the terrain object itself. Then, if you press ‘e’ to enter edit mode, the wireframe turns light gray, as in the picture:
This is a better way to do things because it doesn’t mess with the color of the terrain as it is being edited. When the terrain was glowing a bright green, it made it difficult to see the changes being made. Now you can tell what you are doing, and the wireframe really helps. I also change the camera to orthographic. This just makes it easier to navigate and get a clearer picture of the whole scene. The white square with line in the image is a directional light helper.
Right now I’m running into a little trouble with saving the scene file. For simplicity’s sake I was trying to just save the ‘y’ value of every vertex in the terrain. This isn’t working correctly and I think it’s because of an inherent limitation in the amount of data I can send through an HTTP POST. I may have to write the scene file data into a pop up <div> then copy and paste that into a scene file on the server. This isn’t very efficient so I’ll need to improve the process eventually, but it may be an ok solution for now.