Game Development Community

"GORE" effect

by Ari J · in Torque Game Engine · 09/14/2004 (5:04 am) · 12 replies

Does anyone know if this is possible?

I was thinking that it would be really cool if my game would hafe some kind of gore effect, for exapmle: When the bullet model from the weapon reches a certain model, the vertex that would be the closest to where the bullet hit that certain model would "sink" into it thus giving it the effect that it had been blown away.

If this is posssible i would also like to know how to change the texture on the place the bullet hit.

#1
09/14/2004 (7:19 am)
Well, for the first piece, you'll need to look at the collision code for DTS objects. Extend it so that characters have per-poly collision rather than hitbox collision (and keep your polycount very low). Then, work on a selection algorithm (the easiest way I can think of right now would be an extension of the show tool that allows you to select points on your model and then "selects" the polygons within a certain distance of that point; that way you could have more of the polys on your mesh deformed with different ammunition hits). Once you have a visual selection method, you should have a good idea of how to manipulate the polygons themselves to give the sunken look you're going for.

Personally, I think that it's overkill that most people wouldn't notice (or once they did, they wouldn't care because it doesn't enhance gameplay unless you actively associate different target points with hit areas...say, the lungs, where the player's model would hunch over and begin wheezing hard and vomiting blood). For the player, this extended animation would mean that they'd have to wait longer to respawn and get back into the game. If you're looking at a single-player title with the example above, it could work well in a survival horror game, but the death sequence could just as easily be done with hitbox detection with much less overhead. For the most part, the "getting hit" side could be done with textures.

Which brings me to the second point. Do a search for decals on the forums. Also, look into the demo mission and see how the footsteps were done. That should get you started. If you're looking at something like the texturing in The Suffering, where Torque (the main character) gets more and more bloody the more he kills things, then I'd recommend a number of skins in a variety of "bloody" states. Combining those with smaller damage decals could be rather interesting.

Note, though, that I haven't done anything with the DTS code or any of the decal stuff, so I may be making life a bit more difficult that you would if you were to look through the code yourself. These were just the thoughts off the top of my head.
#2
09/14/2004 (7:44 am)
Thanks man, but i am acctually thinking about it to use on only few weapons like the shotgun, so i would make multiple vertexes sink, making it look like it shot away.

Another question though, could i delete the vertex the bullet hits?
#3
09/14/2004 (7:47 am)
(That was of course supposed to be "like it was shot away.")
#4
09/14/2004 (8:52 am)
Hello,

One possibility is to cover areas of the person with a collition box or cylander, ie The torso, upper leg, lower leg, upper arm and lower arm. That would give you the areas that were hit, then it would be a matter of finding the polygon that was hit. Personally, I think the poly or vertex level may be too much and you could accomplish the same thing by simply removing the section of the body that was hit (asside from the torso of course). For example, shooting someone in the arm could just blow that section of there arm off. That should get what you are looking for.

Ben
#5
09/14/2004 (9:18 am)
If you start deleting and manipulating vertexes within your models, you can run into some really funky UV problems if. You may also run into joint problems if you incorrectly select vertices that are reference points for the DSQ animations (the fix would be to check the bones, and if the selected area is in conjunction with a joint, then determine whether to deselect the problem area or sever the joint and associated limb). Again, since I haven't looked at the code, I may be leading you down the wrong path. I'm sure that the people who have written exporters for various packages such as James Urquhart (Blender exporter), Matt Summers (GameSpace exporter), LightWave David "Fulcrum" Wyand (GnomeTech LightWave exporter, Clark Fagot (of BraveTree) and Danny Ngan (Maya2DTS documentation guru). Sorry if I screwed up anyone's info.

The hidden mesh resource might help you, though.

Here's an old skin modification resource, too.
#6
09/14/2004 (9:23 am)
Thank you :/
#7
09/14/2004 (9:25 am)
But could i delete the vertex the bullet hits? because we're thinking of having organs and stuff being planted behind the main body. So if you shoot off a vertex you can see the organs.
#8
09/14/2004 (9:53 am)
Check out the hidden mesh resource. That could definitely help you with the layering.
#9
09/14/2004 (10:19 am)
I would definitely approach this from a higher level than deleting vertices on the fly.
Hiding & Revealing meshes is probably the way to go.

True, every time you shoot some guy in the belly with a shotgun,
if you just swap out which meshes are visible then it will always
look more or less the same,
whereas the more physics-style approach of modifying the mesh would give nice satisfying always-different results, it's a pretty non-trivial job.
#10
09/14/2004 (10:32 am)
Hmm yeah that is probably the way to go, but i don't really have the slightest idea how to do this.
#11
09/14/2004 (12:53 pm)
Here's another excellent Node hiding resource.

Okay, start simple. Create a box model with collision boxes on each face of the model. Put something inside the box and put a bounding collision mesh around it. Then, put the box into Torque and script the triggers so that it will hide the face that is "hit" according to the boxes. Once this works, you should be able to see the item inside the box. Make a trigger that records when the item inside the box is hit.

Next, create a single face with four collision boxes (each corner to the center so it looks like a chess board). Put them together to make a box inside the engine. Then, put something else inside the box (complete with the collision mesh). Target each of the boxes with a trigger and work out the difference between instances and global triggers affecting the nodes.

Next, create a torso. Create the hitboxes for areas that you want to be able to break open and reveal. Create and animation for them "mending" themselves (perhaps a simple blend between hiding and showing would work, but I don't know since I haven't done anything like this). Utilize the triggers for the collision meshes the same way as you did in the box. You now have a boss similar to a number of platformers (or at least its torso). Set a schedule for how long meshes should stay hidden once destroyed, and then repair them. Now, you should have all of the elements necessary to 1) shoot the torso in different areas to "blow it open" and 2) have a method for it regenerating. Finally, put a heart shape into the torso and give it a damage variable. This way, you can test hiding meshes and collision meshes. Plus, you'll have a good start on a boss body.

Finally, you can apply everything learned here into your character models, though you'll be doing some manipulation with the collision code to use a larger number of collision meshes (or mounting body parts which can lead to interesting constraints problems).

I don't know if any of that would help you, but if I were looking at the same problem you are right now, I'd do something like that: start simple and get more advanced until I have a working prototype of the basics of what I'm trying to accomplish.
#12
09/16/2004 (8:59 am)
Thank you man i'll try this out.