Material billboards cant change size dynamically.

Hello,

using UE4.5, I created a blueprint with a Material Billboard. In the sprite section, I added 1 element with a very simple material and base size of 16 for X and Y. This part works fine.

in my graph, I’m trying to change the size of this sprite element with event tick and I cant find a way to make it work. I’ve tried changing the properties of the element and also changing the scale, and no matter what I do, it has zero effect on the billboard.

Am I missing something? or is this broken? I would like to have a material billboard that I can shrink over time.

Hello xdbxdbx,

I am assuming the further away from the sprite you go as far as camera distance, the larger you wish the sprite to become?

If you could give me some specific steps to follow to reproduce your issue, we could help you solve this and get the Material Billboard scaling to function properly?

Thanks,

Hello Andrew,

see attached, nothing happens to the billboard in either of these cases.
These are the simplest examples I can conjure that showcase the issue.
I am expecting the billboard to be a different size on the screen every frame relative to its world space.

for context, I have about 500 material billboards in my world, and I want them to change size based on some musical properties. I seemed to have gotten around the issue using individual particle systems instead, but that seems far less efficient to me.

Hello xdbxdbx,

I just had the same problem and then came across voigtboys “hack”-solution from here:

Basically the values get updated, but the billboard wont notice the change, so you can simply call “ToggleVisibility” twice, which will make your billboard invisible and then visible again, and also update its values.

Works for me pretty well so far, although I wish there were a cleaner solution.

1 Like

I’ve posted some other comments in answers in related threads on the subject, but the gist of it is that the rendering logic doesn’t know that you’ve made changes. I suspect that ToggleVisibility is making the rendering logic aware that changes happened, at which point it picks up on the other changes too. The key part is that MarkRenderStateDirty (C++) gets called on the UMaterialBillboardComponent after changes are made.

It does work when using ToggleVisibility, but it sure is a dirty solution. It seems strange to be forced to call an update function on a billboard which anyhow need to be updated each frame to face the camera.