PDA

View Full Version : Facial Animation released (OpenGL / Half-Life 2)



Georgy
18-09-2008, 08:02 PM
TDG3D Engine is now capable of loading VTA (vertex facial animation) and SMD-s from Half-Life 2 models. The demo example and the full source code provided.

http://www.igrodel.ru/images/2008-9-21bugfix.jpg

Download: http://www.igrodel.ru/tdg3d/tdg2008-9-24.rar (900kb)

vgo
20-09-2008, 09:13 AM
Thats very cool! I was workin on HL2/Doom3 animations myself for my engine, but never got very far.

Good job! :)

Traveler
20-09-2008, 12:08 PM
I second that! Very well done!

michalis
20-09-2008, 09:40 PM
Nice!

My two notes:

1. Right now I was only able to view it by wine emulator. (I'm sitting on Linux and FreePascal only.)

So I wanted to compile and port your code to Linux+FPC, which should be easy as newest eXgine compiles fine under Linux+FPC... I used code from http://code.google.com/p/exgine/ (I don't speak Russion, so I couldn't understand anything from http://xproger.mirgames.ru, hopefully version on code.google is newest?).

After some work I gave up --- looks like new eXgine changed a lot. Anyway, here's the patch: http://michalis.ii.uni.wroc.pl/~michalis/tmp/tdg3d.patch. It makes the example3 compile under Linux+FPC, but running it causes segfaults. This is most probably my inability to use newest eXgine, I'm not sure how I should run the program there (lack of English docs is pretty bad).

Do you plan to port your tdg3d to newest eXgine? Let me know if yes, I can help with Linux porting/testing.

2. I'm curious about your approach to collisions --- what is the "compressed Z-buffer cache"? Can anyone explain it shortly or point me to some article about it (googling didn't return anything useful on the 1st sight)? Thanks!

Georgy
21-09-2008, 06:17 AM
BONE BUG FIXED: http://www.igrodel.ru/files/tdg2008-9-19bugfix.zip

http://www.igrodel.ru/images/2008-9-21bugfix.jpg


I'm curious about your approach to collisions --- what is the "compressed Z-buffer cache"? Can anyone explain it shortly or point me to some article about it (googling didn't return anything useful on the 1st sight)? Thanks!
it's very easy technique, see mydepthcollision.pas to understand it.

It consists of 3 stages:

1. divide your 3d level on cubes
2. make z-buffer photo from top of all cubes to 2D ARRAY
3. when player goes to some cube, use 2D array to restore 3D heightmap of that place.

Compression: check cubes with equal data, and make link to one cube.

vgo
21-09-2008, 06:31 AM
What about overlapping geometry and dynamic objects?

Georgy
21-09-2008, 06:57 AM
What about overlapping geometry and dynamic objects?
actually all collision detection done in 2D space, now mydepthcollision creates 2d screenshot for each frame of skeletal animation - it is not done very well yet. You can check example1.exe - dancing man can kick wll with the leg and get some collision responce (move).

Georgy
22-12-2008, 03:05 PM
After some work I gave up --- looks like new eXgine changed a lot. Anyway, here's the patch: http://michalis.ii.uni.wroc.pl/~michalis/tmp/tdg3d.patch. It makes the example3 compile under Linux+FPC, but running it causes segfaults. This is most probably my inability to use newest eXgine, I'm not sure how I should run the program there (lack of English docs is pretty bad).
was busy on work.
I have an idea why this happens on FPC.
Maybe it uses FPC-s "INTEGER" type, which is not delphi "INTEGER". FPCs integer equal to delphi's SHORTinteger (-32767..32767), so maybe overflow happens. :roll: Try replace integer by longinteger or set some define like "$delphi or something for delphi types compatiblity".

michalis
22-12-2008, 06:39 PM
was busy on work.
I have an idea why this happens on FPC.
Maybe it uses FPC-s "INTEGER" type, which is not delphi "INTEGER". FPCs integer equal to delphi's SHORTinteger (-32767..32767), so maybe overflow happens. :roll: Try replace integer by longinteger or set some define like "$delphi or something for delphi types compatiblity".

I was compiling with -Mdelphi. (Not many people use the old FPC mode where Integer = ShortInt, this is an old heritage from Turbo Pascal compatibility. I always used $mode objfpc or $mode delphi.)

Like said before, I suspect that segfaults are result of my lack of knowledge of newest eXgine. I had to use the newest version, to get Linux and FPC compatibility, but it was quite incompatible with the older version you used... Lack of (English) docs for eXgine forced me to do some "blind guesses" about how eXgine works (being too lazy to dig too deep into eXgine source), so it's pretty understandable that I got errors :)

Once you port your code to the newest eXgine version, such that it works with whatever compiler and OS you like, I'm confident that I'll be able to fix/compile with Linux+FPC easily :)

XProger
24-12-2008, 05:05 PM
michalis, eXgine 1.0 (new eXgine started on 1.0 version) is still in development, and not compatible with older versions. When version has will be ready, i will write help and tutorials.

Georgy
01-01-2009, 04:57 AM
Using GLSL shaders and collision detection:
http://www.igrodel.ru/tdg3d/tdg2008-4-7-normalmap.zip
http://www.igrodel.ru/tdg3d/tdg2008-4-7lite-shaders.zip

Other files:
http://www.igrodel.ru/tdg3d/