Create explosion destruction

Discussion in 'Mapping Questions & Discussion' started by Simulacron, Jul 10, 2016.

  1. Simulacron

    Simulacron L6: Sharp Member

    Messages:
    287
    Positive Ratings:
    147
    As you can read in the title, I want to create a explosion. The particle system, the sound and the shake for the explosion is already set up, but how can I create the effect of destruction, caused by the explosion, like flying away barrels or some kind of destruction on the enviroment(missing walls...)
     
  2. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,819
    Positive Ratings:
    4,661
    This is done by importing your map into a 3d modelling software and simulating the explosion, then baking it into one big model animation to play in your map.

    If you're interested, I'd reccomend 3ds max and the rayfire plugin as I believe that's what valve and most of the community use.
     
  3. Simulacron

    Simulacron L6: Sharp Member

    Messages:
    287
    Positive Ratings:
    147
    Thanks for this information, I didn't know that you need a extra programm to do this
     
  4. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,419
    Positive Ratings:
    1,141
    Basically, you can make the flying barrels prop/func_tracktrain and that stuff, but that's harder to debug though it gives you some funny things to do like these barrels killing players, etc
     
    • Respectfully Disagree Respectfully Disagree x 2
    • Agree Agree x 1
  5. Muddy

    Server Staff Muddy Muddy

    Messages:
    2,372
    Positive Ratings:
    4,167
    I imagine that would look too weird and unrealistic to be worth the trouble
     
  6. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,419
    Positive Ratings:
    1,141
    That's why I don't recommend this way, besides it being harder if you have animating skills.
     
  7. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    If you're just dealing with flying objects (no object deformation), you could rig stuff up with Source's physics engine. Everything needs to be a prop_dynamic from the start, which you can physics-ify with phys_convert. Alternatively, you can disable prop_dynamics and swap them with prop_physics equivalents when you need to throw them, which should give you more control over the exact physical properties of each object.

    (I don't know that you can set phys_convert objects to not collide with players, so the swapping method is probably what you'd want to use.)

    As for actually throwing objects, env_physexplosion is your friend.

    This method is faster and more versatile than a baked animation, but it's also more expensive (multiplayer servers don't like physics) and isn't predictable. I don't recommend it for a _final version, but you can probably get away with it in an early beta.
     
    • Thanks Thanks x 2
  8. henke37

    aa henke37

    Messages:
    1,834
    Positive Ratings:
    420
    I wouldn't worry too much about colliding with players since noone is going to complain when someone else gets hit by flying debre.
     
  9. dryerlint

    dryerlint L5: Dapper Member

    Messages:
    205
    Positive Ratings:
    183
    If anything, it'll increase the Explosion Coolness Factor (TM)
     
    • Agree Agree x 3
    • Like Like x 1
  10. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    Plus anyone close enough to get hit by it is probably going to die from the trigger_hurt anyway.
     
    • Agree Agree x 1
  11. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,419
    Positive Ratings:
    1,141
    How about getting hit by a piece of the wall being half a km away from the explosion?
    would be quite high wouldn't it
     
    • Agree Agree x 1
  12. Pocket

    aa Pocket func_croc

    Messages:
    4,489
    Positive Ratings:
    2,213
    I wonder what's the farthest a piece of debris actually flies in any of the stock explosions and actually lands on a walkable surface. My TF2-having computer is currently in a flesh-meltingly hot part of the house so I can't look into it right now.

    It would be intensely cool if your explosion did send something heavy flying at a spot players could conceivably be, and put a trigger_hurt there that's set to go off at the exact moment the object lands there. 99% of the time it won't do anything, but the one time a player happens to get caught in that spot, their mind will be blown by your foresight.
     
    • Like Like x 1
  13. Crowbar

    aa Crowbar perfektoberfest

    Messages:
    1,419
    Positive Ratings:
    1,141
    Why not parent the trigger to the object so it also can hit a random stickyjumping demo? I'd love to be killed in such a way
    Edit oh wait your way also works with animations, like sane people would do it. Weeeeell u can make a trigger move along but that's hard an I don't really know if it's worth it tbh
     
  14. Idolon

    aa Idolon the worst admin

    Messages:
    1,421
    Positive Ratings:
    4,154
    You could parent the trigger to an attachment point on the prop (same method used for the articulating panel arms in Portal 2).
     
    • Thanks Thanks x 1
Tags: