multiple particle streams or beams

Creating scripts
Post Reply
meghan brandi
Posts: 2
Joined: Sat Sep 21, 2019 11:48 pm
Has thanked: 0
Been thanked: 1 time

multiple particle streams or beams

Post by meghan brandi »

Hi my name is meghan
I am new to scripting and I not looking to make a career out of it. I am trying to mimic Jean Michel Jarre's lase harp. I have been able to put a "laser beam" in a prim and turn it on and off with "touch" and I can "fan" it. But fanning it looks really "crappy" JMJ has 9 discrete beams coming out of his box. I have tried putting multiple beam scripts in to one prim with different angles but on the "last" one I put in activates?????
There has to be a way around this :geek:
thank you in advance for any help you all can provde
Meg
These users thanked the author meghan brandi for the post:
Ilan Tochner
Zed deTremont
Posts: 86
Joined: Wed Oct 22, 2014 5:37 am
Has thanked: 108 times
Been thanked: 147 times

Re: multiple particle streams or beams

Post by Zed deTremont »

Hello Meghan, I'm sorry I'm in no way a scripter so I'm in no way the person who can help you with this issue. On the other hand I was thinking about the issue and am wondering a bit why you use particles to recreate this effect. They tend to be quite demanding on the rendering system. In the end, as it concerns shape laser beams are nothing more then cylinders.
Have you thought about using mesh to recreate the laser harp of Jean Michel Jarre? Each beam can be reproduced with ease via a simple cylinder and you will have the possibility to "cut" the beam on a predefined height by using texture faces. In one mesh you can use 8 of them, so you'll have to consider a bit the setup. Perhaps it might also make the scripting easier since it will only involve switching on/off colour and glow (for the emission of light). As mentioned before for that part I'm of absolutely no use. But perhaps this might help you in some way.
These users thanked the author Zed deTremont for the post:
Chris Namaste
meghan brandi
Posts: 2
Joined: Sat Sep 21, 2019 11:48 pm
Has thanked: 0
Been thanked: 1 time

Re: multiple particle streams or beams

Post by meghan brandi »

Thank you Zed... I will look in to that
Would it be possible to animate them to watch them grow tall and fan out initially when I "start" the harp... Then fan in and close down when I shut down the harp?


Meg
Zed deTremont
Posts: 86
Joined: Wed Oct 22, 2014 5:37 am
Has thanked: 108 times
Been thanked: 147 times

Re: multiple particle streams or beams

Post by Zed deTremont »

Sorry Meghan, rl is keeping me a bit busy the last month, missed your reply.
As mentioned before I'm in no way a scripted. but since the geometry is in principle very simple you do can work with a "doubled" mesh of which specific texture faces can be made alpha/none alpha. Also you can enlarge a mesh in a animation. But you can not "call" for a new mesh <other geometry>. It is possible to work via different "states" in a script and making a kind animation, fanning may be actually possible if you would make the tubes as different meshes.
OK, I can not say this for 100% sure but I believe something you want might be possible with a script that Sei Lisa made for me in sl and once the setup is done there, she also has a script to have the same setup in kitely. It will take a bit of thinking how exactly to arrange it in a logical order but yes good chance that you get something similar.
Particles - not my speciality - will pass "through" your hands while a mesh want have this issue if you play with alphas and texture faces. You do will have it on a specific predefined height though. Nothing can help that. You anyway will need an animation so I guess it wouldn't cause troubles.
Graham Mills
Posts: 1314
Joined: Sun Dec 23, 2012 2:26 pm
Has thanked: 1134 times
Been thanked: 1141 times

Re: multiple particle streams or beams

Post by Graham Mills »

It has been a while since I did any particle scripting but I believe the issue is that a prim can be the target of multiple particle streams but the origin of only one. I don't know anything about operation of the harp but one solution for the particles would be to have a linkset of 9 emitter prims (optionally with associated target prims) and, if appropriate, a controller prim.

If you haven't already noticed, Firestorm has a builtin dialog for particle generation that can generate basic scripts for further editing. With the particle source prim selected in Edit mode, it is accessed via the Build/Object menu.
User avatar
Krull Kitty
Posts: 100
Joined: Thu Aug 06, 2020 1:25 pm
Has thanked: 39 times
Been thanked: 81 times

Re: multiple particle streams or beams

Post by Krull Kitty »

You will have to use separate prims for each beam, this is the simplest solution.
Adjust each prim in order to orient the beam in the direction you would like it
to travel from the base of your harp.

Code: Select all

// This creates a single blue laser beam. Color values are in RGB <R, G, B>

default
{
    state_entry()
    {

        llParticleSystem( [
            PSYS_SRC_PATTERN, PSYS_SRC_PATTERN_ANGLE,
            PSYS_SRC_BURST_PART_COUNT,(integer) 40000,   // adjust for beam strength,
            PSYS_SRC_BURST_RATE,(float) .05,
            PSYS_PART_MAX_AGE,(float)  50,  //Adjust length of beam here
            PSYS_SRC_BURST_SPEED_MIN,(float)1,
            PSYS_SRC_BURST_SPEED_MAX,(float) 7.0,
            PSYS_PART_START_SCALE,(vector) <0.25,0.25,0>, //Adjust size of beam
            PSYS_PART_END_SCALE,(vector) <0.25,0.25,0>,
            PSYS_PART_START_COLOR,(vector) <0,0,1>, // Adjust color of beam - RGB <R, G, B>
            PSYS_PART_END_COLOR,(vector) <0,0,1>, //RGB <R, G, B>
            PSYS_PART_START_ALPHA,(float)0.5, //Adjust beam alpha value "Clearness"
            PSYS_PART_END_ALPHA,(float)0.00,
            PSYS_PART_FLAGS,
                 PSYS_PART_EMISSIVE_MASK |
                 PSYS_PART_FOLLOW_VELOCITY_MASK |
                 PSYS_PART_FOLLOW_SRC_MASK |
                 PSYS_PART_INTERP_SCALE_MASK
        ] );
}
Post Reply