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"

Temporarily Applying Material to Entire Actor

TLDL; How do I apply a material to an entire actor and then undo this within the same second?

Alright, so I spent three days searching here and other sites, using Google, but nothing has shown up that applies to my situation. I could be mistaken, or maybe I'm using the wrong keywords.

Scenario: In the game, I am clicking a button, spawning the mesh of an actor (not the original actor) and placing it in the world. It can't be the original actor because it's basically not supposed to exist, in the eyes of the AI, until it has actually been placed. Once placed, the spawned mesh is destroyed and the actor is placed then activated.

Problem: While the object is overlapping other objects, I can lower its opacity, turn it all red by parsing through all mesh components, and make the dynamic material glow. The problem is, I need to be able to turn the entire actor's material back to normal without creating and modifying a separate instance of it, and without storing every single material in a temporary array.

What I have tried: I first went about this by parsing through all of the actor's primitives and changing the color to a solid red but that looked nasty and, again, there was no clean way to undo the change. I've tried creating a separate instance and making the original invisible for a while, but I honestly don't like that idea for a number of reasons I won't go into.

Also, it needs to be possible to manipulate the entire actor within blueprints without making any modifications to anything pertaining to the original actor. That is, without modifying its blueprint, material, mesh, etc. I'm trying to just be able to externally take an actor class reference, extract its mesh and spawn a generic actor using only the physical appearance of the original actor. Using the reference of the newly spawned actor, I need to be able to change its appearance and revert the changes back to its original appearance without constantly creating dynamic materials.

Product Version: UE 4.14
Tags:
more ▼

asked Jan 25 '17 at 01:54 PM in Blueprint Scripting

avatar image

Zakku Arashi
111 2 7 9

avatar image Zakku Arashi Jan 28 '17 at 05:41 AM

Alright, a little more detail on this. I've spent about a week trying different things, albeit with no real success, and I've learned a lot more in that time.

For one, I figured out that I need a [Post-process] in order to do what I need-- not just parse through every component and change it to a dynamic texture. I've found out how I would like the object to change, but I have still not found out how to get a [PostProcessVolume] to change the object within its field to the desired material, temporarily, for as long as that object is inside.

Many responses for something similar have been, "Use a [MaterialCollection]..." but the idea is to change the object to these material settings without the [Post-process Material] or [PostProcessVolume] needing to know the actor's materials.

I consider myself to be pretty adept at Google-ing but, quite frankly, I'm stumped. Any suggestions?

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

0 answers: sort voted first
Be the first one to answer this question
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