Monday, November 21, 2011

Putting the stars in their place...

So, in case anyone is wondering... this is how I line up the stars to the lens flare effect (shown in the above pic).  I made a grid pattern... which I then load in place of the nebula texture file.  At the top there's a horizontal line of numbers (which you can't see in this screenshot).

The odd thing to know is that all the texture files are flipped both horizontally and vertically when rendered in the game.

Since the lens flare effect is always the same color, this allows me to effectively fake the star colors that we encounter in the game by adding a star of the correct color directly into the nebula texture file directly "on top" of where it appears in the game.  It's (apparently) different for nebula texture file loaded.

The Kerberos development team actually made use of this same effect to add an additional lens flare effect to one of the nebula textures in the AMOC expansion.

I'm operating under the assumption that star color determines which nebula texture files get loaded AND that they appear in the same place in the sky every time...  But I am prepared for the possibility that it's not true for all files, since some do not have the star color in the filenames.  I have the star overlay saved as a separate layer, so it's all easily adjustable/removable.  The star positions for each tactical map is stored in skydefs.txt!

I've completed 8 nebulas so far... There's many left to do, so I'm thinking I'll just do recolors for a lot of them... at least for now.

No comments:

Post a Comment