Skip to content

πŸ“¦3D Perlin Noise using Marching cubes algorithm for Unreal Engine 4πŸ“¦

License

Notifications You must be signed in to change notification settings

mikhomak/Ue4MarchingCubes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

27 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

3D Perlin noise using marching cubes algorithm

About:

This component allows you to generate 3D Perlin Noise mesh with collisions in runtime in unreal engine.

Requirements:

In order for this component to work you will need:

  1. Unreal Engine 4 2.5 (2.6 is yet not supported by RuntimeMeshComponent so you need to use 2.6 or update RuntimeMeshComponent to 2.6)
  2. Runtime mesh component - In order to create a mesh (Marketplace)
  3. PerlinNoiseComponent - In order to get noise values (This component comes bundled in this repo)

Installation:

  1. Install the RuntimeMeshComponent
  2. Add libnoise library to your UE4 project. You can find how in this repo by nialna. P.S. - in the git history of this repo you can find installed version of libnose.
  3. Copy PerlinNoiseComponent.h and PerlinNoiseComponent.cpp to your Source folder. This component was made by nialna, thanks a lot to her!
  4. Copy MCubeComponent.h and MCubeComponent.cpp to your Source folder. (You can also copy MCubeActor.h and MCubeActor.cpp which is an Actor example)
  5. Add UMcubeComponent, URuntimeMeshComponentStatic and UPerlinNoiseComponent to your actor. Set Noise and RuntimeMesh variables for UMcubeComponent.
  6. Call GenerateMarchingCubeMesh() of UMcubeComponent to generate the mesh!

Screenshots:

FAQ:

1) Does the mesh have collisions?
YES, but you can disable them in MCubeComponent.cpp RuntimeMesh->CreateSectionFromComponents(0, 0, 0, Vertices, Triangles, Normals, UV, VertexColors, Tangents, ERuntimeMeshUpdateFrequency::Infrequent, true); by setting the last argument to false.

2) Can you use it as a Terrain?
Yeap, but I recomend you for this purpouse to use Voxel plugin which is cool as shit

Credits:

About

πŸ“¦3D Perlin Noise using Marching cubes algorithm for Unreal Engine 4πŸ“¦

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages