Innovative, simple and elegant - i like the way you think JT.
I take it that the low particle count keeps it from adversely affecting the framerate? Do you think you could vegetate a whole island this way without turning it into a slideshow?
These forums are CLOSED. Please visit the new forums HERE
Tutorial - Creating high density field of vegetation for your outdoor scene |
|
Zebulon Starseeker
Hujambo!
![]() Join date: 31 Dec 1969
Posts: 203
|
11-04-2004 06:56
Innovative, simple and elegant - i like the way you think JT.
I take it that the low particle count keeps it from adversely affecting the framerate? Do you think you could vegetate a whole island this way without turning it into a slideshow? _____________________
|
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
Bluebell woods
11-06-2004 04:55
This is an excellent idea Jimmy! I've attached a picture of my bluebell woods to this message. If anyone is interested in seeing them IM me or come to Alviso (19,201) .
here's the link to the picture Bluebells.jpg ![]() |
Ale Bukowski
Gnomes Landscapers Master
![]() Join date: 2 Apr 2004
Posts: 129
|
11-06-2004 13:13
Jimmy, I'm witched. You should get the Nobel man.
|
Pirate Cotton
DarkLifer
![]() Join date: 26 Sep 2003
Posts: 538
|
11-06-2004 19:16
Putting default { } around pasted isn't working, getting an error on llParticleSystem..
PC _____________________
|
Pirate Cotton
DarkLifer
![]() Join date: 26 Sep 2003
Posts: 538
|
11-06-2004 22:53
Jimmy helped me get it working
![]() PC _____________________
|
Planet Mars
Registered User
Join date: 10 Feb 2004
Posts: 159
|
11-07-2004 05:14
Jimmy helped me get it working ![]() PC I just tried this too, how do you get it working? I get the error on llparticlesystem too, but i know next to nothing about scripting _____________________
Planet Mars
|
Pirate Cotton
DarkLifer
![]() Join date: 26 Sep 2003
Posts: 538
|
11-07-2004 11:20
Neither do I. someone will post a full text eventually.
PC _____________________
|
Mike Zidane
Registered User
![]() Join date: 10 Apr 2004
Posts: 255
|
11-07-2004 11:43
Ok folks, here is the money making opportunity....
some one do this up real nice, make it easy to use with some voice commands or a card or something, and sell it to these people who need help for a fair price. Might try something like that instead of opening a mall. Don't take too long or I'll do it myself. Excellent excellent effect. |
Toy LaFollette
I eat paintchips
![]() Join date: 11 Feb 2004
Posts: 2,359
|
11-07-2004 11:51
here ya go
![]() default { state_entry() {llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK , PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, PSYS_PART_START_COLOR, <0.75,1,0.75> , PSYS_PART_START_ALPHA, 0.5 , PSYS_PART_END_COLOR, <0.75,1,0.75> , PSYS_PART_END_ALPHA, 0.5 , PSYS_PART_START_SCALE, <10,1,3> , PSYS_PART_END_SCALE, <10,1,3> , PSYS_PART_MAX_AGE, 50.0 , PSYS_SRC_ACCEL, <0,0,0> , PSYS_SRC_TEXTURE, "gras02l" , //name of your own texture here, between the quotes PSYS_SRC_BURST_RATE, 0.5 , PSYS_SRC_INNERANGLE, 0.0 , PSYS_SRC_OUTERANGLE, PI , PSYS_SRC_BURST_PART_COUNT, 2 , PSYS_SRC_BURST_RADIUS, 1.5 , PSYS_SRC_BURST_SPEED_MIN, 0.0 , PSYS_SRC_BURST_SPEED_MAX, 0.0 , PSYS_SRC_MAX_AGE, 0.0 , PSYS_SRC_OMEGA, <0,0,0>]); } } _____________________
"So you see, my loyalty lies with Second Life, not with Linden Lab. Where I perceive the actions of Linden Lab to be in conflict with the best interests of Second Life, I side with Second Life."-Jacek
|
Goshua Lament
Registered User
![]() Join date: 25 Dec 2003
Posts: 703
|
11-07-2004 13:57
Ok folks, here is the money making opportunity.... some one do this up real nice, make it easy to use with some voice commands or a card or something, and sell it to these people who need help for a fair price. Might try something like that instead of opening a mall. Don't take too long or I'll do it myself. Excellent excellent effect. What would the voice commands do? It's simple enough that I could do the commands myself rather than paying for it. I could also do an open source version. _____________________
Flickr Second Life Photo Gallery
I no longer regularly login to SecondLife, but please contact me if an issue arises that needs my attention. |
Hamstershire Biggles
Second Life Resident
Join date: 27 Oct 2004
Posts: 15
|
11-07-2004 15:45
Hi...
I love that effect, very natural looking and seems to be amazingly customizable. Now, I am certainly very new to scripting in LSL, so excuse me if this is an ignorant suggestion, but, I was wondering if, since one can get the wind velocity and direction in SL (can't we?), would it be possible to change textures or rotate the textures/particles slightly and then back in order to simulate the grass moving in the wind? Just an idea! Thanks for making this open source, Jimmy! |
Jimmy Thomson
Bedazzle Team
![]() Join date: 16 Sep 2003
Posts: 50
|
11-07-2004 18:43
Thank you everyone for your interest, I appreciated to see the prototype that Pirate, Toy and Goshua made. I encourage everyone to post your result, even if its not perfect, the objective is to improve the concept the get a reliable solution to improve our projects.
On my side I didn't work on this effect since I posted this tutorial, I was working on the upcomming welcome area of the team Bedazzle. For those of you who could be interested, here is a first look. I have two objectives for the next week, first it will be to apply the same concept the creation of high definition trees (leaf), and then I'll remake the prototype in a public area to allow you to see the effect for real. And yes, this script is made by the community for the community, so the latest version will be open-source. One last thing, my tutorial are now available on the Bedazzle website at the adress : http://bedazzle.grfx.at/portal/modules.php?name=Content&pa=list_pages_categories&cid=3 _____________________
|
Pirate Cotton
DarkLifer
![]() Join date: 26 Sep 2003
Posts: 538
|
11-07-2004 19:18
Anyone got any nice suitable grass textures they'd like to share? The one built into the game (with a long key) isn't transparent so is a bit 'poppy'.. any others kind enough to denote?
to get a good effect put the script on two prims about 5m appart. Then another prim another 5m away can have a rotation script. Link them all up so the grass prims spin around as one prim rotates.. the grass gets thrown about quite nicely then. Thanks jimmy ![]() You can see this in action at the south side of Navora. PC _____________________
|
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
A simplified planter assembly
11-08-2004 05:37
Here are 2 files which I hope can contribute to this project ...
planter.jpg shows an exaggerated picture of my planter assembly red = rotator green = arm blue = planter planter.txt contains a short description and 3 commented scripts, one each for the rotator, arm and planter prims. The scripts I present here are simplified versions of the scripts i use in attempt to make them usable for novices. Do not paste the entire text file, extract the appropriate script from the file and paste that. It should be obvious from the comments where each script starts and ends. If you need any more help IM me when I'm online, I can TP you to show you my efforts in action. |
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
planter.txt again ...
11-08-2004 05:41
mmm i'm not very good at using the forums!, I expected my planter.txt file to show up as a text window in the browser, but it doesnt. When I click on the file it gets downloaded to my hard disk. Here it is pasted ... of course this will destroy the tabbing ...
// ================================================== // PLANTER // Made from 2 or more linked prims: // // 1. A Rotator prim to rotate the assembly // 2. An optional arm between the rotator and the planter // 3. One or more planter prims linked to the Arm. // // In my simple setup the prims also contain 2 additional // textures "visible" and "hidden" which are use when // hiding and showing the planters. "visible" is any // opaque texture and "hidden" is a 100% alpha texture. // // No copyright whatsoever: Laukosargas Svarog November 2004. // ================================================== // ================================================== // ROTATOR // This script goes in the rotating section of the planter. // This prim listens for the voice commands and converts them to // link_messages to pass on to the other prims. // // No copyright whatsoever: Laukosargas Svarog November 2004. // ================================================== // Rotator listens on this channel integer channel = 5; default { on_rez ( integer param ) { llResetScript(); } state_entry() { // Initialise in stopped state llTargetOmega( <0,0,0.0>, 0.0, 0.0 ); // Set a listen event llListen( channel, "", llGetOwner(),"" ); } // Respond to voice command by passing them on as // link messages listen( integer channel, string name, key id, string m ) { llMessageLinked( LINK_SET, 0, m, NULL_KEY ); } // Command handler... link_message(integer sender_number, integer number, string message, key id) { if ( message == "planter on" ) { // Start rotating llTargetOmega( <0,0,0.1> * llGetRot(), PI, 1.0 ); } else if ( message == "planter off" ) { // Stop rotating llTargetOmega( <0,0,0.0>, 0.0, 0.0 ); } else if ( message == "planter show" ) { // Make this prim visible llSetTexture( "visible", ALL_SIDES ); } else if ( message == "planter hide" ) { // Hide this prim llSetTexture( "hidden", ALL_SIDES ); } } } // ================================================== // END OF ROTATOR SCRIPT // ================================================== // ================================================== // Arm // This optional script goes in the arm of the planter // All it does is respond to link_message to hide and show the arm // // No copyright whatsoever: Laukosargas Svarog November 2004. // ================================================== default { on_rez ( integer param ) { llResetScript(); } link_message(integer sender_number, integer number, string message, key id) { if ( message == "planter show" ) { llSetTexture( "visible", ALL_SIDES ); } else if ( message == "planter hide" ) { llSetTexture( "hidden", ALL_SIDES ); } } } // ================================================== // END OF ARM SCRIPT // ================================================== // ================================================== // PLANTER // Link as many planter prims as you require to the Arm // Then put this script along with a plant texture in each planter. // NOTE: before the planter prim is linked to the arm or rotator // it must be rotated to correctly place the particles horizontally // across the ground. If your particles come out in a vertical circle // rotate the planter prim until you are satified. I find I made great // use of alt+shift+3, alt+shift+= and alt+ctl+T when i was positioning // my planters. // // No copyright whatsoever: Laukosargas Svarog November 2004. // ================================================== // // Set this string to the name of your plant texture // If you cant copy your textures then a use a Key instead of a name. // string texture = "grass.tga"; // Alter this colour if you want to shade your texture vector colour = <1.0,1.0,1.0>; // This is the horizontal and vertical size of each particle // Scale this size to suit your texture this 10,2 is for // textures of 512x256 or 256x128 vector size = <10,2,0>; default { on_rez ( integer param ) { llResetScript(); } link_message(integer sender_number, integer number, string message, key id) { if ( message == "planter on" ) { llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK , PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, PSYS_SRC_BURST_SPEED_MIN, 0.0 , PSYS_SRC_BURST_SPEED_MAX, 0.0 , PSYS_SRC_OMEGA, <0, 0, 0>, PSYS_SRC_ACCEL, <0,0,0> , PSYS_SRC_MAX_AGE, 0.0, PSYS_PART_START_ALPHA, 0.5, PSYS_PART_END_ALPHA, 0.5 , // --------------------- PSYS_SRC_TEXTURE, texture, PSYS_PART_START_COLOR, colour , PSYS_PART_END_COLOR, colour; PSYS_PART_START_SCALE, size, PSYS_PART_END_SCALE, size, PSYS_SRC_INNERANGLE, 0.0 , PSYS_SRC_OUTERANGLE, PI , // --------------------- // These next four parameters age, part count // burst rate and radius should be fiddled // with until you are happy with the result! PSYS_PART_MAX_AGE, 60.0 , PSYS_SRC_BURST_PART_COUNT, 4, PSYS_SRC_BURST_RATE, 0.25, PSYS_SRC_BURST_RADIUS, 2.0 ]); } else if ( message == "planter off" ) { llParticleSystem( [] ); } else if ( message == "planter show" ) { llSetTexture( "visible", ALL_SIDES ); } else if ( message == "planter hide" ) { llSetTexture( "hidden", ALL_SIDES ); } } } // ================================================== // END OF PLANTER SCRIPT // ================================================== |
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
errata
11-08-2004 06:14
vector size = <10,2,0> ?
where was my head ? should be vector size = <4,2,0>; although in reality it makes very little difference as the max particle size i believe is 5 m ? Note: I like my meadow to be very tall, hence the large sizes ![]() i makes for more fun playing hide and seek with small AVs |
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
update already
11-08-2004 08:30
I realised I could make the thing more efficient and lose the arm script entirely.
Also no longer need the visible and hidden textures. Here are two alternative scripts for the Rotator prim and the Planter prim, the arm prim no longer requires a script to hide / show it.... // ================================================== // ROTATOR // This script goes in the rotating section of the planter. // This prim listens for the voice commands and converts them to // link_messages to pass on to the other prims. // // No copyright whatsoever: Laukosargas Svarog November 2004. // ================================================== // Rotator listens on this channel integer channel = 5; default { on_rez ( integer param ) { llResetScript(); } state_entry() { // Initialise in stopped state llTargetOmega( <0,0,0.0>, 0.0, 0.0 ); // Set a listen event llListen( channel, "", llGetOwner(),"" ); } // Respond to voice command by passing them on as // link messages listen( integer channel, string name, key id, string m ) { llMessageLinked( LINK_SET, 0, m, NULL_KEY ); } // Command handler... link_message(integer sender_number, integer number, string message, key id) { key linkKey; integer i = 1; if ( message == "planter on" ) { // Start rotating llTargetOmega( <0,0,0.1> * llGetRot(), PI, 1.0 ); } else if ( message == "planter off" ) { // Stop rotating llTargetOmega( <0,0,0.0>, 0.0, 0.0 ); } else if ( message == "planter show" ) { while( (linkKey = llGetLinkKey(i)) != NULL_KEY ) { llSetLinkAlpha( i, 1.0, ALL_SIDES ); i = i + 1; } } else if ( message == "planter hide" ) { while( (linkKey = llGetLinkKey(i)) != NULL_KEY ) { llSetLinkAlpha( i, 0.0, ALL_SIDES ); i = i + 1; } } } } // ====================================================== // END OF ROTATOR SCRIPT // ====================================================== // ====================================================== // PLANTER // ====================================================== default { on_rez ( integer param ) { llResetScript(); } link_message(integer sender_number, integer number, string message, key id) { if ( message == "planter on" ) { llParticleSystem([PSYS_PART_FLAGS, PSYS_PART_INTERP_COLOR_MASK , PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE, PSYS_PART_START_COLOR, <0.75,1.0,0.75> , PSYS_PART_END_COLOR, <0.75,1.0,0.75> , PSYS_PART_START_ALPHA, 0.5, PSYS_PART_END_ALPHA, 0.5 , PSYS_PART_START_SCALE, <10,2,0> , PSYS_PART_END_SCALE, <10,2,0> , PSYS_SRC_INNERANGLE, 0.0 , PSYS_SRC_OUTERANGLE, PI , PSYS_PART_MAX_AGE, 60.0 , PSYS_SRC_BURST_RATE, 0.25, PSYS_SRC_BURST_PART_COUNT, 5, PSYS_SRC_BURST_RADIUS, 2.0 , PSYS_SRC_BURST_SPEED_MIN, 0.0 , PSYS_SRC_BURST_SPEED_MAX, 0.0 , PSYS_SRC_OMEGA, <0, 0, 0>, PSYS_SRC_TEXTURE, "plant", PSYS_SRC_ACCEL, <0,0,0> , PSYS_SRC_MAX_AGE, 0.0 ]); } else if ( message == "planter off" ) { llParticleSystem( [] ); } } } // ====================================================== // END OF PLANTER SCRIPT // ====================================================== |
Apotheus Silverman
I write code.
![]() Join date: 17 Nov 2003
Posts: 416
|
11-08-2004 11:12
I did some fiddling with this over the weekend and found that the maximum recognized value for PSYS_PART_MAX_AGE is 30 seconds. Values higher than that will disappear after 30 seconds.
I was under the impression that the maximum was 120 seconds, so I figure this information might be of use to anyone else who is trying this. _____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com Visit Abbotts Aerodrome for gobs of flying fun. |
Laukosargas Svarog
Angel ?
![]() Join date: 18 Aug 2004
Posts: 1,304
|
11-08-2004 12:13
I did some fiddling with this over the weekend and found that the maximum recognized value for PSYS_PART_MAX_AGE is 30 seconds. Values higher than that will disappear after 30 seconds. I was under the impression that the maximum was 120 seconds, so I figure this information might be of use to anyone else who is trying this. looks like you're correct Apotheus, I've just timed them also and 30 secs is the max. I too thought 120, was that from the late lamented WIKI ? I wont be putting any more ammendments to my code up here, i don't want to mess up the forum. Anyone interested in any updates should contact me. I also have a working planter that I'm happy to distribute for a small contribution. |
Planet Mars
Registered User
Join date: 10 Feb 2004
Posts: 159
|
11-08-2004 13:16
yay... even I've got this working now
![]() _____________________
Planet Mars
|
Pirate Cotton
DarkLifer
![]() Join date: 26 Sep 2003
Posts: 538
|
11-08-2004 14:22
Can someone go look at my setup in sth Navora.. and tell me why it's flickering? Perhaps some slightly transparent texture would help..
And gosh, anyone able to share up some nice grass textures? I googled for 30 minutes and found nothing appropriate ![]() PC _____________________
|
Cross Lament
Loose-brained Vixen
![]() Join date: 20 Mar 2004
Posts: 1,115
|
11-08-2004 23:57
I was just toying with this script this evening, and came up with this slight variation. It basically fills in a circular area around the particle generator. No moving parts!
![]() CODE
Geez, I hope I did that right. I wrote it offline so I never compiled it. If it doesn't work I'm gonna feel like such a dork. ![]() _____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |
Mike Zidane
Registered User
![]() Join date: 10 Apr 2004
Posts: 255
|
11-09-2004 07:05
Has anyone figured out how to get targetomega to turn on an incline? I'd like to use this effect on a rock face, but I can only seem to get it to spin on the world axis.
|
Cross Lament
Loose-brained Vixen
![]() Join date: 20 Mar 2004
Posts: 1,115
|
11-09-2004 10:26
Rotate the base object.
![]() _____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |
Khamon Fate
fategardens.net
![]() Join date: 21 Nov 2003
Posts: 4,177
|
11-09-2004 10:48
i just ran across this and have to say it's a most incredible idea. jimmy you more than deserve a dev incentive for this. got any land i can make a point to stand on every day for a month?
_____________________
Visit the Fate Gardens Website @ fategardens.net
|