Home Unreal Engine

AnimSet Editor - AnimSequence - Notifies

Hi guys and girls.
I wonder if anyone has any experience in adding particle systems to FPS weapons using sockets and notifies?
Me and my collegue tried this feature to attach and trigger particle effects on an FPS weapon during an animation sequence. It worked perfectly in the AnimSet editor preview window but when I checked it in-game the particle system seemed to be offset to the side and did not follow the socket correctly. The rotation worked alright but the translation did not.
We spent hours trying to get this fixed but no success. The weapon is rendered in local space but the particle seems to be rendered in world space because the particle would cut through walls etc if you walk close to them and the weapon doesn't.
Looks like there's no problem when it's being used on environment assets, only FPS weapon etc. Has anyone got this working? We started to wonder if it's possible at all. Any help would be much appreciated.

Replies

  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
  • o2_is_alright
    Options
    Offline / Send Message
    Thanks for your reply. I tried to add a bone/socket location module but unfortunately it didn't make a difference. The particle is spawned to the right of the socket and when the socket moves and rotates according to the animation the particles are moving in the wrong direction. It feels like the particle somehow is getting double transformations. I've tried to change the different rotation settings but it only affects the particles locally.
    Sorry for not being able to show this with a screenshot.

    One of our coders added the particle system through code without the use of notifies. It worked fine as long as the player didn't move sideways, because then the particles wouldn't spawn at the socket but to the left of the socket if the player is moving to the left and likewise to the right.

    I have limited experience with these sort of things but it seems like it could be a code related problem.
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    well if its a coordinate space issue, then change the spawn code to transform the worldspace position of the bone into player or camera space.
  • o2_is_alright
    Options
    Offline / Send Message
    We've found the cause of the problem but not yet a solution. It's the FOV on the weapons. If it's disabled the particles looks right but the weapons doesn't, so we have to try and solve that somehow.
    Thanks for the help though
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    O2: that suggests what I said last.

    Each camera has it's own coordinate space within the world space. The perspective frustum distorts world space to project onto the 2d plane that is your screen. If you turn off the FOV you get an orthographic projection, so world coords effectively equal screen coords. This generally looks unnatural for a first person game.

    A solution is to have 2 effect classes. One for the player to see, and one for everyone else. The players effect will need to be corrected for perspective if you create it in worlds space. You can do this by multiplying it's spawn coordinates by a matrix representing the offset of the camera from the world coordinate system.

    There is likely a built in method to unreal for this. Of course if the effect is spawned relative to the camera in it's own view system it should look correct.
  • o2_is_alright
    Options
    Offline / Send Message
    Vailias, thanks for explaining. According to our programmer though, that is something that has already been implemented. I'm not gonna pretend I know much about code so I can't really give you any more valuable info on the matter, sorry...
    We've come up with a temporary solution for the time being though and that is simply to make the particle system less precise so that the spawn area is a bit larger and not so much pinned to one small location. It's not as good looking but it works. We'll settle with that for the moment. If we find a solution I'll make sure to post it here.
Sign In or Register to comment.