Git Product home page Git Product logo

mapgen2's Introduction

Map Generator

Build status

A prototyping tool for 2D and 3D procedural terrain maps.

Build

Requirements:

I am managing the above with vcpkg, however that is not required as long as cmake can find them.

For vcpkg:

$ vcpkg install boost-variant
$ vcpkg install corrade --head
$ vcpkg install magnum --head

Configure and build:

$ cd /path/to/mapgen2
$ mkdir build && cd build
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=/path/to/vcpkg.cmake
$ cmake --build . --target mapgen2

Ommit CMAKE_TOOLCHAIN_FILE if not using vcpkg. Set necessary Boost options (e.g. -DBoost_USE_STATIC_LIBS=OFF).

Usage

Add and connect nodes in the editor to create a noise output.

Image not found

Image not found

mapgen2's People

Contributors

nnarain avatar

Watchers

 avatar  avatar

Forkers

ofosos

mapgen2's Issues

Phase 1 - Initial Implementation

The scope of this project is to create a tool for generating 2D and 3D terrain maps. It should allow fast iteration of generating terrain maps.

This epic groups issues related to the initial implementation of the map generator. It is the baseline for "getting it to work".

Must:

  • Allow for the creation of libnoise modules
  • Set the parameters for the libnoise modules, including other noise modules
  • Display a 2D terrain map

Should:

  • Display output of the individual noise modules (preview)

Following Phase 1 will be a refactoring stage to improve the code without changing functionality.

Serialization

Allow the noise module representation to be stored on disk. As well as restored from disk. Ideally, this will be a human-readable format like YAML.

Node Editor

This application could use a node editor to configure noise modules.

  • Add noise modules
  • Link noise modules
  • Remove noise modules
  • Rename modules
  • Node tool tips (Show module type)
  • Noise module description in active panel
  • Reset source modules when a link is removed

Build on CI

Really need this for making sure everything builds in a clean environment

Create a sub-system for organizing/linking noise modules

This will be the system that creates and links noise modules together. Noise modules do not refer directly to libnoise modules. A noise module can refer to individual libnoise modules or other noise modules linked together.

For example:

Module 1:
  sources:
    - noise 1
    - noise 2:
      source: noise 1
  output: noise 2

Module 2:
  sources:
    - noise 1
      source: Module 1 

Something like that.

Add libnoise modules

Noise modules will be added slowly to prevent a large amount of re-work should some implementation details change.

Modules:

  • Abs
  • Clamp
  • Exponent
  • Invert
  • ScaleBias
  • Add
  • Max
  • Min
  • Multiply
  • Power
  • Billow
  • Checkerboard
  • Const
  • Cylinder
  • Perlin
  • RidgedMulti
  • Spheres
  • Voronoi
  • Blend
  • Select
  • Cache
  • Displace
  • RotatePoint
  • ScalePoint
  • TranslatePoint
  • Turbulence

Global seed

Some modules have a seed parameter. They can't all be the same but it would be nice is setting a "global seed" was possible. That way, only one seed value is required to regenerate the map.

Noise module caching

As more modules are added it will become costly to generate previews for each one individually.

It would be helpful if a noise module could cache value from the preview generation to bring down the cost of generation.

Add tutorial modules

Add modules to complete libnoise tutorials

  • Billow
  • ScaleBias
  • RidgedMulti
  • Perlin
  • Select

Noise Module Validation

Before generating/serializing/updating noise modules, ensure that the parameters are valid. Specifically noise module inputs.

Also must detect circular dependencies for modules and their sources.

libnoise library fail to build

Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "__declspec(dllimport) public: __thiscall noise::model::Cylinder::Cylinder(void)" (__imp_??0Cylinder@model@noise@@QAE@XZ) referenced in function __catch$?WriteDestFile@WriterTER@utils@noise@@QAEXXZ$0	noiseutils	


Severity	Code	Description	Project	File	Line	Suppression State
Error	LNK2019	unresolved external symbol "__declspec(dllimport) public: double __thiscall noise::model::Cylinder::GetValue(double,double)const " (__imp_?GetValue@Cylinder@model@noise@@QBENNN@Z) referenced in function __catch$?WriteDestFile@WriterTER@utils@noise@@QAEXXZ$0	noiseutils	

Harden NoiseModule interface

  • Should be able to set noise module as sources from the noise module class interface
  • Should be able to cleanly evaluate if a source module is invalid (caused by removal)
  • Should be able to track source dependencies in both directions ("Module 1 in a source of module 2. Module 2 has a dependency on Module 1")

Phase 3 - UI Enhancements

This epic captures necessary UI enhancements to the map generator tool.

Primarily the addition of module groups and the capability to preview the output of a group of modules together.

Module Groups

Logical groups of noise modules that create a final output. All modules in the group should be visible together (with previews). Should be able to set parameters of individual modules. Should be able to view/set leaf parameters of the entire group.

Display 3D terrain map

Display 3D terrain map to the window. This will require generating a mesh and render it to the screen.

Phase 2 - Refactoring

The initial implementation of core features is complete. Refractor the existing code base to make new features easier to add/implement.

Noise module preview

As parameters are adjusted a preview should be updated with the output of the noise module.

Rename noise modules

Technically doable if you remove and re-add a module. But would be nice to have it built into the UI.

Save output

Save output. Can be textures or 3D files.

Curve Editor

Some modules require control points as parameters

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.