Author Topic: Having effects on Animations  (Read 1901 times)

0 Members and 1 Guest are viewing this topic.

Zombie

  • Guest
Having effects on Animations
« on: August 21, 2014, 04:06:07 AM »
Hello!

Currently I'm at work, and something came to me, how do you spawn effects on animations, for example the fire particles on the lost soul.

Is that only for AI or can you add that to generic animated MD5's too? I don't want to place them in the world though and bind them to a bone, that's too tedious.

Cheers,

Z

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 915
  • Karma: +44/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Having effects on Animations
« Reply #1 on: August 21, 2014, 07:07:39 AM »
In the def files (on every D3 engine variant but ETQW I think) you can have a particle automatically bound to a bone. id dev net has some of the keywords you'll need, but to sum it up:
the particle name & bone name need to be identical.

 

Zombie

  • Guest
Re: Having effects on Animations
« Reply #2 on: August 21, 2014, 09:12:48 AM »
Nice one, thanks Friar!

solarsplace

  • Jr. Member
  • **
  • Posts: 63
  • Karma: +8/-0
  • Mainly a programmer...
    • View Profile
Re: Having effects on Animations
« Reply #3 on: September 15, 2014, 11:06:01 AM »
Hi

Happy Friar is correct, you can have many particles bound to many bones and the code is already in there to do it for you:

The key / value name & format you need is:

"smokeparticleSystem" "particle-bone"

The following example binds the particle called "arx_fish_bubbles" to a bone named "mouth":

"smokeparticleSystem" "arx_fish_bubbles-mouth"

If I were to add the following, then the SDK would assume the particle and the bone name were one and the same. So it would try and bind a particle called "mouth" to a bone called "mouth":

"smokeparticleSystem" "mouth"

You can add more particle to the model in the following way:

"smokeParticleSystem2" "particle-bone"
"smokeParticleSystem3" "particle-bone"
"smokeParticleSystem4" "particle-bone"

etc...

Hope that helps someone :)

VGames

  • PD3 Beta Testers
  • Hero Member
  • *
  • Posts: 757
  • Karma: +17/-69
    • View Profile
Re: Having effects on Animations
« Reply #4 on: September 15, 2014, 12:45:51 PM »
What about a light source along with the particle effect. I was able to do this using projectiles but it was too tasking on the system is there a better way to add lights to a bone.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

BloodRayne

  • Old Forum Goer
  • Full Member
  • ***
  • Posts: 136
  • Karma: +13/-0
  • Doom Newbie
    • View Profile
    • Grimm Quest for the Gatherer's Key
Re: Having effects on Animations
« Reply #5 on: September 15, 2014, 12:54:35 PM »
What about a light source along with the particle effect. I was able to do this using projectiles but it was too tasking on the system is there a better way to add lights to a bone.
It might be better to start an FX on the bone then. You can add lights/particles e.g. to FX files easily.

Here's the complete reference: http://www.iddevnet.com/doom3/fx.php

To start an FX, you have several methods. You can spawn and bind (then trigger) an FX entity to a joint using the BindToJoint() function in script, then remove it after a certain amount of time.

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 915
  • Karma: +44/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Re: Having effects on Animations
« Reply #6 on: September 15, 2014, 01:40:21 PM »
Something I always wondered about FX: if I used a particle, sound & light those would be three entities.  If I use an FX instead of those three, is it one entity that contains all three elements or is it three entities + the FX entity?  I'm asking entity count wise, not visual wise.

Zombie

  • Guest
Re: Having effects on Animations
« Reply #7 on: September 16, 2014, 12:23:03 AM »
In game it would be 3 entities since they are 3 different spawn classes.

there is no way to spawn a particle, light and sound unless you coded a new entity that has the property of all those entities in one.

BloodRayne

  • Old Forum Goer
  • Full Member
  • ***
  • Posts: 136
  • Karma: +13/-0
  • Doom Newbie
    • View Profile
    • Grimm Quest for the Gatherer's Key
Re: Having effects on Animations
« Reply #8 on: September 16, 2014, 03:46:51 AM »
I'm not totally convinced of that, Zombie. Or rather, I'm not totally convinced that they count towards the entity limit. I was going to post the same thing as each thing you create from an FX is an entity, but then again, decals are entities also (you can see this by using the g_showentity command) and in my tests they never counted towards the entity limit.

I think the only real options are to check the source or to simply test it (create an FX that spawns more entities than the entitycount and see if it bombs the level).

Zombie

  • Guest
Re: Having effects on Animations
« Reply #9 on: September 16, 2014, 05:47:23 AM »
You could be right!

I don't really have the time to test it and it's not really a huge issue if it does or doesn't spawn new entities. I have never reached the entity limit before =)