Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,758 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
BEAM effect tutorial #178299
01/17/08 11:13
01/17/08 11:13
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
Frederick_Lim Offline OP
User
Frederick_Lim  Offline OP
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
HI George, I tried to find a tutorial/sample of BEAM effect, maybe I overlook, but I can't find one in all available resources. Could you make a tutorial or sample of BEAM effect in next AUM?

Thank you.

Re: BEAM effect tutorial [Re: Frederick_Lim] #178300
01/19/08 08:13
01/19/08 08:13
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Do you mean something like the old "my.beam = on;" used for particles?

Re: BEAM effect tutorial [Re: George] #178301
01/20/08 04:05
01/20/08 04:05
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
Frederick_Lim Offline OP
User
Frederick_Lim  Offline OP
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
Yes, I'd like to use the BEAM option for light tail, but I can't achieve the desire result. At this moment I am making the light tail without using BEAM option.

Re: BEAM effect tutorial [Re: Frederick_Lim] #178302
01/20/08 10:23
01/20/08 10:23
Joined: Nov 2005
Posts: 1,007
jigalypuff Offline
Serious User
jigalypuff  Offline
Serious User

Joined: Nov 2005
Posts: 1,007
Quote:

Beam generators for laser beams and tracer paths



i hoped this is what you were on about, i recently upgraded to a7 but can`t see anything in the tuts or the manual aboout this beam generator.


Why does everyone like dolphins? Never trust a species which smiles all the time!
Re: BEAM effect tutorial [Re: jigalypuff] #178303
01/20/08 10:50
01/20/08 10:50
Joined: Mar 2003
Posts: 4,264
Wellington
Nems Offline

.
Nems  Offline

.

Joined: Mar 2003
Posts: 4,264
Wellington
Have you tried some thing like this one,
Code:
action exhaust
{
my.scale_x=0.02;
my.scale_y=0.02;
my.scale_z=0.02;
my.nofog = on;

my.oriented = off;
my.facing = on;
my.transparent=on;
my.alpha=70-random(50);
my.ambient = 100;
my.flare=on;
my.bright=on;
my.passable=on;
my.invisible=on;

wait(3);

my.invisible=off;


while(my.alpha>0)
{

if(my.alpha>12){my.alpha-=time_step*5;}
else{my.alpha-=time_step*2;}



wait(1);
}
ent_remove(my);

}




and call with

ent_create("exhaust_red.tga",my.x,exhaust);// or blue or green etc

in your bullet or trail code, may need scaling to suit.



Re: BEAM effect tutorial [Re: Nems] #178304
01/20/08 21:38
01/20/08 21:38
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline

Expert
George  Offline

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
A good looking "beam" effect can be obtained if the speed of the particle is big enough. You can't create something that looks great if the particle (or the object that has the particle attached to it) has a small speed. That's the main beam "secret".

Re: BEAM effect tutorial [Re: George] #178305
01/21/08 08:19
01/21/08 08:19
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
Here LINK You have a code named "Realistic missile trail" Maybe will help
I've used this code with some changes with my space-shooter game as exhaust


Never say never.
Re: BEAM effect tutorial [Re: tompo] #178306
01/21/08 08:50
01/21/08 08:50
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
Frederick_Lim Offline OP
User
Frederick_Lim  Offline OP
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
I can create the tail without BEAM/STREAK option, but if I use BEAM/STREAK, the particle tail is very strange, I am sure I pass enough velocity, but the particle beam stripe is "moving" at a speed. I only want the beam stripe not moving.

Re: BEAM effect tutorial [Re: Frederick_Lim] #178307
01/21/08 11:54
01/21/08 11:54
Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
tompo Offline
User
tompo  Offline
User

Joined: Mar 2007
Posts: 776
Poor village - Poland ;)
Maybe give us some example of your code? and some screenshots?
Because if your model moving to fast, then you need moving particles to avoid spaces between particles.
If is slow enough then just disappearing particles with alpha channel should be work well.


Never say never.
Re: BEAM effect tutorial [Re: tompo] #178308
01/22/08 01:00
01/22/08 01:00
Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
Frederick_Lim Offline OP
User
Frederick_Lim  Offline OP
User

Joined: Oct 2003
Posts: 827
22�21'24"N 114�07'30...
This is the projectile code
Code:
		bullet_speed.x = 100 * time_step; // adjust the speed of the bullet here

vec_set(pos1.x, my.x);
c_move(me, bullet_speed, nullvector, IGNORE_YOU|IGNORE_PASSABLE|IGNORE_FLAG2|ACTIVATE_SHOOT);
vec_set(pos2.x, my.x);
vec_sub(pos2.x, pos1.x);
pos2.x = pos2.x / time_step;
pos2.y = pos2.y / time_step;
pos2.z = pos2.z / time_step;

vec_inverse(pos2);


This is the particle, remove the remark with if use with 2nd method.
Code:
function tail(PARTICLE *p)
{
p.bmap = tail_image;
p.size = tail_size;
//set(p,BRIGHT|MOVE|BEAM);
set(p,BRIGHT|MOVE);
p.alpha = 100;
p.red = 50;
p.green = 255;
p.blue = 50;
p.gravity = 0;
p.lifespan = tail_life;
p.event = tail_func;
}

function tail_func(PARTICLE *p)
{
// erases the tail after a while
p.alpha = 100*(p.lifespan/tail_life);
}



Method 1:
If I compute the tail by manual, I can get the expected particle tail, this method is found in the advance particle tutorial by Thomas Gisiger.
Code:
		// * manual compute without beam option		
// first compute velocity length
pskill_a = vec_length(pos2.x);

// then compute the number of particles necessary for each frame
pskill_b = ceiling(pskill_a*time_step/(tail_size*tail_p));

// finally the tail is constructed here
pskill_c = 0;

while(pskill_c < pskill_b)
{
tail_position.x = my.x - time_step * pos2.x * (pskill_c/pskill_b-1);
tail_position.y = my.y - time_step * pos2.y * (pskill_c/pskill_b-1);
tail_position.z = my.z - time_step * pos2.z * (pskill_c/pskill_b-1);

effect(tail,1,tail_position.x,nullvector);

pskill_c += 1;
}



Method 2:
But I got very wrong particle if I just pass the velocity to effect with beam option:
Code:
effect(tail,1,my.x,pos2);



Page 1 of 2 1 2

Moderated by  George 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1