Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Sculpty Preview using Parcel Media

nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-16-2007 05:56
Hey folks, I wrote up a little tutorial on using the Parcel Media as a Sculpt Texture Preview. Comments welcome both here or on the page itself.

http://nandnerd.info/blog/2007/06/16/sculpty-media-video-url-previewer/
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-16-2007 06:31
I stopped by your very nice place, interesting. I don't quite get how it works, but plz pardon my ignorance, can this be adapted to animate sculpties smoothly?

It's definately a better preview that the preview window you get before the upload( which is all squashed and doesn't look much like it's supposed to)

Also, the sculptpreviewer.lsl.txt is not a requisite aspect of the previewing right? just a facilitator for ppl who don't have perms on this object?
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-16-2007 06:51
Yes!!! i have been wondering about this but have not had enough time to work on it. Thanks for the info I will try it out..

THe next question I have been trying to find out is where can I find a free .mov authoring tool?

-why
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-16-2007 16:45
From: Zen Zeddmore
I stopped by your very nice place, interesting. I don't quite get how it works, but plz pardon my ignorance, can this be adapted to animate sculpties smoothly?

Hmm, in it's current state I'd say no, this wouldn't be any better for animating sculpties. If you were to play a series of sculpt textures in a loop as the parcel media only one of the textures would be applied to the prim.

From: Zen Zeddmore

Also, the sculptpreviewer.lsl.txt is not a requisite aspect of the previewing right? just a facilitator for ppl who don't have perms on this object?

Correct in that the script isn't required. The script just takes the repetitive part of the process and automates it.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-16-2007 16:48
From: whyroc Slade
Yes!!! i have been wondering about this but have not had enough time to work on it. Thanks for the info I will try it out..


Do let us know how you get on. This is still at an early stage of development.

From: whyroc Slade

THe next question I have been trying to find out is where can I find a free .mov authoring tool?


I'm afraid I have no idea. Perhaps as the .mov format is owned by Quicktime (am I right?) there is no alternative authoring tool. I recon you'd find a better answer in the Movies & Machinima Forum.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-17-2007 01:21
Hi I tried out my idea of streaming a mini sculpt movie through the media texture that Iconverted using avid free dv.. but I figured something out that should have been obvious from the start hehe.

It's the aspect ratio! none of my editing programs allow for 1:1 ratio, which is needed to display the 64 by 64 map.

Oh well it was wortha try.

Thanks again Nand!

-why
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-17-2007 06:29
Plz tell me that you were succesfull in animating a sculpty this way, but that it just didn't "look" right because of the aspect ratio.
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-17-2007 11:11
Nope the object just remained a sphere. I think it would work if you could produce a movie whrere the sculpt maps filled the 64px square. the film I made has black bars on each side. Maybe one of the higher end programs like Premier could do it, not my lowly windows movie maker.

Maybe Nand is right it's worth moving this discussion to the movies sub forum. I am not a DV expert by any stretch of the imagination, maybe someone there has an idea...

I'm not finished playing with this, will post if I have any success.

-why
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
06-17-2007 12:34
From: whyroc Slade
It's the aspect ratio! none of my editing programs allow for 1:1 ratio, which is needed to display the 64 by 64 map.


FWIW, SL does not require sculpty bitmaps to be one of a few standard sizes, e.g. 64x64. They don't have to be square, either.
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-17-2007 14:48
OMei, by jove you are right sir, and it worked!!! I did not know that!

My tests came out a little funky but the shape was recognisable.

It takes a while for the sculptmap to load, I waited thinking it wasn't going to work then pop! My sculpty was there.

I'll break down the steps I did for anyone who wants to run with this, as it is I am very busy making non-animated sculpties for folks, I will come back to this later I think. Lindens talk baby!

1.re-bake your sculpt maps at 4:3, I think a larger resolution is going to best the best at this point (1024 by 768) using your 3d app (blender in my case) i used 256 by 192.

