Home Unreal Engine

multiple collision meshes

poopipe
grand marshal polycounter
Offline / Send Message
poopipe grand marshal polycounter
Hello 

I did  some reading earlier and it appears that unreal doesn't  exactly have out of the box support for the concept of multiple different collision meshes eg.  separate pawn and projectile collisions

I need to support arbitrary meshes - it's not practical to author valid primitive or combined convex hull meshes for all the content that needs this stuff and I'm fully aware of the performance concerns around it.

so.. two questions for those who've shipped a shooter on the engine : 
1: Am i wrong (i.e it does support this out of the box)?
2: I'f I'm not wrong, did you simply wrap the static mesh class with something that supports custom meshes for various collision types   (I've already done this but i'm wondering if I'm going to regret it later)


ta

Replies

  • Alex_J
    Options
    Online / Send Message
    Alex_J grand marshal polycounter
    I am not sure I completely understand the question but I'll mention a couple things just in case it's helpful:

    1. You can make custom collision (and trace) channels in project settings
    2. I've added static mesh components (with arbitrary shapes made in maya) to a character and then just set the collision to only respond to specific channels. The static mesh components I make child of a skeleton bone (in this case this was a form of hit colliders so that we can know if we shot a vital organ, etc)


    An example of custom collision channel is that I wanted for a "near miss" sound effect when a projectile goes close to the player. So I made a static mesh shape, add to the character, and set it to only overlap a specific custom collision channel I made just for that. Everything else is ignored. It could just as well be a primitive shape, but the actual static mesh doesn't really matter. Just set its collision settings to be Complex as Simple.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    the TLDR is that I need simple player collision so you don't hung up on stuff but I still need to be able to shoot through small gaps in railings etc.

    I've done roughly what you describe  - just wondering how other people have dealt with it and whether it'll start becoming a problem when a large map gets populated.
    I'm looking at 64km^2 with a fairly dense distribution of villages/towns etc. so i'm just a bit twitchy about getting hit with an unsolvable problem later. 

    meh.  I'll work it out if it happens i spose :)
  • Alex_J
    Options
    Online / Send Message
    Alex_J grand marshal polycounter
    ah gotcha.

    for shooting games I've not done any large maps, I do use complex collision on any static meshes in the play area. I have used complex collision in non-shooting games for foliage instances on maps about that size and it didn't make any measurable difference that I could see. This was hundreds of thousands of foliage instances and it just didn't appear to matter. The collision only enables with proximity to the player (that's just auto-magically handled by unreal).

  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    thats reassuring  -  guess I'll find out right :D
  • Alex_J
    Options
    Online / Send Message
    Alex_J grand marshal polycounter
    i wish the epic devs were still active on their forums there. anybody who worked on fortnite would probably be able to give a good answer since that sounds closer to what you are doing. recently one of the community staff mentioned at least that they were considering getting some devs more involved with the forums because user count has tripled recently... might be worth just keeping an eye on.  It's tough spending days / weeks to trial error something when you know somebody somewhere could just give an answer in five minutes, lol.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    UDN is the best way to get that sort of response but you need an account for that and tbh, I've only found it really useful for code/build stuff.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    poopipe said:
    the TLDR is that I need simple player collision so you don't hung up on stuff but I still need to be able to shoot through small gaps in railings etc.

    I've done roughly what you describe  - just wondering how other people have dealt with it and whether it'll start becoming a problem when a large map gets populated.
    I'm looking at 64km^2 with a fairly dense distribution of villages/towns etc. so i'm just a bit twitchy about getting hit with an unsolvable problem later. 

    meh.  I'll work it out if it happens i spose :)

    You can set your own custom "complex" collision mesh. So you can have a simplified mesh for doing weapon raytraces and so on.

    Have a look at the image on this page - there's a slot for custom complex collision

    Although as far as I know there's no particular performance problem with using the basic setup of using the standard LOD for complex collision. Even in very big environments.

  • rexo12
    Options
    Offline / Send Message
    rexo12 interpolator
    Alex_J said:
    i wish the epic devs were still active on their forums there. anybody who worked on fortnite would probably be able to give a good answer since that sounds closer to what you are doing. recently one of the community staff mentioned at least that they were considering getting some devs more involved with the forums because user count has tripled recently... might be worth just keeping an eye on.  It's tough spending days / weeks to trial error something when you know somebody somewhere could just give an answer in five minutes, lol.

    A few of them do float around the 'Unreal Slackers' Discord, although like poopipe said it's mostly programmers, not artists.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    @sprunghunt
    The custom complex collision mesh thing sort of works but you're still unable to declare more than one.
    The reason for wanting the custom meshes is to tailor player collision to promote movement fluidity and use something akin to but not identical to the visual mesh for projectiles. it's not for performance so much as it is for control over the mechanics

    What I've got works for the time being so I can carry on. if I have to bust out visual studio later on then so be it I guess
Sign In or Register to comment.