Dust trails. Unit animation.
Moderators: rbodleyscott, Slitherine Core, Gothic Labs
Dust trails. Unit animation.
I noticed some units leave a dust trail while some don't.
Which parameter in the unit.txt controls this? Also do I also need to do something to the 3d model?
As for preferences, is it better to remove the dust for all units? Implement dust for all? Or only for selected fast units?
Which parameter in the unit.txt controls this? Also do I also need to do something to the 3d model?
As for preferences, is it better to remove the dust for all units? Implement dust for all? Or only for selected fast units?
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
Sadly, the short answer to all this is that I haven't a clue. I will see if the artist, Rob Graat, (who is now working on other projects) has time to explain.jomni wrote:I noticed some units leave a dust trail while some don't.
Which parameter in the unit.txt controls this? Also do I also need to do something to the 3d model?
As for preferences, is it better to remove the dust for all units? Implement dust for all? Or only for selected fast units?
Richard Bodley Scott
Re: Dust trails. Unit animation.
No worries. At this point I only see the archers leaving a trail of dust.
Re: Dust trails. Unit animation.
Each model has particle emitters, or actually it has parts of a mesh called !#[EmitterID]. The dust particles are emitted by a submesh called either !#12 (small units), !#13 (wide units) or !#14 (normal width units). If a model does not have the correctly named submeshes it won't be able to emite particles associated with that emitter.
So the first step is adding a submesh called either !#12, !#13 or !#14.
The dust particles (along with all the other particles) are described in Pike and Shot\Core\explosions.fxf:
Hook up the particle to the emitter:
Give the particle emitter a FX ID to be used in the unit text file:
Now make the emitters actually emit particles in Pike and Shot\Data\Battle\Units\[UnitName].txt:
I hope this quick explanation will get you on the right track if you decide to add dust afterall.
Cheers,
Rob
So the first step is adding a submesh called either !#12, !#13 or !#14.
The dust particles (along with all the other particles) are described in Pike and Shot\Core\explosions.fxf:
Code: Select all
[Dust24] //
VelBase 0 , 0 , 0 // Initial speed in X,Y,Z coordinates. Positive Z is upwards.
VelRand 0.1 , 0.05 , 0.1 // Random modifier of intitial speed.
RBase 250 // Base colour.
GBase 200
BBase 140
ABase 50 // Base alpha. 0 = invisible. 255 = opaque.
RRand 0 // Random modifier of base colour.
GRand 0
BRand 0
ARand 100
RFadeBase 0 // Fading.
GFadeBase 0
BFadeBase 0
AFadeBase -10 // Negative value results in increasing transparency during lifetime.
RFadeRand 0
GFadeRand 0
BFadeRand 0
AFadeRand 0 // Random modifier of fading.
SizeBase 2 // Small size which grows larger.
SizeRand 6
SizeDelta 1.05
LifeBase 5 // Base lifetime. 30 = 1 second?
LifeRand 10 // Random modifier of lifetime.
TexBase 16 // 0 based index of texture tile in atlas.
TexRand 3 // Random texture tile selection over given range. 0 = no randomization.
TexWalk 15 // ?
Type 1 // 0 = all white texture | 1 = local coordinates | 2 = global coordinates | 3 =
Gravity 0 // Positive is upwards
Emission 1 // Number of particles emitted per timeframe.
EmissionArea 0 , 0 , 24 // 3D space in which particles are emitted.
Code: Select all
[$EMIT_13]
PARTICLE Dust24
START 13
END 13
Code: Select all
[%FX_13]
LOOPS FALSE
MAXTIME 0.100000
EMITTER EMIT_13
EMIT_130> 0.000000
EMIT_130< 0.100000
Code: Select all
[MOVE00] // Animation tag and index
FRM 17 27 // Frame numbers for this animation
FX 0 13 // FX [FrameNumber] [FX ID]
FX 1 13 // Emitter !#13 will emit at frame 1
FX 2 13 // Emitter !#13 will emit at frame 2
FX 3 13 // etc.
FX 4 13
FX 5 13
FX 6 13
FX 7 13
FX 8 13
FX 9 13
Cheers,
Rob
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
Thanks. Now time to digest.
Re: Dust trails. Unit animation.
can large dust trails impede LOS ? Horses certainly stirred up the dust.
Cannon fire and salvos produced alot of smoke. Sometimes obscuring vision at unfortunate times, would this be a major deal to set this up?
Cannon fire and salvos produced alot of smoke. Sometimes obscuring vision at unfortunate times, would this be a major deal to set this up?
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
Probably not feasible, I fear.beserko wrote:can large dust trails impede LOS ? Horses certainly stirred up the dust.
Cannon fire and salvos produced alot of smoke. Sometimes obscuring vision at unfortunate times, would this be a major deal to set this up?
Richard Bodley Scott
-
- Field of Glory Moderator
- Posts: 14500
- Joined: Fri Oct 01, 2010 2:50 pm
Re: Dust trails. Unit animation.
What about mud?
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)stockwellpete wrote:What about mud?
Richard Bodley Scott
-
- Field of Glory Moderator
- Posts: 14500
- Joined: Fri Oct 01, 2010 2:50 pm
Re: Dust trails. Unit animation.
Yes, that would be good. Maybe that could come if you decide to include weather rules in your games at some stage? I was just wondering - do you envisage any great problems with writing scripts for weather conditions?rbodleyscott wrote: Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)
And I was also thinking that instead of a dust trail (summer) you could have the cavalry units throwing up clods of mud for the rest of the year (in Europe/Japan anyway). It would bring a nice little touch to your games.
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.stockwellpete wrote:Yes, that would be good. Maybe that could come if you decide to include weather rules in your games at some stage? I was just wondering - do you envisage any great problems with writing scripts for weather conditions?rbodleyscott wrote: Would be easy enough to implement by addinh a mud tile (or simply treating it as rough ground)
That would be a lot harder.And I was also thinking that instead of a dust trail (summer) you could have the cavalry units throwing up clods of mud for the rest of the year (in Europe/Japan anyway). It would bring a nice little touch to your games.
Richard Bodley Scott
-
- Field of Glory Moderator
- Posts: 14500
- Joined: Fri Oct 01, 2010 2:50 pm
Re: Dust trails. Unit animation.
I was just thinking about the way weather conditions affected the War of the Roses battles and I suppose there were three main examples . . .rbodleyscott wrote: It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.
Northampton 1460 - poured with rain prior to the battle rendering artillery and handguns fairly useless
Towton 1461 - the wind direction favoured the Yorkist archers at the start of the battle and they were able to cause more casualties than their Lancastrian counterparts, although this was not decisive in terms of the outcome of the battle.
Barnet 1471 - the early morning mist/fog completely disoriented the Lancastrian army and played a big part in their eventual defeat.
So rain (and snow) would be OK to do, wind would be difficult, and I imagine mist/fog would be do-able as well seeing that we already have "fog of war" in games.
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
Well we already have Fog in the Lutzen scenario affecting visiblity, though there is no Fog visual effect.stockwellpete wrote:I was just thinking about the way weather conditions affected the War of the Roses battles and I suppose there were three main examples . . .rbodleyscott wrote: It would be very easy to write scripts for simple weather conditions such as raining, harder for items like wind direction.
Northampton 1460 - poured with rain prior to the battle rendering artillery and handguns fairly useless
Towton 1461 - the wind direction favoured the Yorkist archers at the start of the battle and they were able to cause more casualties than their Lancastrian counterparts, although this was not decisive in terms of the outcome of the battle.
Barnet 1471 - the early morning mist/fog completely disoriented the Lancastrian army and played a big part in their eventual defeat.
So rain (and snow) would be OK to do, wind would be difficult, and I imagine mist/fog would be do-able as well seeing that we already have "fog of war" in games.
Richard Bodley Scott
Re: Dust trails. Unit animation.
Id love to see a mod that prolonged the gunsmoke gfx.
Mmmm, lingering smoke.
Could I edit the explosions.fxf myself for desired effect?
Thanks
Mmmm, lingering smoke.
Could I edit the explosions.fxf myself for desired effect?
Thanks
-
- Field of Glory 2
- Posts: 28014
- Joined: Sun Dec 04, 2005 6:25 pm
Re: Dust trails. Unit animation.
TBH I have no idea. I left the graphics to the graphics guy (Rob Graat).Dino_SWE wrote:Id love to see a mod that prolonged the gunsmoke gfx.
Mmmm, lingering smoke.
Could I edit the explosions.fxf myself for desired effect?
Richard Bodley Scott