Jump to content
  • Advertisement
Sign in to follow this  

Implementation of perlin noise / solid noise

This topic is 3336 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I've a question about how to do a perlin implementation. I've got this book: Fundamentals of Graphics - Peter Shirley . And it shows about everything how to implement perlin noise. However I can't seem to get an effect like: (see image 1) Now my effect is more like: (see image 2) Using linear interpolation. Using absolute, I get a nice effect! But it doesn't even look like image 1 =(. (see image 3) Here is location when a ray in my ray tracer hits an surface of an object that has perlin texture.
float noise = Perlin.generate_noise(location);
// Generates perlin noise (see also Fundamentals of Computer Graphics - Peter Shirley)

noise = (noise + 1)/2;
// see Fundamentals of Computer Graphics - Peter Shirley
// Linear interpolation

// noise = Math.abs(noise);
// Absolute noise

material_color = material_color.times(1 - noise).add(material_perlin.times(noise));

// material_color is an object that contains the true material color

Can someone point me in the right direction of achieving such patterns? Thank you, Disfunctional Some images, because else my post would look a bit ugly formatted in my opinion: Image 1: Perlin noise with Absolute values. Image 2: Perlin noise with my own implementation. Image 3: Using absolute noise, perlin noise.. PS: if you need some more code, please reply to the post. [Edited by - Disfunctional on October 26, 2009 7:58:10 AM]

Share this post

Link to post
Share on other sites
Yes, I was about to post it but then something caught my eye.

I did something wrong in the computation, a typo slipped in. Im sorry. This thread is solved!


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!