Unfortunately this setup makes no sense to me, because how image and scalar parameter (both appended) plugged into UV socket. Tbh I donât understand UE4âs material editor since it doesnât really follow the same logic as 3D appâs Material editors (because in Blender for example UV map is geometry, so you canât really get pixel image, plug it into geometry and have image change levels to appear to be animated).
Can someone please explain how this works and possibly maybe offer an alternative method that is more in line with how it would be done in GIMP/Photoshop/Blender ? (for example in GIMP Iâd use Levels to âanimateâ the circle)
I know how to use scalar parameters and dynamic material instances
What I donât get is the logic behind that setup (as I was saying the Material Editor makes no sense to me as I described above). It would be nice if you (or someone else) could explain why this setup works and how, or perhaps explain if it could be setup differently, where it makes more sense to a graphic artist.
The âAppendâ node essentially makes a Vector out of the elements you pass in. In this case, the â0.5â is the âRâ channel, and the red channel of the texture becomes the âGâ channel. You can then use that 2D data as UVâs. Itâs hard to explain UVâs with text and why that example up top works⌠hmm.
The above example is quite confusing though and you lack control, there are certainly better ways to do it. If you want a radial progress bar, I prefer this method myself. The radial texture is just a gradient made in Photoshop, but you could generate that in the material editor too.
Also, Jan posted a more customize-able version not so long ago, which you can see here:
You can make mask texture with those masks in RGB channels:
black white mask to mask what is circle and what is outside. fo eg white ring on black background.
half of texture (horizontal or vertical), one side white other black, so you can rotate this and mask progress.
1/4th part of texture (one quarter whit one black).
now to make circle dynamic mask: multiply ring texture by half or 1/4th (or some combination of 1/2 and 1/4th texture with circle.
Make rotator to rotate one of 1/2 or 1/4th masks to show progress. Then write down angle values for mimum state and max state of variable you want to show.
Plug this all into dynamic material. use map in range clamped to change your variable value from bluperints into values for material.
when you have b/w mask that makes more or less of circle visible you can plug in any texture (multiply it by b/w mask), then display it as result.
In case you do not know âmasksâ math in unreal:
one-minus node makes negative of mask
mask+mask (then clamp) 0-1 will make sum of white areas
mask*mask will make only common part white.
for rotator set its rotation to 1, then feed time as parameter. With a bit of calculations you could scale values here so it meets for eg range of variable you feed from blueprints. but doing material 0-1 then scaling values in blueprint is faster to change or tune later.
To make part (slice) of ring:
get 2 textures that are half of box. rotate one and get (multiply) common part of them. Then again multiply with ring texture. This will work for 0-180. You can do almost same way 180-360 part. For it make stationary 0-180 part of ring, then add same texture as you did 0-180 just flip horizontally (or negate) 1/2 box mask.