# Average value in material nodes

Is there a way to get an average value in material nodes? I am only aware of this option in compositor: https://docs.blender.org/manual/en/dev/compositing/types/output/levels.html

• What do you mean by an average value for a material node? In the compositor node, there's a well-defined input for which the average is calculated. – remco Apr 12 '18 at 8:05
• I'm looking for a way to display average value of a vector, for instance if I plug in the separated X value i want to get 0.5 displayed evenly – Johan Apes Apr 12 '18 at 8:11
• You can make a node group that calculates average value according to your needs. In Vector context the average value doesn't really make lot sense but you can calculate it by x + y + z / 3. Maybe you'd want the actual vector length/magnitude instead? – kheetor Apr 12 '18 at 8:55
• Maybe, I'm probably not explaining it right, how would I go about that? – Johan Apes Apr 12 '18 at 9:11
• You can calculate Vector length by x^2 + y^2 + z^2 and using squareroot on that (math node set to Power with value of 0.5). Can't post images here. Post broader question if you're not sure of your approach. – kheetor Apr 12 '18 at 12:20