function GetHeight (x : int, y : int) : floatReally? A function called GetHeight() that returns a height value? No Shit? How about some information about the input parameters? What is the expected range of values, for instance? How about the return value, what do the units come back as? You know, little things, back to that whole idea of useful and relevant, right? Sheesh.
Gets the height at a certain point x,y
...Captain Obvious is Obvious, Captain...
My ire comes from a perfect case, one of today's tasks was to spawn trees on a Terrain based on the heightmap. All the pieces are there, it's actually quite a simple process, but again, it's just not knowing the little things that results in probably a bit more experimentation than necessary. Really I'm just whining, but i've run into so many cases of this sort of thing with so many software packages I've used (looking at you, Maya), that at some point you just wanna contract out and document the stuff yourself for them.
So rant over, if you're interested in doing this sort of thing yourself, here's some code that might be useful:
Obviously you'd want to add some sort of noise to the tree placement and maybe even add some simple tree variants so it doesn't look like a military haircut, but this code produces a good starting point, something like this:
You could probably get even more headway by sampling other maps or attributes to add a bit more spottiness to the placement or maybe even do a radial tap per sample step, something like that. Dunno, if you make any useful changes to this, let me know! Otherwise I'm just going to do it myself and...well, i guess that's not that bad.