New Year’s report

I somehow managed to leave this blog unattended for six months. I shall submit the feat as a Steam achievement. Maybe.
And yet, there are lots of things to write. They added up, tiny bit after tiny bit, and I was being guilty of wanting to wait a little more before posting a report, just to have more progress to show. Some technical ideas were weighted and eventually left over, some others were brought up to front… and now the story to tell is a potpourri of failed attempts and dead-end researches, along with some real progress. Due to the size of this report, I’ve put most of the dropped stuff into spoilers below.

Dead-end : on Lisp and Lispy stuff
Stalled : on Character Modelling
Parenthesis : on Complexity Theory

Progress : on Rendering

I need to get to the point where I can start showing nice outdoor environments. I really need it, for my own sake, for this blog’s appeal, and for the fact I’ve always had immense fun programming terrain. Yet, I figured any environment screenie without lighting would look bland anyway, when NeREIDS bare rendering code at this point had no lighting at all, and had been torn up by my first tests around the deferred G-Buffer. So this was the time to implement some of the renderer. Meaning, adding light support and wrapping up a first version of the full deferred pipeline.

Technical pdf after technical pdf, I had built a good representation of how other game engines would organize their deferred renderer and lay out their G-Buffer, and started devising a few versions of my own. Then I settled for one and started coding.

It took me quite long… nothing was very conveniently working the first time. Tiny parts I had looked over made for subtle bugs, which could hide at any code line, declaration and initialization of shader code parts having to match with declarations and initialization of C-code stuff was a royal pain in the ass. And I have poor skills at debugging shader code.

While I’ve had a good grasp on the basics of each technique to use here for many years (eg normal mapping was not a new world to me by far), I was a total newbie when it came to actually implement this stuff. I also learned about Physically-based Rendering along the way… and absolutely wanted to implement lighting this way, already… Meaning reading many new papers on the subject, and adding up to the delay before having a working version. But hey, I got there ๐Ÿ˜€ After that part was done, I also talked myself into adding a basic shadow casting implementation. Believe me, this took me some time too.

Since I didn’t have any graphical asset at hand with a nice looking texture and a normal/roughness map, I just hastily devised an export of those from my previous work on the Earth’s surface. Here are the results so far :
Deferred&PBR&CastShadows

First attempt with functionnal Deferred Renderer using PBR and simple shadow maps.
Oceans were arbitrarily set to metallic behavior, while landmasses were set as dielectrics, to test the PBR parameters.
Mipmapped normals automatically affect “roughness”, making very bumpy surfaces appear less shiny when downsampled.

Now, although I want to use HDR ultimately, this picture was taken without it, thus color here is ugly. I have yet to code HDR and exposure, as well as lots of additional features : transparency, volumetric effects, environmental mapping and image-based lighting (without which any metal or reflective surface would look bland), anti-aliasing and other post processes. I also need to extend my shadow casting techniques to parallel lights (for sunlight) and implement some kind of cascaded shadow maps algorithm for it. I also need to fix light bleeding issues visible here on the shadows, to tweak the resolution of shadow maps, and maybe add soft shadows to the mix. So the renderer is very very far from “done” but the core is here : any good-looking textured geometry submitted to the renderer at this point, would interact nicely with light and get the display quality already seen on the earth globe.

Mixed : on Terrain

Displaying nice looking terrain is my next milestone. It has been my “next milestone” for like a year, I must admit, but still…
There’s no shortage of disruptive, almost “procrastinative” work in the meantime, mind you (Wait, can humans do such things as procrastinative work ? Yes we can !). Even while toying with terrain-related topics, I’m making few progress on concrete NeREIDS terrain issues. This was the case recently, messing around with planetary-scale tectonics… I mean, NeREIDS environment wasn’t even supposed to cover such a range !

The shoulders on which my guilt ought to fall are those of Andy Gainey who blogged about a very nice procedural generator for a planet, taking into account a rough approximation of plate tectonics for defining mountain ranges, as well as wind-carried temperature and moisture for defining biomes. I was instantly in love with this stuff, even before he mischievously cited “Civilization” as a game inspiration. And I instantly wanted to steal some ideas from this. I also instantly wanted to improve upon his techniques, as while reading some more about plate tectonics, I felt that the final result would benefit from more realistic processes of tearing the crust apart. And I also needed to do things a little different for any NeREIDS usage, as I wanted the planet generation results not to be elevation directly, but intermediate terrain features generators.

Not so instantly, I realized improving upon his intuitive simplifications would not be so simple. It took me some time to get to the conclusion that any true noticeable improvement could not be done without actually moving the plates for many iterations, and computing non trivial stuff at each step. As I need NeREIDS environment generators to be able to generate content almost at interactive rates, this was becoming out of question.

I’m still a little sad about leaving this work behind. Shown below is an attempt at defining earth-like mid-ocean rigde positions, a few days before dropping that stuff altogether.
testRidgeSpread3

Anyway, I’m still toying around with terrain, reading further about procedural generation, grided stuff, non grided stuff, all kinds of noise from perlin to gabor to randomization from Voronoi cells… All the while trying to fit those into my own vision of NeREIDS Generators and their requirements. There are times when I’m losing hope about this, but I still feel the urge to get to a breakthrough here, so I guess I’ll continue drawing triangles on paper sheets and covering text files with figures, until I solve this or die of old age… This may be a little abstract for you, I realize, until I write some detailed post on the matter. Hopefully I’ll get to it soon.

That would be all. Happy new year everyone ๐Ÿ˜‰

Leave a Reply

Your email address will not be published. Required fields are marked *