Open source level editor toolkit built on FNA+ImGui.NET
An open-source generic 3D level editor designed to be integrated into any game or engine. Inspired by the way LDTK, Ogmo, and Tiled serve as generic 2D tile based editors, and also taking inspiration from Unity Editor, Godot, and Trenchbroom.
Open World Builder requires the .NET 7.0 SDK to compile.
It depends on FNA, SDL2-CS, ImGui.NET, and NativeFileDialogSharp.
Clone Open-World-Builder then:
- Run
git submodule update --init --recursive
to fetch all submodule dependencies - Open the
src
subfolder in a terminal - Run
dotnet build --configuration Release /p:Platform=x64
- Find the built executable in
src/bin/x64/Release/net7.0/[linux-x64|win-x64]
- After opening OWB, save a new project by going to File → Save Project
- Open the project settings (Window → Project Settings) and set your new project's content path (recommended to put a "content" folder next to the project file you saved and set this as your project's content path). This is where all visual assets will reside for level editing (meshes, textures, etc)
- To save a new level, open the Hierarchy (Window → Hierarchy) and the Inspector (Window → Inspector), change the name of the level by selecting the root node in the Hierarchy and changing it's name in the Inspector, and then press CTRL-S or File → Save Level. The saved level will appear in the Project Browser (Window → Project Browser) under the "Levels" dropdown, on-disk as
levels/[level_name].owblevel
next to the project file.
OWB outputs three types of files: .owbproject
, .owblevel
, and .raw
. The first two are simply JSON files, and the last is used to save both heightmap and splatmap information for terrains.
A schema describing this format can be found in the schema
folder in this repository, and example .CS files for use with Newtonsoft.JSON matching this schema can be found in this folder as well.
Note that several types are represented as formatted strings rather than JSON objects (mostly vectors, quaternions, & colors). Wherever applicable, these are annotated with a comment in the .schema.json
files.
As far as heightmap/splatmap .raw
files, the formats are as follows:
- For heightmaps, this stores a headerless blob of 32-bit floating point values (heightmapRes * heightmapRes)
- For splatmaps, this stores a headerless blob of 8-bit RGBA values (heightmapRes * heightmapRes)
Heightmap/splatmap files are given a consistent naming convention for loading. For heightmaps, they are stored in the levels folder as {level name}_{terrain node guid}_heightmap.raw
. For splatmaps, they are stored in the levels folder as {level name}_{terrain node guid}_splatmap{index}.raw
. There will be one heightmap per terrain, and one splatmap per 4 textures per terrain.