I'm trying to use the python noise function.
hou.hmath.noise1d(hou.Vector3(1.0,1.0,1.0))
but it returns 0.5 no matter the input. Am I doing something wrong?
Thanks
hou.hmath.noise1d returns 0.5
5285 5 1- burnie
- Member
- 23 posts
- Joined: July 2008
- Offline
- Anonymous
- Member
- 678 posts
- Joined: July 2005
- Offline
- burnie
- Member
- 23 posts
- Joined: July 2008
- Offline
Hi,
I know how a noise-function works. The whole idea is to get the same “random” number every time at a certain position.
The problem is
hou.hmath.noise1d(hou.Vector3(1.0,1.0,5.0))
hou.hmath.noise1d(hou.Vector3(2.0,1.0,2.0))
hou.hmath.noise1d(hou.Vector3(4.0,1.0,1.0))
all return 0.5
is this function not implemented yet?
I know how a noise-function works. The whole idea is to get the same “random” number every time at a certain position.
The problem is
hou.hmath.noise1d(hou.Vector3(1.0,1.0,5.0))
hou.hmath.noise1d(hou.Vector3(2.0,1.0,2.0))
hou.hmath.noise1d(hou.Vector3(4.0,1.0,1.0))
all return 0.5
is this function not implemented yet?
- symek
- Member
- 1390 posts
- Joined: July 2005
- Offline
burnie
Hi,
I know how a noise-function works. The whole idea is to get the same “random” number every time at a certain position.
The problem is
hou.hmath.noise1d(hou.Vector3(1.0,1.0,5.0))
hou.hmath.noise1d(hou.Vector3(2.0,1.0,2.0))
hou.hmath.noise1d(hou.Vector3(4.0,1.0,1.0))
all return 0.5
is this function not implemented yet?
Try hou.hmath.noise1d(hou.Vector3(1.01,1.01,5.01))
There must be reason for that, noise function in hscript behaves the same way. Don't ask me why
skk.
- johner
- Staff
- 823 posts
- Joined: July 2006
- Offline
SYmek
There must be reason for that, noise function in hscript behaves the same way. Don't ask me why
The results of “exhelp noise” do a pretty good job of explaining Perlin noise:
The noise is calculated on a unit-spaced lattice and then internal
points are interpolated from lattice points. This means the noise
will be independent between points one unit distance apart. You can
scale the inputs to achieve different frequencies.
Basically this means that the noise will always be zero at integer values and smoothly varying in-between. Noise1d is just shifted so that 0.5 is the median value.
Here is a CHOPs graph of 1D noise vs time. It always crosses 0.5 at integer time values:
- burnie
- Member
- 23 posts
- Joined: July 2008
- Offline
-
- Quick Links