jump to navigation

Update sculpties in OpenSim from scripts? November 17, 2009

Posted by justincc in opensim-dev, opensim-integration, virtual-environments, virtual-worlds.
trackback

Inspired by a few Tweets and a blog post from Rich White, I took a look yesterday at a program called PloppSL, derived from the Plopp children’s drawing package.

Plopp allows you to draw 2D objects and convert them into 3D at the touch of a button.  For example, a circle drawn on the screen will become a sphere when converted to 3D.

PloppSL modifies Plopp by adding a function to export the drawing into pair of Second Life textures – a sculptie texture and an ordinary texture.  You can then import these into Second Life or OpenSim via the client’s upload functions to produce the sculptie in-world.

Rich’s point was that OpenSim could achieve a closer integration with PloppSL by allowing the user to update a sculptie already in world whenever it was modified by PloppSL.  OpenSim already has a script function called osSetDynamicTextureURL() that can dynamically create textures from images found at URLs.  So why not do the same for sculpties with a method such as osSetDynamicSculptieURL(), as shown below?

In principle, I don’t see why this shouldn’t be possible.  In an osSetDynamicSculptieURL() function one might always want to try and make sure that both a sculptie and an ordinary texture are uploaded at the same time, otherwise the intermediate results could be a little odd.

I’m interested in whether this would be useful to people.  PloppSL itself is closed source and hasn’t been updated for a while (the last messages in the forum are from 2007).  It’s also very much oriented towards kids.  But I know there are other programs out there which could use the same facility.

Any thoughts?

Advertisements

Comments»

1. Tweets that mention Update sculpties in OpenSim from scripts? | justincc.org -- Topsy.com - November 17, 2009

[…] This post was mentioned on Twitter by Justin Clark-Casey, Justin Clark-Casey. Justin Clark-Casey said: New blog post – Update sculpties in OpenSim from scripts? – http://bit.ly/1dP5Hn […]

2. laeming - November 17, 2009

I always thought inworld sculptie modelling via a physics system would be cool. Basically put the sculptie into a ‘plastic’ mode and hit it with stuff to shape it; set the sculptie spinning and jam a prim into it for a lathe effect, possibly material-based effects: if the tool is ‘wood’ make soft edges, glass = hard edges, metal = draw the contact point out (magnet); extrude it through a hole between some nested prims; etc.

3. Pocoloco - November 18, 2009

Forgive me if I’m not understanding the gist of this concept.
We have the ability to bring in static 2d images to a face or faces of prims.
What you seem to be suggesting is a method of bringing in sculpt images that, as it is currently employed, will change the appearance of the shape of an object.
An object that not only can change it colours but also it’s contours.
BRING IT ON!
Sounds wonderful!

4. James Corbett - November 18, 2009

Justin this is a terrific idea and something we’d definitely make use of. We’ve used PloppSL in the past and wished it was being updated, it’s a terrific little kid-friendly tool. I love laeming’s ideas above too.

5. justincc - November 18, 2009

@Pocoloco – you’ve got it!

@James – Cool. Now it’s a matter of finding a pro bono gap in the schedule (more likely if it’s going to be useful). Someone else might get there first since Rich White mentioned it as part of his project.

6. links for 2009-11-18 | Metaverse3d.com - November 19, 2009

[…] Update sculpties in OpenSim from scripts? | justincc.org Partager : […]

7. Greenbush Labs Blog » Blog Archive » Dynamic Sculpt Maps in Opensim - November 19, 2009

[…] a twitter discussion with Justin Clark-Casey (more on his blog here) it seems a osSetDynamicSculptieURL() function for Opensim is feasible … A step closer to […]

8. Vin Seymore - November 20, 2009

Justin, that would be a great thing to have! Maybe it would also be possible to incorporate some kind of buffering for the dynamically loaded textures? Is this already possible for the “normal” (non-sculpty) textures – I dunno? Useful it would be in both cases. Buffering would allow for some smooth transitions… I have no clear idea yet how this could be achieved. Maybe it would mean to dynamically add the loaded textures to inventory of an av or a prim?

