Urban Terror Forums: Animated Shaders (gif) - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Animated Shaders (gif) Rate Topic: -----

#1 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 25 June 2014 - 06:49 PM

I know I'm polluting this section but someone must use it after all. :P

I have made a gif and I'd like to use it in game, so I basically exported each frame as a separate image (.tga) that are to be shown one after the other using a shader, so that the animation works.

The shader works in game because it's nonsolid and I can go through, however it shows the No-Texture-Dutch-Flag. In the console, in-game, it says "unknown parameter, textures/map/frame2.tga".

Also, what image am I supposed to use as preview in the editor? Any will do? I use Frame 1.

I took the shader from this page and edited to fit my needs, in case you want to see it.

This post has been edited by Kolossus: 25 June 2014 - 07:09 PM


#2 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 25 June 2014 - 07:58 PM

For the preview image: the qer_ stuff is only for radiant. You dont need to set it. Actually you can set it to ANYTHING that is supported by radiant. Just make sure you afterwards are able to find your shaders ^^
all qer_ attributes are ignored by the compiler.

Also it would be helpful if you could post your shader here (in code tags please :) )

For the nonsolid stuff (not sure if you wanted it to be nonsolid)

surfaceparm trans
surfaceparm nomarks
surfaceparm nolightmap

You could basically just remove those lines, if you don't want your shader to be transparent, have bullet marks on it and have a lightmap applied.

For the missing texture:
1)You either got the wrong path, or don't have to files in your pk3.
2)You got more than 8 frames. I think that more than 8 frames should work, it would just ignore any additional frames, but I'm not sure. There is a way to have 16 frames though (without using videomap)
3)you fucked up the shaders syntax (e.g. forgot some parentheses )

so just post it here and we will see :)
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#3 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 25 June 2014 - 08:54 PM

Maybe I messed up the syntax because I edited what I found on that page. Anyway here it goes:

textures/ut4_mymap/frame1
{
    qer_editorimage textures/ut4_mymap/frame1.tga
    //surfaceparm trans
    surfaceparm nomarks
    surfaceparm nolightmap
    cull none

    {
    		animMap 10 textures/ut4_mymap/frame1.tga
        	textures/ut4_mymap/frame2.tga
        	textures/ut4_mymap/frame3.tga
		textures/ut4_mymap/frame4.tga
		textures/ut4_mymap/frame5.tga
		textures/ut4_mymap/frame6.tga
		textures/ut4_mymap/frame7.tga
		textures/ut4_mymap/frame8.tga
        blendFunc GL_ONE GL_ONE
        rgbGen wave inverseSawtooth 0 1 0 10

    }
    {

        map textures/ut4_map/frame1.tga
        blendFunc GL_ONE GL_ONE
        rgbGen wave sin .6 .2 0 .6

    }

}


#4 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 25 June 2014 - 10:59 PM

Hm. syntax looks OK.
i could imagine that the problem is that you got a EOL and/or TAB between the different frames.
Try someting like

animmap <freq> <path/to/frame1.EXT> [path/to/frame2.EXT]

so basically put it all in one line. seems pretty stupid, might be the point though. since i dont see anything work here. Try asking at cmm or in the cmm irc if it still doesnt work.
Been a while since i worked on q3map shaders :)
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#5 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 25 June 2014 - 11:14 PM

I tried deleting all spaces and resetting them, but it's not working. When I open the console in-game, I see 2 "warnings", one says something like "unknown parameter, textures/mymap/frame2.tga" (it mentions the second one), then another warning that says "light grid mismatch".

I was only compiling BSP -meta, so I thought that the light stage might be the key but no. Do you have a shader that animates or do you know where I can find one? Maybe I can see if there are differences.

bullet_loaderAdvertisement

#6 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 25 June 2014 - 11:21 PM

Uhm, I fixed it. I edited mine according to the one you find in this topic, in Sinni's post. It worked. lol

#7 User is offline   Iye Icon

  •   head moderator   
    Co-Chief Community Moderator
  • Account: iye
  • Country:
  • Joined: 07-June 11
  • Posts: 1,054

Posted 26 June 2014 - 05:36 PM

hm. maybe it was a problem with the .6 instead of 0.6.
anyway. good to hear it works now. :)
Sorry for my bad spelling - I am still asleep. :)

|=| Iye's UrT Addon |=| Firefox Personas |=| Maps |=|
http://www.mediafire...vk3a602hcfg.jpg

#8 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 26 June 2014 - 07:46 PM

Yeah! Also, it doesn't work with more than 8 frames, which sucks because a 8 frame animation is fast and laggy. :(

#9 User is offline   JRandomNoob Icon

  •   moderator   
    Community Moderator

Posted 27 June 2014 - 06:27 PM

You can bypass the 8 frame limitation (see also: rgbGen syntax).
dswp.de
Beginner’s Guide to Urban Terror (woefully out of date)
Daily Deadnade (Last updated September 9, 2016)

#10 User is offline   Kolossus Icon

  • Account: kolossus
  • Joined: 28-September 10
  • Posts: 386

Posted 27 June 2014 - 10:01 PM

:O I'm going to try! Even if I'm not sure I understand that rgbGen Wave thing... :|

This post has been edited by Kolossus: 27 June 2014 - 10:02 PM


  • (2 Pages)
  • +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942