Hello,
Is it possible to apply a sculpt map to an object with a script instead of with the build tool of SL so it is possible to let the user modify the size, location, rotation,... of the object with letting touch the sculpt map ?
Thank you
These forums are CLOSED. Please visit the new forums HERE
Script to apply sculpt map |
|
|
Mathis Zabelin
Registered User
Join date: 29 May 2008
Posts: 22
|
02-22-2009 08:14
Hello,
Is it possible to apply a sculpt map to an object with a script instead of with the build tool of SL so it is possible to let the user modify the size, location, rotation,... of the object with letting touch the sculpt map ? Thank you |
|
Carbon Philter
Registered User
Join date: 4 Apr 2008
Posts: 165
|
02-22-2009 08:21
If you're using Domino Marama's add-in scripts for Blender, the export function creates a script which you put in a prim along with the sculpt map. That changes the prim into a sculpty with the dims/orientation without manual intervention.
I'm not sure if that's what you're after, and how the script is generated is way beyond me so can't really offer much more in the way of help. Here's an example of what is generated - one that I prepared earlier lol string tS; default { on_rez(integer start_param) { llResetScript(); } state_entry() { list params = [ PRIM_TYPE, PRIM_TYPE_SCULPT, "nosesculpt1_map", PRIM_SCULPT_TYPE_PLANE ,PRIM_SIZE, < 3.47421, 0.84596, 0.91079 > ,PRIM_ROTATION, < 0.00000, 0.00000, 0.00000, 1.00000 > ]; if (llGetLinkNumber() > 1) params += [PRIM_POSITION, < -0.00094, -4.56783, -0.59338 > ]; llSetObjectName( "nosesculpt1" ); llSetPrimitiveParams(params); llRemoveInventory( "nosesculpt1_map" ); llRemoveInventory( tS = llGetScriptName() ); llSetScriptState( tS, FALSE ); } changed(integer change) { if (change & CHANGED_LINK) llResetScript(); } } |
|
Mathis Zabelin
Registered User
Join date: 29 May 2008
Posts: 22
|
02-22-2009 08:35
I'll try that...
thank you |
|
Mathis Zabelin
Registered User
Join date: 29 May 2008
Posts: 22
|
02-22-2009 10:03
It's not exactly that. In the object I've seen, the script stay with the sculpt map in the content of the object, it is possible to modify the size, the rotation and the location, but not the type of the object which is greyed. The script of Domino Namara disappears as soon it is applied.
|
|
Nalates Urriah
D'ni Refugee
Join date: 11 Mar 2008
Posts: 113
|
02-22-2009 12:34
I'm not clear what you are trying to do...
If you are asking can the Sculpty map scale and rotation can be modifed, no. Those changes have to be done in Photoshop or other image editor and those changes affect the object's shape. I think you mean can a downline user change/switch the map to change the shape and size via/under program control, yes. One can switch/swap maps. Sculpty animation is often done by changing maps under script control. ASk the Scripting College group if scripts can change the size of no mod ojects. I think they can. AFAIK, there is no way to get size info from a sculpty map in SL. One would have to know that before hand and script it in. If you are trying to restict access to the sculpty map... there are some tricky ways to do that. There are threads here and web sites that have that info. The only way I know not to include scuply maps in the object is to use UUID's, which is it's own can of worms. However once you open MODIFY to allow size and shape changes via basic edit, they can open the Texture tab, which, I understand, is how most scuplty maps are stolen. There is a something somewhere that tells how to hide the map in the Texture tab. It has to do with making the map transparent. _____________________
Nalates Urriah
D'ni Refugee - Guild of Cartographers |
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
02-22-2009 16:28
However once you open MODIFY to allow size and shape changes via basic edit, they can open the Texture tab, which, I understand, is how most scuplty maps are stolen. There is a something somewhere that tells how to hide the map in the Texture tab. It has to do with making the map transparent. yep. you apply an alpha mask over the whole map and save it as a png. since the sculpty engine only reads the red, green, blue layers and ignores the alpha layer, the sculpt map still works. this also allows the creators to watermark the maps. of course if you're selling the map full perms, it can still be downloaded and the mask can be removed in photoshop _____________________
Dark Heart Emporium
http://www.xstreetsl.com/modules.php?name=Marketplace&MerchantID=133020 want more layers for tattoos, specifically for the head? vote here http://jira.secondlife.com/browse/VWR-1449? llDetectedCollision* Functions similar to touch http://jira.secondlife.com/browse/SVC-3369 |