Hey,
I would like to create a weightmap based on the proximity between two objects (closest location). The closer the objects are to eachother, the higher the values should be.
I tried following the transfer CPV data tutorial on youtube and downloaded the compound but it doesnt seem to work for me. No colours appear. Also, I don't want to transfer colorset data, I just want to create it.
Ultimately I would like this to be live and usuable in a shader network.
Thanks!
Solved! Go to Solution.
Solved by mjcg91. Go to Solution.
You first need to get the closest location from one mesh to another, then subtract the source position with the sampled position, and get the length from these vectors. From there you can manipulate the result data to fit your needs.
Thank you!
That's exactly what I need. Makes perfect sense. Would you be able to share the scene/compound? I have recreated it but not getting the same result. I'm probably missing the correct values and property names.
**edit**
Never mind, I got it working. Thanks a bunch!
hi! would you be able to share your version? Is speed acceptable for larger meshes? (50-100k polys) Thanks!
For everyone that had an issue with the compound from the image above not working :
You need to change the value node connected to the sample_proprety default port, to a float3 before connecting sampled_data to the subtract node.
my settings so far are :
- sample_property is set to from closest
-either make sure you have a big enough cutOff distance on the get_closest_locations, or simply turn it off
-on the change_range, 0-3, 0-1 , with from_end (at 3) is giving more falloff distance in my scene
-set_geo_property i have propriety = color , set at 1 , 1 , 1
hope it helps.
There is a way to save the map generated to a file\texture or file\texture sequence?
Interesting....what I am asking myself is, if there is a way to color MPM Particles this way, based on proximity to a Mesh??
I am struggling to get is working with Voxel Positions.
regards,
Stefan
I managed to color MPM Points but I wonder if there is a better way to do it.
I created a emitter mesh and a geo for coloring like described above. Everything works fine.
Then I color the MPM Points by the color of the emitter mesh.
I can share my compound later on, when I finished my setup to my likings.
It would be very good if there are more prebuilt options for coloring or adjusting particles, mpm particles, cloth or fluids by things like properties (velocity, age, distance to objects, etc...)
I am trying to replicate this bifg but it seems I am doing something wrong.
I get an error message about type data "no promotion exist from a value of type Animo::Object type to a value of type Array::math_float3"
Any idea?
Thank you so much for this solution MJ.
Now would there be a way to keep the color on its highest value once the sphere goes aways..? 🤔
In other words to draw on the plane with the sphere?
There you go !
The same setup, with an additional compound using a feedback port. If the current value is greater than the last one, It will be saved in the feedback port.
I attached a sample scene, you can adapt it as you wish.
can more the one influence mesh be added to get_closest_location ?
i figured it out. Just had to drag all the mesh into the graph. and then pipe it into a merge_geometry node and replace the connections.
Hi everyone!
I've been studying the graph, and I am wondering could this be used as the start setup of a dynamic trigger like
when a foot touches the ground, it triggers ground dust particles? How would you setup something like that in the graph?
I just started learning about bifrost graph and I am learning a lot from the forum posts 🙂
I'm trying to use a curve instead of a mesh. There is a way to do it, because it seem not work with a curve.
Can't find what you're looking for? Ask the community or share your knowledge.