ShaderV icon indicating copy to clipboard operation
ShaderV copied to clipboard

3D Noise functions only make use of two coordinates. How to make them actually 3D?

Open bluegreen1024 opened this issue 2 years ago • 6 comments

The 3D noise functions, such as the 3D simplex noise, 3D fractal simplex noise, etc. seem to only use the first two channels of the uv, period, and offset/shift vectors. I thought the purpose of a 3D noise function was to take 3D position input and give smoothly varying scalar output. Am I misunderstanding how these are used or is this a bug?

bluegreen1024 avatar Apr 30 '23 04:04 bluegreen1024

I just saw in another thread that this plugin is meant to be 2D only. Thus I am now very confused by how the 3D and 4D functions are meant to work, and what their use case is. Apologies if this led to an off-topic issue report.

bluegreen1024 avatar Apr 30 '23 05:04 bluegreen1024

@bluegreen1024 I think you could provide (x, y) vector to "uv" input and z scalar to "z" input and it will work as expected.

arkology avatar May 03 '23 08:05 arkology

I think you could provide (x, y) vector to "uv" input and z scalar to "z" input and it will work as expected.

Sorry, but since I see a "time" input even on the 3D noise, I also find myself in a bit of a confused situation for when to use 3D and 4D. What's the difference between time and offset?

(And for the record, I also want to use this for a 3D game and I'm hoping this can provide non-repeating variation in vertex shaded meshes on outdoors locations all the way to the horizon.)

eobet avatar Jul 28 '24 14:07 eobet

@arkology could you please see if you can tell what I'm doing wrong from this screenshot here?

Screenshot 2024-07-30 191234

https://github.com/user-attachments/assets/67b125cc-63ac-4420-af31-96a6ebf13aee

I'm using local vertex coords, but still feeding node world pos into offset should get me a new "seed" per instance, but it only works for X and Y, not in the Z axis...

eobet avatar Jul 29 '24 21:07 eobet

Damn... I just noticed that if I use world vertex coordinates, and then rotate the tiles, the vertices no longer line up, which seems to imply that there's still some local calculations going on somewhere... but where?

image

I'm willing to pay to have this fixed, btw.

eobet avatar Aug 10 '24 21:08 eobet

@eobet sorry, actually I know nothing about 3d stuff so can't help you. Last time I checked it worked fine in 2d. I literally don't have enough free time and knowledge. But if you find proper fix (or find someone who can fix it), I would appreciate any PR☺️

arkology avatar Aug 11 '24 05:08 arkology