Weee I actually love doing Artificial Intelligence. I love giving these guys little lived and methods to figure out their world and KILL PLAYERS!… =P.. The funny thing is in A.I. a major guideline is to dumb down the AI so it will not just destroy the player =).. after all the computer knows the best weapon, fastest path, and best weakness to exploit at all times if coded right =)…I will try to post more later. BTW it ran GREAT on the iPad 2 with all bells and whistles running =)…

AI Instances in!

Of course had to do a major render path update… I moved the transform updates into the render pipeline and out of the update pipeline as instancing requires the transforms to be updated as they are rendered anyway here they are.. I am about to plug them into my iPad 2 and do some performance runs…
Then sleep for tonight. I have some Breaking Bad episodes to catch up on =).

This is an AI instance using a pool of 3 models to render.. each doing its own animation.. So I could have tons of them going at once =)…

Busy weekend..and bug in blender…

Finally got it done…The bug in blender got me for a while I did not expect that. Here is a video showing parallax and normal mapping working well. That is a totally flat plane using texture maps to create the illusion that there is actual geometry there =)..

Working with skeletal deformation….

Please remember all art is first pass… long way to go =)..

And on the imp finally! .. I need to tweak some things and fix the animations but FINALLY off to the races! =).. all the hard math and shader communication complete =)..

With the screen bloom filter to smooth it all out….

Back to work!

Off to animate! =)


I am using 2.49 and when I used their supplied getTangents() call… it would return a positive tangent even when I flipped the texture mapping to be negative in the X .. the Y preforms properly but the X does not. or the tangent is wrong but the y is correct from what I can tell… the tangent should be the U in the texture and reflect a negative value when the UVs are flipped in my simple model… just another issue… argh..

The fix was to write my own tangent exporter inside of my script.. done so I can move on.. but wow I wish sometimes things would just work… I am using all free open source tools though so I cannot complain at all =)…7000 dollars for Maya… I can write a page of code to save some cash =-P

Wow I got just about nothing done this weekend sadly game wise… I had a get together Friday night a mid day 107 degree football game with my oldest.. (Won 27 to nothing!)..A pool party Sunday to celebrate my wife’s last day of summer as she goes back to school..(last semester of nursing school!)..SOOOO.. this week I am dedicating to the new game!

I will be taking the gloves off and getting some progress!…

I still need to finish the character normal mapping translation systems. It really should not take long. Something that gave me a stumble was GIMP. In gimp if you are using it to create your normal maps be careful to check save color data with alpha. Otherwise it discards the color information where your alhpa is transparent ( a really odd behavior ). I use the alpha as the height informaton for parralaxing =)..

More later hopefully and lots more soon as I move to all asset creation and really get some good looking stuff out =-)

Forgot a little time suck I need to invest in..

Its been so long since I could use shaders I forgot I have to do a joint space matrix calc on a per bone basis for all joints in an enveloped model!.. whoops!.. Basically in a regular normal mapped object you can just use the inverse world matrix for the object to move the light and the camera into object space. However, the bones in a model each have their own space and this you must calculate and store on a per bone basis. There is a caveat for me in this mix as I plan on instancing models!.. owach.. Instancing means I will have a model PER animation PER skeletal model . I then will animated each off frame and update. Then as I run through the visible scene the AI will draw its current animation model transformed by a matrix in the AI node. What this means is I will do a basic update for the base bone model off frame. Then at each skeleton models draw I will have to update the light location object space and cam location object space for each bone in the bad guy.. This will force me to limit the bone count a bit most probably now, however that will require testing. With all that can go wrong this will most probably take me about 4-hour hours of after the day job work…argh..On the bright side of this I will only have to do this once and it will work for everything I need it for in this game and future games. I do not see normal mapping going anywhere any time soon.

When I get some pretty pics I will try to post them for now I have the DAY JOB!

O PS.. my current thought is to just include it in the vertex stream at the cost of memory. Otherwise I would have to load shader constants and restrain the number of bones. I do not want to do that.

OR I just go the easy route and transform my tangent space per draw in the shader… I think this is the way I want to go =P…

Full steam ahead!


Improved imp walk and removed the debug skeleton =)… there is still a glitch on animation relapse.. I know what it is I will try to get to it tonight =)..

Check out the video he is moving a lot better =).. more work to do but you can see pass 2 now with a fully functional skeletal model =).. I still have to do the noramls there are errors you can see in there from that..












I still need to add the normal transformations to the skeletal system and that should take an hour tonight if that. Then I will tweak the imp a bit more adding in the animations he needs..
———————-Imp animations
1. walk/run
2. use pick axe
3. celebrate
4. cry
5. summon

I then need to go about updating the design doc with some huge time saving changes and some that will make the game much better I think. =)

For now I wanted to share all the parts that make a character….

No art is even close to final everything is a first pass!


Normal Map Channel: RGB Use: Normal Mapping

Height Map Channel: Alhpa of Normal map Use: Parralax Mapping

Glow Channel: Red Channel of LM texture Use: RED glows the color channel and replaces the lighting in the scene BLACK leaves it to the shaders lighting equations.

Specular Channel: Green Channel of LM Texture which leaves Blue and Alpha open to special effects Use: GREEN is high specular intensity and black is none.

Here are the bones for the imp:

And the model:

Finally the in game AND TOTALLY UNFINISHED! =)… imp…

Off to the day job!

WOw Day Job, Remodeling Shower, New Game, Life.. ;)

Update : persistence pays off with a fully functional system!!!! finally full steam ahead!!


Update!!!: I had a few moments of clarity and finally figured out the skeletal system. I must say after much work it should have been much easier then it was. I was making things a LOT harder on myself then I should have. To clear things up for others out there that may hit this issue let me save you a TON of time.

Blender Exporter for Skeletal Animation and Rest Pose:
USE only Armature Space for the rest position. Just take the current boneMatrix * parentBoneMatrix.invert();
Then for the posing…
poseMatrix * parentPoseMatrix.Invert();
For Position tails and heads:
tailArmatureSpace * parentTailArmatureSpace.invert();
same for the head…

If anyone has questions ever feel free to ask as this sucked a WEEK of my spare work time up… I could have had game play up and running by now… 😉

I now just have to export the skin mesh correctly (simple)
Busy!!! =) Rather be busy then not though..

So here is where I stand on blender and its crazy system I might be wrong as I am inches away from finally getting it done.

Blender has an armature that is basically the rest pose. Inside that are bones. Inside each bone there is a matrix, head, and tail (and a bunch of other stuff we do not need.) .Each bone has the axis rotated from world to where Y is towards the tail and a roll factor that tells how the axis is rotated around the Y. The first bone moved from world to this local axis. I do not really need any of that except the bone matrix in rest pose. Now Blender has another contraption. The poseMode….(start menacing music).. Here is where I am. I am doing something wrong. Inside the pose mode there are poseBones with a matrix and a local matrix. I SHOULD be able to take the local matrix and multiply it into a rest pose to get the animation going. That is what I would think at least. This is not working however. That is where I stand. I am going to write a print function to print EVERYTHING inside the bone and pick out what I think I am doing wrong…..For now the day job!

AS far as why it is taking a week plus? THE DOCS STINK HERE and the examples are convoluted and long. I.E. the Ogre exporter looks like an alien language as to how it is constructed. The Ogre Exporter is very hard to follow, but is one rare working example. However, I struck out without it with my trusty math skills in hand…=)…


Life is so busy right now.. hard to even get time for a breath of air… I could have written an entirely new skeletal system now for blender with as much time as I have lost on this exporter…. their system is so messed up I am writing a new method of exporting.. I wrote the maya exporter back in the day in a few days … this guy I have put 8 – 12 hours into I bet… sheesh.. anyway I will let yall know when the dang thing is going and the wheels finally hit the road…