Pori nirumpa yamuta

posted in Captaiz Z
Published August 11, 2008
Advertisement
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 [cool] ) so any coding at home was very infrequent and lacked direction ... BUT LOCK UP YOUR POLYGONS, I HAVE RETURNED!! [grin]

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 [wink] ). 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 [sad]

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!! [grin]

PoliceAlyx
Marcus FenixNomad

Don't be fooled by the appearance of Nomad and Marcus Fenix in the screenies [cool] 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 [smile]

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 [wink]

Regards,
ViLiO
0 likes 10 comments

Comments

Saruman
Oooh I remember when you were working with the HL2 models way back! Good to see you picking it up again :)
August 11, 2008 11:53 PM
Zao
Impressive.
August 12, 2008 12:49 AM
ViLiO
Thanks guys [smile]

also ....Holy Crap! It's Saruman! [wow] Been ages since I saw you last.
August 12, 2008 03:20 AM
looterz
Looks awesome, you should release a tutorial showing how you load and animate valve models, once you find out.
August 31, 2008 10:05 PM
ViLiO
Quote:Original post by Looter222
Looks awesome, you should release a tutorial showing how you load and animate valve models, once you find out.
I am not very good at that sort of thing and considering I lack the motivation most of the time to code, I think it is pretty unlikely I'll ever find the motivation to write about the code I am rarely motivated to do [wink]

If you are having a go at a HL2 mdl/vvd/vtx/ani loader yourself and have any questions, I am more than happy to attempt to answer them. [smile]
September 01, 2008 11:52 AM
looterz
Thanks for the reply.

Quick question though, what are you using to render those in? did you create a 3D engine or something? Because it looks really nice :D.
September 01, 2008 01:37 PM
ViLiO
Quote:Original post by Looter222
Thanks for the reply.

Quick question though, what are you using to render those in? did you create a 3D engine or something? Because it looks really nice :D.
Thanks! [smile]

It is just a little graphics framework I made for trying out stuff (dubbed VLaboratory). The backdrop is just a brute force rendered 256x256 heightmap, so nothing fancy [cool]

The framework does have some other cool little bits 'n bobs in it though, like a nearly complete HL2 bsp renderer, which I kind of got sidetracked from finishing and keep meaning to return to (being able to load mdls and vtfs should make finishing the bsp renderer a lot easier if/when I get around to it) [smile]
September 01, 2008 03:50 PM
looterz
Sounds cool, I'm working on creating a 3D Game Engine for a future platform to build games off of, we need some more programmers, especially graphical programmers to help out, if you're interested check out the blog post here:

http://www.thebearfucker.com/how-to-guide/?p=74
September 01, 2008 06:03 PM
ViLiO
Haha, should have guessed you were sizing me up to join some project [lol]

Unfortunately my work prohibits me from doing such things but I wish you all the best [smile]
September 01, 2008 07:55 PM
looterz
:D, understood. Good luck.
September 01, 2008 08:56 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement