What do these do?

Started by james adamson, August 11, 2020, 06:22:47 am

Previous topic - Next topic

james adamson

Hi all.
Could someone tell me what these two nodes do and in what scenarios's they would be most useful.

Dot product. (Read the  online description. No clue as to what its for.)
Get position. (I have a vague idea, but I am not sure, also I would like to know what its doing to get position.)

And all the vectory ones! When does having a vector become useful? It seems such a specific bit of data for what is quite an abstract process. (Building in TG.)
If someone could just highlight some scenario's where having a vector is useful that would be great.

Basically after simple shapes, some fractal nodes and a few blues for maths op and mask creation my brain kinda stops!


I don't know dot product, but if you take 2 simple shapes or PF's you could exeriment what it does.
The get position can be used to make a gradient for instance; try get postion-x to scalar-smooth step (in meters for a soft transition around 0)... or make voronoi shapes from it (get position-voronoi diff scalar-color adjust). Better is the get position in texture, as that can be warped afterwards, the get position can't.
If you add a constant vector to a get position (in texture) you can for instance change the initial position.
If you use the search function there may be tgc's or tgd's around that can be dissected. Or read (very) old threads regarding these things.

james adamson

Great. Thanks Dune.
You have just solved a problem I am struggling with right now.
I have a get pos into voronoi 3d diff scalar with a colour adjust and am trying to run a fractal warp on it. it is not working and I have been scratching my head for about an hour as to why. You have just explained why. I am using get pos. Not get pos in tex..

james adamson

So does get pos grab the position from the planet relative to camera?
And get pos in tex do the same thing but take all displacements into account?


I really don't know. I just use them ;)


August 11, 2020, 10:09:20 am #5 Last Edit: August 11, 2020, 10:21:11 am by Hetzen
Get Position in Texture outputs where a render point is in the scene at the moment it's used. So it will use what's been set with Compute Terrain, Texture Coords from XYZ.

Get Position returns where the render point is when everything has been worked out through your node chain. So it will account for all displacements and modifications you've made, including things like Fake Stones. Even if those are used after you've called a Get Position node.

Dot Product multiplies the component parts of two inputs together and then adds the result. It's often used to find how similar two normalised vectors are.
So if you have a vector input of (1,0,0) and input 2 (1,0,0). The vectors are the same in this case, so the output of Dot Product will give you 1.
(1 x 1) +(0 x 0) + (0 x 0) = 1.
If the vectors are pointing in opposite directions, the output will be -1.
(1 x -1) + (0 x 0) + (0 x 0) = -1.

james adamson

Thanks for the explanation Hetzen.
I kind of get the "get position" and "get position in tex". (I think. :o ) They are like the sum of all work in the chain so as to 
accurately apply more deformations/colours to the scene.

Dot product and what it's practical applications could be is as I thought. 
Beyond me.