Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (Quad, AndrewAMD, EternallyCurious, 7th_zorro), 511 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Dust in air particle shader ??? #466664
06/26/17 19:58
06/26/17 19:58
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hey there,

I'm searching for some kind of dust in air particle shader, maybe something like this

Dust in Air FX

I need it for a dusty attic room.

Maybe someone has done something like that already and likes to share?

Best regards,
Sascha

Re: Dust in air particle shader ??? [Re: pegamode] #466665
06/26/17 20:13
06/26/17 20:13
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hi!

Why not use particles or sprites?

Greets.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Dust in air particle shader ??? [Re: 3run] #466666
06/26/17 20:21
06/26/17 20:21
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Particles, sprites, shader or a combination ... I just thought that someone did some kind of dust in air fx already.

Re: Dust in air particle shader ??? [Re: pegamode] #466667
06/26/17 20:29
06/26/17 20:29
Joined: Oct 2008
Posts: 681
Germany
Ayumi Offline
User
Ayumi  Offline
User

Joined: Oct 2008
Posts: 681
Germany
Code:
#define Partikelraum skill1 
#define Partikelmenge skill2 


BMAP* bmapGlow = "P_Dust.tga";

var glowFade = 0;			// fadegeschwindigkeit
var glowMove = 0.5;		// Bewegungsgeschwindigkeit


function GlowRemove(PARTICLE *p)
{
	if(p.alpha <= 100 && p.skill_a == 0)
	{
		p.alpha += glowFade*time_step;
	}
	if(p.alpha >= 100){p.skill_a = 1;}
	if(p.alpha >= 1 && p.skill_a == 1)
	{
		p.alpha -= glowFade*time_step;
	}
	if(p.alpha <= 1 && p.skill_a == 1){p.lifespan = 0;}
}




´

function Glow(PARTICLE *p)
{
	glowFade = 3;
	p.vel_x = 1-random(4)*glowMove;
	p.vel_y = 1-random(4)*glowMove;
	p.vel_z = 1-random(2)*glowMove;
	p.alpha = 0;
	p.skill_a = 0;
	p.size = 20;
	p.bmap = bmapGlow;
	p.flags |= (BRIGHT | TRANSLUCENT | MOVE);
	p.green =  255;
	p.event = GlowRemove;
}


// uses: Partikelmenge, Partikelraum
action GlowErmitterBlob()
{
	VECTOR glowPos;
	set(my,PASSABLE | INVISIBLE);
	if(!my.Partikelraum) { my.Partikelraum = 3000; }
	if(!my.Partikelmenge) { my.Partikelmenge = -0.1; }
	
	while(!player) wait(1);
	while(1)
	{
		glowPos.x = my.x - random(my.Partikelraum) + my.Partikelraum/2;
		glowPos.y = my.y - random(my.Partikelraum) + my.Partikelraum/4;
		glowPos.z = my.z - random(my.Partikelraum) + my.Partikelraum/12;
		effect(Glow,1,glowPos,nullvector); 
		wait(my.Partikelmenge);
	}
	
	my.eflags &= ~DYNAMIC;
}

// uses: Partikelraum, Partikelmenge
action GlowErmitterPlayer()
{
	VECTOR glowPos;
	if(!my.Partikelraum){my.Partikelraum = 600;}
	set(my,PASSABLE|INVISIBLE);
	
	while(!player) wait(1);
	while(1)
	{
		glowPos.x = player.x - random(my.Partikelraum) + my.Partikelraum/2;
		glowPos.y = player.y - random(my.Partikelraum) + my.Partikelraum/2;
		glowPos.z = player.z - random(my.Partikelraum) + my.Partikelraum/2;
		effect(Glow,1,glowPos,nullvector);
		wait(my.Partikelmenge);
	}
}



Der Code ist sehr alt, darum sind die Bezeichnungen noch in deutsch. Aber da du ja scheinbar aus Deutschland kommst, brauch ich das nicht extra aufarbeiten.

The code is very old, so the names are still in German. But since you seem to come from Germany, i do not need to work that up.


EDIT: Added glowFade var

EDIT2: Reworked and testet, updated Code



Last edited by Ayumi; 06/27/17 09:13.
Re: Dust in air particle shader ??? [Re: Ayumi] #466693
06/27/17 19:34
06/27/17 19:34
Joined: Feb 2006
Posts: 1,011
Germany
pegamode Offline OP
Serious User
pegamode  Offline OP
Serious User

Joined: Feb 2006
Posts: 1,011
Germany
Hey Ayumi,

thank you very much ... I will check it out tomorrow.

Thanks
Sascha


Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | 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