|
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn),
581
guests, and 0
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Particle Laser
#74005
05/12/06 23:26
05/12/06 23:26
|
Joined: Jul 2005
Posts: 262 Earth, The Netherlands
NL_3DGS_n00b
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
|
Hi,
I wanted to make a realistic laser beam with particles, and then more laser beams in a row. (Like a pathway which is filled with security lasers.)
Now my questions:
1. Whats the best way to create a laser with particles? I've tried easy particle 3, but I just dont get it that good to make a laser of it.
2. If I make multiple laserbeams, will this decrease my framerate strongly?
The best games are the games you create yourself.
|
|
|
Re: Particle Laser
[Re: TWO]
#74008
05/14/06 15:30
05/14/06 15:30
|
Joined: Jul 2005
Posts: 262 Earth, The Netherlands
NL_3DGS_n00b
OP
Member
|
OP
Member
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
|
The point is, I am not able to create a small beam op particles so it realy looks like a laser...
The best games are the games you create yourself.
|
|
|
Re: Particle Laser
[Re: NL_3DGS_n00b]
#74009
05/14/06 23:31
05/14/06 23:31
|
Joined: Aug 2005
Posts: 1,185 Ukraine
Lion_Ts
Serious User
|
Serious User
Joined: Aug 2005
Posts: 1,185
Ukraine
|
try to search 'Advanced Particle Effects Programming Tutorial' (don't remeber author) -------------------- example (C) NOT mine Code:
... function ceiling(x) { return(int(x)+(frc(x)>0)); }
function improved_photon();
var position;
bmap photon = <novaV1.pcx>; var n; var photon_p = 0.2; var velocity_dir;
action a_improved_laser { // define a direction/velocity for the laser velocity.x = 50; velocity.y = 0; velocity.z = 0; // loop which generates the photons while(1) { n = ceiling(vec_length(velocity.x)*time/(photon_size*photon_p)); if (key_2) { my.skill1 = 1; // counts particles in the strip while(my.skill1<=n) { // compute the unitary vector parallel the velocity vec_set(velocity_dir.x,velocity.x); vec_normalize(velocity_dir.x,1); // places the n particles along a strip begining at my.x // and ending at my.x + vel_direction*l*(n-1) position.x = my.x + (my.skill1-1)*velocity_dir.x*(photon_size*photon_p) - time*velocity.x; position.y = my.y + (my.skill1-1)*velocity_dir.y*(photon_size*photon_p) - time*velocity.y;; position.z = my.z + (my.skill1-1)*velocity_dir.z*(photon_size*photon_p) - time*velocity.z; // creats the particles effect(improved_photon,1,position.x,velocity.x);
//increment the counter my.skill1 += 1; }
} wait(1); } }
function improved_photon() { if (my.lifespan==80) { my.bmap = photon; my.size = photon_size; my.bright = on; my.flare = on; my.alpha = 100; my.move = on; my.red = random(40); my.green = 255; my.blue = random(40); my.gravity = 0; my.lifespan = 30; } ... }
P.S. For good laser don't use images only. Try to play sound near laser, for example. Like 'electric engine' or alike. Or try to 'interrupt' some of your beams for a short time. Or place another particle effect at the beam end... Good luck with laser!
|
|
|
Re: Particle Laser
[Re: Lion_Ts]
#74010
05/15/06 00:17
05/15/06 00:17
|
Joined: Jun 2004
Posts: 2,234 Wisconsin USA
FoxHound
Expert
|
Expert
Joined: Jun 2004
Posts: 2,234
Wisconsin USA
|
Also check the AUM. There was one article which showed how to make lazer beams come out of a monster's eyes.
In tower what I did was to get the position I wanted to start my lazer, create the effect, and then using COS,SIN,TAN, figure out the place in front of that particle and creat another one until I had my affect.
--------------------- There is no signature here.
QUIT LOOKING FOR ONE!
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|