Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, ozgur, AbrahamR, wdlmaster), 849 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
About particle system ? #401088
05/13/12 12:28
05/13/12 12:28
Joined: May 2010
Posts: 37
AMIR_REZAs Offline OP
Newbie
AMIR_REZAs  Offline OP
Newbie

Joined: May 2010
Posts: 37
Hello

I want to have a particle system around my character , like it



I tested the "manual gamestudio example" but it didn't work.
Already in c-script I could do it but in LiteC I can't.
plz help me...
thanks/

Re: About particle system ? [Re: AMIR_REZAs] #401089
05/13/12 12:51
05/13/12 12:51
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
JoGa Offline
User
JoGa  Offline
User

Joined: Dec 2003
Posts: 988
Germany, Magdeburg
i don't think that this effect is created with particles, it looks like they used models.
Try it this way: The figure creates some model-copies of itself on its position.
Every copy is a bit larger than the previous one (scale_z), but the scale_x and scale_y is smaller because the effect is not visible at front.
Then use a blue skin and TRANSLUCENT and BRIGHT - flags for the models.
Set the models passable and set their position every frame to the creator-position; also they have to be animated, too.
I think this way is used at your screenshot, because you see a gradation of the blue transparent.
In addition you can use particles, which are created at the entity-vertices and are rising.

I don't know which "manual gamestudio example" you mean, but maybe my idea from above can help you to create your effect laugh

Last edited by JoGa; 05/13/12 12:52.
Re: About particle system ? [Re: JoGa] #401124
05/14/12 01:53
05/14/12 01:53
Joined: Dec 2009
Posts: 128
China
frankjiang Offline
Member
frankjiang  Offline
Member

Joined: Dec 2009
Posts: 128
China

well ,i think maybe it render likes shader effect,maybe create by model.




development 3d game is interesting!
Re: About particle system ? [Re: frankjiang] #401127
05/14/12 07:50
05/14/12 07:50
Joined: Apr 2008
Posts: 245
GameScore Offline
Member
GameScore  Offline
Member

Joined: Apr 2008
Posts: 245
looks a bit like a glow shader

glow shader

Re: About particle system ? [Re: GameScore] #401129
05/14/12 08:17
05/14/12 08:17
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
no, it's the Force itself grin


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: About particle system ? [Re: sivan] #401132
05/14/12 09:33
05/14/12 09:33
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi!

I achieved a similar effect some time ago and adapted it to your desires, but it is totally tricky and it just can be used at very particular cases.

It mixes two cameras, one for the background and one for the model, and makes the effect with the model cameras render targets alpha channel.

Click to reveal..

main.c
Code:
#include <acknex.h>

VECTOR vtemp;

MATERIAL *MAT_Camera =
{
	effect = "mixer.fx";
}

function main ()
{
	video_mode = 10;
	
	wait(2);
	level_load ( "level.wmb" );
	wait(3);
	
	BMAP *IMG_Model = bmap_createblack ( screen_size.x, screen_size.y, 32 );
	VIEW *CAM_Model = view_create ( -1 );
	CAM_Model.bmap = IMG_Model;
	set ( CAM_Model, SHOW | NOWORLD );
	
	BMAP *IMG_World = bmap_createblack ( screen_size.x, screen_size.y, 32 );
	VIEW *CAM_World = view_create ( -1 );
	CAM_World.bmap = IMG_World;
	set ( CAM_World, SHOW | NOENT );

	camera.flags |= PROCESS_TARGET;
	camera.material = MAT_Camera;
	MAT_Camera.skin1 = IMG_Model;
	MAT_Camera.skin2 = IMG_World;
	
	while ( !key_esc )
	{
		camera.pan += mouse_force.x;
		camera.tilt = clamp ( camera.tilt + mouse_force.y, -60, 5 );
		vec_set ( vtemp, vector ( -40, 0, 0 ) );
		vec_rotate ( vtemp, camera.pan );
		vec_set ( camera.x, vtemp );
		
		vec_set ( CAM_Model.x, camera.x );
		vec_set ( CAM_Model.pan, camera.pan );
		vec_set ( CAM_World.x, camera.x );
		vec_set ( CAM_World.pan, camera.pan );
		
		wait(1);
	}
	
	sys_exit ( NULL );
}



mixer.fx
Code:
texture mtlSkin1;
texture mtlSkin2;

sampler2D ModelSampler = sampler_state
{
   Texture = <mtlSkin1>;
   MipFilter = Linear;   
   AddressU  = clamp;
   AddressV  = clamp;
};
	
sampler2D WorldSampler = sampler_state
{
   Texture = <mtlSkin2>;
   MipFilter = Linear;   
   AddressU  = clamp;
   AddressV  = clamp;
};
	
float4 PS ( in float2 ScreenCoor: TEXCOORD0 ) : COLOR0
{
	float3 GlowColor = float3 ( 1.0f, 0.5f, 0.5f );
	float CoorYInv = 1.0f - ScreenCoor.y;
	float CoorXMid = ScreenCoor.x - 0.5f;
	float2 Coor = ScreenCoor;
	
	float4 BG = tex2D ( WorldSampler, Coor );
	float4 Model = tex2D ( ModelSampler, Coor );
	
	Coor.x = ( CoorXMid * ( 1.0f - ( 0.1 * CoorYInv ) ) ) + 0.5f;
	Coor.y += 0.01 * CoorYInv;
	float4 Glow1 = tex2D ( ModelSampler, Coor );
	
	Coor.x = ( CoorXMid * ( 1.0f - ( 0.2 * CoorYInv ) ) ) + 0.5f;
	Coor.y += 0.015 * CoorYInv;
	float4 Glow2 = tex2D ( ModelSampler, Coor );
	
	Coor.x = ( CoorXMid * ( 1.0f - ( 0.4 * CoorYInv ) ) ) + 0.5f;
	Coor.y += 0.02 * CoorYInv;
	float4 Glow3 = tex2D ( ModelSampler, Coor );
	
	float4 FinalColor;
	FinalColor.a = max ( (Glow1.a+Glow2.a+Glow3.a)*0.2, Model.a );
	FinalColor.rgb = ( ( Model.rgb * Model.a ) + ( CoorYInv * ( 1.0f - Model.a ) ) ) * FinalColor.a;
	FinalColor.rgb += BG.rgb * ( 1.0f - FinalColor.a ); 
	return FinalColor;
}

technique PostProcess
{
	pass p0
	{
		VertexShader = NULL;
		PixelShader  = compile ps_2_0 PS();
	}
}






Salud!


Re: About particle system ? [Re: txesmi] #401190
05/15/12 09:37
05/15/12 09:37
Joined: May 2010
Posts: 37
AMIR_REZAs Offline OP
Newbie
AMIR_REZAs  Offline OP
Newbie

Joined: May 2010
Posts: 37
Thanks alot but I'm using Free version and I can't use shaders...
I thought that it want a simple particle but....
Can u give me a simple particle code that is similar to that picture??


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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