Quake3World.com Forums
     Level Editing & Modeling
        My animmap do not work


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: My animmap do not work

Commander
Commander
Joined: 09 Jul 2013
Posts: 100
PostPosted: 12-21-2014 09:28 AM           Profile Send private message  E-mail  Edit post Reply with quote


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?




Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 12-21-2014 10:43 AM           Profile   Send private message  E-mail  Edit post Reply with quote


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:
Code:
textures/awesomemap/texturename
{
    (shader general directives)
    {
        (shader stage directives)
    }
}


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...



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

I'm the dude!
I'm the dude!
Joined: 04 Feb 2002
Posts: 12498
PostPosted: 12-21-2014 05:16 PM           Profile Send private message  E-mail  Edit post Reply with quote


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.



_________________
GtkRadiant | Q3Map2 | Shader Manual


Top
                 

Grunt
Grunt
Joined: 06 Dec 2009
Posts: 69
PostPosted: 12-21-2014 11:50 PM           Profile Send private message  E-mail  Edit post Reply with quote


Code:
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
   }
}



_________________
Image
http://www.q3-sg.tk


Top
                 

The hell good boy
The hell good boy
Joined: 22 Jun 2011
Posts: 1922
PostPosted: 12-22-2014 05:17 AM           Profile   Send private message  E-mail  Edit post Reply with quote


obsidian wrote:
Tabulation is just because he's posting this on the forum without the "code" markup.

It's one of the reason why to post these codes under the markup.

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.

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:
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.

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.



_________________
[ Websites | Facebook | Twitter | YouTube | Instagram ]
When you feel the worst, turn to the sun and all the shadows will fall behind you.” - John Lennon


Top
                 

Commander
Commander
Joined: 09 Jul 2013
Posts: 100
PostPosted: 12-22-2014 09:11 AM           Profile Send private message  E-mail  Edit post Reply with quote


thanks CZghost and Obsidian :p
Animmap is working now!! (light emission added). I will post my "Roughmap" soon.




Top
                 
Quake3World.com | Forum Index | Level Editing & Modeling


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.