Implementing Simplex Noise

I was wondering how to calculate simplex noise in my project using C++. I know how to use simplex noise in the material editor, but cant figure out how to use it in my Actor Class . If this is possible, is there any documentation or tutorials on how to implement this?

Cross post: https://answers.unrealengine.com/questions/252936/using-simplex-noise-in-c.html
This question probably hasn’t been answered as it is rather open ended.

Yes - you can change the color of pixels in a texture using simplex noise with a pixel shader. What it sounds like you are asking is how to change the height of vertices in a vertex shader. UE4 has sacrificed some vertex shader flexibility for pixel shader ease of use (the excellent material nodes frame). You will also run into other problems trying to do this sort of thing in vertex shaders with what various brands of 3D card hardware support (vertex texture fetch).

If I was trying to do this in UE4 I would generate simplex noise on the CPU (probably easiest and quickest to use something third party like libnoise).

  1. Add a procedural mesh component (a dynamic vertex buffer) to an actor.
  2. Create an array of quads in the vertex buffer and offset the height of each vertex by the sampled simplex noise value multiplied by a scale factor.

There are plenty of (non UE4) projects on the Interwebs demonstrating how to write a procedural height field to a dynamic vertex buffer. If you want it to look good and perform well, you are going need some form of ROAM implementation.

UE4’s existing landscape system uses a fixed height map and has some form of ROAM implementation which will be writing out to a vertex buffer. You could conceivably look at adapting this code to read from simplex noise rather than a fixed height map. As the UE4 landscape system supports streaming chunks of landscape in and out I imagine this is a non trivial task.

There is a very good implementation of tileable Perlin noise in C++ here:

Check it out and integrate it into your code. Use is free by GNU General Public License, so try it and have fun!