Generate Height map with Generator (OpenGL and imgui) and Construct Splat Map with generated height map using Algorithm

Overview

Procedural Terrain Estimator

PTE consists of two programs, Renderer and Editing tool.

The main usage of these programs is for generating 3D terrain by editing noise map and controlling several parameters of noise function.

Renderer is mainly for viewing resources (height map, or equivalently, displacement map and blend map) which are generated by the Editing tool. Renderer always checks if resources have been modified, and ,if it does, reload resources in the OpenGL Current Context. This makes it easier for the users to edit resources and debug resources.

Editing tool consists of two stages, Generator and Estimator.
At Generator stage, users can edit height map with several noise functions by controlling several parameters of each noise functions. Also enable to edit output board directly with additive brush / decline brush / lasso (free-form) / lasso (polygonal) / etc ..
At Estimator stage, you can generate blend map associated with height map which you are editing. This will be automatically done using several terrain related algorithms.

Demo Video

Procedural-Terrain-Estimator-Demo-screenshot

Features

  1. Renderer :

    • Quad-tree based non-uniform patch primitive terrain
    • Dynamic Level Of Detail
    • Resource hot-reload technique (only for height map and blend map)
    • Sky box (rotation supported)
    • Water rendering (with reflection and refraction)
    • Fog (at terrain)
    • Shadow mapping
    • Gamma correction
    • Tone mapping
    • Motion Blur
    • Wireframe view (at geometry shader)
    • HDR Environment map (not included in release product)
    • Crepuscular Lighting (God-rays)
  2. Generator :

    • several noise functions(voronoi, simplex, fbM) are supported
    • brush, lasso, move, zoom in/out tools
    • 16bit height map writing supported.
    • load preset images supported
  3. Estimator :

    • Blend map generation by elevation descent mapping.
    • Height map smoothness control.
    • Height map normalize.

How to build

will be supported ...

How to Use

Help

  • Generate height map and blend map at the first :

    1. Open both the Renderer and the Generator .
    2. Set Renderer parameters as you want.
    3. With renderer opened, switch to generator program.
    4. Change noises' parameters and Edit noise board with several brushes as you want.
    5. If you finished your editing, scroll down GUI and select "Export Images".
    6. Export your height map and blend map!
    7. Watch your resources you just created with Renderer. (It automatically loaded your resources).
  • Generate blend map from your own height map. (but, height map must be 16bit single channel)

    1. Put your height map to resources/texture/preset directory.
    2. Open the generator.
    3. At the GUI, set the blend values of whole noises to zero.
    4. In the "Preset" tree node, select your height map and export it. Done.

Keys

  1. Renderer :

    • 1, 2, 3, 4, 5 - Camera view mode (top-view, left-to-middle, right-to-middle ...)
    • W,A,S,D - Camera movement
    • Cursor move with LMB pressed - Camera rotation
    • RMB - Camera Zoom in/out (automatically and smoothly)
    • Mouse Wheel - Camera Zoom in/out
    • Space bar - Renderer Pause
    • ESC - quit program
  2. Editing Tool :

    • 1, 2, 3 - Swap board for brushwork.
    • R - reset brush
    • B - Additive brush
    • N - Erase
    • Z - Zoom in
    • X - Zoom out
    • C - Lasso (polygonal)
    • F - Lasso (free-form)
    • M - move scroll

Dependencies

  • glfw3
  • glad
  • spdlog
  • glm
  • stb_image
  • imgui
  • opencv

Tested Environment

CPU GPU OS it Work? Frame time
i7-7700HQ Nvidia Geforce GTX 1060 Windows 64bit O 8 (ms)
i5-? HD630 Windows 64bit O ?

Contributor

@snowapril - generator and renderer
@kkorona - estimator

License

MIT License

You might also like...
Dear IMGUI + Render + Window handling, amalgamation in two files ready to use
Dear IMGUI + Render + Window handling, amalgamation in two files ready to use

imgui-app Imgui-app is an amalgamation of two amazing projects Dear Imgui and Sokol libraries into two files to make it very easy to start working wit

A file dialog library for Dear ImGui
A file dialog library for Dear ImGui

ImFileDialog A simple file dialog library for Dear ImGui. This library supports favorites, actual Windows icons, image previews, zooming in, etc... DI

dear imgui + glfw framework
dear imgui + glfw framework

ImFrame ImFrame is a lightweight framework designed to provide you with a window and graphical backend for the Dear ImGui library. Unlike more traditi

A (very) simple notification wrapper for Dear ImGui
A (very) simple notification wrapper for Dear ImGui

imgui-notify Is a header-only wrapper made to create notifications with Dear ImGui. As I couldn't find any library for this I just decided to create m

ImTricks is a collection of useful functions for expanding / improving the functionality of the ImGui.

ImTricks ImTricks is a collection of useful functions for expanding / improving the functionality of the ImGui. At the moment it has in itself: Functi

