Here is a small section of an in progress render. Currently the rendering process is very slow because it does everything at the maximum resolution everywhere, and uses a crummy slow 4D noise function. I finally got the layer management system organized enough to easily add rainfall and temperature layers to help keep the forests and deserts separate. Also, I have plans to do clever things like skip spending most of the time deciding to not render vegetation foe every under water pixel, and to vary the sample rates depending on the rate of change and visibility. This should boost speed by several times, and make all the edges sharper. With the current system, low sample rate (really fast) renders look great except for the edges, so this change should help a lot. I also touched up the texture positioning and scaling system so they should tile correctly when sections of the texture are rendered separately at arbitrary sizes. Also, it supports textures of arbitrary resolution and size, so the tile edges don't need to line up which hides the tiled artifacts pretty well.
I profiled the code a bit, and it seems that 99.5% of the (horribly slow) 6 hours spend rendering this massive texture (click for giant version. It's worth it!) was spend dealing with mask values, and the remaining 0.5% was spent dealing with the actual images and such. About 97% of the time seems to be spent getting the actual noise values. Over half the time was spent getting the elevation value from scratch 5 times per mask pixel (all 512*512*6 of them), so I can make it a lot faster there with some basic cashing. I'm guessing I can make it several times faster through some simple optimizations. Also, we are working on getting a much faster (and better) noise function, so that should help a lot too. I'm hoping to get even more detail and more layers, and have it render in less than 1/20 the time, and look much better for the resolution.
Note: These numbers are from a far smaller image and the profiler effects run time, so they may be off by a bit, but probably not too much.
This image (again, click for large version) took just under 4 minutes to render. To pull this off, I added some minimal cashing, and added a crude edge detection system. Basically it samples the mask as a grid, and if the 4 corners of any box are different by more that a specific tolerance, it sub divides the box, otherwise it fills it with a color for the corners (I just realized I forgot to average them!). The edge detection does not look inside the box at all, just at the corners, so it misses some stuff. I think by sampling larger sections of the grid, I can remove the artifacts caused by poor edge detection with out much of a speed penalty.
Also, instead of first sampling a grid, then filling in the boxes, I could draw a low resolution version, blow it up then draw over it to fix the areas that need it. This has two main advantages, it provides a continuously improving mask which is great for real time viewing, and it automatically smooths between points instead of filling with a solid average value. Thus, I'm planning to convert to this method in the future.
Here is a larger render, took 41 minutes. I think most of the time was spend doing the smooth desert blending because it does not mesh well with my acceleration algorithms. When I do the improvements mentioned in my previous post, it should allow good appearance with a much higher mask tolerance, which means this speed hang up will be pretty much eliminated. Also, I'm thinking about drawing the vegetation onto the continents. Generally, I would allow layers to be features of other layers. This means that I can use the parent layer's mask to decide if the layer will be visible (avoid vegetation computation off the edges of continents). That should only help a bit because it that is already accelerated. I also want to take advantage of layer order. If I draw the top layers first, then looking up at them lets me know if a give point will be visible. If it is fully hidden, then I don't have to draw it at all, and if it is partly hidden, I don't have to do full detail. I guess if I do this, and make water the top layer (well, below ice), it handles the continent issues.
I'm working on a series of low resolution zoom pictures to see how well the detail scales. I will post them soon.
Edit: Here is a crummy zoom pdf showing zooms of 1,2,4,8,16,32,64,128 and 256 times. The furthest zoomed out ones were the slowest. They took about 10 seconds depending on the location. The further zoomed in ones wer much faster, though their quality is poor.Edit2: I just found a bug that causes those block bugs. It should help a lot. I'll put up a new post with some new renders later.
18 Minute render. I think it looks a lot better than yesterday's 6 hour render. If you look at the edges closely you can see the square artifacts from my sampling pattern. Overall I think it is pretty good. I have not done any of the layer coverage awareness or modified/improved sampling methods. I'm just using some improved tolerance tuning, that it. I expect to be able to half the time again at least through lowering the resolution where covered, and just tuning stuff some more. When we get our new noise function, I expect another double in speed.
19.4 second render. I now have adjustable quality independent of mask resolution. This image has a quality of 0.125. Also, when I implement the resizing low resolution images instead of grid sampling, it will smooth every last one of those boxes. Might be a bit faster or slower, but I'm not sure.
Also here is a 387 second render (while my computer was doing some other stuff) with the exact same settings except a quality of 1. I can also set the quality higher if desired.looks nice but can there be a better transition between jungle/forrest and the surrounding terrains?
Those ice caps are amazing!
looks nice but can there be a better transition between jungle/forrest and the surrounding terrains?
I was experimenting with that. The question really comes down to what is better? When you zoom in on a real forest, they have reasonably soft but distinct edges on the small scale. Wen you zoom out, the transition zone shrinks away, and you get hard edges, which are also bad. I think I need something like logarithmic tapering or something so the taper has the same appearance across scales. Also of note is that hard edges draw faster, especially with the sampling algorithm shown here. Really it is just a tuning issue, but thanks for the input.
Those ice caps are amazing!
Thanks. I'm really happy with them too. I think I might have to so a separate soft edged snow layer so I can make snowy forests with out disrupting the ice layer.
Check it out:
(www.oera.net)
You are right Craig, the transitions are more sudden than I thought. The problem is that there are more textures between that makeup the transition. See the rainforest in the center of Africa as an example. There are dark green parts, green parts, light green parts, olive green parts, and brown parts.
Do we need more textures?
Edit: Sorry about the size…
I should have been more clear in my post. If we apply something like logarithmic tapering, we effectively get pretty hard edges, but some variance in opacity away from the edges.
After a 2 days of experimenting with a different sampling method, I think I have realized that the one I had before is much better, though I never got it fully working. Hopefully I can drop in into my new mask management classes, and adjust it to work. Then I can get images like that 19 second one again. Thats about 3 seconds per panel. With that speed I can probably pre-render at least that resolution. Then if I up the minimum square size (lower the mask size) it should do a bit quicker and get a tad of smoothing from the resize. Add in variable settings for different layers (do water at higher accuracy on top so the vegetation can have rough edges covered over.