Hello, im working on a project where I need to apply a new material to 200 actors during a showreel to show the Rebar inside the structure. But there I have well over 200 actors that needs to fade, and this is quite a dilemma for me.
On other projects i’ve had 5 or 6 actors at most and have simply made a duplicate dynamic material BP for each as shown here.
Well, you’re casting to a Static Mesh Actor - are your objects called Static Mesh Actor, I doubt that. Your casts fail. How is your actor called in the Content Browser?
Besides that, I believe the whole approach is very incorrect. I’d do it differently altogether, at the very least I’d implement some functionality inside the actor:
Have an event that allows you to fetch what you need by Tag. Keep the results in an array of the correct type so only a single cast is necessary. Run the loop after timeline so you use a single timeline for everything and use the object’s event defined earlier.
There are much better approaches to this, though - there is [Material Parameter Collections][3] but see if you can implement this at least. It’s pretty scalable and reusable. You can use it for 4 or 4000 actors.
edit: also, consider looking into inheritance, this will allow you to work with many different objects that share some common functionality (like changing textures).
It’s an arrayvariable you create yourself, it has to be the type of your objects. It acts as a temporary reference container.
Consider investing some time into learning the basics, either YT or just reading the docs; otherwise you might end up pulling your hair every 10 mins or so
On the other hand, just getting the hands-on works for some quite well!
thankyou. About creating functionality within each actor. That wont be possible. The models are implemented from IFC, so I havent made these and cant duplicate them. And I dont have tiem to go through every single actor and create functionality, I need a more streamlined method. It also need to happen automatic, this is just a showreel, it wont simulate a game.
Huh, this IS the streamlined method. It’s 20 or so nodes doing all the work you need.
If you need automation, you need to put in the work upfront. You create a framework first and base the rest of your work on that, otherwise you face a lot of manual labour.
Perhaps you can experiment with re-parenting. Not sure if that’d work for you.
So, in your content browser you have 100s of different actors (?!), each of different class? That’s a pretty horrible way of exporting things. I’d rather have a DataTable of just static meshes and build actors on that.
Look into Material Parameter Collection then - the link is in one of the comments. It does not deal with objects but with materials - imagine having a global material parameter you can control. Any object with that material applied will react to it.
correct, I get 100s of different actors, and each of them has a static mesh thats inherited from them. This is what I get when I import with Datasmith. So im kinda stuck
Never worked with datasmith but the documentation seems fleshed out nicely. Perhaps there are ways of handling it or it can all be set up differently. I’m gonna tap out on that, though.
I still think MPC would work here - see my last comment.