OZONE Asylum
Forums
DHTML/Javascript
3D Procedural Landscape using Canvas
This page's ID:
31012
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Well, I've been working on this off and on for the last couple weeks. It's looking much nicer these days (and runs much faster, due to a number of optimizations placed here and there). http://lonelypinkelephants.com/landscapes.html It also has some very nice reference functions in the source, for rasterizing a polygon, generating perlin noise (by hand), and the miscellaneous 3D stuff, so it may be worth looking at for those who don't know how to do such things. :) Still havn't fixed the seams -- every solution I've tried so far has artifacts that look just about as bad as the seams themselves. I notice that Satoshi Ueyama has made some attempt to use the 2D Canvas as fallback and try the newer 3D things if they exist ( http://gyu.que.jp/jscloth/touch-opera-gecko.html ), but I can't get any of them to work other than the 2D one, so it's probably worth waiting another few months to see if any standardization comes along. @Arthurio: I've minimized the amount that water creeps up onto the hills (and improved the overall quality of the terrain) by passing the terrain through a "flattening" step: after the terrain is generated, the heightmap is normalized to roughly -1 (deepest ocean) to 1 (tallest mountain). After that, I square the height, which has the benefit of keeping mountains tall but making land near sea level very flat and even. Thus, since terrain near water tends to be flatter, water creeps up the hills less. [small](Edited by [url=http://www.ozoneasylum.com/user/6658]iron_wallaby[/url] on 06-06-2009 23:30)[/small]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »