Author Topic: On Animations: Setting states across animations  (Read 341 times)

Legacy_Zarathustra217

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +0/-0
On Animations: Setting states across animations
« on: March 09, 2014, 07:47:23 pm »


               

(This is actually something I learned ten years ago, but then soon forgot all about again when I took a long hiatus from NWN custom content. I don't know if it's actually been documented before, so bear with me if it has.)


 


One curious thing about animations in NWN is that you don't have to animate all parts of a model for each animation node. If there's no animation keys, it will simply leave the model parts at their prior (relative) rotation and position.


 


Often this may cause erratic results, but in some cases it can be used to your advantage.


 


What made me revisit the idea was the desire to do a long overdue update of the Beholder model I first released back in 2002, and last updated 2004. As you might notice, the last is called BETA, namely because I never got around doing the additions I had in mind.


 


I've fixed some shadowing and improved the texturing, but the most significant change will be that it now has eyelids (this was in fact the most often requested feature people made back then, so it seemed appropriate.) This is the updated model (WIP):


 


eyelid_open_zps1d721db1.jpg


 


But these are no ordinary eyelids - they can be toggled by scripting - here there's model with the central eye closed:


 


eyelid_closed_zps412f104f.jpg


 


This is accomplished by only giving the skinmesh bones for the eyelids animation keys in two animations - the custom 11 for closing the eyes and custom 12 for opening them. Since the eyelids are only animated in these two animations (and the dying animation), they will remain in whatever state that the last of these animations run left them in, even when attacking, casting spells, etc.


 


You can also see a video of it happening here:


 


[Youtube][/Youtube]


 


I will release the updated beholder soon enough, but I post it here because I imagine that all you creative minds might come up with other ways of benefiting from this aspect of the NWN animation system.


 


There's one caveat to beware of though, namely that the players will not see the effects of this unless they have the model in view when the animation fires. It will also be reset on re-logging, so keep that in mind too - but since it's purely a visual thing, I imagine it's in most cases liveable. For the beholder, I plan to simply run the animation for whatever state once each round so it'll be updated fairly frequently.


 


Anyway, I hope some of you might use this for something '<img'>



               
               

               
            

Legacy_Tarot Redhand

  • Hero Member
  • *****
  • Posts: 4165
  • Karma: +0/-0
On Animations: Setting states across animations
« Reply #1 on: March 09, 2014, 10:52:03 pm »


               

One thing that comes to mind is that this opens up the possibility to have a beholder mage. For those that don't know, in order for a beholder to be able to cast spells it must deliberately blind itself in the large central eye. This is to eliminate the permanent anti-magic ray that said eye produces.


 


With a permanently closed eyelid we now have the appearance of a beholder mage. Just need to script the little b$$g$r.


 


TR



               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
On Animations: Setting states across animations
« Reply #2 on: March 09, 2014, 11:55:35 pm »


               The mouth animation is great, too!


P.S. This site has a BBCode for embedding videos:

[Youtube]url[/Youtube]

               
               

               
            

Legacy_Zarathustra217

  • Sr. Member
  • ****
  • Posts: 322
  • Karma: +0/-0
On Animations: Setting states across animations
« Reply #3 on: March 10, 2014, 01:33:03 pm »


               


The mouth animation is great, too!


P.S. This site has a BBCode for embedding videos:



[Youtube]url[/Youtube]



Thanks, updated the post. Can't get the code tags themseves to not display though, but I figure that's minor. Anyone have a clue though?


               
               

               
            

Legacy_Proleric

  • Hero Member
  • *****
  • Posts: 1750
  • Karma: +0/-0
On Animations: Setting states across animations
« Reply #4 on: March 10, 2014, 03:15:03 pm »


               Do you have the full "embed" code between the tags? You just need the url http://youtu.be/yPqZcffOFuY.