[Feedback / Feature Request] Material Editor lacking basic parameters which can keep Material Instance Clean.

Material Editor lacks some basic material parameters that can make the material instance way cleaner and more user-friendly.

Needed Parameters:
1. Static Enum Parameter
2. Vector2 Parameter
3. Vector3 Parameter

Note: I know I can use boolean, scalar, and vector4 parameters as an alternative, but it’s not user-friendly and clean.

It would be great to have these parameters which will help to keep the material instance clean.

People who will suggest that Enums can’t happen in HLSL then unity3d shader graph already has it.

Enums in Unity 3D

Please, vote this post so epic implements these parameters as soon as possible.

Vector2 and 3 are there…

No, there aren’t Vector2 and Vector3 parameters

image

?

you keep ignoring the word parameter. these are constants not parameters.

2 Likes

Ah, then yes, you do need

image

A slight pain.

I think you didn’t read my post properly because I mentioned that I already know about the scalar parameter but having vector2 and vector3 parameters along with enum will be more user-friendly.

I can’t collapse the multiple scaler parameter, but I can collapse the vector2 and vector3.

It doesn’t bother me when I use append to combine the 2 vectors. I am more concerned about the look and design of the Material instance parameter field.

we don’t need multiple parameters on a material instance when we can simplify it using parameters like vectors 2 and 3.

1 Like

I know exactly what you mean. Like when you want to set the UVs ( on somebody else’s asset ), and for some reason, you have a 3 or 4 vector parameter.

1 Like

and the most important one is enum so we can avoid a series of boolean.

2 Likes

I agree that we could use these parameters and I am aware that what I am posting is not a solution, just a partial workaround, but it can help at least a little bit :slight_smile: You can name the Float4 parameter channels whatever you want

And then in the Material Instance dialog, you can see the names:
image

If nothing, you can at the very least use these channel names to let user know that for example B and A channels are not used by naming them as “unused” or “none” or “empty” :slight_smile:

I am not sure if this is true, but I always assumed the reason we can’t parametrize Vec2 or Vec3 is that the GPU shader math internally only works with Floats and Vec4s, so if we had Vec2 and Vec3, it would still be stored as Vec4 internally with some bits just unused. This solution kinda pushes user in the direction of utilizing all the bits allocated in memory for given type so they don’t go to waste. I may be wrong though. I’d love someone more experienced to chime in.

1 Like

then why do they have constant vectors 2 and 3. if we can have constants then we can also have parameters.

and about vector 4 and changing channel names to suit the need. there are a few issues with that.

  1. It’s slow
  2. it’s clamped and required manual input in the field if you want to enter a negative value or higher than 1.
  3. if you grab the field and try to increase or decrease the value by mouse movement. it will reset the values higher than 1. so you will need to set all the values again.
  4. filling extra channels with words like none or empty make it less user-friendly.

And you ignored the enums. they already have an enum parameter built in an unreal engine with the name of “Mask Channel”.
So we should also have access to enums so we can avoid multiple booleans.

Prolly b/c on the card, everything is a 4vec. A 1vec can be easily interpolated across X-spaces, but a 2 or 3 vec cannot be readily expanded into a 4vec based on some kind of assumption; it’s the same reason LERP has that quirk.

Plus, on the compiler, it’s likely easier to pack single-channels vs blocks of 2 or 3.

2 Likes

You didn’t really read my entire post I am afraid.

2 Likes

is there similar case for enums?

Might be.

Since the node-based UI is middleware, the more assumptions they have to make under the covers, the less reliable it will become.

At some point you have to say we won’t (can’t) do this because there’s too many things that might muck up someone’s code if we guess wrong, it’s not worth risking that so let’s just leave X, Y and Z at a basic level.

This is more a thing with abstraction vs shaders; anytime the dev has to assume the thinking of the user, they’ll likely get it wrong.

Clippy! Remember Clippy!? Perfect example…

1 Like