x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Dynamic Material Instance not working on Material Billboard?

Hey everyone, I've been working with Dynamic Material Instances lately and noticed that they don't seem to work on Material Billboards.
I have included a snapshot of the blueprint I'm using for this. This exact node network works fine on static meshes but when I try to apply it to a Material Billboard it doesn't do anything at all.

Are there limitations in terms of what Dynamic Material Instances will work on or am I missing something?

Blueprint Snapshot

Product Version: Not Selected
Tags:
more ▼

asked Jun 12 '14 at 09:08 PM in Blueprint Scripting

avatar image

Pedram Navin
98 3 12 11

avatar image optimage Sep 09 '14 at 04:48 PM

I am having the same issue.

I tried with a premade material.

I tried with one added after run time and even this didn't work / update. Did error checking and they all returned true.

I was trying to create a health bar using the healthbar example to one of the mesh assets. I can manually change the health bar but when i try to do it in the blue print I get the same issue as the OP.

Even tried to add the Sprite in at run time and it did not show.

Any ideas ?

(comments are locked)
10|2000 characters needed characters left

2 answers: sort voted first

Looks like this is a bug.

https://forums.unrealengine.com/showthread.php?1464-I-can-t-get-Dynamic-Material-Color-changes-to-work

Hi Erdrik ,there seems to be a bug with doing this to a Material Billboard atm. I'll show this to the programmers, for now if you are just wanting to play around with changing the materials, I would just do it on a Static Mesh vs a Material Billboard. I had never actually tried doing that on a Material Billboard before, good find!

more ▼

answered Sep 09 '14 at 04:52 PM

avatar image

optimage
1 1 3

(comments are locked)
10|2000 characters needed characters left

This may not be the same cause originally, but based on the code in 4.6.1:

The UPrimitiveComponent SetMaterial method won't work on this. UMaterialBillboardComponent has an array of FMaterialSpriteElement structures, named Elements, which is what you see and configure in the components view.

You could try to update a structure in this array, but the structure isn't actually marked as BlueprintType, so you can't create or interact with FMaterialSpriteElement structs in blueprints.

Even if you mark it as BlueprintType in the engine code, you'll find that nothing changes. This is because changing the value doesn't actually tell the component about the change to the structure.

UMaterialBillboardComponent has an AddElement method which does work, because it calls MarkRenderStateDirty after adding a new FMaterialSpriteElement element to the Elements array.

If you can manage to call MarkRenderStateDirty after changing anything in the Elements array, you should see your changes.

more ▼

answered Feb 20 '15 at 09:39 PM

avatar image

Sion Sheevok
26 2 3 4

avatar image dzeligman Feb 20 '15 at 09:58 PM

This issue has been resolved as of 4.7. They merged the PR I did.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question