# [SOLVED] Custom Shader for GTKRadiant???



## atsdo (Apr 14, 2009)

Hi, im kinda new-ish at this GTKRadiant stuff, but I DEFINATELY know my way around. Its gotten quite easy for a while, and then I decided to undertake a map based on World 1-1 for the original SMB.I want a question block shader and I want the textures to switch in this order. Like I would want it to go in a loop from top left and then clockwise. ----->







Any help would be appreciated!ray:
If you dont know how just tell me how to make my own shader Im sure somehow ill figure it out!:grin:


----------



## Aus_Karlos (Mar 10, 2007)

*Re: Custom Shader for GTKRadiant???*

I believe for many games this is an animated image and not a shading technique. I could be wrong, my forte is only the Source Engine. You can add animated textures to the game and have them change accordingly to a trigger input.
If the game your setting it up for can understand a gif image file (Or has its own image file system) then this would be your best bet in making an animated texture. 

A free program is GIMP, add each picture to a layer then save as a gif texture. You may want to change the default delay that occurs when it changes images to suit your needs.
http://www.gimp.org/


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

THANK you. I already have gimp, and im compiling the map now-*crosses fingers*


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

ooohhh...
nopes. Ill use a func_usable, I guess...
But anybody who owns radiant can you tell me how to make an animated image?:4-dontkno


----------



## atsdo (Apr 14, 2009)

*Animated Shader/ GTKRadiant v1.5.0*

I have this set as my shader file in my assets0.pk3 file:

textures/mariojpg/block
{

surfaceparm nomarks
surfaceparm nolightmap
cull none
q3map_surfacelight 500
q3map_globaltexture
qer_editorimage textures/mariojpg/block1.jpg

{
animMap 10 textures/mariojpg/block1.jpg textures/mariojpg/block1.2.jpg textures/mariojpg/block1.3.jpg
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10

}	
{
animMap 10 textures/mariojpg/block1.jpg textures/mariojpg/block1.2.jpg textures/mariojpg/block1.3.jpg
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}	
}

And the shader is not even showing up in the editor. What am I doing wrong, please somebody help me.
By the way this was a blank template it told me to edit the values and It would work so somebody help me! PLZ =C:4-dontkno:4-dontkno:4-dontkno


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

Okay now the shader shows up but its not working.
same shader file, i just added in the shaderlist.txt


----------



## Aus_Karlos (Mar 10, 2007)

*Re: Custom Shader for GTKRadiant???*

Ive done this for you. See if it works.


```
textures/mariojpg/block
{
map $lightmap
{
}
q3map_material Brick
surfaceparm nomarks
q3map_surfacelight 500
q3map_globaltexture
qer_editorimage textures/mariojpg/block1.jpg
}
animMap 10 textures/mariojpg/block1.jpg textures/mariojpg/block1.2.jpg textures/mariojpg/block1.3.jpg
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
{
animMap 10 textures/mariojpg/block1.jpg textures/mariojpg/block1.2.jpg textures/mariojpg/block1.3.jpg
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
}
```
You may have to play around with the Syntax "{" and "}" as i fully dont understand them. And you may have to change this line "q3map_material Brick" to suit the correct Material name, i just guessed there.


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

THANK YOU!
Once again, compiling, I hope it works- ?
but I still cant get passed one problem- JK2 says it doesnt recognize the line 'aniMap'
but I saw someone else do it, so I guess my scripting is a failure...
*crosses fingers(again)*


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

AAAARGH
did not work
thanks for your help and time, just seems like jk2 cant handle aniMaps.
o well...


----------



## ds615 (Oct 27, 2009)

*Re: Custom Shader for GTKRadiant???*

Animaps work just fine in JK2, I use them all the time.
Your shader is likely in the wrong place. First, why is it in Asset anything?
Make your own pk3 with the shader in the shaders folder, place that in the Base folder, and you're good.

q3map_material Brick doesn't exist, and q3map_globaltexture isn't needed for this, so take those out.

Finally, try renaming your textures to block1, block2, etc. I don't know if radiant can read file names with extra dots.


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

WOW! I am seriously impressed with all the help I am getting here... thx especially to ds615. Its working!!!ray:
Only one thing...
its running at 10x the speed i want it to...
again, thanks for all the help!


----------



## atsdo (Apr 14, 2009)

*Re: Custom Shader for GTKRadiant???*

YAY!
okay i figured out how to do that... and fixed a problem where it would flash uncontrollably running my fps up a wall... so, I suppose thats about it! thank you everyone for keeping me informed. Check out my map to be released sometime in January on JK2files on filefront! woohoo!
kbai!:wave:


----------



## twinghost (Nov 3, 2010)

textures/pug1/1
{
map $lightmap
{
}
surfaceparm nomarks
q3map_surfacelight 500
qer_editorimage textures/pug1/2
}
animMap 10 textures/pug1/2 textures/pug1/3 textures/pug1/4 textures/pug1/5 textures/pug1/6 textures/pug1/7 textures/pug1/8 textures/pug1/9 textures/pug1/10
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
{
animMap 10 textures/pug1/2 textures/pug1/3 textures/pug1/4 textures/pug1/5 textures/pug1/6 textures/pug1/7 textures/pug1/8 textures/pug1/9 textures/pug1/10
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
}

what am i doing wrong?


----------



## atsdo (Apr 14, 2009)

textures/pug1/1
{
surfaceparm nomarks
q3map_surfacelight 500
qer_editorimage textures/pug1/2
{
animMap 10 textures/pug1/2 textures/pug1/3 textures/pug1/4 textures/pug1/5 textures/pug1/6 textures/pug1/7 textures/pug1/8 textures/pug1/9 textures/pug1/10
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
{
animMap 10 textures/pug1/2 textures/pug1/3 textures/pug1/4 textures/pug1/5 textures/pug1/6 textures/pug1/7 textures/pug1/8 textures/pug1/9 textures/pug1/10
blendFunc GL_ONE GL_ONE
rgbGen wave sawtooth 0 1 0 10
}
}

Try that.
Also:
http://jediknight3.filefront.com/file/World_11;112913
My Mario Map.


----------

