Oddlabs Forum

It is currently Wed Jun 19, 2013 1:13 pm

All times are UTC + 1 hour




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 
Author Message
 Post subject: Hydraulic Erosion Algorithm causing Isolated Peaks?
PostPosted: Sun Apr 30, 2006 8:15 pm 
Offline

Joined: Sun Apr 30, 2006 8:09 pm
Posts: 4
Hi,

I have been going through your paper on real-time procedural terrain generation.

One artifact that I am seeing is isolated, one-pixel peaks that are created by the new erosion algorithm. As a result the terrain looks good except for some flat areas that have isolated vertices that are too high, causing spikes.

Did you guys come across this problem?

The paper is excellent by the way. I am really enjoying working through it.

Thanks
Todd

edit for clarification - The algorithm that is causing the spikes is the new algorithm proposed in the paper (not the speed optimized hydraulic erosion algorithm)


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 2:38 pm 
Offline
User avatar

Joined: Fri Sep 26, 2003 6:34 pm
Posts: 71
Some of the hydraulic erosion algorithms suffer from wild oscillations if the parameters are too large (i.e. too much happening per iteration), but I actually haven't seen any strange artifacts or oscillations from the thermal erosion type algorithms (neither the normal one or the new inverse thermal erosion). Under what circumstances does it occur?

There has been a lot of interest in the paper, so I have decided to release the source code used for generating textures and terrains in the hope that someone can come up with improvements and new ideas.

It'll take some effort to untangle it from Tribal Trouble and make into a stand-alone software package (not to mention writing some documentation... yikes!), but with a bit of luck I should be able to launch it this summer along with a website about procedural content generation techniques.


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 02, 2006 4:23 pm 
Offline

Joined: Sun Apr 30, 2006 8:09 pm
Posts: 4
Hi Jacob,

That sounds great. I would love to see more of your work. The paper was really nicely done and I have enjoyed going through it and understanding how you finally came to the new technique. The environment in Tribal Trouble really looks fantastic.

Given that you haven't seen any artificats, maybe I have made a mistake.
Here is what I am doing:

standard Von Neumann neighborhood (not rotated)
in-place modifications to the heightmap
256x256 heightmap (which causes other aliasing issues)
T = 0.0625 (T is muliplied by the range of the heightmap to get the height threshold)
iterations = 50

Here is a screenshot of the issue (please excuse the textures, they are programmer art):
http://www.tormentedgames.com/images/pr ... lSpike.png

And in Figure 31 I thought I was seeing a similar artifact, here is what I mean:
http://www.tormentedgames.com/files/spike.png

Thanks again for your help.
Todd


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 03, 2006 3:20 am 
Offline

Joined: Sun Apr 30, 2006 8:09 pm
Posts: 4
Another update...

I was able to eliminate 90% of the spikes in my terrain.
When moving "dirt" I replaced:
H = H - delatH
Hi = Hi + deltaH
with
H = H - deltaH
Hi = H

So, it look like a big part of my problem was precision. When converting from the 0..1 range to height values ranging from 0..255 an imprecision would result in a one pixel difference which made a bunch of the spikes. I am guessing that my remaining problems are also precision issues.

edit - I am fairly confident that the remaining spikes are indeed a precision issue when leveling the terrain.

Are you using an 8-bit heightfield or 16-bit? A 16-bit heightfield would handle this much better. It would also explain why your terrain looks alot smoother than mine.

Thanks again for any help.
Todd


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 8:44 am 
Offline
User avatar

Joined: Fri Sep 26, 2003 6:34 pm
Posts: 71
Interesting - you're right, it actually looks like there are some minor spikes in my own screenshots :)

Both the algorithm used for the paper and for Tribal Trouble use 32 bit floats for height values, so that might explain why I haven't been bugged as much by precision induced artifacts. In Tribal Trouble, I also add a bit of smoothing after the erosion iterations - just a simple 3x3 convolution matrix with all values set to 1/9 (i.e. each point is set to the average of itself and its 8 immediate neighbors). This usually takes care of minor spikes and especially the jagged edges at the top and bottom of steep cliffs (you can see these clearly at the top of your own screenshot: http://www.tormentedgames.com/images/pr ... lSpike.png).


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 04, 2006 3:38 pm 
Offline

Joined: Sun Apr 30, 2006 8:09 pm
Posts: 4
Jacob,

That is really helpful. A guy I am working with suggested the exact same thing...averaging each pixel with its neighbors. I am increasing the precision of our heightmap and will apply the filter as well.

If we come up with any neat modifications I will be sure to share them here or on your pending website.

Thanks again.
Todd


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 23, 2006 12:08 pm 
Offline

Joined: Sun Oct 22, 2006 8:09 pm
Posts: 115
Location: UK
That is intersing


Last edited by PA on Tue Oct 24, 2006 8:44 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 1:41 am 
Offline
User avatar

Joined: Thu Sep 07, 2006 3:35 am
Posts: 859
Location: pacific islands
parsa this subject is dead do not post anything!!!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 8:44 am 
Offline

Joined: Sun Oct 22, 2006 8:09 pm
Posts: 115
Location: UK
razor are you following my posts because it seems like it


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 8:46 am 
Offline
User avatar

Joined: Thu Sep 07, 2006 3:35 am
Posts: 859
Location: pacific islands
follwoing your posts what do you mean by that? i read every no post that is made if i have enough time to respond or is necesary


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 8:48 am 
Offline

Joined: Sun Oct 22, 2006 8:09 pm
Posts: 115
Location: UK
razor wrote:
follwoing your posts what do you mean by that? i read every no post that is made if i have enough time to respond or is necesary



if you go back to the forms on the bottom it tells you who is online. if you click on their name it tells you all their posts..........................


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 24, 2006 8:51 am 
Offline
User avatar

Joined: Thu Sep 07, 2006 3:35 am
Posts: 859
Location: pacific islands
yeah i knew it does that but why did you bring that up?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 0 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