|
2 registered members (TipmyPip, izorro),
556
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: How to apply a material to a entity
[Re: demiGod]
#91442
09/25/06 16:17
09/25/06 16:17
|
Joined: Sep 2006
Posts: 15 Rome, Italy
Mehdi_Mahdloo
OP
Newbie
|
OP
Newbie
Joined: Sep 2006
Posts: 15
Rome, Italy
|
Thanks demiGOD but in which WDL file I have to wrote the instruction? How can I reconize the entity I want to texture in the code?
mehdimahdloo.altervista.org
mehdimahdloo.spaces.msn.com
|
|
|
Re: How to apply a material to a entity
[Re: demiGod]
#91444
09/25/06 16:41
09/25/06 16:41
|
Joined: Sep 2006
Posts: 15 Rome, Italy
Mehdi_Mahdloo
OP
Newbie
|
OP
Newbie
Joined: Sep 2006
Posts: 15
Rome, Italy
|
Thanks again demiGOD but I'm a newbie and i don't know how to create an action. Can you write me a little turorial that explain me how to use shaders? Please is very important for me. Thanks.
mehdimahdloo.altervista.org
mehdimahdloo.spaces.msn.com
|
|
|
Re: How to apply a material to a entity
[Re: Mehdi_Mahdloo]
#91445
09/25/06 17:41
09/25/06 17:41
|
Joined: Mar 2006
Posts: 752 Portugal
demiGod
User
|
User
Joined: Mar 2006
Posts: 752
Portugal
|
Hey Mehdi, I already told you how to use shaders, its applying the material thing in the created action. I think the best advice i can give to you its to start reading the manual of 3DGS, download and practice the tutorials and workshops listed in the Links and Downloads pages, and the AUM magazine and AU resources. You must learn basic things first before using more advanced topics like shaders. For example, you need to know how to create a level in the Wed Editor, create a hollow block for the sky, place entities and assign actions to them. Without this knowledge you cant do anything in 3DGS. 
|
|
|
Re: How to apply a material to a entity
[Re: demiGod]
#91446
09/25/06 19:25
09/25/06 19:25
|
Joined: Sep 2006
Posts: 15 Rome, Italy
Mehdi_Mahdloo
OP
Newbie
|
OP
Newbie
Joined: Sep 2006
Posts: 15
Rome, Italy
|
Hi. I know how to create Hollow block, lights, give action at entity, and texture block by using the WADS. I know how to include WDL in my project...i simply don't know how to apply a shader...I've never worked with shaders...can you still help me?
mehdimahdloo.altervista.org
mehdimahdloo.spaces.msn.com
|
|
|
Re: How to apply a material to a entity
[Re: Mehdi_Mahdloo]
#91447
09/25/06 19:51
09/25/06 19:51
|
Joined: Mar 2006
Posts: 752 Portugal
demiGod
User
|
User
Joined: Mar 2006
Posts: 752
Portugal
|
Ok very well, maybe this works because i didnt test: a) Copy the 3 files (3dgs_toon.fx, shadows.wdl and toonLookup.bmp) to your work directory; b) In the top of main script file write "include <shaders.wdl>;" c) Create an action for the entity you want to apply the shader like i mentioned above and dont forget to write "my.material=mtl_toon;" d) In Wed load an entity and assign that action from the list. e) Compile and Run. I think will work. Hope it helps  .
|
|
|
Re: How to apply a material to a entity
[Re: demiGod]
#91448
09/25/06 20:02
09/25/06 20:02
|
Joined: Oct 2003
Posts: 2,628 IL,US
FeiHongJr
Expert
|
Expert
Joined: Oct 2003
Posts: 2,628
IL,US
|
Quote:
For example, you need to know how to create a level in the Wed Editor, create a hollow block for the sky, place entities and assign actions to them.
You forgot one little thing here Learn basic scripting. If you know how to assign an action to an entity then demigod allready gave you the action.
Quote:
Create an action and assign that action in WED to the entities you want to be affected by the shader.
Code:
action toonShader { my.material = mtl_toon; }
Just throw that into your wdl file anywhere is fine (as long as its not in another function or action) if thats all its going to do and assign it to your model.
If you want to assign this to your player model for example find the players action in your wdl script and write this at the very top(inside the action)
my.material = mtl_toon;
I suggest at least working thru the c-script workshop found on the downloads page. I think everyone using gamestudio should have at least that basic knowledge under their belt even if they plan on using templates.
|
|
|
Re: How to apply a material to a entity
[Re: FeiHongJr]
#91449
09/25/06 22:23
09/25/06 22:23
|
Joined: Sep 2006
Posts: 15 Rome, Italy
Mehdi_Mahdloo
OP
Newbie
|
OP
Newbie
Joined: Sep 2006
Posts: 15
Rome, Italy
|
Still don't work. Let me tell you which steps I did. I have a "Toon.wdl" that is the level code generated by WED. Then I have the "shaders.wdl" provided me by ello.
1) I have created a hollow cube textured. 2) I have insert an mdl model 3) I have saved and closed WED 4) I have opened the "Toon.wdl" and I have included in the top, the "shaders.wdl" 5) At the end of "Toon.wdl" I have insert:
action toonShader { my.material = mtl_toon; }
6) Now i ave opened the WED again 7) I have loaded my level 8) I have assigned to my mdl model the "toonShader" action 9) I have saved and fully compiled 10) I run the project but I get a "systax error" and the toon shaders is not applied.
Any sugestion people? Thanks again for your help!
Mehdi
Last edited by Mehdi_Mahdloo; 09/25/06 22:24.
mehdimahdloo.altervista.org
mehdimahdloo.spaces.msn.com
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|