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 (AndrewAMD, degenerate_762), 1,309 guests, and 1 spider.
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
Shader Library - Why we need one now #21014
12/11/03 11:48
12/11/03 11:48
Joined: Aug 2003
Posts: 61
SingleCell Offline OP
Junior Member
SingleCell  Offline OP
Junior Member

Joined: Aug 2003
Posts: 61
Shaders... Seems to be like sex when i was at school, everyone talking about it, no one doing it.

Ive tried to make some simple shader effects and have got nowhere fast, the documentation is hidiously complex (as is the subject matter) and best left to those programmers who understand it. Me, im an artist who dabbles in programming, so all i want is something i can use in my application without fuss, and i need to know what cards it will run with. And im guessing that im not alone here.

Looking at most of the shader sites on the net, there is a common theme - that is, that shaders are for coders. You can tell this by descriptions such as "Modulates the fresnel term using a rotational matrix of a Dot-3 product calculated from the inverse vertex matrix. requires PS_7" Cool... but what does it look like? And will it work on a GF2 class card? (Dont get me wrong, im not bagging coders here, its just they see the world differently - mine understands this stuff and looks at me like im a complete idiot when i ask her what it all means...)

But, from an artistic point of view, what i, and im guessing others, want is "This shader makes surface look like they are shiny, with a gold tint and small bumps. Uses 2 passes and works with GF3 class cards or better."

So, when im browsing through the huge library of effects that im sure will manifest itself any day now, i can pick based on what it does and what cards it will run on. I mean who cares if its dot3 or per pixel bump mapping - does it make the thing look lumpy?

I dont know how we can work this, but we probably also need a "request an effect" topic - for instance, right now, i want a simple script that will give me "shiny" effects on a model based on the alpha of the models skin - that will run on everything from a TNT2 class upwards. Just a standard, simple effect that is used in a lot of games today.

This shader stuff is exciting, but i want to be "doing it" not talking about it. (or trying to read the manuals).

Thoughts?

Tone


Re: Shader Library - Why we need one now [Re: SingleCell] #21015
12/11/03 14:45
12/11/03 14:45
Joined: Oct 2000
Posts: 267
Hartford, CT
msKEN Offline
Member
msKEN  Offline
Member

