Hello!
I have a quick question - I have a basic Menu UI blueprint with 3 slider’s the player can drag. And, I have an object with a Material Instance that has R, G, B values I want the player to be able to control with the sliders - I’m not sure how to set the blueprint for that up. I understand that I’m supposed to do something with a dynamic material instance blueprint, but I’m not sure what the web for that looks like Here is a video describing my situation more clearly:
Then whenever each of your sliders are updated, we set the dynamic material instance’s color. How you communicate between these is up to you, but one way is to pass a reference of that dynamic material into the UI.
Since both sliders and colors use a 0-1 scale, we can just directly use the value.
Here’s how we could set that up:
!??! Thank you so much for the quick response Rokenrock!
I’ll try that immediately, do you mind sharing a screenshot of how you would augment this setup to include R, G, and B instead of just R?
Thanks again for your time and effort, I really appreciate it!
Awesome, thank you so much for the amazing help!
I’ve gotten much farther now, but I’ve hit a little hiccup in the second step - Here’s what I got so far: https://www.youtube.com/watch?v=GMFMzip0eqM
I think I’m just missing something small, but yeah I’m all ears as to what it could be, thank you again for your time!
So the problem is that you’re using a different function. The functions you have laid out are for Material Parameter Collections. To get the right functions, you’ll want to drag off of the test material variable and search there.
Also, I recommend you go with the alternative setup:
Now as for how you’d get a material from that sphere to the UI is a bit more complicated. It’d be really easy if this was for the player, but it’s for a random sphere.
This is the part where you have to decide how you want to do it- the approach will change depending on the purpose of the sphere.
For now, I’ll suggest you just use the closest sphere. If you decide if you want to use an interaction system, you’ll want to change it to whatever you’re interacting with. This is a very backwards way of doing it as the UI shouldn’t be handling something like interaction, but this is the best way to show: