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"

DecalActor dynamic material instances

Dynamic material instances to not appear to be working correctly on Decal Components.

If I create a DecalActor and call the DecalComponent 'CreateDynamicMaterialInstance' node in its construction script, it creates a material instance, but that instance does not have the original decal material as a parent and so the decal appears as broken:

alt text

The only way for me to get it to work is to create the dynamic material instance using the BeginPlay event:

alt text

Should I not expect this node to work in the construction script? Or is it a bug?

Product Version: UE 4.10
Tags:
decalcdmi.png (26.0 kB)
beginplay.png (25.4 kB)
more ▼

asked Nov 29 '15 at 05:12 AM in Rendering

avatar image

keithoconor
21 1 3 7

avatar image Garybru Aug 09 '16 at 06:31 PM

same issue here

avatar image AJ_Graphix Jul 28 '17 at 08:28 PM

Yeah, I'm wondering why that is not working. Did you ever figure it out? Thanks

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I found the answer! Thanks to Eric Ketchum's helpful test project here, I discovered why the decal's dynamic material instance would always show up as the default decal material inside the level. Apparently, you cannot have the decal as the root of the blueprint, which means you cannot have a dynamic material in a blueprint whose Parent Class is decal actor. You must first choose actor, then manually add a decal component. This is how Eric's BP test project was setup, and this is the only way that works. Not sure if that's by design, or a bug.

-Adam

more ▼

answered Jul 28 '17 at 09:08 PM

avatar image

AJ_Graphix
259 11 17 28

avatar image RCV2 Aug 02 '18 at 01:18 AM

I'm using a decal component which is not the root, but still the material instance created is the default one :(

avatar image AJ_Graphix Aug 02 '18 at 04:13 PM

Is the parent class of your BP "Actor"? Check out Eric's test project to see if you have any differences in setup with your own.

avatar image RCV2 Aug 03 '18 at 08:47 PM

The parent of my BP is a C++ class i made, which indeed inherits from Actor. Never found out what the issue was, just created the dynamic material instance on PostInitializeComponents(). It however, only worked for the first material created, after that, the decal would use the default material as base. I just saved a reference to the first one.

avatar image AJ_Graphix Aug 07 '18 at 09:18 PM

Ah, okay. Well, I haven't touched decal actors with C++ before, only with Blueprint. Sorry, I couldn't help more with this one. Hope you find the solution.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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