Joined: Oct 2000
Posts: 267
Hartford, CT
Below is the alphamap shadder you are looking for that was made by Drew and Vent. You must make the second skin01 in MED a 32 bit alphamap. I personally have not been able to get it to work. I don't know if the problem is with my alphamap (white is the shader, black 0,0,0 is no shader) or if the new patch changed some features or something or what, but I'm dying to be able to use alpha maps on my car models. It would work nicely/perfectly for chrome and windows. Things that aren't supposed to be shinney just shouldn't be (IE grills, tires, and liceanse plates, underbody and etc. ! lol.

Code:
 bmap bmp_envcube2 = <skycube1+6.tga>;

// generate a matrix that transforms camera space back to world space
function mtl_env_view()
{
mat_set(mtl.matrix,matViewInv);
// reset the translation part of the matrix
mtl.matrix41 = 0;
mtl.matrix42 = 0;
mtl.matrix43 = 0;
}

function mtl_env_init()
{
bmap_to_cubemap(mtl.skin1);
mtl.event = mtl_env_view;
mtl.enable_view = on;
}

material mtl_envcube2 // environment cube
{
skin1 = bmp_envcube2;
event = mtl_env_init;

effect=
"
texture entSkin1;
texture mtlSkin1;
matrix matMtl;
technique cubic_environment
{
pass p0
{
Texture[0]=<entSkin1>;
Texture[1]=<mtlSkin1>;

zWriteEnable=true;
AlphaBlendEnable=true;

ColorArg1[0]=Texture;
ColorOp[0]=Modulate2x;
ColorArg2[0]=Diffuse;

ColorArg1[1]=Texture;
ColorOp[1]=BlendCurrentAlpha;

AddressU[1]=Clamp;
AddressV[1]=Clamp;
TexCoordIndex[1]=CameraSpaceReflectionVector;
TextureTransformFlags[1]=Count3;
TextureTransform[1]=<matMtl>;
}
}
";

}

action a
{
my.material = mtl_envcube2;
}



If someone could check that out that knows what they are doing, and can tell us if thats working correctlt in v6.20 then that would be great, cause at the moment, I'm blaming my alphamap.

Re: Shader Library - Why we need one now [Re: msKEN] #21016
12/11/03 22:56
12/11/03 22:56
Joined: Jul 2002
Posts: 2,813
U.S.
Nadester Offline

Expert
Nadester  Offline

Expert

Joined: Jul 2002
Posts: 2,813
U.S.
That works like this: Make a model, assign that to it. Export the skin. Edit it, and make the skin's alpha channel what you want (the lighter the area, the more reflective). Save the image as .tga. Then import it into med as the model's skin. And save the model. It *should work.


--Eric
Re: Shader Library - Why we need one now [Re: msKEN] #21017
12/11/03 23:39
12/11/03 23:39
Joined: Aug 2003
Posts: 145
Beorn Offline
Member
Beorn  Offline
Member

Joined: Aug 2003
Posts: 145
Hmmm, MSKen,
Im not sure about this but i think you got it slightly wrong. I got Vent/jelly/conitecs script working very nice with my geforce2mobile. But i only have one skin on my model but this skin is a 32 Bit tga. And that alpha controls the shinyness.

And also, i dont think this is a shader, itīs an effect. Shaders wont work with such old hogs as geforce 2 so i guess they should be impossible on TNTs also.
But effects may, since there is no "graphics assembler" involved.




Re: Shader Library - Why we need one now [Re: Beorn] #21018
12/12/03 00:01
12/12/03 00:01
Joined: May 2002
Posts: 845
Missouri the "Show me" State
Zerodin Offline
Developer
Zerodin  Offline
Developer

Joined: May 2002
Posts: 845
Missouri the "Show me" State
Hey it WORKS, and it looks NICE on my Geforce FX 5200

Re: Shader Library - Why we need one now [Re: Zerodin] #21019
12/12/03 04:46
12/12/03 04:46
Joined: Oct 2000
Posts: 267
Hartford, CT
msKEN Offline
Member
msKEN  Offline
Member

Joined: Oct 2000
Posts: 267
Hartford, CT
Quote:

Hey it WORKS, and it looks NICE on my Geforce FX 5200




Sweet, I must be making my alphamaps incorrectly.

Re: Shader Library - Why we need one now [Re: msKEN] #21020
12/12/03 06:07
12/12/03 06:07
Joined: May 2002
Posts: 845
Missouri the "Show me" State
Zerodin Offline
Developer
Zerodin  Offline
Developer

Joined: May 2002
Posts: 845
Missouri the "Show me" State
I haven't mastered alphas right either the hole model is shiney, but I actually am getting to see A6 shader effects at work on my computer! YAY!

Re: Shader Library - Why we need one now [Re: Beorn] #21021
12/13/03 15:52
12/13/03 15:52
Joined: Oct 2000
Posts: 267
Hartford, CT
msKEN Offline
Member
msKEN  Offline
Member

Joined: Oct 2000
Posts: 267
Hartford, CT
Quote:

And also, i dont think this is a shader, itīs an effect. Shaders wont work with such old hogs as geforce 2 so i guess they should be impossible on TNTs also.




Thanks for the correction, I guess I don't know my terminology as well as I should.

Re: Shader Library - Why we need one now [Re: msKEN] #21022
12/14/03 11:15
12/14/03 11:15
Joined: Aug 2003
Posts: 145
Beorn Offline
Member
Beorn  Offline
Member

Joined: Aug 2003
Posts: 145
Hey, neither do i;) It caused me some serious headache to find out wich was which. Jut thought it might be handy to know while trying to get into this stuff.

Re: Shader Library - Why we need one now [Re: Beorn] #21023
12/15/03 06:22
12/15/03 06:22
Joined: Aug 2003
Posts: 61
SingleCell Offline OP
Junior Member
SingleCell  Offline OP
Junior Member

Joined: Aug 2003
Posts: 61
msKen:

Thanks, but that effect is not exactly what im looking for, but thanks for posting it anyway. (Sorry, i should have elucidated a bit more - The effect im after is where the "reflection" or "shine" looks as though its "attached" to the view - Hmm... trying to explain ithis is not easy - If anyone has played Judge Dredd recently its used for almost every shiny surface in the game. (See this is exactly what i was talking about, i see stuff from an artisti perspective - i dont see it as "environment mapping" or such like..)

I see there is now a shader Index topic, which i guess is what i was asking for, so we shall see what falls in to it.


Tone

Last edited by SingleCell; 12/15/03 06:28.
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