More Fun From The TEXTURE MAPS!

This texture map loader is getting pretty sophisticated.

I've decided to add yet another option to the texture loader, namely an alpha channel combiner. Basically what I have found is that, for the kind of textures I use, it doesn't make (much) sense to give them an alpha channel directly. Like, I have some texture of leaves, and I can indeed outline the leaves in some way to create an alpha channel but the way my textures are, it isn't that hand-crafted anyways so that actually probably looks not so great.

Instead, what I'll do is make a set of "leafy" alpha maps, just 8 bit bmps which are like, leaf patterns, sticks, and whatnot. Then to my texture loader, I can pass in the name of an alpha bmp to merge in with the colormap bmp that it loads, and voila. The net result should be much nicer/more sensible looking trees and whatnot, and yet again, more mileage out of my textures.

What else this can be used for? Aha! This is where it gets a bit interesting. I am going to do some kind of planetary-daytime-based switching texture, which will allow cities to light up at night. On the wall/window textures or whatnot, I can create an "alternate" which is the same texture but mapped with an alpha map. This will just be a window pattern. Anyhow, I will just use the alpha map as an emissions map, with the underlying textures providing the colour and some additional shape to the windows. I think, actually, that this will look fairly nice.

Other than that, I have to continue to work on the organics engine and so forth. Trees, rocks, bushes need to be better color-coordinated with the planet they are on. That's a bit of a job but hopefully not too major. Rocks for instance I can make to use the same rock texture as the planet. Then I have to work a bit to make sure they load/generate fine in the bg (I think they will, I organized them yesterday so that they would) and make it so they can cache out to disk. I have a little bit more work to do as well, because on very small planets you get a wierd bug where textures seem to wrap around. I'm not 100% sure how it's happening but i'm about 60% sure how to fix it... More or less, it relates to having a view radius on the organics mapper that is larger than the planet's horizon. That's fairly easy to fix, actually.

The impostor/pbuffer system was pretty hard to get right. I had some problems with setting up the camera, depth components, whatever, but in the end it just took some merciless tweaking and now it's more or less OK. Still it can't look as good as hand-crafted impostors (for instance, it may pick an odd-looking tree to use as the impostor, or it is sometimes a bit clipped) but overall it looks pretty good. Waaay more trees and so forth than the old algorithm.

I also worked up the clumping algorithm. It's pretty nice, it groups together trees and whatnot into nice clumps. There is a bug there I have to look into.

As you can see, there's lots of work to get at. Ah yes, and one more thing, I have to make a modification to the gradient loader so that it can do HSV transforms as well (right now only the texture loader can, but sometimes I want to load a gradient which is like, a software texture that I use to do software shading lookups and stuff; anyhow, that's not a major issue)

TONS OF SMALL THING! It's awesome, man.


◀ Back