It is currently Sat Aug 22, 2020 4:12 am


All times are UTC




Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: fractal noise generator?
PostPosted: Wed Mar 09, 2011 12:46 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Anyone might have a fractal noise class/function for c++? I found only one explanation of the math but didn't manage to apply it properly.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 5:10 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
The libnoise tutorials does a good introduction to "noise"

http://libnoise.sourceforge.net/tutoria ... rial2.html

I'm currently using a library called noisepp (you can download it; it's home page is offline though)

http://sourceforge.net/projects/noisepp/

It supposedly incorporates several optimizations not available with libnoise. Although I haven't done extensive testing since I'm just trying to get my game together right now. Another plus is that it's API is directly compatible with libnoise.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 5:45 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Are you sure? When I tried libnoise it was SUPER slow, took ages for small regions to work.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 6:46 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
I said I'm using noisepp because it's supposedly faster than libnoise. I'm not using libnoise.

And it depends on what you mean by fast. If you are generating 3D terrain with a bunch of "filters" it's may take awhile. For me, I'm only generating 2D terrain at the moment. When I was doing 3D noise it wasn't excruciatingly slow, it was decent.

The only way around it is implement it yourself and optimize the crap out of for multiple cores. I was planning on implementing it for OpenCL, just haven't got around to doing it.

Either way you have to realize depending on the terrain you expect it will have to generate a lot of data. R^3 is not to be trifled with, lol.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 6:51 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
See this post where I have some times for how long it takes me to generate a 32x32x256 patch. Without the compression stuff it takes 0.04 ms so well above 60fps (with compression it's still around 60fps). Note that however, I'm only generating a 2D type terrain. BUT, for Minecraft style 3d terrain you should expect the same timing. I say this because I think Minecraft he only uses a single noise FBM "type"--i.e Perlin. Whereas in my setup I'm using a multifractal and perlin, plus other filters.

I don't know for sure though. You just have to mess around with it. I'm only at the beginning with my own terrain generation, I just have something up and running there is still a lot of work left to do.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 6:58 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
Oh btw I'm using threads via a task-based system. So it doesn't really appear like it's slow... once the entire terrain is generated, new patches can be generated and it doesn't seem to slow down my rendering because generation and rendering are decoupled.

Maybe that's the reason why it feels so slow for you. You are generating them in sequence in a single thread.

Add: I also tried it on a single core machine with thread it still feels responsive. The overall generating may be slow but it's just as interactive as on my multicore machine. I think the trick is to decouple generation from rendering.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 7:13 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
Are you talking about libnoise or the app? cause libnoise is kinda known to be not for real time.

About the app, is it fractal noise or perlin noise?


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 7:16 pm 

Joined: Fri Feb 18, 2011 8:41 pm
Posts: 173
here you go:

http://www.ogre3d.org/forums/viewtopic. ... 1032dd0e69

there is a performance comparison just for that reaaon :)


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 8:03 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
My game is using noisepp so whatever noisepp supports so I guess it's coherent noise. Hey I'm not really at the point where I'm exploring options for generating terrain. I using noisepp right now and it works for me, decently enough so I can work on other aspects of my app.

Also, i'm confused on when you say fractal noise. When I think of Perlin noise I categorize that as a fractal noise because of self similarity. Do you have something else in mind when you say "fractal noise". Maybe midpoint displacement or something? I know these coherent noise functions are suitable for my needs because they generate 3D noise. I've messed with things like midpoint displacement but only for 2D and I'm not sure whether it carries over to 3D or not.


Top
Offline Profile  
Reply with quote  
 Post subject: Re: fractal noise generator?
PostPosted: Wed Mar 09, 2011 8:31 pm 

Joined: Sat Sep 18, 2010 9:45 pm
Posts: 189
Hey Notch made a post on terrain generation just now. He generates 3D noise at a lower resolution then interpolates.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net