Topic: 3D Procedural Landscape using Canvas |
|
---|---|
Author | Thread |
Nervous Wreck (II) Inmate From: |
posted 05-16-2009 03:31
So this is why I was playing with Perlin Noise... |
Nervous Wreck (II) Inmate From: Portland Oregon |
posted 05-16-2009 05:50
I wonder if it would be possible to interpret google map elevations and make the terrain map. |
Nervous Wreck (II) Inmate From: |
posted 05-16-2009 13:20
The difficulty with using the typical heightmap => polygon mesh scheme is that a grid is actually a terrible way to specify a heightmap if you are looking to use as few polygons as possible (which we are, since Canvas isn't very fast). You also tend to get a lot of distortion that way since we're using affine textures. Going with a equilateral/hex grid minimizes both of those problems, but then you need a new way to generate the heightmap. (In my case, I build the polygon mesh first, convert it into a heightmap, and then use the heightmap to make the texture map.) |
Nervous Wreck (II) Inmate From: |
posted 05-20-2009 01:27
Updated. Now doesn't use any getImageData or putImageData operations, so it's more compatible across a wider range of browsers (including Chrome, in which it is a thing of beauty). It also isn't crippled by Safari/Chrome's horrible image interpolation (as I generate the Perlin noise manually). |
Paranoid (IV) Inmate From: cell 3736 |
posted 05-20-2009 10:52
Very cool stuff. I know it's not that important but it bugs me that there's some water on the slopes |
Paranoid (IV) Inmate From: Norway |
posted 05-20-2009 11:16 |
Nervous Wreck (II) Inmate From: |
posted 05-20-2009 16:05
Arthurio: heh, yeah. I don't think there's a good way to solve that the way I'm currently doing it. Luckily, the "final" view (for the project I'm toying around with) will be nearly top-down, so that artifact will hopefully not be noticeable. |
Paranoid (IV) Inmate From: Norway |
posted 05-20-2009 16:11
(\/)oO(|) ...snap double post |
Paranoid (IV) Inmate From: Norway |
posted 05-20-2009 16:14
"Extending" the vertices will have the side effect of having the tip of the triangles overlap on sibling triangles. |
Nervous Wreck (II) Inmate From: |
posted 06-06-2009 23:25
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). |
Nervous Wreck (II) Inmate From: United States |
posted 06-07-2009 01:47 |
Maniac (V) Inmate From: zero divided. |
posted 06-07-2009 13:40
Without plugins? I wouldn't pretend to know. |
Paranoid (IV) Inmate From: Norway |
posted 06-07-2009 16:13
Of course browsers will use HW acceleration. It's just a matter of time. The BIG problem is how to support multiple platforms and not ditch "older" or less capable platforms without leaving some code to rot or requiring to increase significantly the number of developers in order to maintain multiple rendering pipelines. |
Paranoid (IV) Inmate From: cell 3736 |
posted 06-08-2009 11:55
My personal opinion is that canvas, java and flash are all we need for interactive web graphics ... and canvas is the least important of them. It's better if the development of this kind of thing is handled by someone other than the browser developer. Keeps it consistent across platforms. Take flash for example, it's quite fast and feature rich despite the lack of serious competition. It works in every major browser and operating system. So despite it's little quirks it's generally a pleasure to develop. Contrary to canvas, js in general and html that are a major pain in the ass because all the implementations are different. |
Nervous Wreck (II) Inmate From: |
posted 06-08-2009 20:06
I tend to disagree. Java is too heavyweight to be useful a lot of the time (though it's feature set makes it awesome it certain cases), and if you think Flash is well supported everywhere, Linux would like to have a word with you. (It's better than it was a year or two ago, but it's still pretty horrifying.) |
Nervous Wreck (II) Inmate From: |
posted 05-31-2011 11:08
Edit TP: spam removed
|