Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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
2 registered members (AndrewAMD, Ayumi), 838 guests, and 2 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
Glow ? #45014
04/30/05 16:42
04/30/05 16:42
Joined: Aug 2002
Posts: 96
A
AAM Offline OP
Junior Member
AAM  Offline OP
Junior Member
A

Joined: Aug 2002
Posts: 96
Hi ,
I was wondering if 3dgs is capable of glow effects , such as prince of persia .. etc , add to that the sort of blury effect that covers all of thier game scenes.

Like now im working on a jail level with alot of night lights like the moon light , lamps them selves ..etc, so if you could help itll be great .

here`s a pic :




Thanks.


If You Treat a Persone As He Is He Will Be As He Is, But If You Treat Him As He Should Be , He Will Be As He Should Be ,And Can Be.
Re: Glow ? [Re: AAM] #45015
04/30/05 17:28
04/30/05 17:28
Joined: Sep 2002
Posts: 758
Sunny Scotland
xoNoid Offline
Developer
xoNoid  Offline
Developer

Joined: Sep 2002
Posts: 758
Sunny Scotland
There is a bloom shader which is like the Price of Persia blure effect. It can be found on user contributions.

Re: Glow ? [Re: xoNoid] #45016
04/30/05 23:14
04/30/05 23:14
Joined: Aug 2002
Posts: 96
A
AAM Offline OP
Junior Member
AAM  Offline OP
Junior Member
A

Joined: Aug 2002
Posts: 96
Thanks , currently viewing.


If You Treat a Persone As He Is He Will Be As He Is, But If You Treat Him As He Should Be , He Will Be As He Should Be ,And Can Be.
Re: Glow ? [Re: AAM] #45017
05/03/05 02:33
05/03/05 02:33
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
Bloom works, but it's not really what you're looking for. That creates more of an actual glowing "dreamy" look. What you want is volumetric lighting. The engine currently does not support this, but you can do a pretty good job faking it with sprites, models, and/or particles.


--Eric
Re: Glow ? [Re: Nadester] #45018
05/04/05 14:21
05/04/05 14:21
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Yeah, but you could use the real glow shader, on some lightwaves (sprites) coming from the windows and still achieve a volumetric light-like effect...

Edit: Ello's sort of glow shader thing.... Might want to check this out...


Cheers

Last edited by PHeMoX; 05/04/05 14:30.
Re: Glow ? [Re: PHeMoX] #45019
05/05/05 00:13
05/05/05 00:13
Joined: Oct 2003
Posts: 4,131
M
Matt_Aufderheide Offline
Expert
Matt_Aufderheide  Offline
Expert
M

Joined: Oct 2003
Posts: 4,131
The easy way to make a glow shader is to take the fur shader on the wiki and modify it.. this is a vertex trick, but with proper control can look quite convincly like a volumetric glow... here is some starter code for you:
Code:
 /////////////////////////////////////////////////
//multipass shader for glow
//based on the WIKI fur shader example
/////////////////////////////////////////////////

texture entSkin1; //should be dark grey
matrix matWorldViewProj;
matrix matWorld;
matrix matWorldView;
vector vecSkill1;
vector vecSkill41;
vector vecFog;
vector vecSunDir;

technique shadowblur
{
pass p0
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;
// cullmode=none;

//srcblend=one;
//destblend=srcalpha;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>; // shell_distance, 0, fur_u_scale, fur_v_scale
vertexShaderConstant[17]={0.0,0.0,0.0,0.0}; // shell_number
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>; // first_shell_brightness, brightness_increment, 0, 0
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1

dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x // shell distance * shell number
mul r1,r1,v3 // scale normal
add r0.xyz,r0.xyz,r1.xyz // shell offset (vertex position + scaled normal}

m4x4 oPos,r0,c0 // transform position to clip space
mov oT0,v7 // output uvs

mov r1.w,c20.w // r1.w=1
dp4 r0,v0,c10 // distance to camera position
add r0,r0,-c20.x // distance-fog_start
mad r0.x,-r0.x,c20.z,r1.w // 1-(distance-fog_start}*(1/(fog_end-fog_start}}
max oFog,r0.x,c95.w // clamp with custom max value

};


pixelShader=
asm
{
ps.1.1


tex t0 // sample colormap

mov r0,t0

};
}

//-----------------------------------------------------------------------------


pass p1
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={1.0,0.0,0.0,0.0};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov r1.w,c20.w // r1.w=1
dp4 r0,v0,c10 // distance to camera position
add r0,r0,-c20.x // distance-fog_start
mad r0.x,-r0.x,c20.z,r1.w // 1-(distance-fog_start}*(1/(fog_end-fog_start}}
max oFog,r0.x,c95.w // clamp with custom max value


};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0


};
}


pass p2
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={2.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w


};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0


};
}
pass p3
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={3.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}
pass p4
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={4.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p5
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={5.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p6
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={6.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p7
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={7.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p8
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={8.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p9
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={9.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p10
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={10.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p11
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={11.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}

pass p12
{
texture[0]=<entSkin1>;


zWriteEnable=false;
alphaBlendEnable=true;

vertexShaderConstant[0]=<matWorldViewProj>;
vertexShaderConstant[4]=<matWorld>;
vertexShaderConstant[8]=<matWorldView>;
vertexShaderConstant[16]=<vecSkill41>;
vertexShaderConstant[17]={12.0,0.0,0.0,10000};
vertexShaderConstant[19]=<vecSunDir>;
vertexShaderConstant[20]=<vecFog>;
vertexShaderConstant[94]=<vecSkill1>;
vertexShaderConstant[95]={0.5,1.0,2.0,0.0};

vertexShader =

asm
{
vs.1.1
dcl_position v0
dcl_normal v3
dcl_texcoord1 v7 //color uv

mov r0,v0
mov r1,c16
mul r1,r1.x,c17.x
mul r1,r1,v3
add r0.xyz,r0.xyz,r1.xyz

m4x4 oPos,r0,c0
mov oT0,v7

mov oFog,c17.w

};
pixelShader=
asm
{
ps.1.1

tex t0

mov r0,t0

};
}


}



and make an action sort of like this:
action glow
{

my.passable=on;
my.material=mat_glow;
my.skill41=float(0.6); // adjust this to increase blurriness..
my.transparent=on;

}

Last edited by Matt_Aufderheide; 05/05/05 00:17.

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