Saturday, November 26, 2011

Missile trails!

I'm taking a break from nebulas and trying my hand doing some special effects.  Here's some images I found on the internet for inspiration.  I'm sure I can do something like this in the game.

UPDATE:  I finished doing the effect for planetary missiles... I think it looks pretty epic!  Screenshot of them about to blow up my helpless Destroyer class scout vessel...

They look even better when moving...  The trails are super long... and I managed to use some tricks to get the particle count is pretty close to the vanilla version (84 vs 58)!


I've made some custom effects explosion as well... I wanted to have debris left when a missile detonates... animated with some randomization.  They fade out appropriately as the trail fades.  You may notice I cheaped out a little on the trails in these photos (notice the texture repetition?)... yeah, I was testing explosion effects, not trails this time.  It'll look perfect when I'm done, trust me.  The top image will blow up if you click on it. ;)

Wednesday, November 23, 2011

Better ambient lighting possible?

Yes.  Yes it is.

I've figured out how to make the lighting much more realistic by forcing objects (ships, asteroids, and such) to only be lit by the directional light given off by the nearby star.

Also... I am able to change the lighting to accurately reflect the light color used in the nebula texture file... pretty sweet.

In the above pic you can plainly see that the desaturating glow effect is greatly reduced, and that the asteroid looks red... that's purely a lighting effect from the red star. 

When rotating the camera behind the asteroid, like so:

It's nearly black.  Which is closer to how it should be.  Unfortunately, it's not possible to have a directional light coming from the planet.

Of course, this requires new textures for asteroids (which are shown these screenshots) because I darkened the asteroid textures a lot in beta version 2 of the asteroid retex... and, I'll be forced to merge the asteroid retex in with the nebulas retex because the lighting changes directly affects both.


I just discovered that what I thought were light orange stars... were actually olive colored.  ::face palm::

Since I've already completed 3/5 of the nebulas for  light orange olive stars, I decided to just change the color in the starcolors.txt data file from olive to light orange. ;)

Before anyone cries foul, keep in mind that a star's color has no gameplay effect whatsoever... I certainly will shed no tears over less olive in the game.  It's one of my least favorite colors.  An olive colored nebula would make me sick.

On a happy note, I'm about to finish up beta version 5 for the nebula retex's... that's 13 nebulas replaced (if you include the strategy starmap and light orange ones... which I assume you will).

EDIT:  It turns out the changing a star's color during a game in progress prevents nebulas from  loading properly for that star type.  So, that file will be included as an optional download at some point in the future.

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.

Saturday, November 19, 2011

Hi all... I'm getting better at making nebulas. ;)

I'm fighting the urge to go back and redo the first two I did (one being the starmap replacement)... but with only a total of 4 done, I need to hold off on that until I'm finished replacing the other stock ones.  We're up to beta version 3 for the nebulas now....

I've learned something:  The star for each solarsystem always appears in the same place in the tactical view... So, I can set up each nebula background with that in mind to give it a fake bloom effect (as in the photo above).  Pretty neat ;)