1
$\begingroup$

I have a grid point field as a result of cfd simulation. Each point has its own col attribute. I am trying to convert this field into a volume and color the volume based on the original attributes in geometry nodes so that I can nicely visualise the results. Converting the points into a volume is not a problem, however I can't seem to be able to keep the attribute. (I get it. The volume does not have the same amount of points than the original but I think it could be solved by distances from the original points)

enter image description here When I color the points by attribute it works fine but only when coloring surfaces, not volumes.

enter image description here enter image description here

The same goes when I try to convert the points into volume and then color it (which is ultimately my goal)

enter image description here

Can anyone tell me a way how to handle this? (or if it is currently even possible?)

UPDATE:

Ok so I am still looking for a solution. The closest I got was by splitting the data into separate instances of volumes with specific color that are overlapping its neighbours. Thanks to that the emission blends together creating an illusion of a gradient which works for me. It looks like this:

enter image description here

Now the problem is the overlapping volumes create glitches on voxel contact. Anyone has any ideas how to get around it? Increasing voxel amount in each volume kinda helps (the voxels are smaller) but it is still not ideal. (it's getting close tho). For example, is there a way to set alternating 'zero' point from which the voxels are created? there would be no face overlap and the glitches should disappear

Glitch illustration: enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ How about using a Point Density texture? The 'points' would need to be converted into a mesh with the colour of each vertex set to be the colour of that point in your simulation. You can then feed the colours from the point density into the volume. Do you have some sample data available in order more easily create an answer that's specific to your situation? $\endgroup$ Commented Dec 18, 2023 at 11:50

1 Answer 1

2
+100
$\begingroup$

One potential solution (not using Geometry Nodes) could be to use a Point Density texture to colour the volume. This would require the simulation data to be converted into a mesh with the colour information encoded as Vertex Color.

enter image description here

I don't know if this is ultimately applicable to your situation but if you can provide more information (and preferably some example data) then I can update this answer to be more specific.

Here's an example after tweaking the Point Density and increasing Light Paths/Max Bounces/Volume to get a better representation of the colours (the lack of volume bounces will significantly dull the colours otherwise).

final result

$\endgroup$
14
  • $\begingroup$ Oh yeah!! I'll look into it, but it seems like this is exactly what I need. I don't really need to use GN, it just seemed like the best approach. Never heard of point density node before:)) $\endgroup$ Commented Dec 18, 2023 at 12:53
  • $\begingroup$ Now the question is. My simulation data are spearate mesh planes filling test geometry along z axis (when I get to it, I'll upload a sample). it is one mesh but it does not have any volume just planes. Do I have to convert them into voxels before in order to make it work? $\endgroup$ Commented Dec 18, 2023 at 12:59
  • $\begingroup$ Basically it is spatial data, not surface data $\endgroup$ Commented Dec 18, 2023 at 13:17
  • $\begingroup$ Separate planes are fine, provided they're part of the same mesh; only the vertices themselves are actually required (so don't even need edges or faces, although the faces would be useful to be able to visualise the vertex colours when in mesh vertex paint mode). $\endgroup$ Commented Dec 18, 2023 at 13:50
  • $\begingroup$ I tried your approach and I am more and more convinced it is what I am looking for. Unfortunately for some reason the point density node wont load the attribute of selected object. I tried both to store it using GN and use that and also tried baking it first. I am sure the attribute is there, I can see it in object data properties but whatever what I do the list in point density node is empty $\endgroup$ Commented Dec 18, 2023 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .