After struggling for the last couple of weeks on trying to get shadows throughout our game, I was tasked with at least getting one below our Avatar to help with player movement while jumping from platform to platform. I went back and revisited both of these tutorials:
http://xbox.create.msdn.com/en-US/education/catalog/sample/shadow_mapping_1
http://xbox.create.msdn.com/en-US/education/catalog/sample/avatar_shadows
But the problem I kept running into was that both tutorials are displaying the shadow on flat surfaces that are not being Normal Mapped. As I continued to try and merge the tutorials in with how we were drawing our models I would run into problems where the textures would not be displayed properly. They would be drawn then stretched around the model. Kind of like a Christmas bow on a present:



I finally decided to just hack it to create a simple circular shadow under the player. I would ray cast below the player and if a collision was detected, it would draw a circular model I created in Maya on the surface of that model at the X,Z position of the Avatar. It was far more simplistic than I wanted it to be, but in the end it gets the job done. Playing the game with it and jumping from platform to platform was a lot easier with the shadow as a guide:
No comments:
Post a Comment