Expose the ImGui framework to clasp

Expose the ImGui framework to clasp Installing in the clasp source tree cd clasp/extensions git clone https://github.com/clasp-developers/imgui-clasp

Growtopia android modmenu with ImGui
Growtopia android modmenu with ImGui

Growtopia Android ImGUI Growtopia android modmenu with ImGUI. Features Built with ImGUI. Coming Soon None Requirements The following dependencies are

X11 + GLFW + Dear ImGUI Overlay

Dear ImGUI Overlay X11 + GLFW + Dear ImGUI Overlay made by rdbo Based on https://github.com/rdbo/glfw-overlay How to use? In main.c, there is a window

Partial source of the ImGui interfaces used in the Rocket League version of CodeRed.
Partial source of the ImGui interfaces used in the Rocket League version of CodeRed.

CodeRed-ImGui Raw source of the ImGui interfaces used in the Rocket League version of CodeRed. About This repo is just part of the ImGui source used i

Comments
  • Blend Map export

    Blend Map export

    Am not sure if its bug or am missing something but why is exported blend map transparent with black spots and not like depicted in export dialog RGBA blendmap?

    opened by Gusher 5
Releases(1.1.0)
  • 1.0.0(Nov 23, 2018)

    1. Renderer :

      • Quad-tree based non-uniform patch primitive terrain
      • Dynamic Level Of Detail
      • Resource hot-reload technique (only for height map and blend map)
      • Sky box (rotation supported)
      • Water rendering (with reflection and refraction)
      • Fog (at terrain)
      • Shadow mapping
      • Gamma correction
      • Tone mapping
      • Motion Blur
      • Wireframe view (at geometry shader)
      • HDR Environment map (not included in release product)
      • Crepuscular Lighting (God-rays)
    2. Generator :

      • several noise functions(voronoi, simplex, fbM) are supported
      • brush, lasso, move, zoom in/out tools
      • 16bit height map writing supported.
      • load preset images supported
    3. Estimator :

      • Blend map generation with gradient descent and definite height.
      • Height map smoothness control.
      • Height map normalize.
    Source code(tar.gz)
    Source code(zip)
    Procedural-Terrain-Estimator.zip(22.70 MB)
Owner
Snowapril
Snowapril
ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages.

ZT is a zig-contained library that automatically compiles+links ImGui, OpenGL, and GLFW into typed packages. By zig contained I mean that ZT is intend

null 88 Nov 7, 2022
A GIF art engine that will allow you to generate multi-layer GIFs from single GIFs as layers.

A GIF art engine that will allow you to generate multi-layer GIFs from single GIFs as layers. All the code in this repository has been written by me in c++, inspired by the generative art engine of HashLips that does not support GIFs as layers. The problem arose from my and my teamleader's need to generate animated images and then GIFs, in the same way as HashLips generated static images.

Andre 61 Oct 15, 2022
A ImGui Application with Multi Viewports and Docking using D3D11

ImGui-Application Informations A ImGui Application with Multi Viewports and Docking using D3D11 Build You need the DirectX SDK, here the Download link

Argon Projects 12 Nov 13, 2022
ImGuiFileDialog is a file selection dialog built for (and using only) Dear ImGui

ImGuiFileDialog Purpose ImGuiFileDialog is a file selection dialog built for (and using only) Dear ImGui. My primary goal was to have a custom pane wi

Aiekick 764 Nov 24, 2022
Markdown renderer for Dear ImGui using MD4C parser

imgui_md Markdown renderer for Dear ImGui using MD4C parser. C++11 or above imgui_md currently supports the following markdown functionality: Wrapped

Dmitry Mekhontsev 72 Nov 26, 2022
A cross-platform wrapper for using SDL2 with ImGui

ImSDL2 ImSDL2 is an open source "wrapper" of imgui backends available for SDL2. It aims to provide a backend-independent yet simple interface for inte

terens 5 Feb 2, 2022
Minimal example of prototyping CLAP audio plugins using Dear ImGui as the user interface.

clap-imgui Minimal example of prototyping CLAP audio plugins using Dear ImGui as the user interface. This is intended as an example of presenting a UI

schwa 47 Nov 21, 2022
This is a C++17 deployment of deep-learning based image inpainting algorithm on Windows10, using Libtorch, Opencv and Qt.

This is a desktop software for image inpainting. It is a C++ deployment of image inpainting algorithm on Windows10, based on C++17 and implemented using vs2019.

null 4 May 13, 2022
Example program for integrating Dear ImGui and GLFW into Source's App System

This is an example program for integrating Dear ImGui and GLFW into Source's app system, the same thing Source's tools use. Feel free to do with this

null 9 Apr 16, 2022
Simpler ImGui Backend Implementation for VulkanHpp.

ImGui-VulkanHpp Simpler ImGui Backend Implementation for VulkanHpp.

takiyu 28 Nov 13, 2022