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

Gibbing

Started by VGames, June 29, 2015, 10:31:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VGames

When a monster gibs how does the game know where to start disintegrating the body? Is it an alpha texture thing? And is there a way to only let certain parts of the body disintegrate?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

argoon

Doom 3 has perpixel collision detection so you can detect when a projectile hits a specific part of the body, so you could use that data to drive your dismembering tech.
There's other ways also, i remember how the old Severance blade of darkness game made dismembering, it divided the body in sections by means of smoothing groups, and it used two identical models but one was already pre cut in the different sections, head, torso, legs,etc, with a meat texture in the end sections, so when the sword hit a specific section it would change the uncut model to the cut model with the specific limb missing how it did that on code is beyond me.






VGames

Interesting stuff. But I'm not trying to make a new gibbing system. I just want to know how to manipulate what part of the model disintegrates using the gibbing system that's already in Doom 3.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

motorsep

Quote from: VGames on June 29, 2015, 11:29:01 AM
Interesting stuff. But I'm not trying to make a new gibbing system. I just want to know how to manipulate what part of the model disintegrates using the gibbing system that's already in Doom 3.

You can't. Any dismembering system depends on premade model set with body parts. There is no other way around. Doom 3 was not designed that way. 

Check this out:

https://de45xmedrsdbp.cloudfront.net/Resources/files/GDC09_Smedberg_RenderingTechniques-1415210295.pdf

http://www.gdcvault.com/play/1295/Rendering-Techniques-in-GEARS-OF

VGames

Ok I see how they do it. But how does the doom 3 gibbing system know where to start disintegrating a body? Is there a place in the source to see that? Or is that something that can't be altered? I'm asking this because I noticed that a body for a monster will start disintegrating at the same spot every time. But for a different character they'll start disintegrating at a different spot on their body but they'll start right there every time. So what is causing it to happen like that for each monster? Is that something that can be seen code wise?
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

The Happy Friar

It's a material that causes the disintegration.  That's why you're having a hard time finding it.  I'm betting it's listed in the shader file for the model.

As for certain parts, do you mean that when you chop off an arm the arm disintegrates but not the rest?  Or when you chop off the arm it starts to disintegrate from the arm, chop off the leg from the leg, etc?

BielBdeLuna

the effect is controlled by a grey texture that both controls the burnaway effect and the gibbing effect, it's done with the transparency percentage informed by the grey texture luminance over the other textures of the monsters and in the case of the burnaway with an additional fiery texture, it's a time dependant effect and it's time gets re-started by the c++ code per dying AI entity.

VGames

I'm referring to the disintegration that happens when a monster is gibbed in vanilla doom 3. I'm not doing anything new. I just wanted to know how the game knows what to disentegrate. I'll look for this shader file and the texture.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

motorsep

Quote from: VGames on June 29, 2015, 10:58:19 PM
I'm referring to the disintegration that happens when a monster is gibbed in vanilla doom 3. I'm not doing anything new. I just wanted to know how the game knows what to disentegrate. I'll look for this shader file and the texture.

There is no disintegration when monsters are gibbed. Each model has regular mesh and skeleton mesh (humanoids at least do). So when it's gibbed, regular mesh gets hidden (I don't know if it's done via skin or somehow else), skeleton mesh gets shown, gibs and blood are spawned on the joints defined in def file. That's all there is to it.

VGames

The "via skin or somehow else" is what I'm looking for.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

motorsep

Quote from: VGames on June 30, 2015, 08:11:08 AM
The "via skin or somehow else" is what I'm looking for.

You should really need to open the code and sift through it. It's a slow process that can get annoying at times, especially for non-programmers, but it something you have to do on your own for basic things like this.

BielBdeLuna

before the actual death in the script there is a pre-burn which sets the models with the correct shaders (the shaders needed for the effect) and in death then c++ restarts the time of the shaders and therefore the shader makes the effect, so it's all in the script and in the c++, the gibbing is a simpler burning effect that happens when the monster corpse receives enough pain.

VGames

I have gone through the sdk many times and found where to increase the length of time a gib sticks around and how fast the character model disintegrates and how fast the skeleton disintegrates. That was the easy part. I also found the name of the shader that does this but I couldn't find where the code for that shader was. That's what I'm looking for. Plus the texture if there is one that guides the effect as it disintegrates the body.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500

motorsep

#13
There are no shaders involved, please stop mixing up terminology (I am guessing this nonsense spawns from Quake 3). Shaders are ARB and they don't participate in this at all. Materials, shaderParms (material parameter) and code are the ones doing magic.

Since all you need is to replicate the effect as in doom 3, just with your assets, it's not that complicated to find out how it's done. Just get the model, and it's def, and start searching from there. The code is the last place you need to look at really. You don't need any delay, any restart time. All you need is to get an asset and find corresponding assets and parameters.

VGames

Yeah I'm sorry I didn't mean shader I meant shaderParm. I found that. I'll look through the character def and model and see what I come up with. What id like to do is cause only parts of a model to disintegrate and then bind a gore model to the part that has been removed. Like make their foot and lower leg disappear and then bind a model that looks like meat and bone sticking out to their knee to make it look like their leg was blown off when they were gibbed. Stuff like that.
Get the latest on Perfected Doom 3 here - http://www.moddb.com/mods/perfected-doom-3-version-500