Welcome, Guest.
Username: Password: Remember me

TOPIC: Animated HUD

Animated HUD 1 year 7 months ago #1

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
I would like to have a shader that displays on the screen a looping animated image. I have seen a thread around here with a shader that displays a regular PNG image overlay, and I tried it with a gif, however it did not animate. Is it possible?
The administrator has disabled public write access.

Animated HUD 1 year 7 months ago #2

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
You are probably looking for something like this

reshade.me/forum/shader-discussion/162-l...v-blog?start=24#4782

You can find this Gr8mmFilm shader in CustomFX suite. It might already be everything you need. Checkout the texture it loads and replace its parts with your animated HUD pictures. (You might need to adjust a few values in the mediator if you change e.g. the amount of animated pictures)
Last Edit: 1 year 7 months ago by Ganossa.
The administrator has disabled public write access.
The following user(s) said Thank You: DanP

Animated HUD 1 year 7 months ago #3

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
Thank you. But, this means I have to convert my gif into a really massive png? Is there no way to use the gif? It's video footage (with transparency), I would like it to be really high res and framerate
The administrator has disabled public write access.

Animated HUD 1 year 7 months ago #4

  • Ganossa
  • Ganossa's Avatar
  • Offline
  • 최정장군
  • Posts: 790
  • Thank you received: 838
Crosire probably knows better but currently ReShade only supports 2D textures so no additional layers for a number of images. You might be able to add the alpha layer to a .dds texture though but I personally did not use .dds in ReShade yet (not sure it can also be read from other formats such as png).
In the worst case you need a texture for each frame (or a bundle as for the shader I wrote) plus the additional alpha layer/texture (or color it with a constant color that is not used for the UI and can therefore be filtered in the shader)
Since high quality usually contradicts with good performance, it might also be a good idea to identify effects in your image loop that can be done without sampling yet another stack of textures.
By the way, there are good compression tools for png so those files do not need to be massive :)
With proper blending you can also fake a proper framerate ;)
The administrator has disabled public write access.
The following user(s) said Thank You: DanP

Animated HUD 1 year 7 months ago #5

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
Alright, I'll make do with png. Thanks again. Great work on those shaders.
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #6

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
So I tried it and I couldn't get it to work, the transparency was off and I couldn't figure out how to automatically put all the images I needed in sequence into one image. Plus photoshop wouldn't let me make a bigger res than I needed. Do you think maybe a shader could do something like, point to a folder full of PNGs and, according to filename, display each one of them in sequence?
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #7

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2644
  • Thank you received: 1517
DanP wrote:
Do you think maybe a shader could do something like, point to a folder full of PNGs and, according to filename, display each one of them in sequence?
No. That would be way too many textures to load and the amount of samplers required to sample them cannot be handled by GPUs, nor would it make sense performancewise. Putting everything into one texture works, using multiple textures for this would be insane.
Cheers, crosire =)
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #8

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
Are you sure? Currently I'm using an old program that does something similar, called Custom Desktop Logo, it's loading a folder of about 200 pngs @1mb each and animating it at 30 fps, the performance impact is negligible. Why can't a shader do this?
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #9

You can't load all the textures in a shader at once, there are hardware(TMUs) and api limits.
and you didn't need to, luciferhawk already made some old TV effect that uses texture atlas which in some way is animated HUD.
Last Edit: 1 year 6 months ago by kingeric1992.
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2644
  • Thank you received: 1517
DanP wrote:
Are you sure? Currently I'm using an old program that does something similar, called Custom Desktop Logo, it's loading a folder of about 200 pngs @1mb each and animating it at 30 fps, the performance impact is negligible. Why can't a shader do this?
That program is entirely CPU based (as almost every desktop application). The GPU has a !completly! different architecture than the CPU. It only has a limited number of sampler registers from which a shader can sample a texture. Each access to one such register is a demanding operation, so those should be kept low and one should always sample from memory which is close to each other to utilize the cache best. Switching textures in those samplers is another demaning operation and can not be done in the middle of executing a shader (obviously). This is why you would always put everything you need in the same memory region, which means one texture with all the data.
Cheers, crosire =)
Last Edit: 1 year 6 months ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: DanP

Animated HUD 1 year 6 months ago #11

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
Alright, thanks for the clarification.
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #12

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
kingeric1992 wrote:
You can't load all the textures in a shader at once, there are hardware(TMUs) and api limits.
and you didn't need to, luciferhawk already made some old TV effect that uses texture atlas which in some way is animated HUD.
And I tried that shader, and ran into too many hurdles for what I tried to do. The biggest would be, how would I automatically insert hundreds of full res images, vertically, in a specific order into one static png?
Last Edit: 1 year 6 months ago by DanP.
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #13

This??
www.photojoiner.net/
I'm sure there are a lot of other programs capable of stitching pics together.

you still need to set the grid size in shader.
Last Edit: 1 year 6 months ago by kingeric1992.
The administrator has disabled public write access.

Animated HUD 1 year 6 months ago #14

  • DanP
  • DanP's Avatar
  • Offline
  • Posts: 8
I've tried it, that site converts the image to jpg. It has to be png, for transparency.
I searched quite a bit for programs/ways to do this. I'm sure they exist but I just couldn't find them.
The administrator has disabled public write access.