Ok, I downloaded and checked the source.
After some digging around I was able to see what was happening.
Made some quick and dirty changes and was able to make the NPC play
internal animations!! How about that !!
Before I explain what I found let me first state that I was pleasantly
surprised by how smooth the whole process of setting up and building the
project was.
I was dreading a complicated setup and a large build time.
The setup was simple and the build pretty fast, usually less than a minute.
Thank you developers for making this so easy.
Anyway here is what I found.
If the animation specified in an animation function does not exist in
the prim then the server checks to see if there is an internal animation
with that name.
If it finds one then it passes its UUID to the client else it passes
UUID.Zero.
For normal avatar this is done, I think, by class
"OpenSim.Region.ClientStack.lindenUDP.LLClientView" method
GetDefaultAnimation(string name)
This basically checks against the animations listed in the
"data/avataranimations.xml" file
For NPC this is done by "OpenSim.region.OptionalModules.World.NPCAvatar"
method GetDefaultAnimation(string name)
For some reason this does not perform any check and always returns
UUID.Zero.
I copied the method code from LLClientview to NPCAvatar and was able to
make the NPC Avatar play internal animations.
Now I am not sure if the code was intentionally written this way and if
not then if the hack which I did was the proper way to solve this.
Hope some developer helps out with this.
Thanks
Sat
On 3/5/2012 9:41 PM, satguru p srivastava wrote:
I think I will download the source code and have a go at it.
Thanks
Sat
On 3/5/2012 9:08 PM, Gudule Lapointe wrote:
I am not quite sure about the detailed protocol between server and
client for animation, so I would be happy if someone smarter on this
field can confirm or correct...
What I am sure is
- client can play the animation if it's included in the client
software or sent by the server
- script can send the animation only if it's inside the prim where
the script resides.
That is: first steps needed to animate an avatar
After the avatar has confirmed and accepted the animation, there is a
protocol, which is certainly more complicate, to deploy this
animation to other viewers, (exchange of UUID / animations, updates
on moves, whatever...). But it would occur only once the avatar has
confirmed it can handle the animation
So, it sounds logical to me that the avatar can be animated only if
it's own client owns the animation.
--
http://www.speculoos.net/
secondlife://speculoos.net:8002/
Speculoos, the belgian cookie-flavored metaverse
Le 6 mars 2012 à 03:46, satguru p srivastava a écrit :
I guess I must be dense :(
I still do not get it.
Below is how I think the animation system works.
Let me know where I am wrong.
I have a Avatar or a NPC with an attachment.
The attachment has script which plays an animation using an
animation function like llStartAnimation().
Now like any other script, the script when triggered, will run on
the server side. (Right ?)
When the server encounters the animation function the server will
send a message to the client asking it to play an animation with
that UUID
If the client has an animation with that UUID it will animate the
Avatar or NPC with that animation else it will ask the server to
send the animation and will animate when it receives it.
If the animation is internal animation and if it is, as you say,
part of the client then the client already has it and should be
able to animate the Avatar/NPC
Sorry to belabor this but it seems I am obviously missing a major
concept and would like to figure out what :))
Thanks
Sat
On 3/5/2012 7:55 PM, Gudule Lapointe wrote:
Obviously, everything runs on client side, that's the point of a
client ;-)
I think what was meant is that internal animations are part of the
client, not loaded from server.
As your NPC is not controlled by a client, it doesn't have these
animations at disposal, unless you put them in your script's prim.
--
http://www.speculoos.net/
secondlife://speculoos.net:8002/
Speculoos, the belgian cookie-flavored metaverse
Le 6 mars 2012 à 02:48, satguru p srivastava a écrit :
Garmin,
Thanks for pointing out the BVH files.
121 files!!
A bit of a pain uploading them :)
You also loose the per bone priorites which you get with
internal/default animations.
Also I am assuming that user loaded animations are not as
efficient as internal ones. Right?
I am still curious why the internal animations do not play.
As far as I know all animations run on client side.
The triggers for animation can come from client side (example when
a users presses a key to make the avatar walk)
or from server side (example when if it is being called from script).
NPCs animations are triggered from scripts.
How is this different from Avatar animations being triggered from
scripts ?
Thanks
Sat
On 3/5/2012 5:34 AM, Garmin Kawaguichi wrote:
True, Trinity! User Playable Internal Animations are serverside;
you cannot use them with NPCs but...
... the BVH files corresponding to the Internal Animation are at :
http://static-secondlife-com.s3.amazonaws.com/downloads/avatar/bvh_files.zip
as it is specified in the SL Wiki :
http://wiki.secondlife.com/wiki/Internal_Animations
GCI
----- Original Message -----
*From:* Trinity <mailto:[email protected]>
*Sent:* Monday, March 05, 2012 6:58 AM
*Subject:* Re: [Opensim-users] NPC and internal Animations
Because some animations are built into the viewer and npcs
dont use a viewer and perhaps for security reasons. Im not
really completely sure to be honest.
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected] <mailto:[email protected]>
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected] <mailto:[email protected]>
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users