2.make an avi movie using your favorite dv app, I used Studio 8/9 because it imports tga files and because it was free with an old graphics card I had. I'm guessing there is going to be a trade off between .mov dimensions for better detail and final sculptie load times... not sure though. I would suggest using long intervals between map changes/scenes at least 15 seconds to start off with.

3.Follow this link for directions how to convert from avi to .mov using Avid Free DV, download and registration is a PITA for this BTW.

http://www.freevlog.org/index.php/2005/10/25/create-a-quicktime-mov-from-windows-movie-maker/

Better yet go buy Quicktime pro which I understand authors .mov files (makes sense huh!) you will skip the previous steps if you have it.

4.Upload to your web server (you have one don't you?)

5.plug the URL into you parcel media stream in SL (follow Nand's instructions in a general way) and point your sculpted prim texture to the media parcel texture.

6.be patient... voila! be patient again, voila again... ad infinitum!


Please post here if you have any success with this. This is by no means a fail safe method, rather the result of an hour of mucking about with DV and sculpties!!!

-why
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-17-2007 15:48
From: whyroc Slade

Maybe Nand is right it's worth moving this discussion to the movies sub forum. I am not a DV expert by any stretch of the imagination, maybe someone there has an idea...


Why, sorry I didn't make the connection between this thread and the .mov authoring program. Now I see what you meant I retract my previous statement ;)
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-17-2007 15:50
From: whyroc Slade

6.be patient... voila! be patient again, voila again... ad infinitum!


So the sculpt shape is changing whenever the video changes to another sculpt image? If so then we should have some fantastic morphs / animations to look forward to.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Zor Zeddmore
Registered User
Join date: 13 May 2006
Posts: 87
06-17-2007 16:36
If you wanted to make it change smoothly code more like this would be faster, and smoother:

state_entry()
{
while(TRUE){
llSleep(10);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "", PRIM_SCULPT_TYPE_SPHERE]);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "da5f84cd-1b32-f6da-5629-e13a20e14ade", PRIM_SCULPT_TYPE_SPHERE]);
}
}



The second texture being the video texture.. it would send a ton of texture changes .. causeing the viewer to rapidly redraw the scuplty..
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-17-2007 18:00
Yes, I forgot to mention I had a script dropped in the object:

default
{
state_entry()
{
llSay(0, "Hello, Avatar!";);
llSetTimerEvent(0.1);
}



timer()
{

llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "", PRIM_SCULPT_TYPE_SPHERE]);

llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361", PRIM_SCULPT_TYPE_SPHERE]);

}
}


very similar....

limitations are it pops into a sphere visibly each cycle

one good thing is once the movie is loaded it's much faster changing maps.

Can anyone think of a way to reload the texture from the media URL without replacing it by a null string? it doesn't seem to work without some kind of switching out of the texture...a single function call won't change it.

AFter some experimenting (I know I said I was going to leave this alone lol!) I find the non-square map does mess up the object, stretching it out in the back.

LOD problems need to be overcome too, I wish I knew a little more about producing a better quality .mov file!!!


-why
Omei Turnbull
Registered User
Join date: 19 Jun 2005
Posts: 577
06-17-2007 18:43
From: whyroc Slade
1.re-bake your sculpt maps at 4:3, I think a larger resolution is going to best the best at this point (1024 by 768) using your 3d app (blender in my case) i used 256 by 192.

This is cool, why!! I won't be trying it myself real soon, but here's my guess on how to improve the animation frame rate -- use small bitmaps, not large ones. If you have to transmit a 4:3 aspect ratio, I would try 32:24 or 64:48 for starters. Regardless of what sized bitmap you make, Sl is going to create the sculpty out of at most 1 + 32x32 = 1025 vertices. Adding addition pixels to the bitmap can, under some circumstances, improve the positional accuracy of those 1025 vertices, but that is a topic of its own. If you transmit a 256x192 bitmap, the client will start off by resizing that to 256x256, which is going to be slower than resizing 32x24 to 32x32.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-18-2007 00:18
From: whyroc Slade
Yes, I forgot to mention I had a script dropped in the object:

