U3DTerrainEditor Project Page

Published January 13, 2018
Advertisement

I've created a project page for the U3DTerrainEditor I have been working on. Project now includes a downloadable Windows binary so you can try it out. Warning: rough code ahead. It's still a pretty unpolished project, but you can do some cool stuff with it regardless.

Your first terrain:

1) Download the archive, unpack, and execute either run_opengl.bat or run_d3d11.bat. Alternatively, you can execute TEdit.exe or TEdit_D3D11.exe directly, passing arguments on the commandline; ie, 


TEdit.exe LuaScripts/terraineditor.lua -w

to run windowed instead of borderless. The batch scripts execute in borderless windowed mode.

2) Click on the NodeGraph button in the toolbar, represented by 3 boxes linked by lines. A window will popup in the lower right. Click new to create a new Node Group, then click Edit to edit the new node group. An overlay window will popup with a + button to create nodes, and an output widget.

3) Click on +, navigate to library, then click on ridged. A node for a Ridged fractal should appear. Change the value of the Frequency input to 3. Click and drag on the output link of the node, and drag the link to the input of the output widget. When the link is established, click the Preview button. The preview pane should fill with a preview image of the node function.

4) At the bottom of the output widget, ensure that Terrain is selected as the Output Target, then click Execute. After a brief processing pause, you should see the terrain change in the background. Press 'm' to close the node window.

5) Click on the Filters button. (It looks like a magic wand). From the list of filters, select Erosion. In the Power box, enter an erosion power (or just stay with 0.3, which is a decent choice). Power values can range from 0 to 0.5. Click Execute. After a brief prcoessing delay, the terrain should change again showing the results of the erosion applied.

6) From filters, select the Cliffify filter. In the dropdown box for Layer, select Layer 7. Press execute. After processing, the terrain should change so that steep areas show a cliff-like texture.

7) Select the Cavity Map to Layer filter. In the Layer dropdown box, select Layer 2, then press execute. The terrain should change again, showing sandy texture in the bottom of hollows and depressions.

8) Press the Terrain Options button (represented as a gear wheel). Select the Save button next to the Terrain: label, enter a filename, and hit Save to save the terrain heightmap to a PNG file. Heightmap will be saved as a standard RGB PNG, with height stored in the Red and Green channels. Red is the coarse height, and Green is finer detail data, allowing the heightmap to represent more than just 256 levels of elevation and making a smoother heightmap. Height can be extracted as Red + Green/255.0f.

Of course, there is a lot more you can do with it. There are brushes for manually editing terrain, texture layers and masks. You can use masks to protect areas from being edited or modified. You can create a spline (use 'q' and 'e' to remove and create knots) then use the Road filter or River filter to create areas of road and river. You can export the texture blend layers as well as a normal map. Some stuff still might not be hooked up right, and as always this is a work in progress.

If you have any feedback or suggestions, let me know.

0 likes 2 comments

Comments

Phodex Games

Looks pretty cool :) What is the main idea behind the Editor, as there are already many terrain editors, thats a thing I would be interested in. Have not tried it yet...

January 14, 2018 06:09 AM
JTippetts

Yeah, not sure it really brings anything new to the table, to be honest. I just kinda like working on it, usually when I get burned out working on my game.

January 16, 2018 03:44 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement