Quick bugfix in fog, and some namespace renaming checked in

Topics: Developer Forum
Feb 21, 2007 at 5:47 PM
Hey Dastle -- just made a quick update to the code because the namespaces under "X File" hadn't been updated. I also found a place where fog wasn't being set in the BasicPaletteEffect.

But now it's time for me to understand how the BasicPaletteEffect really works. When the character moves away from the origin, the bits that are rendered using BasicPaletteEffect fog unnaturally (seemingly as a function of his distance from the origin) -- whereas the bits rendered using BasicEffect seem to work fine.

I am not an Effect expert and I have a feeling that's what I need to understand next...
Coordinator
Feb 21, 2007 at 9:12 PM
I didn't really test it much so that's possible. Now that you mention it, I think I forgot to multiply the vertex position by the world transform when calculating distance between the camera and vertex...
Feb 21, 2007 at 9:16 PM
A ha -- that would totally explain it. I'm just in the middle of something else and then I was going to return to Animation. If I go scrounging aroung, will I find the place where you're doing those multiplications?
Coordinator
Feb 21, 2007 at 10:02 PM
I checked in a new changeset that fixes it. I added comments to every class in the entire codebase as well, and documented the palette effect code.
Feb 21, 2007 at 11:26 PM
Edited Feb 21, 2007 at 11:51 PM
hmmm... are you sure you've sorted it out? I just did a GetLatest and rebuilt but still I am getting him going foggy after he walks a bit. (I am doing the 'root node integration' trick where translations from his animation are added to the World transformation.)

I'll take a look deeper into how the Effect does its thing before I head to bed.

Edit My bad!!! I was compiling the wrong version of Animation.Content! Fog is looking great now.