News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

Having effects on Animations

Started by Zombie, August 21, 2014, 04:06:07 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Zombie

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

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


solarsplace

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

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

Quote from: VGames 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.
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

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

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

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

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 =)