Worley's Caves

Worley's Caves

7M Downloads

[Question/Suggestion] Multithreaded Noise

Darkhax opened this issue ยท 2 comments

commented

There is a mod called Multithreaded Noise which aims to improve world generation times at the expense of seeds resulting in identical seeds. I noticed this mod is using its own noise generator, and was wondering if it would be able to take advantage of their multi threaded noise, or if it may be possible to see this mod implement it's own multithreaded noise option.

commented

Possibly, I haven't worked much with threading but I assume it would be possible to split the 4 noise calls to different threads. I'm not sure if it would have much of an impact though, since I believe something like 85% of the time spent on noise functions comes from a single expensive call to get the cellular noise. Something to look at

commented

I guess a better way would be to multithread the noise sampling by splitting the sampeled section into a number of slices along the x, z or y direction where each slice gets sampeled by their own threads, that should make the load balanced accross the threads more uniformly, and the thread instancing and merging more efficient. All the noise algorithms used should be safe with multithreading the way they're used as far as I'm aware of (or making them if not should be trivial). It might even be possible to multithread the "digging" part of the cave generator also, but I beleive there is relatively little to gain from going all the way there, tho I might be wrong on this.
Generally it would be nice to do a little profiling again before setting of into multithreading tho. Will see what I can figure.