Hi guys
Started a new map some weeks ago and it is ready to show you the first rough. I would like to include some shaders in this rough, but one I made for the teleporter I cant make it work.
Is a animmap with 8 tga images with alpha channel and the script is:
textures/newmap/mj_tporter
{
qer_editorimage textures/newmap/mj_tp01.tga
q3map_lightimage textures/newmap/mj_tp01.tga
surfaceparm trans
surfaceparm nomarks
surfaceparm nolightmap
{
animMap 1 textures/newmap/mj_tp01.tga
textures/newmap/mj_tp02.tga textures/newmap/mj_tp03.tga
textures/newmap/mj_tp04.tga textures/newmap/mj_tp05.tga
textures/newmap/mj_tp06.tga textures/newmap/mj_tp07.tga
textures/newmap/mj_tp08.tga
blendfunc add
}
}
The images show in the texture editor as a shader but do not appear after compilation.
Someone can tell me what is wrong/missing in this script?
My animmap do not work
Re: My animmap do not work
The list of frames has to be on one line. New line means new shader command. Remove line breaks and separate frames by spaces instead, therefore it should work.
Also, you are using lightimage but no light, you just forgot to include it? If you want to give texture light color be sure to include also strenght of the light...
Technically your script needs only to remove line breaks between frames and use only spaces like described above. But, code will look better, if you will use tabulators, structure the code like this model:
Your shader coding skills would look better if you choose GL_ONE GL_ONE blendfunc for additive texture instead, I know that both work, but the GL keywords give you more options to blend your texture and it's original way of shader stages blending introduced with first Q3 release (note that original id's shaders are using this way, not the simplified ones). I'd recommend to use original blending keywords, but that's my opinion. If you read the replacements better, use them...
Also, you are using lightimage but no light, you just forgot to include it? If you want to give texture light color be sure to include also strenght of the light...
Technically your script needs only to remove line breaks between frames and use only spaces like described above. But, code will look better, if you will use tabulators, structure the code like this model:
Code: Select all
textures/awesomemap/texturename
{
(shader general directives)
{
(shader stage directives)
}
}
Re: My animmap do not work
Tabulation is just because he's posting this on the forum without the "code" markup.
GL_ONE GL_ONE vs. blendFunc add is nonsense. Both are fine, one is just the shorthand for the other, so why not use the shorthand if that's all you need. Both are valid for the game. It's fine if you prefer one over the other, but neither one is better than the other.
What is redundant is q3map_lightimage since the shader is not emitting light, as well as the alpha channel if he is using an additive blend function.
GL_ONE GL_ONE vs. blendFunc add is nonsense. Both are fine, one is just the shorthand for the other, so why not use the shorthand if that's all you need. Both are valid for the game. It's fine if you prefer one over the other, but neither one is better than the other.
What is redundant is q3map_lightimage since the shader is not emitting light, as well as the alpha channel if he is using an additive blend function.
[size=85][url=http://gtkradiant.com]GtkRadiant[/url] | [url=http://q3map2.robotrenegade.com]Q3Map2[/url] | [url=http://q3map2.robotrenegade.com/docs/shader_manual/]Shader Manual[/url][/size]
Re: My animmap do not work
Code: Select all
textures/newmap/mj_tporter
{
qer_editorimage textures/newmap/mj_tp01.tga
q3map_lightimage textures/newmap/mj_tp01.tga
surfaceparm trans
surfaceparm nomarks
surfaceparm nolightmap
{
animMap 8 textures/newmap/mj_tp01.tga textures/newmap/mj_tp02.tga textures/newmap/mj_tp03.tga textures/newmap/mj_tp04.tga textures/newmap/mj_tp05.tga textures/newmap/mj_tp06.tga textures/newmap/mj_tp07.tga textures/newmap/mj_tp08.tga
blendfunc add
}
}
[url=http://www.q3-sg.tk][img]http://www.q3-sg.tk/q3sg-project-banner.png[/img][/url]
http://www.q3-sg.tk
http://www.q3-sg.tk
Re: My animmap do not work
It's one of the reason why to post these codes under the markup.obsidian wrote:Tabulation is just because he's posting this on the forum without the "code" markup.
Yea, they are the same, but I think that shortcuts have not been in the game from very early just right after release of first version in 1999. If someone likes to use shortcuts, then no problem, but it does nothing special, just shortcuts the code a bit.obsidian wrote:GL_ONE GL_ONE vs. blendFunc add is nonsense. Both are fine, one is just the shorthand for the other, so why not use the shorthand if that's all you need. Both are valid for the game. It's fine if you prefer one over the other, but neither one is better than the other.
I always use .tga in shader eighter if I have jpg or tga, it doesn't matter. I think tga is better for the quality, just a bigger file. Also, he probably wants to add light emission to the texture (like fire does), just forgot to include the light emission command.obsidian wrote:What is redundant is q3map_lightimage since the shader is not emitting light, as well as the alpha channel if he is using an additive blend function.
Re: My animmap do not work
thanks CZghost and Obsidian
Animmap is working now!! (light emission added). I will post my "Roughmap" soon.

Animmap is working now!! (light emission added). I will post my "Roughmap" soon.