Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

gore system ideas

Discussion in 'General Discussion' started by Mister-D, Feb 20, 2017.

  1. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    im trying to figure out the best way to do a gore/ dismemberment system in unity

    my ideas were:

    1 shaderbased to cutoff the damaged mesh
    2 prefractured mesh
    3 blendshape system
    4 dynamic ,scriptbased mesh cut (way to difficult for me to write ;) )

    if anyone has a good solution please post me in the right direction

    tnx
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    I'm horrible at this kind of stuff, so I'm thinking how I'd do it with my limited abilities, and I'd probably go with something like:
    1. Create my character models with dismemberable parts as separate objects so they appear as submeshes in Unity
    2. Name the parts in such a way that they can be easily findable, i.e., "l_hand, l_arm, r_leg"
    3. When a critical hit is struck and dismemberment should take place, find the parts and any children and disable/remove them
    4. Spawn an appropriate object that matches the part that was dismembered, add the physics component, and send it flying
    5. Instantiate and activate a ton of blood particle effects at the location of the cut (pre-placed Transform points or may be able to use the Avatar/skeleton somehow) and on the spawned object
     
  3. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,433
    A lot of it probably depends on more in-depth usecase requirements like number of enemies per encounter, genre of game, camera perspective, art style, target hardware, number of unique enemie assets, customization/random variation options per enemy, etc..
     
  4. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes also my first idea, but i was hoping for a more "simple" solution thru code or shader.
    its a ton of work to make such a character and im a bit lazy ;)
    its for fps(pc)not more than 4 enemys at the same time.
     
  5. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    think of the first soldier of fortune,
     
  6. pixpusher2

    pixpusher2

    Joined:
    Oct 30, 2013
    Posts:
    121
    In the early days they just scaled the affected limb's bone to zero and then spawn some gibs & blood particles after. Pretty clever trick.
     
    theANMATOR2b and Martin_H like this.
  7. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    really? ill try it, tnx
     
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    Predetermined destructible zones with predefined modeled geometry. It is going to be incredibly tedious to model, by the way.

    Blendshapes won't give you anything, shader won't be able to close holes in the mesh, script based will result in perfectly flat cuts unless you're willing to spend a year perfecting real-time booleans.
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    SF 1 and SF 2 used predetermined destructible zones, if I remember correctly. The only difference is that they had a LOT of zones. Heard the stories it was possible to carve out individual organs with knife. The stories are probably true.
     
  10. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes lots of modelling work
    im going with pixpushers method combined with some gib meshes.
     
  11. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    A lot of modeling, but the best visual results.

    Additional possible method is voxelizing object interiors, but this requires R&D, and is not guaranteed to work. If it works, it coudl produce results comparable to MGS: Rising katana.

    It is possible to make things a bit more realistic by creating two more models: "guts" and "bones", and attaching them to model's skeleton, then hiding portions that are not going to be visible. This is more difficult to implement, but you will need to do it once, and will be able to reuse the same skeleton/guts everywhere.

    But if you want a quick result, scaling limbs down is the way to go.
     
  12. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes i will scale limbs and make guts and bones models to be attached to the scaled joint.
     
  13. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,433
    Unless I see a video of that I'm inclined to write that off as an urban legend. I played through that game back in the days and I think that's something I would have remembered. SOF 1 did have lots of hit-zones though and also uncommon ones like throat or groin. I think there also was one where guts would spill out if you shoot someone in the stomach with a shotgun. And they had different hit decals, including exist woulds I think.
    Afaik the most sophisticated gore systems are in Dead Island and Dying Light where they feature more or less gradual removal of flesh from zombies' arms and legs.
     
    theANMATOR2b likes this.