Procedural Texture Generation

I am currently working on creating procedural textures for a planet surface. I read many articles on algorithms to achieve it but, I am not sure how to do it in UE4.

In past i managed to cheat it by using Material editor noise functions but now, I need a lot of control over the texture so I want to generate it procedurally. Any leads on where should I start from?

If you know how these algorithms work it shouldn’t be too hard to implement them with the material editor or unreal shader files. Any specific example you are struggling with?
Performance will be an issue if you go fully procedural, which means each texture is created purely from scratch at runtime with maths. Using a semi-procedural approach with some pre-rendered textures is probably your best bet.

How exactly is that cheating? Noise functions is where many procedural textures start from.

I don’t want to use material editor. I want to do it in some way using c++ so that I can have more freedom. Any more info I can find on unreal shader files? I am not sure which is effective, procedurally generating textures or materials.

I plan to use semi-procedural generation. Like generating a grey scale image and blending between a few textures I already have.

-----Edit--------

I don’t think writing shaders will achieve what I want. E.g. I have a planet surface and I have craters of different types What would be the best method to procedurally generate the craters over the planet surface?

I don’t think I can do something like that with material editor alone. I cant find anything regarding procedurally generating 2d Textures.

For complex static procedural effects, such as a planet surface, you’re better off generating the textures as this means you only have to render them once and you don’t have to be able to generate them in real time. This allows a lot more complex and realistic effects than you could manage purely using the material editor.

You would likely want custom materials to actually render these procedural textures too and make them look at good as possible, but the procedural heavy-lifting should be outside of the actual material rendering wherever possible.

Hello,
Not sure it will helps for what you are looking for but with instanced materials you can set your textures to texture object parameter and with more parameters (scalar vector color etc) you have a lot of possibilities to set your material.

This does not sound overly complex and can be done with materials. For something like craters on a planet I’d start with voronoi noise.

Well, there might be specific tutorials missing for UnrealEngine but you can translate most of the math/algorithms from other tutorials to the material editor.

Any idea on which class should I check in UE4 to create textures during run time?

Voronoi noise looks like a good algorithm for what I am looking for. Can you give any more suggestions?