# 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.

## 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 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: . Image 2: . Image 3: . PS: if you need some more code, please reply to the post. [Edited by - Disfunctional on October 26, 2009 7:58:10 AM]

##### Share on other sites
Can you post the source for Perlin.generate_noise?

##### 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!

Thanks!

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 9
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633717
• Total Posts
3013514
×