Dynamic Materials with 3D Text

Good morning

Is there a way of creating a dynamic material for a Text3D item?

I want to change a parameter (Colour) on the material of my 3D Text, but haven’t figured out a way to do so in the Blueprint. I need to use a ‘Custom Event’ to start this, where i send the colour via vector.

I have got it working with a static mesh, but not 3D Text.

Thanks!

Seems to work fine out of the box:

What are you doing differently?

Hi!

Thank you for the reply. I’ve included a screenshot of how I’ve done so far.

I haven’t been able to replicate the BP how you’ve laid it out… I’m also not sure if that would be suitable, considering how the way I am getting the variable in.

Would you be so good to outline what I would need to do to finish this BP off, please?

Thanks!

Perfectly suitable!

  • create the Dynamic Material Instance on Begin Play
  • reference it as shown above
  • have the custom event pipe the data in using said reference

The whole thing, in case there was any doubt:

Do note the Text3d component has more than one material. You can apply the same DMI everywhere ofc.


The same setup would work with a Static Mesh Component, ofc.

Hi

Thank you so much for the detailed response.

I feel like a bit of an idiot but I am even struggling to replicate your BP. A few questions:

  1. How do I create those ‘Set’ nodes you have?

  2. How do I reference the DMI? You have a node called ‘My DMI’… how do I create that?

  3. I am creating this blueprint on the Actor. Through that, I am getting ‘Text 3DComponent’ as opposed to ‘Text3D’. Is this ok?

I realise these are likely fairly basic questions, apologies.

Thank you!

1 Like

How do I create those ‘Set’ nodes you have?

When nodes return values, the data is usually of a very specific type. Here:

You can assign this value to a variable for later use (to access the material and change its color). You could laboriously click about a dozen times and:

And then alt+drag:

Or right click the pin instead to:

Which I highly recommend. This variable is the same as any other variable when it comes Get (read) | Set (write to):

More on variables:


You have a node called ‘My DMI’

I renamed it to better reflect what it represents DMI - Dynamic Material Instnace. NewVar0 is just not good enough. Ideally, it should be called something along the lines of text3d_MainMenuFrontDMI… So the future you thanks you.


Yup! Text 3d is the default component user-friendly name:

image

Text 3dComponent is the data type:

1 Like

You are a star for all your help! I haven’t had time to test just yet but am looking forward to doing so. Thank you!

1 Like

It all works.

Again, thank you so much! Taken aback at the level of help.

1 Like