help with phong shader stuff


(craphead2) #1

ok so im trying to make a phong texture here is what it looks like

textures/green/green
{

textures/green/green
	qer_editorimage textures/green/green.jpeg
	q3map_shadeangle 90
	q3map_terrain
	
     }
  }

but if i have it in my scripts folder it miess up my et really bad everything is orage and black but if i take it out it works but the texture wont show up in the game is my shader coded wrong or something i have no clue cuz this is the frist time makeing a shader for me. thanks


(nUllSkillZ) #2

sock has written a phong shading tutorial:
http://www.planetquake.com/simland/pages/articles/phongshading1.htm


(craphead2) #3

thanks i got it working now only thing is the textures still just shows up as green its black and orange like shader image is missing or somethin but it doesnt matter cuz its just a test one other thing also what is a good program to make the textures with i just used pait for this but you cant do much in there so i was wondering what most ppl use thanks for the help


(nUllSkillZ) #4

In your shader above I’ve seen:


qer_editorimage textures/green/green.jpeg

1.) should be jpg
2.) extension should always be tga (even if it is a jpg)
3.) dimensions (width and length) of the texture have to be powers of 2
(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 [,2048])


(craphead2) #5

ok os its like this now

textures/green/green
{
       
	q3map_shadeangle 90
        q3map_nonplanar
        qer_editorimage textures/green/green.tga
     {
           map $lightmap
           rgbGen identity  
     }
     {
           map textures/green/green.tga
           blendFunc filter
     }
}

but in my green folder i leave it as jepg right?


(Shaderman) #6

AFAIk a texture in ET can either be in tga or jpg format (for a phong shader both are ok) but you always specify tga in your shaders, regardless of the file format (jpg or tga) or kind of shader.


(nUllSkillZ) #7

The picture must have jpg or tga as extension.
So the file in your “textures/green”-directory has to be named “green.jpg”.


(Detoeni) #8

The shader in the tut is for q3/rtcw, for et your shader should look like bellow

textures/green/green 
{
	q3map_nonplanar
	q3map_shadeangle 120 //adjust to suit
	implicitMap -
}


(craphead2) #9

so none of this stuff

           map $lightmap 
           rgbGen identity  
     } 
     { 
           map textures/green/green.tga 
           blendFunc filter 

right?


(Shaderman) #10

The shader you postet above

textures/green/green 
{ 
        
   q3map_shadeangle 90 
        q3map_nonplanar 
        qer_editorimage textures/green/green.tga 
     { 
           map $lightmap 
           rgbGen identity  
     } 
     { 
           map textures/green/green.tga 
           blendFunc filter 
     } 
}

is absolutely ok. Why don’t you try it?


(craphead2) #11

i did it works its fine bolth ways i was just wondering. also how can i make a round corner im so stumped i cant get it to look right thanks


(Shaderman) #12

Depends on what you want to build. A screenshot or draft would help.


(craphead2) #13

well i think i got it to look ok here are the pics www.freewebs.com/mapmics any thing i can do to make it better?


(craphead2) #14

also im not sure but it doesnt look like the phong works i dont know much about it but i thouhgt it was more smoth then that? is it just me or what?


(Shaderman) #15

I think you got a typo and assume this are your pics: http://www.freewebs.com/mappics/. Don’t expect too much when using a phong shader on very angular brushwork. Did you adjust the shadeangle? Read sock’s nice tutorial about phong shading. If you’re unsure if your shader works, use textures/goldrush/sandygrass_b_phong instead on smaller angles to compare.