Deviation Actions

phresnel's avatar

Like a bird in the sky

By phresnel
At first, for the curious (skip this if you already know picogen): picogen is a free terrain renderer and synthesizer which is currently being developed. There is not yet a download available, but if you are interested, you might want to watch #picogen , where the releases will always be announced in the future. You also might want to visit [link] to find other channels of information :)


After assimilating the original reference code of the Utah Sun/Sky [0] into picogen [1] which had some consequences like switching to spectral colours [2], the volume rendering exposed some glitches. After fixing it, and adding an approximate bounding-plane to the exponential fog as featured in this image, all was fine again.

And fast: Two days ago, the image above would have been rendered, in that quality, in like 2 days on quadcore. Now it rendered in just 3.5 hours. I love when a simple optimization gains you so much :)


[0]: Preetham/Shirley/Smits: "a practical analytic model for daylight"
[1]: more images showing off the sky later, the aerial perspective stuff is astounding
[2]: not really mandatory, you can get away with tristimulus colors like xyY or the classy RGB for a long time, but I wanted to do it manly
Image details
Image size
1680x600px 939.49 KB
Published:
© 2010 - 2021 phresnel
Comments16
Join the community to add your comment. Already a deviant? Log In
Miarath's avatar
Looks gorgeous. :) Great to see such an improvement in render time, too.
phresnel's avatar
And there's still a lot of potential optimization to be done :D
Miarath's avatar
Hmm, I'm sure there is, but it would be sad if there're nothing to make better and all or wouldn't it?
phresnel's avatar
Indeed, you are perfectly correct :)

Seeing old and established code perform better after some optimizations is a great feeling for any number-crunching-programmer :)
Miarath's avatar
:nod: I know, even if it's sometimes maddening doing them.
phresnel's avatar
Indeed. And with bugs, my reaction often goes like :stupidme:

Haha :)
Miarath's avatar
Hmm, yes, bugs indeed. Reminds me of 'why' they are called that in the first place.
View all replies
angelitoon's avatar
This is really awesome! :dance:

But why the rendering take so much time?
Do you use multilevels terrain definitions, multithreading & kdtree partitionning?
phresnel's avatar
oh, and of course also have a look at the render times of the imagess over at [link] , where most ppl use POV-ray (hint: they lie between 2 and 20 hours) :D
phresnel's avatar
:)

Different factors cause the rendering time:

* The heightmap is defined by a user-definable lisp-like program (line 55ff in [link]) , where the execution of that program is relatively slow at the moment (picogen 0.4 will be much, much faster)

* The heightmap is quite massive and created lazily, during running, unused nodes are deleted. This is a compromise of speed and memory.

* Many samples per pixel, related to anti-aliasing (for this image, it was 15 samples per pixel, so if you want, this image really has size 25200x560 pixels)

* Volumetrics: Inside the volumes, I must go step by step along the ray, evaluating wether the particle is lit or not (there exists no analytical method to do this, and pre-computation needs: a lot of memory (more than most of us have handy) and a lot of time


So all in all, considering that this render is precomputation PLUS rendering, and that this system is relatively general (in contrast to a totally specialized renderer), I think the time is not too bad actually :)
You're right it's not too bad!
I wasn't thinking about anti-aliasing & volumetrics.
Maybe because i'm working on a realtime engine ^^

Great Job! ;)
phresnel's avatar
Surely, in each of those points, there is quite some potential for more optimizations. I can't really argue about the size of that potential, but I think I could double (or more) the performance when I am careful :)

Curious whether you are going to post your own results on ompf/dA :)
Join the community to add your comment. Already a deviant? Log In