0
$\begingroup$

First off: I'm sorry if this has been asked before, it most definitely has, but after an hour of searching and experimenting I have to accept I seem to lack the jargon to properly search for it...

That out of the way, I want to "reveal" specific material values in the property view (Shift F7), similar to making a variable public in Unity. An example: I want to be able to adjust the scale of a Mapping node without having to open the material view.

I am almost certain that this is probably done via custom properties, but I couldn't find out how. Any advice on how it's done or where to find an answer?

$\endgroup$
2
  • $\begingroup$ You can bring a custom property into a material shader with the Attribute node by using its name in there (case-sensitive, so make sure to spell them exactly the same) or by using the property as a driver. $\endgroup$ Commented Sep 7 at 12:24
  • $\begingroup$ It sounds as if you may be asking how to use Blender's Custom Properties? $\endgroup$
    – John Eason
    Commented Sep 7 at 14:04

1 Answer 1

0
$\begingroup$

After a bit more trial and error Gordon Brinkmann's explanation worked. I got attribute nodes to work. Here is what I found out:

  • as Gordon said, spelling is really important

  • Just as important is setting the correct min, max and default values, i.e. for moving the textures left or right you would obviously have to assign a negative min value

  • For rotation the best way is to use pi as max value and negative pi for min value

  • What didn't work was adding custom properties to the material property view. I had to add custom properties to the object itself. That meant setting the attribute node type to "Object".

  • But that also meant I had to add these properties to ALL objects. The addon Copy Attributes Menu proved invaluable

  • Make sure to set all the default values before copying to save a lot of work

I hope this helped anyone who also struggled with this admittedly simple function. One day I will tackle drivers, but I was able to do everything with the Attribute node, even if it wasn't the most efficient way.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .