Multiply texture UV


#1

I didn’t find how to scale UV on a texture input.
There is many options on texture , but no UV input to change texture UV scaling.


#2

Solution

I’m really disappointed about Blender shader nodes editor , many nodes are not available :

  • 2D vectors for UV
  • multiply for Vector 3
  • UV output on texture input node

#3

Alternatively, you can plug a UV map (can be empty), to a mapping node, and plug that mapping node into your “Vector” image map input - This allows for control of both location, rotation and scale:


#4

The biggest issue in Armory nodes logic or materials, it is not possible to create variables with names and reference to them by names on other nodes.

You end up with great spaghetti code :joy:


#5

There actually is a way to to variables in Logic nodes. In the “Arm Logic Node” panel of the properties panel in the node editor there is an ID textbox that lets you set the variable ID which can then be used anywhere and in combination with the Set Variable node. Here is as screenshot from the Logic Pong example:

I don’t think there is a way to do the same in a shader tree, though.


#6

What do you want to do without GetVariable :rofl:


#7

You just use a node that you set the ID to the name of the variable.

So in the picture, there is the “velocity” node with the ID set to “velocity”. If you create a vector node anywhere in the tree, and its ID is set to “velocity”, it will, instead of producing the output set in the x, y, and z of that node, produce the output of the “velocity” variable.


#8

When i add new Float variable, there is no name input.


#9

There isn’t the ID field in the Armory Logic Node section of the properties panel? There is for me if I add a float node.


#10

How do you reference the Float node by name in let’s say the Compare node ?


#11

Just create a new float node with the same ID. It’s easiest just to duplicate the float node that you used when you set the variable with the Set Variable node. You probably want to set the label to the name of the variable as well, just for readability.


#12

Do you have a screenshot about float variable name with set and get example ?


#13

Here is an example that sets the initialZ float variable on init, and later gets that value to set the Z location of the object when I press r. ( Not a very practical example, but it works ) The float node that I have has the ID and the Label ( for readability ) set to initialZ. I use that node as the Variable input to the Set Variable node.

When I want to get the value of the variable later, I just need another float node that has its ID set to initialZ so that it knows that it needs to go get the value of the variable with that name. The node that I use for getting the variable I just duplicated from the float node that I used when setting the variable.


A Way to Make Variables More Intuitive? :thinking:
#14

So the float default value input at 0.0 does not overwrites the SetVariable.
Thank you for the explanation :smiley:


#15

Glad I could help. :smiley: It is kind of un-intuitive, but at least it works.


#16

This could also lead to confusion having the default 0.0 value input active for people not aware :sweat_smile:
Some improvment could be a checkbox like “Input”

  • Checked by default it displays input
  • Could uncheck “input” only when variable has a name.
    Unchecked there is no input and the variable is a reference to the variable name with same name.

#17

Yeah, even better, you could essentially combo every type node as a variable node with a checkbox that indicates that it is a variable. Checking the box would open up a textbox for the variable name and it would gray out the value setting, because it would be getting the variable from memory, and not using the set value. Additionally, you could add a “Set” checkbox to replace the Set Variable node. When you check the “Variable” checkbox, and the “Set” Checkbox, it will add the red “In” and “Out” sockets, add a value input socket corresponding to the type, and it would remove the value output ( or just leave it there and output the newly set value ).

I might do some experimenting to see if I can pull that off. I think that would help a lot.


A Way to Make Variables More Intuitive? :thinking: