Zylann / godot_voxel

Voxel module for Godot Engine
MIT License
2.72k stars 251 forks source link

Expose SpotNoise #586

Closed Elandig closed 11 months ago

Elandig commented 11 months ago

Is your feature request related to a problem? Please describe. After some prototyping, I switched from from graph to script generator and realized that there's no spots noise. It would be nice if it was exposed.

Describe the solution you'd like Expose spot noise

Describe alternatives you've considered N/A

Additional context N/A

Zylann commented 11 months ago

For now you can obtain results of SpotNoise in a 3D grid by generating a VoxelBuffer from a VoxelGeneratorGraph inside your script generator. An alternative to SpotNoise is cellular noise in FastNoiseLite (slower) or hashing chunk coordinates, which is what SpotNoise actually does, it's a very simple algorithm: https://github.com/Zylann/godot_voxel/blob/c791460981052e8a0e80a305a03525d49df906c8/util/noise/spot_noise.h#L73

Elandig commented 11 months ago

Thanks, that's exactly what I'm doing.

Zylann commented 11 months ago

Exposed in e3d4abee2e7bd3731869a1d4872e494cf560031b

Elandig commented 11 months ago

Thanks!