4
$\begingroup$

this is the default distance output of a voronoi texture, 3D/F1/Euclidean

I would like the distance to be normalized for each cell, meaning that the centers of all cells should be black & fade to pure white until reaching the maximal available distance of the context cell when projected on an object

How can i do that?

enter image description here

$\endgroup$
0

2 Answers 2

3
$\begingroup$

Use 2D for the basis of the Voronoi instead of 3D.

vORON

$\endgroup$
6
  • $\begingroup$ thanks, but it's for a 3D object, i need the texture to be in 3D $\endgroup$
    – DB3D
    Aug 6 at 2:41
  • 2
    $\begingroup$ If it's for a 3D object, but you need that type of distribution, use UV texture coordinates. $\endgroup$ Aug 6 at 2:46
  • $\begingroup$ Thanks for you effort, however i need to inform you that you are bypassing the question, i know about 2D mode, and all these projection solution such as triplanar mapping ect.. here the 3D mode and the procedural mapping behavior is important, the question is about normalizing the distance of the cells, not changing the projection method :-) $\endgroup$
    – DB3D
    Aug 6 at 11:27
  • 1
    $\begingroup$ The cells are distributed in the 3d space. The 'zero-point' of every cell doesn't lie directly on a face, and how would you inform the texture of the shape of the mesh without a 2d to 3d projection like UV mapping? $\endgroup$ Aug 6 at 13:47
  • $\begingroup$ Voronoi is by nature normalized so that the center of each cell is zero (black), and the borders where cells intersect is 1 (white). The problem is, these cells are distributed through 3D space, so any 2 dimensional cross section will "slice through" odd areas of the cells on its perimeter, and give the appearance that the cells are not normalized, even though they are - you are just not seeing the "whole thing". The only way to have 3D Voronoi "projected" in a normalized way on your mesh, is to ensure your mesh boundaries pass through the center point of the Voronoi cells on the perimiter. $\endgroup$ Aug 6 at 14:47
2
$\begingroup$

Well, I really have no idea what exactly your question has to do with Geometry Nodes. I also have no idea at all what you could need it for.

But if you insist on doing something with Geometry Nodes here, be my guest:

enter image description here

Here I use Voronoi Texture and move the points of a grid to the positions of the centers of the cells. But without taking over the height of the position.

So now these points lie flat on a surface.

Then I use the node Geometry Proximity and simply capture the distance between the positions of the grid and the points moved according to the pattern.

The node Attribute Statistic gives me the highest value to be determined, which I feed as maximum value into the node Map Range.

This node then returns a beautiful value somewhere between $0-1$ per point.

...but as I said: No idea if I have understood the question correctly or if you can do something with it 😄

$\endgroup$
7
  • 1
    $\begingroup$ I love most of this, but I think OP wants normalization per-cell. Attribute Statistic returns max across the entire field. I wish Accumulate Field had max and min per 'Group Index' . We could do so much with it. (e.g. per-cell) .... unless you can think of a way. ... $\endgroup$ Aug 6 at 19:15
  • 1
    $\begingroup$ @RobinBetts Yes, you're right, it looks somewhat like nonsense, admittedly, and not all of my answers are solid :D But it's quite an interesting approach, I thought, which could possibly help further. With difficult questions sometimes the craziest ideas do help a bit to get to the final solution and I didn't want to deprive anyone of these creative noodles where I already built them ;-) $\endgroup$ Aug 6 at 19:29
  • 1
    $\begingroup$ @RobinBetts "I wish Accumulate Field had max and min per 'Group Index'" ...oh, that would be awesome :D $\endgroup$ Aug 6 at 19:31
  • 1
    $\begingroup$ indeed the goal is to normalize each projected cell. Geometry node seems like the best candidate to work with projected data. I think it's straight out impossible with the tools we have right now, maybe once we have iterative nodes, or if the attribute statistic support groups like the accumulate field. Sorry for the difficult question folks :-) $\endgroup$
    – DB3D
    Aug 6 at 19:33
  • 2
    $\begingroup$ @DB3D me too, this sort of q. is great. it forces (us / me, anyway) to try to get under the bonnet of the system, and exposes what it lacks. @q: I really like your answer, even if it doesn't go exactly to the right place. Your method triggers the imagination for all kinds of other stuff. $\endgroup$ Aug 6 at 20:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.