Home | Documentation | Atomic Chat | Github

Atomic Terrain Editor


Sorry @darrylryan, but I gotta update this with the latest and greatest features.
I was helping a bit with the trees billboards and they got too excited :smile:

:camel::camel::camel: :bus::dash:


Update on imposters!… the maths are not as easy as I thought, but there’s a bit of progress… I haven’t had a lot of time to tweak all the stuff and also had to resort to a bit of shameful curve fitting of utter shame :stuck_out_tongue: but hey, legend says when desperation comes even pros like Planck would curve-fit :smile_cat:

That’s the texture tile Y offset precalc correction: sin(x*-3)*.25+0.5, and nope, I’ve no frigging idea why it’s asymmetrical :confused:. Also, before you say it should have a pi cause of that 3, take my word for it, it doesn’t :stuck_out_tongue: (kids these days… they see a 3 in any trig and think it should be pi :smirk:). It’s possible I’ll have to revamp all the math using a simpler approach because there are too many corrective offsets.

Anyway, accuracy is OK although there’s no perspective correction (on the quad projection, not the texture obviously) but I don’t think that’s necessary anyway because it’s for far stuff, possibly last LOD level:

Transitions are acceptable already imho, with a bit of fading they should look fine:
These are some typical scenarios:

Here’s a more realistic test with lots of transitions (sorry jumpy FPS camera :frowning: ):

We’re gonna have the most badass imposter system ever :P.


Moar goodies! :stuck_out_tongue:
Here’s a transition with some quite extreme perspective distortion:

I’m not a starry wars fan, but that’s cool as heck :wink:


Sorry for bumping this thread like there’s no tomorrow but I’ll probably not have much time to work on this in the next days so just wanted to update with an awesome gif of the progress so far. Note how their rotations are randomized (which is our differential, cause we’re badass like that), what also breaks lighting because lighting is rendered in the imposter main texture at the moment, so there’s a bit of extra ‘popping’ because of that (because imposters are all lit from the same direction, what doesn’t match the actual mesh), in the future we’re gonna bake normals to have lighting fully real-time in the imposters.



Very cool! Reminds me a bit of units in Total War: WARHAMMER! :thumbsup:


Wow… how can I try the impostors? Are they generic objects, maybe like particle systems, or are they only usabel with the terrain? I can think of a lot of uses for that! Memory is abundant in modern devices so that is a very nice way to have automatic LOD for many repeating static objects! Does atomic have polygon cutout sprite and do the impostors use it? (e.g http://cocos2d-x.org/docs/programmers-guide/sprites-img/polygonsprite.png).

@Alan the transition is superb! That gif is no debt better than any imposter system I’ve seen!


@sumpin Alan has moved to the jungle to work on a top secret game project and hasn’t been seen for a while, so he’s probably been eaten by pumas. Hopefully he’ll be back to finish this but it might be a while.


@Sumpin I didn’t finish the freely rotatable impostors yet. The math isn’t that easy although I guess I could put together a naive approach relatively quickly (basically transforming the viewing point for each coordinate). Ideally we should use a decent algorithm to determine the vertices and UV. What’s done so far doesn’t work for non-uniformly scaled objects, and making that work will require some extra math to get the correct UV tile along with origin shifting. A caveat is that the scale has to be uniform in two axis, and distortions are going to occur in any case. The logic for the y-aligned impostors is almost ready, just need a quick fix because the top view rotates accordingly to the camera (the rect is parallel to the screen) what isn’t appropriate for impostors (but is OK for billboards). Besides the ‘runtime’ logic, we also have to work on the impostors generation, we need normals and maybe other maps, and adequate shaders too. We have discussed using that system for automated LOD generation extensively on Gitter, it certainly is a nice feature to have… don’t worry that we certainly wouldn’t let a low-hanging fruit like that untouched :).

Unfortunately what @darrylryan said is true though… and there was a puma attack nearby recently, I kid you not. I’m safe but I really don’t have time to work on anything these days… I’ve been pulling my hair off working on some stressful stuff like porting ImGui to MonoGame and optimizing old code.

I’ve also encountered some oddities in the math operations that made the programming even harder, to speedup development I’m considering making a prototype using a C# lib I’m used to and subsequently port the math to C++ once it’s tested. Maybe I could do it even in Unity because editor execution, reliable hot swapping and easily exposable and tweakable variables could really boost productivity for something like that. I need to get the basic math right though, using curve-fit formulas is a recipe for disaster :P.


Hi guys.

Since there’s no activity on the GitHub issue and on Gitter, I’m updating this with the progress on imposters. Sorry for the gif quality, apparently 10MB is too large for the web_2.0 so I had to decrease the quality…
Everything is done in the vertex shader for maximum compatibility, vbos never updated, thus besides the few draw calls (for each chunk) the amount of required data that’s passed per frame is just 96bit:
You can go pretty massive, but distance-culling the nodes start to slow the whole thing down, ideally we should use a separate frustum for the impostors I guess… in terms of only impostors, you can have a very high number of them, I’ve benchmarked on some hardware and you can expect a low-end rig to be able to display at least 4 million @ 60fps, in a typical game with a large forest, provided the distance culling of nodes is optimized, I think you can realistic expect a few hundreds of thousands.

Latest demo:


Ab.so.lu.te.ly awesome :smiley:


Awesome :slight_smile:

You’re almost there.
Did you solve your blending issue ?


Yessir! I had to go with a ‘dithered blend’ using some noise otherwise I’d have to sort the triangles to use a real alpha blend, what wouldn’t be as fast.


Hey :smiley:

Is this branch not available anymore?
Cause i can`t find it… and i would love to use it ^^#