Jump to content
Sign in to follow this  
Rick Quonset

Simple puppet string script

Recommended Posts

 I need to create a marionette prop for photography.  I cannot for the life of me find a simple script to put in a prim and attach to the models hands, feet etc that will then send a particle string to places on a cross above her like puppet strings.

 

Any help.

Share this post


Link to post
Share on other sites

You'll have to write your own scripts for that purpose unless you are lucky and find a puppet enthusiast who is selling a marionette rig on Marketplace.  It shouldn't be hard.  Visit the Particle Laboratory in world and play with the tutorial demos for an afternoon to get a feel for how to handle the beam.   You'll find a set of free templates in their sandbox area. Take the one that creates a laser beam.  Then all you have to do is set the PSYS_PART_TARGET_POS_MASK parameter in your script and feed each beam the UUID of the target prim you want it to aim to with  PSYS_SRC_TARGET_KEY.

Share this post


Link to post
Share on other sites

The best you can do is to use PSYS_PART_TARGET_POS_MASK instead of PSYS_PART_TARGET_LINEAR_MASK.  I suggested that in my earlier note, because PSYS_PART_TARGET_POS_MASK updates the position of the target continually so that the particle stream adjusts for movement instead of always pointing to a static target.  That will still leave your "strings" looking odd as you change the vertical position of your cross rig, unfortunately, because the particle stream will not sag the way a real string would.  Still, it's the best you can do.  BTW, I didn't mention it in my earlier post, but you can reduce even the small amount of impact that your system will have on sim performance by taking two steps:

1. Use llLinkParticleSystem instead of llParticleSystem.  That way, you can combine all of your scripts into a single one that sits in the root prim of your cross rig (assuming that it's a four-prim object), and have each link target a different prim on your marionette's body.

2. Use llSetMemoryLimit and compile your script in Mono.  Your script should be able to do its work easily within 8K of memory -- probably less.

Share this post


Link to post
Share on other sites

You could also try using PSYS_SRC_ACCEL to add a little "drag" to the particle string by applying a slight amount of force to each particle on the Z axis (to simulate gravitational pull).  It's worth remembering though that the more the particle stream curves the shorter and more numerous the particles will need to be in order to create the illusion of a straight line rather than a "crazy stitching" effect, which in visually laggy areas will probably result in "breaks" in the string (since particle systems seem to be the first thing to suffer when SL gets laggy).

Share this post


Link to post
Share on other sites

You could use a particle but you could also just attached some long thin objects to your hands and Maybe do it much easier. Objects have texture, light, glow and transparency features. Having those particles align with the hand control piece will be a "real" problem.

Share this post


Link to post
Share on other sites

Thanks for everyone's help, I at least have something that resembles strings, I tried the suggestions but still have not figured out how to get them to sag or have gravity but for the purpose it works.  Best thing is I can hand the rope attachements to a model because they are all full perm and they can attache them and the strigs appear.

Share this post


Link to post
Share on other sites

I remember getting this to work with some "slack" in the particle path, but I can't get in-world right now to check exactly how I did it.  I'm vaguely recalling that it was playing with timing parameters PSYS_PART_MAX_AGE (and maybe PSYS_SRC_BURST_SPEED_MIN and _MAX ?) to somehow force the particles to hang around long enough that they "sag" between emitter and target.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...