Gamestudio Links
Zorro Links
Newest Posts
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 (vicknick, AndrewAMD), 1,292 guests, and 3 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
Page 1 of 2 1 2
"wireframe" effect #28779
06/12/04 17:37
06/12/04 17:37
Joined: Jun 2004
Posts: 18
Germany/Daun
JKL Offline OP
Newbie
JKL  Offline OP
Newbie

Joined: Jun 2004
Posts: 18
Germany/Daun
Has someone an idee of makin a shader wich renders the pixels ad the edges of a model to a light (looks maybe like a simple wireframe), how its done in the screenshot?
I’m a very shader noob – so PLEASE PLEASE help you FX Kings!

THX



Re: "wireframe" effect [Re: JKL] #28780
06/12/04 17:39
06/12/04 17:39
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
use this code for wireframe, works for models and levelgeometrie

material wireframe //change the name in the Texture name, if you want to use it for levelgeometrie
{
effect="
DWORD wfcolor = 0xFFFFFFFF; // Change this to the wireframe color of your choice
technique wireframe
{
pass p0
{
TextureFactor = <wfcolor>;
// CullMode = None; // Uncomment if you want backface too.
FillMode = Wireframe;
ColorOp[0] = SelectArg1;
ColorArg1[0] = TFactor;
}
}
";
}


and write in your action of the model:

action blabla
{
my.material = wireframe;
...
}

if you want it for models.

hope that helps

Last edited by DS_Kihaku; 06/12/04 17:41.

My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: "wireframe" effect [Re: Captain_Kiyaku] #28781
06/12/04 18:27
06/12/04 18:27
Joined: Jun 2004
Posts: 18
Germany/Daun
JKL Offline OP
Newbie
JKL  Offline OP
Newbie

Joined: Jun 2004
Posts: 18
Germany/Daun
THX a lot DS_Kihaku, works fine!
But how can I keep the model textured?

Re: "wireframe" effect [Re: JKL] #28782
06/12/04 18:48
06/12/04 18:48
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Hmm that's another problem. maybe duplicate the model at the same position. then you have two models, and one of them will get the material flag.


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: "wireframe" effect [Re: Captain_Kiyaku] #28783
06/12/04 21:50
06/12/04 21:50
Joined: Dec 2000
Posts: 4,608
mk_1 Offline

Expert
mk_1  Offline

Expert

Joined: Dec 2000
Posts: 4,608
I think you can do this using two passes.


Follow me on twitter
Re: "wireframe" effect [Re: mk_1] #28784
06/13/04 06:30
06/13/04 06:30
Joined: Feb 2003
Posts: 264
Michigan,USA
alienheretic Offline
Member
alienheretic  Offline
Member

Joined: Feb 2003
Posts: 264
Michigan,USA
Would Be Cool If Someone Could Post The Code Using Both Passes

Re: "wireframe" effect [Re: alienheretic] #28785
06/13/04 06:38
06/13/04 06:38
Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Captain_Kiyaku Offline

Dichotomic
Captain_Kiyaku  Offline

Dichotomic

Joined: Apr 2002
Posts: 4,801
Richmond B.C., Canada
Hope that works:

material wireframe
{
effect="
texture entSkin1;
DWORD wfcolor = 0xFFFFFFFF; // Change this to the wireframe color of your choice
technique wireframe
{
pass p0
{
TextureFactor = <wfcolor>;
// CullMode = None; // Uncomment if you want backface too.
FillMode = Wireframe;
ColorOp[0] = SelectArg1;
ColorArg1[0] = TFactor;
}
pass p1
{
FillMode = Solid;
ColorOp[0] = SelectArg1;
ColorArg1[0] = texture;
}
}
";
}


My Blog

"Tag und Nacht schrei ich mich heiser,
Wind weht alle Worte fort,
Tag und Nacht schrei ich mein Krähenwort!"

Subway To Sally - Krähenkönig
Re: "wireframe" effect [Re: Captain_Kiyaku] #28786
12/13/04 03:26
12/13/04 03:26
Joined: Jun 2003
Posts: 232
Germany
fernlicht Offline
Member
fernlicht  Offline
Member

Joined: Jun 2003
Posts: 232
Germany
Hi,

i´m wondering the second shader with two passes isn´t working.
i think the bug is in "pass1"
sorry but i´m a shader noob :-) can sombody help?

Quote:

material wireframe
{
effect="
texture entSkin1;
DWORD wfcolor = 0xFFFFFFFF; // Change this to the wireframe color of your choice
technique wireframe
{
pass p0
{
TextureFactor = <wfcolor>;
// CullMode = None; // Uncomment if you want backface too.
FillMode = Wireframe;
ColorOp[0] = SelectArg1;
ColorArg1[0] = TFactor;
}
pass p1
{
FillMode = Solid;
ColorOp[0] = SelectArg1;
ColorArg1[0] = texture;
}
}
";
}




[EDIT]

how is it possible to chage the thickness of the wireframe lines?
[EDIT]

regards

Last edited by fernlicht; 12/13/04 03:31.
Re: "wireframe" effect [Re: fernlicht] #28787
12/14/04 02:55
12/14/04 02:55
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline
Expert
slacer  Offline
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Your card has to support the thickness.
Maybe you google after "d3d pointsprite".

-- slacer

Re: "wireframe" effect [Re: slacer] #28788
12/14/04 09:47
12/14/04 09:47
Joined: Jun 2003
Posts: 232
Germany
fernlicht Offline
Member
fernlicht  Offline
Member

Joined: Jun 2003
Posts: 232
Germany
thanks

is it possible to apply this shader to level-geometry.
how can i do this?
did i miss something, because the material name is the same as my wadtexturename. do i have to initialize the shader to the texture??

my code
Code:
 material blue{
effect="
technique wire{
pass p0{
fillmode=2;//or 1
}
}
";
}



any help welcome
regards

Page 1 of 2 1 2

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