|written by Kynreeve on Feb 03, 2009 20:33|
|In Photoshop there are some ways how to do a simple noise or diffusion. Recently i was playing with em and it came out like something very interesting, something that you guys gotta check out.|
Here are four maps that i made using a few PS procedures and adjustments (more on them further). There you can see some rivers, a canyon, a mountain chain and a lake:
Now for a step-by-step explaination of what i`ve actually done (especially for those of you who are familliar with PS):
- First i created this image (IMMDFM "NICE" uses similiar terrain maps). Those are simple airbrush daubs.
"Difference clouds" filter and auto level adjustment (just to add more contrast)
And finally, an "Emboss" filter.
So what do ya think? Is there any way to simulate those transformations using our own code? If there is, maybe we could "upgrade" NICE terrain generation algorythm and put it in Noctis V?
|So, I'm assuming that these are concept hightmaps here? Interesting. But, I see three potential problems:|
Firstly: These hightmaps would have to be generated while 'loading' the planet, and deleted upon leaving the planet or sector. Otherwise, the amount of space required to store these would be huge, I would think.
Secondly: It might be difficult for a computer to work out how much of each filter should be used. Think of it this way: as a human, when you're applying a filter for a hightmap, you know how much to use, because you can see what looks good. Computers can't do that.
Thirdly: It might also be difficult to generate the initial daubs.
Don't get me wrong, it's a great idea. I love it. There might just be a bit of work getting it all to work together thousands of times over.
It's certainly possible, as I've coded some similar terrain generation algorithms in Lino. Mine are typically based off a fractal terrain algorithm, which would be comparable to Photoshop's clouds filter. From there, objects like hills, craters, and valleys can be added to the terrain to produce more variation, and noise, blur, and other algorithms can be applied to create features like plateaus, cliffs, and more detailed features. The actual implementation can be more complex when working with continuous terrain though, as you need to avoid seams along the edges of heightmaps as much as possible.
|So what do ya think? Is there any way to simulate those transformations using our own code?|
One thing to point out is that your embossed version wouldn't create mountains or dunes when used as a heightmap, as the image might at first suggest. Since the light and dark areas are at opposite extremes in terms of height, the apparent ridge between them would in fact be a near vertical cliff. Of course, those might make for interesting terrain features as well. It should just be noted that all the cliffs would be facing in the same direction. : ) Actually, the embossed version isn't so much a heightmap as it is a lightmap, which can be applied to the pre-embossed terrain.
That would, of course, be a given. When you first land on a planet, you would initially have your current sector, and the sectors surrounding it generated. There would probably be a continental-scale heightmap as well. As you move to adjacent sectors, the new surrounding sectors could be generated. Once the heightmap cache is full, the sectors farthest away from your current location could be offloaded to make way for new ones. As soon as you leave the planet, all existing terrain could be freed from memory, or simply left in the cache until you visit another planet. The actual generation code has the potential to be reasonably fast so long as it's optimized.
|Firstly: These hightmaps would have to be generated while 'loading' the planet, and deleted upon leaving the planet or sector. Otherwise, the amount of space required to store these would be huge, I would think.|
Except that the programmer can determine that, and place limits accordingly. The resulting ranges in which terrain features look good can guide the computer into randomly generating realistic terrain. It might not necessarily be a hard limit, to allow for extreme terrain features, but it would make those significantly less common.
|Secondly: It might be difficult for a computer to work out how much of each filter should be used. Think of it this way: as a human, when you're applying a filter for a hightmap, you know how much to use, because you can see what looks good. Computers can't do that.|
The initial hills and craters should be no problem. Just randomly sprinkle overlapping circular gradients around. : )
|Thirdly: It might also be difficult to generate the initial daubs.|
A rough example of the results of some of these techniques can be seen in this (old) screenshot of a game I was working on in Lino, and probably should get back to at some point. : P
cd/pngs/Cryoburner/s3k011306 (438 Kb)