5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

noise

Last updated at Posted at 2020-04-14

Houdiniのnoise関数をまとめた。ノイズの値はMayaの様に-1~1と固定されていると使いやすいが、Houdiniは関数毎に値の範囲がバラバラで非常に使いずらい。マニュアルに0-1と記載されているものもあるが偏りがあり実際の範囲は異なる。
以下は、freqencyを200ぐらいにした時の最大値と最小値である。0を基準におおよそ-1~1の範囲にフィットさせてみた。

HIPファイル

###Alligator Noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int turb = 5;
float rough = 0.5;
float atten = 1;
vector noise = anoise(@P*freq - set(offset,0,0), turb, rough, atten);
@P = set(@P.x, noise.y, @P.z);

###Curlnoise
image.png

float freq = ch("freq");
float offset = ch("offset");
vector noise = curlnoise(@P*freq - set(offset,0,0));
@P = set(@P.x, noise.y, @P.z);

###Perlin Flow Noise
image.png

float freq = ch("freq");
float offset = ch("offset");
vector noise = flownoise(@P*freq, offset);
@P = set(@P.x, noise.y, @P.z);

###Perlin noise
image.png

float freq = ch("freq");
float offset = ch("offset");
vector noise = noise(@P*freq - set(offset,0,0));
@P = set(@P.x, noise.y, @P.z);

###Original perlin noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int turb = 5;
float rough = 0.5;
float atten = 1;
vector noise = onoise(@P*freq - set(offset,0,0), turb, rough, atten);
@P = set(@P.x, noise.y, @P.z);

###Simplex noise
image.png

float freq = ch("freq");
float offset = ch("offset");
vector noise = xnoise(@P*freq - set(offset,0,0));
@P = set(@P.x, noise.y, @P.z);

###Sparse Convolution noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int turb = 5;
float rough = 0.5;
float atten = 1;
vector noise = snoise(@P*freq - set(offset,0,0), turb, rough, atten);
@P = set(@P.x, noise.y, @P.z);

###Voronoi noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int seed;
float f1, f2;
vector v1, v2;
vnoise((@P*freq - set(offset,0,0)),1,seed,f1, f2, v1, v2);
@P = set(@P.x, f1, @P.z);

###Worley noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int seed; 
float f1, f2, f3, f4;
wnoise((@P*freq - set(offset,0,0)),seed,f1, f2, f3, f4);
@P = set(@P.x, f1, @P.z);

###Worley (cellular) noise using a Chebyshev distance metric noise
image.png

float freq = ch("freq");
float offset = ch("offset");
int seed; 
float f1, f2, f3, f4;
cwnoise((@P*freq - set(offset,0,0)),seed,f1, f2, f3, f4);
@P = set(@P.x, f1, @P.z);
5
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?