flags


(nAb.Death) #1

hey there, once again haha…

I am a noob when it comes to shaders… I tried alot of things you suggested in this topic:http://forums.warchest.com/showthread.php/39927-Flag-shader but i cant get it working…

Could any of you just please create a shader for this 2 flag textures and send it to me:


texture paths:

  1. textures/fabase/flags_m1_snow
  2. textures/fabase/flags_m1

Please it’s the only thing holding me back from publishing my map.
Thank you!


(nAb.Death) #2

sorry to bump, but please someone help me:/


#3

Bump = okey :slight_smile:

Flags = harder :confused:

Can you look at railguns flag maby?
Look at the shader…

Can you do mapscript?
Yes you can!

You open the scriptfile in notepad…
And writing confusing commands in rows…

Now open the shader! (in notepad)

Each texture in the .shader file got a very own shader

The shader looks like this:

Blablablablabla/textures/nAbs_textures/grass
{

surfaceparm grass
surfaceparm landmine

}

Are you understanding? -of course you do! :slight_smile:
The surfaceparms (and I dont know mouch of them or mouch about them…)

Yeh, the surfaceparms telling the compiler what this textures offer.
For example: surfaceparm landmine tells that landmine can be placed at that texture :smiley:

I know that a shadermanual exists, so read it (if you can find it) and try diffrent things, Ive learned mostly things by experiments, good luck :slight_smile:


(twt_thunder) #4

Jeez how hard can it be to help this guy?
Just like me earlier I needed to get things in with a teaspoon to get it… And you can actually learn that way too:

Dont have to much time anymore Death, since I am back in work again.
But you can try this:


textures/fabase/flags_m1_snow
{
      cull disable
      deformVertexes wave 194 sin 0 3 0 .4
      {
         map textures/fabase/flags_m1_snow.tga
         rgbGen lightingDiffuse
       }
}

textures/fabase/flags_m1
{
      cull disable
      deformVertexes wave 194 sin 0 3 0 .4
      {
         map textures/fabase/flags_m1.tga
         rgbGen lightingDiffuse
       }
}

Dont knof if you’re textures are TGA or JPG, you have to change that yourself, copy all in code and save it as flag.shader, remember to add it to shaderlist.txt and also add it in your pk3 when you release the map.

happy flagging


(stealth6) #5

You can always write texturename.tga even if it’s a jpg file.
I don’t think you need “rgbGen lightingDiffuse” you can just use “rgbGen identity”. From the manual:
http://toolz.nexuizninjaz.com/shader/

6.3.8 rgbGen lightingDiffuse
Colors are computed using a standard diffuse lighting equation. It uses the vertex normals to illuminate the object correctly.

Design Note: - rgbGen lightingDiffuse is used when you want the RGB values to be
computed for a dynamic model (i.e. non-map object) in the world using
regular in-game lighting. For example, you would specify on shaders for
items, characters, weapons, etc.

6.3.2 rgbGen identity
Colors are assumed to be all white (1.0,1.0,1.0). All filters stages (lightmaps, etc) will get this by default.

Ah while browsing the other topic I see what you did now :smiley:
http://forums.warchest.com/showthread.php/39927-Flag-shader

RayBan used lightingDiffuse, because the shader was for a dynamic model.

[QUOTE=thunder_13th;496794]Jeez how hard can it be to help this guy?
Just like me earlier I needed to get things in with a teaspoon to get it… And you can actually learn that way too:[/QUOTE]

Everybody has their own projects and we already gave 80% of the solution in the other thread. Making shaders is pretty easy you just open the shader file, make some adjustments and then run it in game. If it doesn’t work try again. You can also check shaders from other maps if they have the effect you want or just to learn the structure of a shader. This way you don’t even really need to understand what’s going on. Lastly there is a manual that describes most parameters.

I think it gives you much more satisfaction if you figure it out yourself rather than just being handed the answer. That doesn’t mean you can’t ask for help.


(nAb.Death) #6

[QUOTE=thunder_13th;496794]Jeez how hard can it be to help this guy?
Just like me earlier I needed to get things in with a teaspoon to get it… And you can actually learn that way too:

Dont have to much time anymore Death, since I am back in work again.
But you can try this:


textures/fabase/flags_m1_snow
{
      cull disable
      deformVertexes wave 194 sin 0 3 0 .4
      {
         map textures/fabase/flags_m1_snow.tga
         rgbGen lightingDiffuse
       }
}

textures/fabase/flags_m1
{
      cull disable
      deformVertexes wave 194 sin 0 3 0 .4
      {
         map textures/fabase/flags_m1.tga
         rgbGen lightingDiffuse
       }
}

Dont knof if you’re textures are TGA or JPG, you have to change that yourself, copy all in code and save it as flag.shader, remember to add it to shaderlist.txt and also add it in your pk3 when you release the map.

happy flagging[/QUOTE]

this worked for the waving, it waves like a flag now but it’s just black now… like this:


If you come really really close and look it under certain angle you can see the flag texture but if you go away it’s just black…


(stealth6) #7

Try adding lightmap stage:


textures/fabase/flags_m1_snow
{
	cull disable
	deformVertexes wave 194 sin 0 3 0 .4
	{
		map textures/fabase/flags_m1_snow.tga
		rgbGen identity
	}
	{
		map $lightmap
		blendFunc filter //might not need this line
		rgbGen identity
	}
}