0 registered members (),
853
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
First time shader application
#74473
05/16/06 22:41
05/16/06 22:41
|
Joined: Feb 2006
Posts: 371 New England
Rad_Daddy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 371
New England
|
Ok, I am attempting to apply a water shader to a model I have made. This model is not designed for a water shader... its actually my terrain. I am simply using it so I can learn how to apply shaders. The shader I am using is the Simple Water shader found on the old wiki, seen here... Simple Water The c-script code I am using to apply the shader is as follows... Code:
var video_mode = 7;
var video_depth = 32;
string new_wmb = <new.wmb>;
material watershader { effect = <toon.fx>; }
action shaderaction { my.material = watershader; }
function main() { level_load (new_wmb); wait(1); }
nothing fancy, just enought to load the level, and apply the shader. However, when I load the level, I recieve the following error... Could anyone help me out as far as fixing this problem? Thank you in advance. Edit: My effect, toon.fx, is in fact my water shader. I first tried to apply the toon shader, but realised I wouldnt even be using it. After that, I was lazy and didnt feel like changing the code, so I saved the water shader as toon.fx. Sorry if that messes anyone up.
Last edited by Rad_Daddy; 05/16/06 22:44.
"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon
www.deckscapedesign.com
|
|
|
Re: First time shader application
[Re: Rad_Daddy]
#74474
05/17/06 00:15
05/17/06 00:15
|
Joined: Feb 2006
Posts: 371 New England
Rad_Daddy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 371
New England
|
I have made a small breakthrough. As I have been reading up on HLSL a little, I realised that the ~ symbol dosent seem to have any meening in HLSL, or so it seems (if im wrong, please correct me). So, I removed all the ~'s from the code, and got the level to run without error. However, my model is rendered completely black. I have no clue why this is, so if anyone has a clue, please tell me the error of my ways . Thank you.
"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon
www.deckscapedesign.com
|
|
|
Re: First time shader application
[Re: Rad_Daddy]
#74475
05/17/06 19:27
05/17/06 19:27
|
Joined: Feb 2006
Posts: 371 New England
Rad_Daddy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 371
New England
|
Another small breakthrough... not sure if it really means anything, but might as well update...
I have made a new model, with two textures. The ones mentioned in the code (mtlSkin1 and mtlSkin2). Not sure as to the format of these skins, so I tried .bmp, .tga, and .pcx. These are both just 2 different solid shades of blue. Anyways, I attempted to apply the .fx file through MED, without and coding. When I run the level, my modle is now invisible... So far, the only two effects I have been able to achieve are solid black, and invisible.
However, for a split second, my model loads as normal, with normal skinns and no effects. Then, within a fraction of a second, it disapears. This leads me to believe that the effect is taking place, but the coding of the .fx file is wrong. Any suggestions?
"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon
www.deckscapedesign.com
|
|
|
Re: First time shader application
[Re: Rad_Daddy]
#74476
05/20/06 20:50
05/20/06 20:50
|
Joined: Feb 2006
Posts: 371 New England
Rad_Daddy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 371
New England
|
Ok, well its been a few days. Hevent really made any progress... If no1 knows what the issue is, I think I will have to go out and buy the ShaderX series, so I can have a better understanding of how shaders work. For the time being, it would be nice to have this one working, but you do what you gata do, I guess.
"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon
www.deckscapedesign.com
|
|
|
Re: First time shader application
[Re: Rad_Daddy]
#74477
05/21/06 12:33
05/21/06 12:33
|
Joined: Jun 2003
Posts: 1,017 Germany
Thomas_Nitschke
Senior Developer
|
Senior Developer
Joined: Jun 2003
Posts: 1,017
Germany
|
I think people around here can't really help you because the code you use has never been converted to work with 3DGS afaik... The old wiki unfortunately has some shaders that appear to just have been taken out of a program like ATI's Render Monkey without having ever been converted. Probably you could check out the new wiki for shaders that should work with 3DGS.
Other than that, I'd really like to help you, but I don't have any deeper knowledge about shaders... Sorry.
Formerly known as The Matrix - ICQ 170408644
I've been here for much longer than most people think. So where's my "Expert" status?
|
|
|
Re: First time shader application
[Re: Thomas_Nitschke]
#74478
05/21/06 14:37
05/21/06 14:37
|
Joined: Feb 2006
Posts: 371 New England
Rad_Daddy
OP
Senior Member
|
OP
Senior Member
Joined: Feb 2006
Posts: 371
New England
|
ok well thanks, The_matrix. For now, I think I am going to lay off shaders, and focus more on the other aspecs. But when the time comes, I will go out and buy a few good books on the subject. Thanks again.
"Read not to contradict and confute, nor to find talk and discourse, but to weigh and consider." Sir Francis Bacon
www.deckscapedesign.com
|
|
|
|