Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: Noise functions

  1. #1
    Intern Contributor
    Join Date
    Jan 2004
    Posts
    75

    Noise functions

    Can anyone explain to me how to use the noise functions?Whatever the input is,the output is always 0.0

    I'm using GFX5200 (56.64 drivers)

  2. #2
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: Noise functions

    noise functions are not yet implemented in those drivers.
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  3. #3
    Intern Contributor
    Join Date
    Jan 2004
    Posts
    75

    Re: Noise functions

    I was afraid of that.Do you know if they're going to support it in future drivers or i have to buy a new card?

  4. #4
    Advanced Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    596

    Re: Noise functions

    its very possible that you dont get HW accelerated noise in current generation cards. ATI has noise implemented but that throws the shader to software render. Why not upload a 3d texture and lookup until we know that noise works in hw?

  5. #5
    Member Regular Contributor
    Join Date
    Apr 2002
    Location
    Austria
    Posts
    328

    Re: Noise functions

    Why not upload a 3d texture and lookup until we know that noise works in hw?
    Why isn't it possible that the driver does exactly this for you? So noise can also be used...
    There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.

    There is another theory which states that this has already happened...

  6. #6
    Advanced Member Frequent Contributor
    Join Date
    Oct 2001
    Posts
    596

    Re: Noise functions

    since that takes a textureslot? well, i guess they can make it that way, but they havent yet

  7. #7
    Senior Member OpenGL Guru Humus's Avatar
    Join Date
    Mar 2000
    Location
    Stockholm, Sweden
    Posts
    2,345

    Re: Noise functions

    I'm not sure the texture way would be conformant. It would be a repeating noise function. I think the spec requests a non-repeating noise function.

  8. #8
    Intern Contributor
    Join Date
    Jul 2001
    Location
    Santa Clara, CA
    Posts
    84

    Re: Noise functions

    Well, all noise implementations repeat at some point, it's just a question of what the period is.

    We do have pixel shader implementations of real Perlin noise, but they take about 40 instructions. For now I recommend people just use 3D texture lookups.

    Originally posted by Humus:
    I'm not sure the texture way would be conformant. It would be a repeating noise function. I think the spec requests a non-repeating noise function.

  9. #9
    Junior Member Regular Contributor
    Join Date
    Sep 2002
    Location
    Germany
    Posts
    205

    Re: Noise functions

    I want to use this Perlin Noise implementation for CPU based noise calculations. But this is a function from R^3 to R.

    What would be the best way, to extend it for the GLSL suggested noise functions:

    Code :
    float noise1(float);
    float noise1(vec2);
    float noise1(vec3);
    float noise1(vec4);
     
     
    vec2 noise2(float);
    vec2 noise2(vec2);
    vec2 noise2(vec3);
    vec2 noise2(vec4);
     
     
    vec3 noise3(float);
    vec3 noise3(vec2);
    vec3 noise3(vec3);
    vec3 noise3(vec4);
     
     
    vec4 noise4(float);
    vec4 noise4(vec2);
    vec4 noise4(vec3);
    vec4 noise4(vec4);

  10. #10
    Intern Contributor
    Join Date
    Jul 2001
    Location
    Santa Clara, CA
    Posts
    84

    Re: Noise functions

    Usually vector-valued noise is implemented on top of scalar noise by simply evaluating the noise function several times at n random offset positions, e.g.:

    vec3 noise3(vec3 p)
    {
    return vec3(noise(p),
    noise(p + vec3(31, 72, 54),
    noise(p + vec3(156, 87, 99));
    }

    This is obviously n times more expensive than scalar noise.

    Perlin doesn't give the code, but the algorithm can be extended to other dimensions.

    Originally posted by Hampel:
    I want to use this Perlin Noise implementation for CPU based noise calculations. But this is a function from R^3 to R.

    What would be the best way, to extend it for the GLSL suggested noise functions:

    Code :
    float noise1(float);
    float noise1(vec2);
    float noise1(vec3);
    float noise1(vec4);
     
     
    vec2 noise2(float);
    vec2 noise2(vec2);
    vec2 noise2(vec3);
    vec2 noise2(vec4);
     
     
    vec3 noise3(float);
    vec3 noise3(vec2);
    vec3 noise3(vec3);
    vec3 noise3(vec4);
     
     
    vec4 noise4(float);
    vec4 noise4(vec2);
    vec4 noise4(vec3);
    vec4 noise4(vec4);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •