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 =)…
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 =)…
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 =-)
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…
WIKI HEAVILY UPDATED:
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..
PLEASE POST SOME COMMENTS BELOW IF YOU HAVE SUGGESTIONS OR IDEAS!
CLICK ON A WORD BELOW TO SEE THE UPDATED PAGE….
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..
2. use pick axe
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!
Finally the in game AND TOTALLY UNFINISHED! =)… imp…
Off to the day job!
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…
I was released the old games back to me so I was able to get then back up.. now to making newer cutting edge games -=).. I now receive the meager funds from them also which makes it easier to support them…
Back to the intricate and overly complicated blender animation system =)..
I am sorry for the lack of news, however I have been busy as heck this weekend with life ;). The good news is I have been re-awarded back my name Ryan Mitchell games 😉 so necro will soon me mine again ;). Thus back on the shelf soon 😉
As far as the character system I am getting there. I have written tons of exporters and this one by far has been the most difficult with blenders VERY convoluted skeletal rigging system. Mainly I am pointing to the animation system. Hopefully I can get er done tonight. As soon as the character system is functional it will be a downhill run to completion!
Have a great Monday and good luck to the kiddos going back to school today!
Update: WOW what a pain.. I was looking into the bone and amrature matrix structures and saw the identity had y and z flipped.. did a search to figure out what the hey and wow..so a little work and all will be good now I hope and finally get back to fast and furious progress on this Syndicate / Dungeon Keeper IOS CLONE! =P
Blender does some very strange things and there are no good examples I can find out there to export the methods I need for speed.I spent till midnight but I did make some serious progress with trial and error.
On top of that the day job is absolutely killing me right now. It seems the more you know how to do and the faster you are the more others offload onto you ;)… great huh.. maybe I should forget how to do so much and slow down as the stress level is getting insane =)…anywho! Day job for now maybe more later =)…
Update: Figured out the issue I think.. I still want to ditch the Bezier curves as they add to much overhead when I think quaternion slerp-ing will do just fine =)..
Update: Well due to lack of documentation in blender I am going to drop the Bezier curve support for animation interpolation…o well. It was decently costly anyway…back to quaternion slerping -)….I could not determine how blender determined the local axis for the bones and did not want to waste time while also wanting to save the cpu cycles….. even if two bones had the exact same ipo bexier curves the rotation was on different axis… very fun =(…
There goes a day.. =(
I want the models to all be so different that they will not be inter-lockable anymore.. SO I want to change how the corpses work. Basically you will research to unlock the types and then you will be able to raise all of them up to the demons -=) (The orignal was to put them together.. you will choose enhancements now like in Syndicate…)… I am working on the Demon model currently (as breaks from debugging the animation system) and it is looking good =-P.. cannot wait to get the imp in there though..This will also save a TON of dev time.. if Doom 3 can get away with 3 enemy character models for the majority of the game then I can get away with 10 or so with lots of variations =)…
Back to the day job.. should have more tonight it is a work night =-)
Taking a break to post a video from last night..
I have the first in engine shot of the unnamed species Imp.. I think when we get enough name suggestions I will take a poll for the name =).
Again FIRST look at the new shader and imp. There is a bit of ways to go ..I also need to crank up the ambient light a bit.
So I am going to get a bit of a redo here.. or a mulligan..
I am going to restructure the mapping situation for the main normal mapping shader.
The following will be the setup after some character exploration…
RGB (AO PREMULTIPLIED), and Alpha (transparency)
Normal Map and Height Map:
RGB (normal) A (Height Map)
Glow,Specular,and Ambient Occlusion :
R (glow), G (Specular), B (OPEN), A (OPEN)…
I wanted to premultiply the normal map with the ambient collusion but I do not like the complexity of the math in my head. The shortening of the normal lengths to me is not a good approximation of the ambient occlusion of the texture… Not a big deal as I have the premults in the last texture. Off to implement!.. =)
.. soon the imp will be rendered properly in game =)….
Update: I found something awesome.. I did a search for RPG.. And Mission Europa was on the search page 😉 not sure if it was tweaked at me but that was pretty cool 😉
Update: Doomified =)… just need a good name now.. Digger is good how about Mole.. =)..
BTW ALL the software I use is either Free (BLENDER,GIMP) or written by yours truly =P…I just wanted to recommend blender and Gimp really they are great tools especially at the price they are at! =)
This is without Specular mapping , Glow mapping, or normal mapping on.. just the color and Ambient Oclusion so it will look better =).. first animations!
Here is where I sit with the imp or whateber we decide to name him…about 75% done.. ;).
Update: Got 3 hours tonight.. and so far I am here… about 50% done painting and finishing the modeling… I then have to animate this bugger… I need a name for the minnions… so far suggestions are … Petri, Jim Bomb, Bob, snail, imp… any ideas.. these are the minions that do the building and digging =)
Update: If only gimp was a LITTLE faster I would be totally in love with it ;P.. O and layer folders would be nice other then that what a great free tool =)…
I would have been done with the imp without the 4 hour wasted adventure into the normal problem mentioned before. So tonight I hope to get this little guy painted and animating. =)
After I get him in game and animating I want to work on the AI system so that he will have a life of his own. I want them to have a lot of fun random personality animations 😉
After that I finaly get to the 5 other body types and their weapons… not a whole lot left really.. if life allows I could have a beta level anywhere from 3 weeks to 8 weeks… good stuff! =)
UpdatE: Note to blender users.. I wasted about 4 hours today trying to figure out why the normals were so screwed up on my model. I tried writing a script to fix it then found out the normals are regenerated every time you go in and out of edit mode.. Then I finally figure out that the BASE scale rot and transforms were nuts.. so I reset them to 0 and 1 rot,trans,scale and then rescaled in model space and all was good.. what a fiasco.. so now I am finally painting the imp BUT.. I have a pool party to go to so maybe tomorrow I will get more or late tonight no idea =P..
Ain’t the best sketch but with fingers on an iPad good enough to get the idea tomorrow I build em 😉 this is your little helper 😉
For those out there that may make an animation exporter for Blender that uses the Bezier curves. A tip!.. watch out for the dang ROLL value of the bones. My script tells you that you need to fix that now. It took a WHILE to find the reason the Quternions were interpolating on a different axis. BUT GOOD NEWS!! I have one more test for the system and then I will start the minnion!!!.. I need to sketch him up and I will do that while I am watching FOOOOOOOOT BALLLLLLL!!!.
OOOOOOOOOooooooooo I LOVE IT!!.. I miss this voice!
The goal is to finish the dang skeletal stuff and get back on track the day job has finally calmed down a bit.. I am very happy to have work in the day job though =).. TOUGH out there!
So hopefully I will get to work on the minnion tonight and start getting the characters done… after they are done I am going to go into AI mode….then game play… then graphical tweak mode…. all are a ton less work then this new animation system -).. So hopefully in the coming weeks I will be sending out a request for testers.. I want to get 1 level done and get it tweaked to all awesomeness so I can build from there with the crew =)..
I FINALLY got myself a 256 Gig ssd drive… o the difference is insane!.. but 450 bucks is pricey owach!…TOTALLY worth it though. The speed increase is insane!.
Ok going to do a little more on the skeleton and then hit the hay for hopefully a good productive ay tomorrow!..
Worked until 10:00 last night as I had to get some renders created from scratch in 6 hours… with a 30:00 render time per render… argh…
Tonight hopefully I will get off at the normal time and be able to finish or get close on the skeletal system I am ready to get some characters in game and get the engine done for all future games =)… really a robust design and so simple =)
Wow have we come a long way =)
I tweaked a few values and submitted again Saturday -=).
I am thinking of releasing all the summons via in game mail to those still playing =).. I might set a date and set a one day 4.99 fire sale. Then the next day mail all current users all of the summons =).. What do you all think?
I am finishing the skeletal animation system. It is SOOOOOOO much cleaner and faster now =). I think then I will get to finishing the starting little minion that helps you =)…
Here is Dungeon Keepers imp =)