Materials drived by UVs

Hello all,
starting to use Armory, I wonder if I could bring my Unreal experience with this engine.
Something I’m trying to achieve is this: using uvs to drive the mix of two shaders as you can see in this video, where I use a color ramp in cycle:

If this is possible with nodes, please tell me which ones.
If this is possible by scripting, please tell me at least that’s only possible by scripting.
If this is not possible at the moment, but it will be, I would love to know when.
Thank you.

I am not having any luck using the color ramp for much of anything. According to the docs it is a supported node but it doesn’t seems to work very well if it all.

So I have issues with this too because I couldn’t get the local coordinate of a vertex for my effect.

You could try and vertex paint your mesh and use the “gradient” of the vertex color to mix/animate your effect.
ill see if I can cook up an example.

Ok, guys, good to know.
So, do you know if it’s possible to achieve that effect in another way?
Or if it’s possible to change a value in a shader tree at render time?

You can change values in material trough nodes/script :

Sidar, I tried that file tonight and it didn’t compile:

armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:19: characters 35-43 : object : iron.object.Object -> mat : -> link : String -> iron.math.Vec4 should be String -> iron.math.Vec4
armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:19: characters 35-43 : For function argument ‘x’
armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:20: characters 36-45 : object : iron.object.Object -> mat : -> link : String -> Null<kha.FastFloat> should be String -> Null<kha.FastFloat>
armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:20: characters 36-45 : For function argument ‘x’
armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:21: characters 38-49 : object : iron.object.Object -> mat : -> link : String -> kha.Image should be String -> kha.Image
armory3d\armory_examples-master\material_params\Sources/arm/MyTrait.hx:21: characters 38-49 : For function argument ‘x’

Try updating the sdk trough preferences > add-ons > armory3d > update sdk

Clean the project and restart blender afterwards.

That’s amazing!
Now it works.
I didn’t know the cool feature of updating Armory.
If I could ask, but where did he put MyTrait script? As I checked all objects and it seems to me they have no script attached.
Thank you a lot, Sidar.

With the examples usually just check the camera object. Camera usually has the traits enabled. There is also a node example.

It was in the scene, but it’s ok, thank you.
So he created the script to do that and, at the same time, nodes to achieve the same effect, so we could choose which way to use, right?

Ah in this case it’s the scene indeed.

anyways it just demonstrates how you can achieve it by code and nodes. So yes.

Yeap, but thank you anyway.
Ok, good, I’ll have a look tonight.

So, test after test, well, it seems Armory can handle mixing two shaders with UVs, now I have only to animate at rendertime and I can close this task.