Custom ANIM3DTRANS animation - working.

Discuss the future of Warzone 2100 with us.
User avatar
Alarak
Rookie
Rookie
Posts: 22
Joined: 05 Feb 2016, 19:17

Re: Custom ANIM3DTRANS animation - working.

Post by Alarak »

Hello guys.

I've been trying to understand a bit of this animation stuff.
And also I read up on an older issue where people complained about the lasers also being projectile based.

I had an idea:

What if we were to anmate the laser FX pie file so that the model is both translated and stretched along the flight path (presumably X direction) and pare it with an attuned flight speed to make it appear as a beam type weapon.

I had hoped to attempt this myself, however I don't understand a single thing of how to make the animation and actually make it work.
I did make an animation based on one of the old ones (single model basis and ANIM3DFRAMES) but the model I used for the laser FX is not affected by what I've done.

Code: Select all

/* header format: anim3d [filename] [frames][framerate] [num objects]            */
/* anim line: [frame] [x] [y] [z] [xrot] [yrot] [zrot][xscale] [yscale] [zscale] */
ANIM3DTRANS "FX_HvyLas.pie" 6 7
{
	  0	0 0 0 0 0 0 1100 1000 1000
	  1	10 0 0 0 0 0 1300 1000 1000
	  2	25 0 0 0 0 0 1600 1000 1000
	  3	50 0 0 0 0 0 2000 1000 1000
	  4	30 0 0 0 0 0 1500 1000 1000
	  5	0 0 0 0 0 0 1000 1000 1000
}
I had hoped this would translate and stretch the FX model, bt alas.. I didn't Could someone please help me here?
If my theory works for acquiring a near-as-good beam weapon it could also be taken over to work in regular WZ.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Custom ANIM3DTRANS animation - working.

Post by Per »

This animation system only works on specific hardcoded models, I'm afraid. I have a generalization of the animation system somewhere, but it isn't in any available version yet.
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: Custom ANIM3DTRANS animation - working.

Post by stiv »

That sounds like a fun thing to work on. Do you have any note or design thoughts, Per?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Custom ANIM3DTRANS animation - working.

Post by Per »

stiv wrote:That sounds like a fun thing to work on. Do you have any note or design thoughts, Per?
Better, I have a working implementation:
https://github.com/perim/warzone2100/co ... 87b8d99d6c
User avatar
Alarak
Rookie
Rookie
Posts: 22
Joined: 05 Feb 2016, 19:17

Re: Custom ANIM3DTRANS animation - working.

Post by Alarak »

Wooow, that's a load to go through, especially with my rudimentary understanding of java :shock:
But if I understand you correctly, you have a working system where the pie file itself directly handles the animations?
So the idea for an actual beam weapon may not be that hard to create then?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Custom ANIM3DTRANS animation - working.

Post by Per »

Alarak wrote:Wooow, that's a load to go through, especially with my rudimentary understanding of java :shock:
But if I understand you correctly, you have a working system where the pie file itself directly handles the animations?
So the idea for an actual beam weapon may not be that hard to create then?
Almost. It still does not handle such animations for weapon models yet. But that should not be hard to add.

This does not mean that I think adding proper laser effects through hacking animations is a good idea... I suspect it will probably look really weird.
User avatar
Alarak
Rookie
Rookie
Posts: 22
Joined: 05 Feb 2016, 19:17

Re: Custom ANIM3DTRANS animation - working.

Post by Alarak »

Per wrote:
Alarak wrote:Wooow, that's a load to go through, especially with my rudimentary understanding of java :shock:
But if I understand you correctly, you have a working system where the pie file itself directly handles the animations?
So the idea for an actual beam weapon may not be that hard to create then?
Almost. It still does not handle such animations for weapon models yet. But that should not be hard to add.

This does not mean that I think adding proper laser effects through hacking animations is a good idea... I suspect it will probably look really weird.
Might be, but as long as the laser remains being a projectile I don't think much else can be achieved, that is the nature of how a projectile works.
Another approach (which i assume is discussed already) is attaching the 'start' point of the laser model to the connector of the gun barrel, and the 'end' point to the target and stretch the model between these. I'm not sure however how one would then work with accuracy, and how to define certain 'hit'-point on the target.
The hack seems like it easier to insert, as it doesn't upset the current system too much (being projectile based) and i guess giving it a try would never hurt :)
Post Reply