After a small vacation, I'm back. I decided to get a head start and look at
some of the work I'd have to do tomorrow [later today] and I got sucked in. Here
are the results. When I left on Friday, the ship effects were made, but they
weren't fully integrated. There were some problems integrating them into the
code. They worked fine in EffectEdit, but didn't in our code. I definately
thought it was a bug with M$. I wrote a little test app to prove it. Turns out
that the test app proved the exact opposite. The effect worked fine in the test
app, but not in our app. Ugh!!!! My first guess was that it was because we were
loading up multiple copies of the effect and I remember reading somewhere about
a pool for effect variables if they were going to be shared. Turns out I was
right on the first go. When I pruned down the loading to just one effect,
everything worked fine. This means that I want to treat effects like other
shared resources (ie. textures, meshes).
So...after a little hard work I managed to fit the effect ships into the code
nicely. They've been broken out into their own class and the rendering code is
smart enough to render properly if the ship has any combination of a base
texture, damage map, and light map. Pretty cool I think. Here's a snap:

There are a couple of small issues that cropped up here.
-
The lighting is way off. The ships aren't lit by the stars or,
when a laser blast shoots by. That's alright though because I was planning on
redoing the lighting for the ships. Now that effects have completely taken
over rendering I can implement as many lights as I want. I'll probably start
with just the lighting from any star nearby and then any planet nearby and
then any shots nearby. This will take some reworking of the scene lights.
It'll be worth it though. Trust me.
-
The damage textures on the battleship are wonky. We'll have to
rework them. Right now, I'm doing a BlendTextureAlpha and blending the results
on the scene. This looks good except that the damage shows up on unlit parts
of the ship. That looks great for lights, but not for damage. Also, I want to
thank Timothy Wilson for giving me some tips on textures. His information will
help us immensly.
I also had to do a lot of tinkering under the hood to get things
working smoothly. Tomorrow (today) I'll work on the lighting and converting
planets and stars to render using effects. Eventually I'd like to replace all
the TnL with shaders. We'll have to see how far I get though.