I am very new to this software and have been trying to learn the best way to go about this. I am trying to create a wardrobe furniture piece where the materials on both the front section and case section change automatically. I am attempting to showcase all of the different combinations of material that are available with the furniture piece, it is too many combinations to do by hand so I thought this could help. So far ive read about Dynamic Material Interfaces and such but cannot quite get anything to work. If anyone has a solution I would appreciate it greatly.
I am trying to create a wardrobe furniture piece where the materials on both the front section and case section change automatically.
If you already have all the materials, add them to the array, and cycle through the options. How to organise it would depend on how you need the cycling to work. I’d probably use a timer or a timeline with events if I needed a non-uniform pace of changes. Or something else if I needed the changes to match the beat of music, for example.
Can you produce an example?
- a piece of furniture with 2 sections, each with 5 materials?
- are we selecting something at random or is there a pattern?
- can patterns repeat?
- the materials are swapped every x seconds?
- how long is the showcase?
- do we need to show ALL available combinations?
Currently, it’s a bit too vague to suggest something tangible. There is also a question of scope, I’d approach things differently if this was a homework assignment for a single wardrobe piece with 50 combinations, and then quite differently if I had to re-imagine & digitalise IKEA catalogue entries since 2001 where they can inject new stuff on a weekly basis up until 2030.
Do tell how it should work.
Dynamic Material Instances are for altering how a material looks and behaves at run-time. Not sure if that’s what you need; sounds like you want to swap out many existing materials instead.
This is an example of one of the pieces I am talking about. The two sections where I need the material to change are the front (doors and Drawers) and the case (everything that’s not the doors and drawers). The scope is more on the ikea side as there are about 18 colors to use for the case section and I would need to cycle through about 35 materials to be used on the front section for EACH of the 18 case materials. I just need to produce images of each combination so the overall time the process takes to go through combinations is not all that important.
This can be done with a dynamic material:
- a parameter in the material:
- a bunch of
Colors
in an array and then cycle them:
You can cycle materials in a similar fashion; or have a double loop to cycle through both to get all possible combinations materials & colours.
produce images of each combination
This can be automated, ofc:
The two sections where I need the material to change are the front (doors and Drawers) and the case (everything that’s not the doors and drawers).
We know nothing about how the material / meshes are set up so can’t advise at this point.
Okay this seems great! Do you know if the object being a model from a different software affects my ability to change parameters of the materials in the blueprint editor? Sorry, like I said very new to this software and very thankful for your patience and response time
You’re working with materials that were auto-generated for you upon importing of the asset, right? You can (and probably will need to) edit the material and add the necessary parameters.
To get a colour that can be updated dynamically, you’d add a Constant 3 Vector and convert it to a parameter:
Same with scalars
for turning surfaces rough / glossy / transparent. Textures can also be parametrised.
Theoretically you could get away with a single material for all dynamic variants of a single piece of furniture. In practice this may be a bit tricky as beachwood material may differ dramatically from some space-age polymer. Depends on the level of realism you’re after and complexity of the material. I’d consider this a mandatory read:
But you may be already fully aware of this, ofc.
There is also this, slightly more advanced feature:
Rather than defining parameters locally inside each material, you define and alter them globally. The materials fetch those values. This is super handy where you have dozens of unrelated materials but want to adjust a shared parameter that affects them all.
Yes all of the materials are image files that were applied to the objects in twinmotion, and then once I brought the twinmotion file into UE the materials were automatically added as well. Will I need to fully remake the materials in UE or will simply converting the already made materials to parameters work
Open one up to see what lurks inside. Almost certain you can add the necessary parameters rather than rework the whole thing. The materials are working after all, right?
I’d half-expect a tangle of wires inside.
Yes I was able to use the materials before, is this what you wanted to see when you asked me to open it up? if not what screen should I navigate to.
- there is a master material somewhere there that has all the wires and exposes the parameters; that’s the chair from the anim above, for example:
- you can then make a bunch of material instances:
You can adjust those exposed parameters upfront in each instance but that’s a lot of work if you need 35 types of wood in 18 colours… That’s the pic you just posted. You cannot change how they look at runtime but you can change which of them is showing. But having 600 instances for each piece of furniture is not feasible.
- and there are Dynamic Material Instances which can be updated by pushing data dynamically into the materials at runtime. So you can have unlimited variants. That’s what was in my example.
Your master material already exposes a bunch of params, as seen in this material instance:
If you’re happy with those and know what they do, you’re good to go. Create a dynamic version of the material and alter the params.
It seems that the process of creating a dynamic material instance out a regular instance can be simplified now (I’m new to UE5):
There, I learnt something today. Neat!