Ah, I see, that makes sense. I wasn't seeing any change to the sculpt unless you do exactly what your script does, change the sculpt texture to something else and back again to force it to update.
From: whyroc Slade

default
{
state_entry()
{
llSetTimerEvent(0.1);
}

timer()
{
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "", PRIM_SCULPT_TYPE_SPHERE]);

llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361", PRIM_SCULPT_TYPE_SPHERE]);
}
}

...

Can anyone think of a way to reload the texture from the media URL without replacing it by a null string? it doesn't seem to work without some kind of switching out of the texture...a single function call won't change it.


What if we use the old hack of combining changes in one llSetPrimitiveParams call? so the above joins into:
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "", PRIM_SCULPT_TYPE_SPHERE, PRIM_TYPE, PRIM_TYPE_SCULPT, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361", PRIM_SCULPT_TYPE_SPHERE]);

It's a long shot but worth 5mins to give it a go. I'll give it a go in 9 hours when I finish work.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-18-2007 09:01
First off, great work People! Woot!!!

Second, :( :)

Althought i don't see this improving frame rates for animation being as it is dependant on the setPrimParameters function,

there is the HUGE plus of obtaining a large number of animation frames at no cost.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-18-2007 09:32
From: Zen Zeddmore
First off, great work People! Woot!!!

Second, :( :)

Althought i don't see this improving frame rates for animation being as it is dependant on the setPrimParameters function,

there is the HUGE plus of obtaining a large number of animation frames at no cost.


*cough* plus the possibility of using it to preview sculpt shapes in-world */cough*

Additional: I tried the combined llSetPrimitiveParams call but unfortunately SL optimises out the blank call so it doesn't refresh the sculpt image. Therefore animation rate using parcel media is TWO TIMES llSetPrimParams function delay since you need to call it once to empty and a second time to set the texture.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
06-18-2007 10:24
From: nand Nerd
*cough* plus the possibility of using it to preview sculpt shapes in-world */cough*



I appologize for this blatant thread Hiijack Nand! Your preview example rocks, I have used it many times already saving me lindens, especially nice during this buggy SL period when half of the time It won't let me upload images at all! (try again later lol!).


-why
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-18-2007 11:44
From: whyroc Slade
I appologize for this blatant thread Hiijack Nand!


Hehe, not at all, glad to see some discussion about other possible uses.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
06-21-2007 13:55
From: nand Nerd
*cough* plus the possibility of using it to preview sculpt shapes in-world */cough*


Did i mention in post #2 how it was better that SL previewer?
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
06-21-2007 14:54
From: Zen Zeddmore
Did i mention in post #2 how it was better that SL previewer?


Why yes, yes you did. :D

From: Zen Zeddmore
It's definately a better preview that the preview window you get before the upload( which is all squashed and doesn't look much like it's supposed to)
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
whyroc Slade
Sculpted and Blended
Join date: 23 Feb 2007
Posts: 315
Some big improvements
07-19-2007 06:14
Using Flash to create tweened transitions, save out to .swf format.


updated script in prim with no 'balling' effect:


default
{

state_entry()
{
while(TRUE){
llSleep(0.01);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361", PRIM_SCULPT_TYPE_TORUS]);
llSetPrimitiveParams([PRIM_TYPE, PRIM_TYPE_SCULPT, "8b5fec65-8d8d-9dc5-cda8-8fdf2716e361", PRIM_SCULPT_TYPE_SPHERE]);
}
}

}
_____________________
Sculpt Maps Galore - 100's of full perm sculpt maps. Top quality sculpts - low prices.
http://slurl.com/secondlife/Poecila/50/54/92
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
07-19-2007 06:20
whtroc is this yours?
http://www.youtube.com/watch?v=macUheJi96U
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
07-19-2007 06:23
Cool, I'd love to see a demonstration of that some time Whyroc.

Nice vid Zen, wonder how much of that could be done on a web-server using a start and an end Sculpt Texture and interpolating between them.
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
1 2