Skip to content
/ NGG Public

A native C++ geometry generator for Unreal Engine 4. This plugin uses the UProceduralMeshComponent to allow for runtime chunk-based geometry generation and editing

Notifications You must be signed in to change notification settings

V41U/NGG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGG

The Native Geometry Generator (NGG) is a private project that allows for chunk-based geometry generation using Unreal's UProceduralMeshComponent.

I have implemented the Marching Cubes algorithm to allow surface editing. Individual chunks register themselves to the chunk manager and allow for edits that can affect multiple chunks at once.

A rough overview of the functionality can be seen in the video here.

Current Features

  • You can use individual chunks to create a map which create a surface using the UMath::Perlin noise function.
  • Editing of the surface using a spherical brush like: Blueprint Terrain Editing
  • An actor can call either EditTerrain or EditTerrainOVERRIDE
    • EditTerrain uses the chunk manager and allows for editing of terrain over multiple chunks
    • EditTerrainOVERRIDE only adapts the individual chunk that is called. This may may be used, but I advise against it ;)
  • For each individual chunk one can define:
    • Extent: How large is the individual chunk
    • Cube Resolution: The size of the cube that is used in the marching cube algorithm
    • Feature Size: The size of the perlin noise features. A smaller value leads to more extreme differences which could represent a mountainous area. You do you :)
    • Use Smooth Surface: Boolean that defines whether a more exact surface representation should be done or whether the edges of the marching cube are always snapped to 0.5.

Open TODOs

  • Expose the generation function so that users can overwrite this and have custom mesh generation (e.g. Underground tunnel systems)
  • Expose VoxelData so that users can save the current version of chunks and the chunk state is not lost when destructing.
  • Bugfixes (e.g. Chunks are currently not unregistered from the chunk manager if they are destructed)

About

A native C++ geometry generator for Unreal Engine 4. This plugin uses the UProceduralMeshComponent to allow for runtime chunk-based geometry generation and editing

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published