Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: .roq videos as textures

  1. #1
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts

    .roq videos as textures

    Hi all

    Would it be possible to use .roq videos as Radiant textures? Kind of like the water texture, but instead of deforming the texture, somehow play a video on it. I've been searching and apparently it's possible in some Q3-based games like Star Wars: Jedi Knight, but I'm not so sure about cod2 (although it's based in q3). As I read it has something to do with shaders, is it possible to implement such custom shaders like this I post below in cod2? If so, know any good resources I can take a look on how to do it? Would appreciate it

    P.d. I saw there are shaders in the materials folder, but how did they make the actual material file that is used in radiant and is "linked" to the shader which animates it? I see no option in asset manager for that (I mean, I can make the texture but how to link a custom, or even a stock shader?)

    Thanks in advance

    PHP Code:
    textures/GPChannelsmap/video
    {
        
    qer_editorimage    textures/GPChannelsmap/video
        q3map_nolightmap
        
    {
            
    videoMap video/openinglogos
        
    }
        {
            
    videoMap video/openinglogos
            alphagen 
    const 0.25
            blendFunc GL_SRC_ALPHA GL_ONE
            glow
        
    }

    (source: https://jkhub.org/forums/topic/10458-video-texture/)
    Last edited by pollo; 25th July 2020 at 17:53.

  2. The Following 2 Users Say Thank You to pollo For This Useful Post:

    iBuddie (27th July 2020),kung foo man (27th July 2020)

  3. #2
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    You can play .roq files, like the CoD2 intro sequence when you first start the game, but only fullscreen.

    You can use atlas-textures to play 'videos' or more gifs.
    However you have to export every frame of the video into such an atlas texture.
    I've done it with something like 144p resolution or even smaller, as these textures grow really big really fast.

    It its possible - yes, but not really practical.
    Last edited by serthy; 26th July 2020 at 07:46. Reason: Its atlas-texture, not alias...

  4. The Following 2 Users Say Thank You to serthy For This Useful Post:

    kung foo man (27th July 2020),pollo (26th July 2020)

  5. #3
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Quote Originally Posted by serthy View Post
    You can play .roq files, like the CoD2 intro sequence when you first start the game, but only fullscreen.

    You can use alias-textures to play 'videos' or more gifs.
    However you have to export every frame of the video into such an aliax texture.
    I've done it with something like 144p resolution or even smaller, as these textures grow really big really fast.

    It its possible - yes, but not really practical.
    Yeah, I know it is possible to play a full-screen .roq video and back in time I used a similar technique of playing gifs, exporting every frame and playing with hide() show() in script (maybe you mean the same with the aliax? ).

    The idea is to play a .roq looping on a surface, eg. make a case texture similar to the water one, and somehow with asset manager, link it with the shader above that plays the .roq video in-game. Because as you rightly say using a lot of images is unpractical and makes the map fat.

    Thanks for the reply

  6. #4
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    I think I kind of remember now.
    It was done as an effect, not as a texture, so placing and scaling can be abit tricky.
    Lookup how smoke or fire effects are done, they use an 'atlas'-texture, something like this:

    You basically have to export your video clip into this format and fiddle around in the EffectsEditor to display every frame.
    Last edited by serthy; 26th July 2020 at 07:47.

  7. The Following 2 Users Say Thank You to serthy For This Useful Post:

    kung foo man (27th July 2020),pollo (26th July 2020)

  8. #5
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    Ty for the clarification I will try doing that. Any other knowledge about this is welcome

  9. #6
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by serthy View Post
    You can use atlas-textures to play 'videos' or more gifs.
    However you have to export every frame of the video into such an atlas texture.
    I've done it with something like 144p resolution or even smaller, as these textures grow really big really fast.

    It its possible - yes, but not really practical.
    Any quick n dirty "howto" on these atlas textures?
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  10. #7
    Sergeant serthy's Avatar
    Join Date
    Nov 2012
    Posts
    450
    Thanks
    96
    Thanked 296 Times in 188 Posts
    Quote Originally Posted by IzNoGoD View Post
    Any quick n dirty "howto" on these atlas textures?
    Sorry, my first reply was misleading.
    I have done it using an effect and placing this in the world, not a rela texture.

    I've played with CoD2 shaders several years ago, the only thing I managed to get to work was changing the speed of the scroll-texture on xmodels, as far as I can remember. Not even the yellow-pulsating glow on objective-textures changed colors. I gave shaders a couple of hours/days to try to modify them and getting the CoD engine to accept them, but I did not 'understand' them well.

    CoD4 got those TV's that display a short video, I remember recreating these without much success.

  11. #8
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    add a anglestoup(origin1.angles) at the end of your playloopedfx:

    PHP Code:
    playLoopedFx(level._effect["dog"], delayorigin1.origindistanglesToForward(origin1.angles), anglesToUp(origin1.angles)); 
    That should fix the upside down stuff.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  12. The Following User Says Thank You to IzNoGoD For This Useful Post:

    pollo (2nd August 2020)

  13. #9
    Private pollo's Avatar
    Join Date
    Jul 2012
    Location
    Spain
    Posts
    116
    Thanks
    93
    Thanked 69 Times in 35 Posts
    yea I tried it too but still the same :/

  14. #10
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    What about using this instead:
    PHP Code:
    playLoopedFx(level._effect["dog"], delayorigin1.origindistanglesToForward(origin1.angles), (001)); 
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  15. The Following 2 Users Say Thank You to IzNoGoD For This Useful Post:

    kung foo man (3rd August 2020),pollo (2nd August 2020)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •