Re: [realXtend] Scripted objects in naali
Jonne Nauha kirjoitti: We provide the EC system for c++ devs for custom components that can do nice things. Also for scripting python and javascript, but other people are more qualified to talk about those :) But I know there will be script stuff done in the next sprint, EC_Script that can run both JS and py. Dunno if this helps if you want to do server side scripting, modrex has python stuff too. Yah the LSL should work, 'cause it's server side so running in opensim like usually. So Peter, you see an object rotating in other viewers but not in Naali? Probably llTargetOmega uses some packet that we haven't implemented, 'cause it is a constant smooth rotation which needs to be done on the client side .. not so that server sends each rotation change. If this is the case, I think we should consider implementing support for that. Nothing we've done in rex yet replaces LSL for the purpose that Linden made it: untrusted sandboxed code running on servers. If you are doing this on your own server, can alternatively use the old rexscript Python system, but it mostly calls the same open functions than the LSL calls so target omega setting probably won't work to Naali. You can of course just use llSetRot or so from either LSL or rex Py, but that won't give you the smooth constant rotation which targetOmega does. If you are fine with a Naali only tech, you can use the new scripting scripting support there to get smooth rotation on the client side. Basically a piece of code attached to your object that says: myentity.placeable.Orientation += rotchange in Python or Javascript. We plan to later have scripts using the Naali API run on the server too, then we will have a LSL replacement. I can make you a working example of this if you're interested, can do that tomorrow. But this is currently client only, so won't rotate the object on the server (just in all clients) so it won't affect the server side collisions etc. which may or may not be a problem for you depending on the case. I wonder if even with the Linden tech all the clients and the server have an identical rotation when using llTargetOmega, 'cause it would seem it depends on when each client got the command .. and the server can't know what rot the clients are at. Do collisions and visuals stay in sync if you e.g. make a big rotating door with TargetOmega and stand so that get pushed by it? ~Toni On Wed, Sep 15, 2010 at 5:02 PM, Peter Steinlechner psteinlech...@gmail.com mailto:psteinlech...@gmail.com wrote: Thanks for the confirmation :-) Actualy I'm glad to hear less and less LL - I will try to figure out how i can get that to work the proper way. On Wed, Sep 15, 2010 at 1:37 PM, Jonne Nauha jonne.na...@evocativi.com mailto:jonne.na...@evocativi.com wrote: You cant set/edit/view LL scripts with Naali but of course if you script rotates some obj inworld (or other manipulation) in the server then Naali will show it. But I guess we cant help you much with your LL script coding, we have few devs that have done something with it but most not like me :) Best regards, Jonne Nauha realXtend developer http://www.realxtend.org/ http://www.evocativi.com/ On Wed, Sep 15, 2010 at 2:33 PM, Ali Kämäräinen ali.kamarai...@realxtend.org mailto:ali.kamarai...@realxtend.org wrote: Hi, Naali doesn't currently support LSL basically at at all (there might be few exceptions). Grey skies, Ali -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org
Re: [realXtend] Scripted objects in naali
Toni, Jonne, thanks for reply :-) The object runs fine in the old r042 viewer - but not in naali. I havnt tested with other viewers, as i can't see meshes there. As its naali only I cant resist your offer of an example script as you mentioned, but no need to rush - it was just an observation I thought it might be of interest and it would look great having some moving objects for some video shots, so there is no need to affect server side effects. I'm just testing 0.3.1 - so far awsome - specialy the tilt for the cam got my attention. I will look at the rest after dinner and keep you postet if i notice something fancy. cheers pedro On Wed, Sep 15, 2010 at 6:21 PM, Toni Alatalo ant...@kyperjokki.fi wrote: Jonne Nauha kirjoitti: We provide the EC system for c++ devs for custom components that can do nice things. Also for scripting python and javascript, but other people are more qualified to talk about those :) But I know there will be script stuff done in the next sprint, EC_Script that can run both JS and py. Dunno if this helps if you want to do server side scripting, modrex has python stuff too. Yah the LSL should work, 'cause it's server side so running in opensim like usually. So Peter, you see an object rotating in other viewers but not in Naali? Probably llTargetOmega uses some packet that we haven't implemented, 'cause it is a constant smooth rotation which needs to be done on the client side .. not so that server sends each rotation change. If this is the case, I think we should consider implementing support for that. Nothing we've done in rex yet replaces LSL for the purpose that Linden made it: untrusted sandboxed code running on servers. If you are doing this on your own server, can alternatively use the old rexscript Python system, but it mostly calls the same open functions than the LSL calls so target omega setting probably won't work to Naali. You can of course just use llSetRot or so from either LSL or rex Py, but that won't give you the smooth constant rotation which targetOmega does. If you are fine with a Naali only tech, you can use the new scripting scripting support there to get smooth rotation on the client side. Basically a piece of code attached to your object that says: myentity.placeable.Orientation += rotchange in Python or Javascript. We plan to later have scripts using the Naali API run on the server too, then we will have a LSL replacement. I can make you a working example of this if you're interested, can do that tomorrow. But this is currently client only, so won't rotate the object on the server (just in all clients) so it won't affect the server side collisions etc. which may or may not be a problem for you depending on the case. I wonder if even with the Linden tech all the clients and the server have an identical rotation when using llTargetOmega, 'cause it would seem it depends on when each client got the command .. and the server can't know what rot the clients are at. Do collisions and visuals stay in sync if you e.g. make a big rotating door with TargetOmega and stand so that get pushed by it? ~Toni On Wed, Sep 15, 2010 at 5:02 PM, Peter Steinlechner psteinlech...@gmail.com mailto:psteinlech...@gmail.com wrote: Thanks for the confirmation :-) Actualy I'm glad to hear less and less LL - I will try to figure out how i can get that to work the proper way. On Wed, Sep 15, 2010 at 1:37 PM, Jonne Nauha jonne.na...@evocativi.com mailto:jonne.na...@evocativi.com wrote: You cant set/edit/view LL scripts with Naali but of course if you script rotates some obj inworld (or other manipulation) in the server then Naali will show it. But I guess we cant help you much with your LL script coding, we have few devs that have done something with it but most not like me :) Best regards, Jonne Nauha realXtend developer http://www.realxtend.org/ http://www.evocativi.com/ On Wed, Sep 15, 2010 at 2:33 PM, Ali Kämäräinen ali.kamarai...@realxtend.org mailto:ali.kamarai...@realxtend.org wrote: Hi, Naali doesn't currently support LSL basically at at all (there might be few exceptions). Grey skies, Ali -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org -- http://groups.google.com/group/realxtend http://www.realxtend.org
Re: [realXtend] Scripted objects in naali
On ke, 2010-09-15 at 19:01 +0200, Peter Steinlechner wrote: Toni, Jonne, thanks for reply :-) The object runs fine in the old r042 viewer - but not in naali. I havnt tested with other viewers, as i Yah I'm quite certain it is some network message we don't handle (yet). As its naali only I cant resist your offer of an example script as you mentioned, but no need to rush - it was just an observation I thought it might be of interest and it would look great having some moving objects for some video shots, so there is no need to affect server Ok, it's great that you and others post these observations .. we are too busy programming and don't get to test and think about doing things enough :o .. it's good to know what's missing so we can do something about it etc. I made a quick test of this now, here is a video of an object rotated in TargetOmega style (i.e. with a constant angular velocity) in Naali, http://www.youtube.com/watch?v=ZcHBlVfxzXw The idea is that there is an Entity-Component with the parameters, I now started it so that it's a DynamicComponent called rotation with values for x,y,z in the attribute(s). The current implementation however doesn't actually use that mechanism now, 'cause I encountered strange UI bugs with the EC editor .. so had to work around as a temp measure and it's hardcoded for that specific object id now so that could test it otherwise. Am happy about how smootly it rotates, smoother live than in the video even :) Current code is fps dependent etc. though, not a complete impl by any means. The UI bugs are probably Linux specific, UI just stalls if I try to add a new component or attributes .. will figure more about that tomorrow. If someone can think of a good name for a component that keeps this kind of data, please tell, so we can perhaps make this a core (as in bundled in official releases) feature .. I'm thinking that perhaps besides constant rotation there are also other similar things you might want to set for this kind of object level animation, or are there? Pushed the work-in-progress / first step to my repo if someone wants to take a look, http://github.com/antont/naali/commit/f453f85b174f9b9355df1d52b362050a28a3fba7 This is in py, 'cause the Javascript API doesn't currently have a way to hook periodic updates. With JS the code can be downloaded as an asset from the web so you can freely program such manipulations without needing them as bundled features in the client. A great example of how access to just the placeable component (i.e. the pos, rot, scale) of the own object can already be useful for such a script .. if we can't expose full scene manipulation for untrusted js codes for security reasons. Will need to think a bit about periodic update calls to js, probably we'll just put a qt signal somewhere that matches the current module update call (which comes once per frame with info about how long the previous frame took to draw, so anim code like this can be made FPS independent). pedro cheers, ~Toni On Wed, Sep 15, 2010 at 6:21 PM, Toni Alatalo ant...@kyperjokki.fi wrote: Jonne Nauha kirjoitti: We provide the EC system for c++ devs for custom components that can do nice things. Also for scripting python and javascript, but other people are more qualified to talk about those :) But I know there will be script stuff done in the next sprint, EC_Script that can run both JS and py. Dunno if this helps if you want to do server side scripting, modrex has python stuff too. Yah the LSL should work, 'cause it's server side so running in opensim like usually. So Peter, you see an object rotating in other viewers but not in Naali? Probably llTargetOmega uses some packet that we haven't implemented, 'cause it is a constant smooth rotation which needs to be done on the client side .. not so that server sends each rotation change. If this is the case, I think we should consider implementing support for that. Nothing we've done in rex yet replaces LSL for the purpose that Linden made it: untrusted sandboxed code running on servers. If you are doing this on your own server, can alternatively use the old rexscript Python system, but it mostly calls the same open functions than the LSL calls so target omega setting probably won't work to Naali. You can of course just use llSetRot or so from either LSL or rex Py, but that won't give you the smooth constant rotation which targetOmega does. If you are fine with a Naali only tech, you can use the new scripting scripting support there to get smooth rotation on the client side. Basically a piece of code attached to your object
Re: [realXtend] Scripted objects in naali
On to, 2010-09-16 at 01:06 +0300, Toni Alatalo wrote: Yah I'm quite certain it is some network message we don't handle (yet). In fact we do get the data to Naali, thanks to John Hurliman on irc learned that it comes in the regular object updates. I checked and Naali seems to read it and tries to apply it too .. but something is wrong 'cause you don't see it work. We'll figure out what. I'll put the info here for reference, but let's have the continuing discussion on the -dev list 'cause this is going to programming details which are not of interest to many on this list I guess: Data is read correctly in Primitive.cpp which says: // ofs 48 - angular velocity - 3 x float (3x4 bytes) vec = *reinterpret_castconst Vector3df*(objectdatabytes[48]); if (IsValidVelocityVector(vec)) netpos-rotvel_ = vec; And it's applied in RexLogicModule line 818- onwards, and the code seems correct but I don't know if it's ever tested. So we'll debug those. ~Toni As its naali only I cant resist your offer of an example script as you mentioned, but no need to rush - it was just an observation I thought it might be of interest and it would look great having some moving objects for some video shots, so there is no need to affect server Ok, it's great that you and others post these observations .. we are too busy programming and don't get to test and think about doing things enough :o .. it's good to know what's missing so we can do something about it etc. I made a quick test of this now, here is a video of an object rotated in TargetOmega style (i.e. with a constant angular velocity) in Naali, http://www.youtube.com/watch?v=ZcHBlVfxzXw The idea is that there is an Entity-Component with the parameters, I now started it so that it's a DynamicComponent called rotation with values for x,y,z in the attribute(s). The current implementation however doesn't actually use that mechanism now, 'cause I encountered strange UI bugs with the EC editor .. so had to work around as a temp measure and it's hardcoded for that specific object id now so that could test it otherwise. Am happy about how smootly it rotates, smoother live than in the video even :) Current code is fps dependent etc. though, not a complete impl by any means. The UI bugs are probably Linux specific, UI just stalls if I try to add a new component or attributes .. will figure more about that tomorrow. If someone can think of a good name for a component that keeps this kind of data, please tell, so we can perhaps make this a core (as in bundled in official releases) feature .. I'm thinking that perhaps besides constant rotation there are also other similar things you might want to set for this kind of object level animation, or are there? Pushed the work-in-progress / first step to my repo if someone wants to take a look, http://github.com/antont/naali/commit/f453f85b174f9b9355df1d52b362050a28a3fba7 This is in py, 'cause the Javascript API doesn't currently have a way to hook periodic updates. With JS the code can be downloaded as an asset from the web so you can freely program such manipulations without needing them as bundled features in the client. A great example of how access to just the placeable component (i.e. the pos, rot, scale) of the own object can already be useful for such a script .. if we can't expose full scene manipulation for untrusted js codes for security reasons. Will need to think a bit about periodic update calls to js, probably we'll just put a qt signal somewhere that matches the current module update call (which comes once per frame with info about how long the previous frame took to draw, so anim code like this can be made FPS independent). pedro cheers, ~Toni On Wed, Sep 15, 2010 at 6:21 PM, Toni Alatalo ant...@kyperjokki.fi wrote: Jonne Nauha kirjoitti: We provide the EC system for c++ devs for custom components that can do nice things. Also for scripting python and javascript, but other people are more qualified to talk about those :) But I know there will be script stuff done in the next sprint, EC_Script that can run both JS and py. Dunno if this helps if you want to do server side scripting, modrex has python stuff too. Yah the LSL should work, 'cause it's server side so running in opensim like usually. So Peter, you see an object rotating in other viewers but not in Naali? Probably llTargetOmega uses some packet that we haven't implemented, 'cause it is a constant smooth rotation which needs to be done on the client side .. not so that server sends each rotation change. If this is the case, I think we should consider implementing support for that. Nothing we've done in rex