 |
| Tangent Normal Shader |
It's been yet another hectic week as I finished up my last midterm (finally!) and have started programming and modelling like mad. I've been trying to focus a lot on some Graphics homework questions to try and get them out of the way and potentially into our game before the end of the month. For the past couple of days I've been working on a normal map shader as seen above. Oddly, I found making one in tangent-space easier then one in object-space, but that must be because no one in online forums has any advice for object-space. Kind of shows how tangent-space is better!
 |
| Shader Code~ |
The code above is pretty simple for creating normal maps, or at least a lot more simple then I would have anticipated. Obviously, the normal of the point is what is affected, which in turn affects how the lighting is calculated for that point. Using the position and the texcoord of each point, the tangent is found pretty easily (credit to imbusy from
http://www.pouet.net/topic.php?which=6266 for the calculation of the TBN matrix). In order to return the normal to world-space from tangent-space multiply the Tangent-Binormal-Normal matrix by the normal map that was created earlier in the code. This way the normal map applies to each normal, insuring the light is affected in the way the normal map intended.
 |
| Final Boss - WIP |
Aside from some rather frantic coding I've also been doing a lot of last minute model work. Above is the dragon head I've been working on as a final boss for our game. I still have to add the teeth to the bottom jaw and sculpt the inside of the lower mouth, as well as whip together a simple texture, but I'm super happy with how the upper head turned out so far! If time allows I'm also going to give him some head armor reminiscent of our main character, but there is a fair chance I simply won't have time. I'm in charge of the whole boss level where the player gets eaten up by this dragon head and spends the level inside his body, dodging bones and ooze while trying to slash at his heart. That's a dragon head, heart, level walls, and falling bones I have to model in about 4 days if you weren't keeping count! I'm up for a challenge but this is a bit much on my birthday weekend :-P
This is the first model I've made with a functional mouth, so it's taking significantly longer than if the mouth was closed. By significantly, I mean I was finished modelling the base after 2 hours before I had to cut it in half and keep going. It's lovely practice though and I appreciate any chance I can get to try something new in Maya, so I'll persevere I'm sure!