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
0 registered members (), 16,232 guests, and 5 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
pp_monochrome? #213615
06/29/08 13:21
06/29/08 13:21
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
Hi @ all!
Could someone explain to me,how to bind this template-postprocessing-shader into a game? Lot's of thanks!


You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #213688
06/30/08 07:54
06/30/08 07:54
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
pp_set(mtl_monochrome,camera);

you need to include mtlView.c in your project.(not sure)

Last edited by Quadraxas; 06/30/08 07:55.

3333333333
Re: pp_monochrome? [Re: Quad] #213756
06/30/08 16:04
06/30/08 16:04
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
Hm,that seems only to work with C-Lite.But thanks!


You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #213835
07/01/08 07:15
07/01/08 07:15
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
The Problem is fixed with the help of a friend and it works fine with A7com!
You have to write into your mainscript:

SW_camera_Init();//Init the effect
PP_Toggle_OnOff();//Show the effect

into a included script you write:

////////////////////////////////////////// Monochrome////////////////////////////////////////////
material Monochrome_mat
{
effect = "monochrome.fx";
}

view SW_camera
{

}

entity PP_Quad
{
type = <PPE_Quad.tga>;
layer = 1;
view = camera;

x = 878;
y = 0;
z = 0;

scale_x = 1;
scale_y = 1;
flags=visible;
}

function PP_Init_startup()
{
SW_camera.bmap = bmap_for_entity(PP_Quad,0);
SW_camera.arc=60;
SW_camera.clip_far=100000;
}

function SW_camera_Init()
{
PP_Quad.material = Monochrome_mat;
}


function PP_Toggle_OnOff()
{
if(PP_Quad.visible == on)
{
SW_camera.visible = off;
PP_Quad.visible = off;
}else
{
SW_camera.visible = on;
PP_Quad.visible = on;

while(PP_Quad.visible == on)
{
vec_set(SW_camera.x,camera.x);
vec_set(SW_camera.pan,camera.pan);
wait(1);
}
}
}

on_t = PP_Toggle_OnOff;

For the "entity PP_Quad" you need a white tga-bitmap 1024*768!This Bitmap and the
monochrome.fx-file has to be in your gamefolder!
I think,other postprocessing-effects will also work with it,but I didn't test it until now.




Last edited by KMS; 07/01/08 07:18.

You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #213843
07/01/08 07:44
07/01/08 07:44
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
This does of course work with single shaders. I recomment you to use the Lite-C stages and include some Lite-C code next to your C-Script lines. It is so much more flexible and you do Not have to care about changing resolutions.

Re: pp_monochrome? [Re: Slin] #213847
07/01/08 07:56
07/01/08 07:56
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
You are right and I will learn C-Lite,when I finished my projekt!During a work I never do a Gs-update or change the Script-language.

Last edited by KMS; 07/01/08 07:59.

You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #214607
07/05/08 18:19
07/05/08 18:19
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
Can someone fix the colour bug using the monochrome shader?The bug appears on all models that use bumpmapping.



Thats the bump-effect:

extern texture entSkin1;
extern texture entSkin2;
extern texture entSkin3;
extern texture entSkin4;
extern texture mtlSkin1;
extern texture mtlSkin2;
extern texture mtlSkin3;
extern texture mtlSkin4;

extern float4x4 matMtl;
extern float4x4 matViewInv;

technique untitled //Author: unknown
{
pass p0
{
//TEXTURE STAGE [0]
Texture[0] = <entSkin2>;
ColorOp[0] = DotProduct3;
//TEXTURE STAGE [1]
Texture[1] = <entSkin1>;
ColorOp[1] = Modulate;
}
};

That's the monochrome:

extern texture entSkin1;
extern texture entSkin2;
extern texture entSkin3;
extern texture entSkin4;
extern texture mtlSkin1;
extern texture mtlSkin2;
extern texture mtlSkin3;
extern texture mtlSkin4;

extern float4x4 matMtl;
extern float4x4 matViewInv;

technique untitled //Author: unknown
{
pass p0
{
//TEXTURE STAGE [0]
Texture[0] = <entSkin2>;
ColorOp[0] = DotProduct3;
//TEXTURE STAGE [1]
Texture[1] = <entSkin1>;
ColorOp[1] = Modulate;
}
};

Last edited by KMS; 07/05/08 18:26.

You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #214629
07/05/08 21:28
07/05/08 21:28
Joined: May 2005
Posts: 2,713
Lübeck
Slin Offline
Expert
Slin  Offline
Expert

Joined: May 2005
Posts: 2,713
Lübeck
Those are both not the monochrome effect :P
If you are using postprocessing for the monochrome effect, objectshaders can´t have any impact on it, or at least that is the case if everything works as it is meant to...

Re: pp_monochrome? [Re: Slin] #214651
07/06/08 05:38
07/06/08 05:38
Joined: Jul 2006
Posts: 511
Germany,NRW
KMS Offline OP
User
KMS  Offline OP
User

Joined: Jul 2006
Posts: 511
Germany,NRW
Sorry,I selected the wrong shader!I solved the problem with a 3.texture,witch is monochrom.By toggle to monochrom-modus, I change skin0 to skin2.That works fine!



Thats the monochrom:

texture entSkin1;

sampler postTex = sampler_state
{
texture = (entSkin1);
MinFilter = linear;
MagFilter = linear;
MipFilter = linear;
AddressU = Clamp;
AddressV = Clamp;
};

float4 Monochrom_PS(float2 tex : TEXCOORD0) : COLOR
{
float4 Color = tex2D(postTex,tex);

Color.rgb = (Color.r+Color.g+Color.b)/3.0f;

return Color;
}

technique tech_00
{
pass pass_00
{
VertexShader = null;
PixelShader = compile ps_2_0 Monochrom_PS();
}
}

technique tech_01
{
pass pass_00
{
Texture[0] = <entSkin1>;
}
}


You need full animated lowpoly-fishes?Look at
http://www.projekt-3d.de/pages/shop2pag.html
Re: pp_monochrome? [Re: KMS] #214760
07/07/08 08:03
07/07/08 08:03
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
but now there are stars in front of the planet.

Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

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