9. Marcus Llewellyn - November 20, 2009

@justincc
I like this idea, but it seems to me like it’s recreating the wheel within itself a tad. What I could use is an actual image handle of some type. Just give me the UUID key. Something along the lines of:

key imgUUID;
imgUUID = osGetImageURL(“http://whowantsabananna.com/pbjellytime.png”);

If this is a UUID, then you could make it work almost anywhere that accepts a UUID for an image. If the UUID were a NULL_KEY, then the attempted acquisition could be assumed to have failed.

// Set image as texture to any old prim.
llSetTexture(imgUUID, ALL_SIDES);

// Set image as sculpt texture with sphere stitching,
// and mirror it for giggles.
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, imgUUID, PRIM_SCULPT_TYPE_SPHERE | PRIM_SCULPT_FLAG_MIRROR]);

Probably all a pipe dream, but it makes sense to me. 🙂

@Vin Seymore
What would be cool for smooth transitions for sculpts would be support for animating sculpt textures as frames like llSetTextureAnim does. This actually makes a *whole* lot of sense to me, as sculpts are usually 64×64, and you could stick 16 frames on just one 256×256 image. Could perhaps be called osSetSculptieAnim and borrow the options that work, and toss the ones that don’t (SMOOTH and ROTATE modes might be funny to watch, but I’m not sure how useful they’d be.)

Because all the sculpts you needed would be rezzed at once, there’s be no need to wait for any buffering beyond the time it take for one fame to rez. If one is rezzed, they all will be.

10. Nebadon Izumi - November 20, 2009

this sounds great to me also.. but here is the kicker.. sculpty need to be Lossless.. do we have the ability to flag the image as a lossless compression upload from the OSSL functions?? without this loading in sculpty is useless.. it would need to be added in if it is not already capable. anyway sounds very useful i would love to see it happen.

11. justincc - November 20, 2009

Thanks for the information, Nebadon. I’m also going to record here some links to pictures that you passed me in IRC to demonstrate the problem.



12. justincc - November 20, 2009

@Marcus – If you look at osSetDynamicTextureURL() isn’t this what it already does (import an image and return a uuid)?

@Vin – I think there will be room for experimentation here if/once the basic functionality can be done.

13. Marcus Llewellyn - November 23, 2009

@justin – I overlooked that function. While the name of the function could have been more general when in comes to it’s functionality, hindsight is 20/20. 🙂

B.T.W. ..

Keep up these sort of posts! I’m a lurker by nature, but I am a regular reader of your blog. I don’t know if you’re thanked often for your summaries of OpenSim updates, but as an hobbyist who has several regions on OSgrid that uses the cutting edge git releases I really appreciate your efforts. It is excellent P.R. for OpenSimulator, and I refer people to your blog for update info.

I also know that you contribute significant code to the project. Seeking opinions about your contributions is very welcome! Thanks for that as well. 🙂

14. justincc - November 23, 2009

@Marcus – Thanks very much 🙂

15. WhiteStar Magic - November 25, 2009

I think it would be a good idea to have an optimized function for bringing in sculpts from outside. As Nebadon pointed out, the need for lossless is really a biggy. Then we have the issue of texturing said sculpt appropriately, which as you know can be quite a chore depending on the sculpt map. Even a simple pillar with a Marble texture is one thing but scaling and setting proportions with a more complex texture would have to be addressed somehow.

This is also appealing because it eliminates the need to stuff more blobs into the active asset store… Going to ponder the possibilites.

Thanks Again for everything Justin
WS

16. Educators - what would you most like to see next in OpenSim? | justincc.org - February 19, 2010

[…] get much free time to implement any of these soon – already I’ve had to put experiments with updating sculpties from scripts on the backburner.  But I’d be very interested to hear from educational users what their […]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: