Gamestudio Links
Zorro Links
Newest Posts
phantom() not defined in indicators.c
by AndrewAMD. 08/05/26 17:49
Pause button for evaluation shell?
by AndrewAMD. 08/05/26 13:42
Fun Arcade Car Physics (nfs style)
by Ezzett. 08/02/26 21:11
ZorroGPT
by TipmyPip. 07/31/26 22:56
Wolfram Mathematica with Zorro
by TipmyPip. 07/30/26 02:07
What are you working on?
by rayp. 07/24/26 22:58
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, Quad), 1,782 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19222 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
how to apply fx files in scripts? #223122
08/22/08 12:45
08/22/08 12:45
Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
O
Omicron_NEGA Offline OP
Warez kiddie?
Omicron_NEGA  Offline OP
Warez kiddie?
O

Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
how to apply fx files in scripts?
i mean the fx like"blur","toon" or something use for global
randering.
thx


P4 3.6GHz x2 8GB RAM DDR2 GeForce8800GTS
Re: how to apply fx files in scripts? [Re: Omicron_NEGA] #223162
08/22/08 14:21
08/22/08 14:21

M
mercuryus
Unregistered
mercuryus
Unregistered
M



An fx-file can be the "effect" for a material.
A material can be assigned to an entity:
(toon.fx is a fx-file countaining a toon shader)
(c-script, lite-c is similar but with pointers (MATERIAL*, ...))

Code:
BMAP bmap_toonlook = <toonlook.bmp>;

MATERIAL mtl_toon = {
	skin1 = bmap_toonlook;
	effect = "toon.fx";
}

//action: fx_toon
//title: Cartoon shading
//
//desc: 
//desc: Shades the object in two steps and paints a black line around it
//
function fx_toon() {
   my.material = mtl_toon;
}


Re: how to apply fx files in scripts? [Re: ] #223165
08/22/08 14:29
08/22/08 14:29
Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
O
Omicron_NEGA Offline OP
Warez kiddie?
Omicron_NEGA  Offline OP
Warez kiddie?
O

Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
where should i put those code ?
in function main?


P4 3.6GHz x2 8GB RAM DDR2 GeForce8800GTS
Re: how to apply fx files in scripts? [Re: Omicron_NEGA] #223179
08/22/08 15:16
08/22/08 15:16

M
mercuryus
Unregistered
mercuryus
Unregistered
M



Most important is to understand the code.
Then you know where to put.

Code:
MATERIAL* mtl_toon = {
	effect = "toon.fx";
}

...is a definition.
It is outside of a function.

Code:
  my.material = mtl_toon;

...is an assignment.
It's part of the entities action (inside the action/function)


Re: how to apply fx files in scripts? [Re: ] #223184
08/22/08 15:53
08/22/08 15:53
Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
O
Omicron_NEGA Offline OP
Warez kiddie?
Omicron_NEGA  Offline OP
Warez kiddie?
O

Joined: Aug 2008
Posts: 63
=Strogg=3rd_com_cent.
thank you!


P4 3.6GHz x2 8GB RAM DDR2 GeForce8800GTS

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

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