Maya's dnoise function: What does it do and how do I implement it?
I need to write a C++ implementation of the dnoise function from Maya. However, the documentation for thi开发者_如何学编程s function is woefully inadequate for describing what this function actually does from an implementation perspective.
So, what does this function actually do? And how do I implement it?
EDIT: Found this in the documentation: "The noise functions return values of a noise field in one, two, and three dimensions. The dnoise command returns the gradient of the noise field in three dimensions."
So what's the difference between the value and the gradient of the noise field?
EDIT 2: Apparently the gradient is the function that returns a vector of partial derivatives.
Partial Derivatives
Gradient
So that answers what the function needs to do; now the question is how to compute the partial derivative of a noise function.
If you read the noise function documentation you'll discover that dnoise is producing Perlin noise in three dimensions.
There's a free implementation in C++ available at flipcode
For more theoretical background about Perlin noise see this page
Also, Ken Perlin is cool guy. Check out his work! see his homepage.
精彩评论