LUA MD5 (skeletal animation etc) - Page 2

LUA MD5 (skeletal animation etc)

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: LUA MD5 (skeletal animation etc)

Post by Zpock »

Just a quick update on whats going on:

I'm pretty busy these days (moving to another country) so I can't work on this at the moment, propably lasting for something like a month. On the other hand my desire for working on it feels pretty high so unless that changes things will get done eventually. Last thing i did is make a parser for the .md5anim files, now I need to setup a decent system for running the animation script and make it reasonably easy to use.

I also sorted out most roblems with the normal mapping. Not a priority at the moment but need to add specular, selfillumination and teamcolor textures to have decent rendering. Perhaps in a system similar to how sm3 does it with each channel of a second texture. It should be easy to change this around as it's all in the script as well.

For the animations I envision having some system that would make it easy for non-LUA people to work with, along with perhaps a detailed tutorial how to do everything from blender and whatever to finished unit in spring.
BaNa
Posts: 1562
Joined: 09 Sep 2007, 21:05

Re: LUA MD5 (skeletal animation etc)

Post by BaNa »

This is EPIC AWESOMENESS.
User avatar
azaremoth
Cursed Developer
Posts: 549
Joined: 17 Feb 2005, 22:05

Re: LUA MD5 (skeletal animation etc)

Post by azaremoth »

That is soooo superb brilliant epic awesome!

Make it happen! I promise to use it intensive - There is still a Cyberdemon to model and a Mancubus to redo then :mrgreen:
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: LUA MD5 (skeletal animation etc)

Post by Zpock »

I finally got a computer (go labor day sales) so I might be able to get some stuff on this done now.
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: LUA MD5 (skeletal animation etc)

Post by Warlord Zsinj »

:D
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: LUA MD5 (skeletal animation etc)

Post by Hoi »

How's the performance, non-shader, optimised ?
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: LUA MD5 (skeletal animation etc)

Post by Zpock »

Most of the stuff including calculation of where the vertices end up is done trough the shader, the part that's not will be the math handling the animation of the bones themselves, so you will probably want to keep the number of those down. It could be setup to not use shaders for normal mapping and such, but I think you will be better off using fewer polygons and taking advantage of normal mapping instead. It would also be easy to add in a damage map.

I think the performance will be good, as long as animation math doesn't suck up too much.
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: LUA MD5 (skeletal animation etc)

Post by Hoi »

But shaders arnt supported by all video cards, right? and is this going to replace bos or not? and is the performance better than bos?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: LUA MD5 (skeletal animation etc)

Post by AF »

Minimum requirements for spring are irrelevant. Minimum requirements for BA or Kernel panic etc etc are though, and they may all differ.

Afterall the min req for P.U.R.E and the min requirements for BOTA are not the same despite both running on the same engine.
User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: LUA MD5 (skeletal animation etc)

Post by Hoi »

/annoying

Please, ansfer the questions, I'm not talking about specs, I just want to know if using this wouldnt exclude 50% of the players and lag the rest to death?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: LUA MD5 (skeletal animation etc)

Post by AF »

that depends on the shaders and how heavy the animation being ran is.

Geforce 2 class gpus can run basic shaders after which its a question of which shader model is being used.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: LUA MD5 (skeletal animation etc)

Post by Argh »

I just want to know if using this wouldnt exclude 50% of the players and lag the rest to death?
More or less, yes. This would create a definite "cutoff" hardware-wise. Such a cutoff is, alas, inevitable and will happen at some point whether or not we want it to.

With P.U.R.E., I very deliberately steered away from that model- I suspect, that if you test my game vs. a *A under real-world conditions, you'll find it performs as well, if not significantly better, while looking a great deal prettier. But that doesn't mean that I'm hostile to something that would create some barriers to entry, but promised significant improvements in quality for future game projects.
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: LUA MD5 (skeletal animation etc)

Post by Zpock »

I think even really old graphics cards support vertex shaders? The thing I have noticed sofar is that my new gfx card can handle more attributes then my old, which means more bones are possible. I'm not sure where to draw the line on that one, it could be anything from 20 to over 100. Doom3 models use around 100 bones per model, but I think we can do withouth using up 5 bones per finger for our purposes?
Warlord Zsinj
Imperial Winter Developer
Posts: 3742
Joined: 24 Aug 2004, 08:59

Re: LUA MD5 (skeletal animation etc)

Post by Warlord Zsinj »

Sure, but Quake doesn't need to render hundreds of units on-screen at once.

Do you think it would be suitable for IW infantry, which would probably have ~10-11 bones total, but would be onscreen in numbers potentially 100+?

Or is it the sort of thing we should only really be reserving for less-frequent units like jedi?
User avatar
Zpock
Posts: 1218
Joined: 16 Sep 2004, 23:20

Re: LUA MD5 (skeletal animation etc)

Post by Zpock »

It's certainly not impossible, especially if the infantry could be organized in huge groups that do the same animation, perhaps with an offset. Perhaps someone could implement some engine side functions accesible to lua for doing matrix multiplication and such (quaternions would be nice too), that would be faster then doing it in lua?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: LUA MD5 (skeletal animation etc)

Post by AF »

There are mechanisms that could be employed such as imposters or not executing animations in certain instances on certain units.

For example if a troop is walking and you zoom out and zoom in you wont know if the troop was walking while it was in icon mode or if the shader stopped executing the animation and simply paused and picked up where it left off when you zoomed in again? (or when a pose changed occurred such as unit starts firing)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: LUA MD5 (skeletal animation etc)

Post by Argh »

I think even really old graphics cards support vertex shaders?
IIRC, this wasn't introduced until the 6800 series, with the requirements of DX8. So, everybody on stuff previous to that hardware would be out. That said, that's a shrinking pile now.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: LUA MD5 (skeletal animation etc)

Post by AF »

hmmm I seem to remember having a Geforce 5200 ultra capable of directx 9, never mind a 6800 with dx 8
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: LUA MD5 (skeletal animation etc)

Post by Kloot »

Zpock wrote:Perhaps someone could implement some engine side functions accesible to lua for doing matrix multiplication and such (quaternions would be nice too), that would be faster then doing it in lua?
Already done, just not committed. (I don't feel like making my own
work on this redundant yet.)
this wasn't introduced until the 6800 series, with the requirements of DX8
Programmable vertex shader support has been around since the
GeForce 3 days (you are partially right about it coinciding with the
introduction of DX8).
Last edited by Kloot on 03 Sep 2008, 16:45, edited 1 time in total.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: LUA MD5 (skeletal animation etc)

Post by Pxtl »

Okay, I'm confused how this sort of system will play with the BOS script - can BOS move around bones instead of parts? Or will it completely supplant the BOS script (except that you have to create a redundant pile of BOS for invisible models or something?)

And as I understand it, the thing with per-vertex animation is that, while it is memory intensive, it is super-fast for large numbers of models with identical meshes, since they can all read from the same display list.
Post Reply

Return to “Lua Scripts”