0
\$\begingroup\$

Is it possible to develop a 3d gradient noise algorithm, that also given a ray (origin + direction) returns the closest hitpoint? Without constructing the actual geometry (grid, bricks, octree, etc)?

\$\endgroup\$
5
  • 1
    \$\begingroup\$ It sounds like you're describing raymarching, which solves this problem iteratively - each noise evaluation giving a distance estimate for how much farther the ray needs to march to reach its intersection. I'm not aware of any ways to compute this in just a single invocation except in special cases. \$\endgroup\$ – DMGregory May 5 at 12:18
  • \$\begingroup\$ Yeah I was hoping for single or couple invocation solution. Raymarching is pretty heavy. \$\endgroup\$ – trshmanx May 5 at 12:53
  • 1
    \$\begingroup\$ Try editing your question to tell us more about your specific application. We might be able to find a special case that fits your needs. \$\endgroup\$ – DMGregory May 5 at 13:05
  • \$\begingroup\$ I think the question and intention is very clear. I want to raycast procedural geometry (noise, sdfs) without actually creating it in some form. After thinking more and reading some stuffs i think it's pretty unreal or some nobel prize math. So I am thinking now to first create a octree from noise etc and the raycasting it. \$\endgroup\$ – trshmanx May 6 at 9:00
  • \$\begingroup\$ What I mean is there are lots of people raycasting procedural noise, and they're not all drawing the same things. Some are drawing terrain, some are drawing clouds, some draw fractal sculptures, etc. So the particulars can sometimes help us narrow down the general technique to something more tailored to your use case. We have some past discussion of using octree optimizations for rays through noise volumes that might give you some ideas. \$\endgroup\$ – DMGregory May 6 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.