Complex Dynamic Prop Animations

Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
I'm wondering if anyone has been successful in getting a Dynamic Prop to animate with the marine/alien structure models. The problem is that the Dynamic Prop is only setup to work for the "animation" input, which is fine for something like the Refinery Fan models, but something more complex like the Hydra or Observatory models have no such animation input.

They instead of separate animation inputs that will determine what animation is played. The Idle animation for the Hydra, for example requires that the Attacking and Alerting animation inputs are False and that the Built animation input is true.

I have played around with the PropDynamicAnimator and a PropDynamic with no success unfortunately. The Tram Repair Arm works in-game, but its parameters seem to be controlled by the game engine itself (i.e. it requires that the room be Powered which will eventually get set by the engine) and requires no other entities it seems for it to get set up properly.

Comments

  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    Why not use a cinematic?
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    SamusDroid wrote: »
    Why not use a cinematic?

    I'd actually like to use the Hydra, Observatory and some other alien/marine models and have them play different animations in a map as per a regular NS2 game, for example, in Ready Room decorations. I don't think you can pose individual skeleton bones in the Cinematic Editor but even if you could I'm trying to stay away from any custom models/cinematics if at all possible at the moment.
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    edited July 2015
    I'm wondering if anyone has been successful in getting a Dynamic Prop to animate with the marine/alien structure models. The problem is that the Dynamic Prop is only setup to work for the "animation" input, which is fine for something like the Refinery Fan models, but something more complex like the Hydra or Observatory models have no such animation input.

    They instead of separate animation inputs that will determine what animation is played. The Idle animation for the Hydra, for example requires that the Attacking and Alerting animation inputs are False and that the Built animation input is true.

    I have played around with the PropDynamicAnimator and a PropDynamic with no success unfortunately. The Tram Repair Arm works in-game, but its parameters seem to be controlled by the game engine itself (i.e. it requires that the room be Powered which will eventually get set by the engine) and requires no other entities it seems for it to get set up properly.

    The repair arm works because of its *.animation_graph file that comes with it. Open that up with viewer. There's a built-in parameter called "powered" that will automatically be set true or false depending on the room location the prop is inside of.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    BeigeAlert wrote: »

    The repair arm works because of its *.animation_graph file that comes with it. Open that up with viewer. There's a built-in parameter called "powered" that will automatically be set true or false depending on the room location the prop is inside of.

    Yep... and the Hydra, Observatory, etc. have other animation inputs in them as well that are set through the engine automatically. The problem is the prop_dynamic_animator doesn't seem to do what it seems it should - i.e. allow you to set these animation inputs.

    And it's unclear if it is simply broken, I'm using it wrong, the Dynamic Prop itself is broken as it only allows you to specify the value of the "animation" animation input, which doesn't exist as an input for most, if not all of the alien/marine animation graphs.

  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    BeigeAlert wrote: »

    The repair arm works because of its *.animation_graph file that comes with it. Open that up with viewer. There's a built-in parameter called "powered" that will automatically be set true or false depending on the room location the prop is inside of.

    Yep... and the Hydra, Observatory, etc. have other animation inputs in them as well that are set through the engine automatically. The problem is the prop_dynamic_animator doesn't seem to do what it seems it should - i.e. allow you to set these animation inputs.

    And it's unclear if it is simply broken, I'm using it wrong, the Dynamic Prop itself is broken as it only allows you to specify the value of the "animation" animation input, which doesn't exist as an input for most, if not all of the alien/marine animation graphs.

    I was under the impression the prop_dynamic_animator is designed to play animations, not alter parameter values or animation_graph states. I'm not super clear on how all that works together anyways, though.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    To tell an animation to play, you specify it's animation graph state name through SetAnimationInput.
    function Exo:OnUpdateAnimationInput(modelMixin)
    
        PROFILE("Exo:OnUpdateAnimationInput")
        
        Player.OnUpdateAnimationInput(self, modelMixin)
        
        if self.thrustersActive then    
            modelMixin:SetAnimationInput("move", "jump")
        end
        
    end
    

    Making custom animations is a lot more difficult, and is beyond the scope of this comment..
  • SamusDroidSamusDroid Colorado Join Date: 2013-05-13 Member: 185219Members, Forum Moderators, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Playtester, NS2 Community Developer, Pistachionauts
    edited July 2015
    You should never need to use a dynamic prop unless you want one animation with collision. Cinematics are better and would serve your purpose better
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    edited July 2015
    SamusDroid wrote: »
    You should never need to use a dynamic prop unless you want one animation with collision. Cinematics are better and would serve your purpose better

    Plus, you can't scale a dynamic prop, you have to put it into a cinematic, and scale it in there.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    BeigeAlert wrote: »
    SamusDroid wrote: »
    You should never need to use a dynamic prop unless you want one animation with collision. Cinematics are better and would serve your purpose better

    Plus, you can't scale a dynamic prop, you have to put it into a cinematic, and scale it in there.

    Thank you for the responses. Maybe I'm not fully understanding what the cinematic editor can do or maybe I'm just not being completely clear though. I want to basically place already existing alien/marine structure animations into a map. The only way I know to play existing animation graphs (i.e. Hydra animations) is to use a dynamic prop. Either through the map itself or embeded in a cinematic, the original problem stands: The alien/marine structure animations do not have an "animation" input, but multiple inputs that guide what animation needs to be played.

    Is there something I am missing here?
  • BeigeAlertBeigeAlert Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
    BeigeAlert wrote: »
    SamusDroid wrote: »
    You should never need to use a dynamic prop unless you want one animation with collision. Cinematics are better and would serve your purpose better

    Plus, you can't scale a dynamic prop, you have to put it into a cinematic, and scale it in there.

    Thank you for the responses. Maybe I'm not fully understanding what the cinematic editor can do or maybe I'm just not being completely clear though. I want to basically place already existing alien/marine structure animations into a map. The only way I know to play existing animation graphs (i.e. Hydra animations) is to use a dynamic prop. Either through the map itself or embeded in a cinematic, the original problem stands: The alien/marine structure animations do not have an "animation" input, but multiple inputs that guide what animation needs to be played.

    Is there something I am missing here?

    Hmm... can you give us more information? Perhaps there's a better way to go about this. What are you trying to accomplish with this, from a gameplay perspective?
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    BeigeAlert wrote: »
    Hmm... can you give us more information? Perhaps there's a better way to go about this. What are you trying to accomplish with this, from a gameplay perspective?

    I actually just took a closer look at the Cinematic editor. I see now that I can do what I'm wanting with it, but it seems unfortunate that I might have to create custom cinematics to go along with the level.

    Basically, I want to put certain animated models into the ready room team join areas to give the RR a little bit of fun. For example, by putting some Hydra models playing the Alerted and Idle animations in the Alien team join zone, or an Observatory model playing the idle animation and an Arc constantly deploying and un-deploying.
    I should also note I'd like full control over these, rather than just placing actual Hydra and Observatory structures in the ready room, I'd like to be able to trigger certain animation at any given time.

    The DynamicProp seemed to give this option, but as I've discussed, it only really works if the animation_graph has a single animation input called "animation" (i.e. the Refinery Fans have only a single input called "animation"). The DynamicPropAnimator seemed to allow you to set a single animation input property within a radius when triggered, but that didn't seem to work either.

    ie. for a Hydra to play the Idle animation, it needs to have built = true, alerted = false and attacking = false as its animation properties. Similarly, the Observatory needs to have built=true, researching=false, scan=false and powered=true. These animation inputs are essentially controlled through the engine but the DynamicPropAnimator code seems to indicate that you can manually set these properties individually at will.

    I guess with the Cinematic Editor I can create a cinematic (or more than one) I can play specific animations, so this will work well for what I want, but I was hoping for solution that used existing entities. If you have any suggestions aside from the Cinematic Editor, please let me know.

    Thanks for the help!
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    The DynamicPropAnimator should do what you want. You would need to set one up for all of those animation inputs however, and they need to be signaled by something to trigger the change (a button or some emitter).

    IE - You would setup the DynamicPropAnimator entity with "built" as the inputName, and true as the inputValue. Once you signaled that Animator, all dynamic props in range would have the built animation tag set to true.
  • Soul_RiderSoul_Rider Mod Bean Join Date: 2004-06-19 Member: 29388Members, Constellation, Squad Five Blue
    Didn't someone do that a few years ago? Create a ready room with alien buildings in it etc?

    I know they posted here because they were having trouble getting any animations to work (game obviously hadn't started), and I can't remember if they got that solved, I know they definitely had the models in the ready room though. I remember playing the map.
Sign In or Register to comment.