Pori nirumpa yamuta

One of the most disheartening things I found about working in the games industry is that when I came back from work each day, my desire to fire up Visual Studio and just sit working on stuff through the night, like I used to, had gone. I was assured from speaking to others that the flame of graphics programming would return but I was sceptical. Work was satisfying my programming needs (and still is …it is great 8) ) so any coding at home was very infrequent and lacked direction … BUT LOCK UP YOUR POLYGONS, I HAVE RETURNED!! :D

Aaaaaaaaages ago now I was working on a nice little .smd loader (decompiled HL2 models) and it went pretty well. However recently I returned to the project and looked in my steam folder …there were LOADS of models for me to play around with, but there was no way I was going to decompile all those (and the MDLDecompiler is temperamental). I also had a new goal…

Just before starting in the games industry, I’d been meaning to play with inverse kinematics (don’t get your hopes up though, I am not about to show some IK related stuff …at least not yet ;) ). So this was my new goal and to accomplish this I needed some data. Since I’d already been looking at HL2 models (and I really quite like Valve’s artwork) the choice was straightforward. I’d load the binary stuff, the .mdl!

C# and SlimDX being my usual weapons of choice, I got stuck right in. It proved challenging but very rewarding (my favourite kind of coding) and when I got my first combine guy rendering correctly I was very happy. Then I tried loading Alyx …and things messed up :(

I was greeted with a rather nasty mess of triangles, giving very little relation to how she should look. But annoyingly the lower levels of detail rendered perfectly. I spent ages trying to work out what was going wrong before coming across the ‘Fixups’ chunk in the .vvd file. With the fixups applied, Alyx was complete! …and since then any .mdl I fire at my loader (even stuff from the orange box) has been fine. The next problem though was materials.

For the same reason that I didn’t want to convert all the .mdl files to .smd, I really didn’t want to have to go through all the .vtf and make them .dds. So I recently started into a vtf loader too. It is still quite hacky, only supporting the key formats, but it is usable and will only get better as I put more effort into the material system, but the key thing is, it is just about ready for screenshot time!! :D

PoliceAlyx
Marcus FenixNomad

Don’t be fooled by the appearance of Nomad and Marcus Fenix in the screenies 8) They are still HL2 models which I found on the Garry’s Mod site. I also need to finish off loading the animation stuff, but the good thing is that the .mdl contains all the batches in nice ‘vertex shader skinning’ sizes, so it will be a breeze :)

Also, observant readers may notice all models are flipped horizontally (Marcus Fenix has a scar on his right cheek, not his left) …I need to fix this ;)

Regards,
Richard

One Response to “Pori nirumpa yamuta”

  1. Rim says:

    I just knew there was something off with good ol’ Marcus :) Great stuff and quite an inspiration to get my lazy behind into gear again as well!

Avatar