Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Perlin Noise

Discussion in 'Scripting' started by Josenifftodd, Mar 19, 2016.

  1. Josenifftodd

    Josenifftodd

    Joined:
    Nov 29, 2013
    Posts:
    158
    I've managed to make a perlin noise script which puts a texture across my sphere. How would I make it so I can raise different colors? so black would be the top level and then lighter going down. I can't seem to find a tutorial on this....
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,903
  3. gorbit99

    gorbit99

    Joined:
    Jul 14, 2015
    Posts:
    1,350
    A terrain has a heightmap value, just set the texteure as the heightmap and you're done. Another option would be a mesh where you use the values as points in the mesh right away instead of the texture. This also gives you the option of making caves and holes.
     
  4. Josenifftodd

    Josenifftodd

    Joined:
    Nov 29, 2013
    Posts:
    158
  5. Josenifftodd

    Josenifftodd

    Joined:
    Nov 29, 2013
    Posts:
    158
    Is they any examples you can show me so I can look through to have a better understanding? I've literally looked so much but not found anything they is ones where people have 'started and will keep everyone posted' but no more posts after. :(
     
  6. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    8,903
    some options with shaders:
    - dx11 tesselate & displacement shaders (your perlin noise texture is heightmap) : http://docs.unity3d.com/Manual/SL-SurfaceShaderTessellation.html
    - vertex displacement/extrude (see normal extrusion, using perlin texture as heightmap in vertex shader, but needs hipoly mesh) http://docs.unity3d.com/Manual/SL-SurfaceShaderExamples.html

    or do you want to walk on the sphere and use collider on the surface, or its just for display?

    tutorials,
     
    Josenifftodd likes this.
  7. Josenifftodd

    Josenifftodd

    Joined:
    Nov 29, 2013
    Posts:
    158
    Legend the last link actually is how i have my setup so that helps me loads. Thanks!