Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NoiseTexture3D #76486

Merged
merged 1 commit into from
Apr 27, 2023
Merged

Add NoiseTexture3D #76486

merged 1 commit into from
Apr 27, 2023

Conversation

Lasuch69
Copy link
Contributor

@Lasuch69 Lasuch69 commented Apr 26, 2023

Implements NoiseTexture3D resource based on existing NoiseTexture2D implementation scaled to third dimension, and modifies it to support custom depth coordinates when generating noise in 3D.

Supports seamless generation, modulation with gradient, and normalization. Lacks mipmap generation because of a bug in core #56066

@Lasuch69 Lasuch69 marked this pull request as ready for review April 27, 2023 14:49
@Lasuch69 Lasuch69 requested a review from a team as a code owner April 27, 2023 14:49
@Calinou Calinou added this to the 4.x milestone Apr 27, 2023
Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally (rebased on latest master), it works for both FogVolume and GPUParticlesAttractorVectorField3D use cases.

Usage notes:

  • You may have to increase the fog volume size and volume depth in the advanced Project Settings for noise in fog to be more noticeable. This has a performance impact.
  • Remember to use a color ramp with GPUParticlesAttractorVectorField3D, so you can adjust each axis individually. Also increase its strength and increase particles damping, so direction changes are more noticeable on the particles themselves.

Testing project: test_noisetexture3d.zip

image

@akien-mga akien-mga merged commit fb3d3bf into godotengine:master Apr 27, 2023
@akien-mga akien-mga modified the milestones: 4.x, 4.1 Apr 27, 2023
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@sosasees
Copy link

sounds like voxel terrain generation will be slightly easier with NoiseTexture3D

related: my first voxel terrain generation attempt in Godot (4.0 alpha 13)

@Lasuch69
Copy link
Contributor Author

sounds like voxel terrain generation will be slightly easier with NoiseTexture3D

related: my first voxel terrain generation attempt in Godot (4.0 alpha 13)

Using get_noise_3d will be a better option.

@sosasees
Copy link

Using get_noise_3d will be a better option.

i just looked through my voxel project that i mentioned, and i used Noise.get_noise_3dv() to determine if any coordinate should have a block at startup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NoiseTexture3D
6 participants