1
\$\begingroup\$

I am new here so thanks for having me. I have a query regarding renaming the Texture 2D nodes I have created in my first Shader graph.

I have setup a shader graph with a normal map, base colour, smoothness and ao. These are showing up as exposed parameters which is just what I wanted so I can drag and drop new texture maps for the other materials easily (please see screen shot attached).

I would love to be able to name each of those Texture 2D maps accordingly so it is clear where each map from the assets folder needs to be dragged.

E.g The Texture node that contains the normal map is simply called 'Normal' instead of 'Texture 2D', the base colour map named 'base colour' etc. Atm I have 4 exposed parameters all called Texture 2D.

Not the most serious of issues I would agree, but I feel like I must be missing something. No sign of a 'rename' option for those nodes.

Any help very much appreciated.

Cheers

Nickenter image description here

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

Inside the shader graph editor, there's a panel where you configure the material properties.

Shader graph properties panel

Double-click on the label on a property to edit its name shown in the Inspector.

Renaming a texture

In code, it will be referred to by the string in the "Reference" box below that.

\$\endgroup\$
4
  • \$\begingroup\$ Hi. I really appreciate your answer. That looks like it would do it. Unfortunately 'Properties' in the black board area is greyed out and collapsed for me and non clickable. I just cant seem to access it and have had the elements of the shader graph highlighted whilst trying etc. \$\endgroup\$
    – Nick
    Feb 12, 2021 at 18:13
  • \$\begingroup\$ What do you see if you create a new shader graph from scratch? Want to edit your question to show us? \$\endgroup\$
    – DMGregory
    Feb 12, 2021 at 18:35
  • \$\begingroup\$ Hey, sorry to have wasted your time. I've figured out whats been going on. I was using Texture Sample 2D nodes. Didt realise I needed to use Texture 2d Asset nodes first. The texture sample nodes were exposing themselves automatically (I had wondered why Convert to property' was always greyed out. This meant I had no options to drag textures on to them or edit under properties. As soon as I tried a Texture Asset node I could expose manually and now your suggestions works perfectly. Thanks again for your help! \$\endgroup\$
    – Nick
    Feb 12, 2021 at 19:18
  • \$\begingroup\$ Want to post an answer walking through that with example images, to help other users who run into the same confusion? \$\endgroup\$
    – DMGregory
    Feb 12, 2021 at 19:35
1
\$\begingroup\$

My issue here was that I was adding my textures into the Shader Graph in the wrong way. I was loading each texture as a Sample Texture 2d Node and just plugging that into the Main Fragment node with the texture inputs as shown here:

enter image description here

Although this did display the output correctly, I was not able to drag and drop different textures into these sample nodes and access any properties for them in the blackboard. This was because I needed to create a 'Texture 2d Asset' node for each of the textures, load the textures into those and plug them into the sample texture nodes. I was then able to select 'Covert>To Property' for the Asset nodes and therefore expose them as parameters and rename them as I initially set out to do, as shown here:

enter image description here

Thanks for the assistance DMGregory.

\$\endgroup\$

You must log in to answer this question.

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