I am trying to make a material for a fluid simulation in blender 2.8.2 that will change the colour of the fluid as the fluids velocity increases. I have tried a few things: Method 1 enter image description here

Both attempts were unsuccessful. Currently, it seems as if it is not possible to find the velocity as there is no way to detect how much time has passed.

I am aware that there is a question almost identical to this one (is there any way to get to velocity of a fluid and use it in the cycle material editor) that has already been asked but it has no answers so I thought it would be ok asking again.

  • $\begingroup$ I found a similar question to this with some answers that might help blender.stackexchange.com/questions/61485/… I think the second answer is better for you purposes. I'm pretty new to blender so I'm not going to pretend I understand whats going on there but it seems that basically you take the location of the object (or in this case the particle), separate the XYZ coordinates and then use it to calculate it's distance from a specific XYZ point. $\endgroup$ – Trash Panda Mar 11 at 10:47
  • $\begingroup$ the "particle info" node is just for particles. Not for fluid simulations with the fluid simulator physics. You can do SPH simulations with particles, and the materials for the particles should then have that node setup. In order to SPH simulation "looks" like fluid, you can use "cubesurfer" addon, metaballs or similar, to create a mesh with the particles. $\endgroup$ – MCunha Mar 11 at 11:14
  • $\begingroup$ Thanks for the reply, Trash Panda, I can already find the displacement with a dedicated node, I don't know what finding each XYZ coordinate from object info would do for me, especially without a reference for time. $\endgroup$ – Chris Mar 11 at 11:28
  • $\begingroup$ you will also just need to use the "particle info">"color ramp">"principled shader" or "color">"material output". Dont forget to use cycles, instead of eevee $\endgroup$ – MCunha Mar 11 at 11:28

enter image description here

As I told in comments, you can get that with a particle emitter. On the next image, you find a cube emitting a ball. The material of the emitted ball is the node setup presented. It works in cycles.

If you need to get a surface made of the particles, you can use Cubesurfer addon, or instead of using a sphere as emitted object, you use a metaball, and fine tune the options of it (size, etc). However, the generated surface wont be with colour change by velocity, for both methods.

If you dont want to use a shape itself, another way, in the "particles" setup, you render as "halo", on "viewport display" you sent as "point", in "colour" you can choose "velocity" or "acceleration". You can fine tune the colours increasing "fade distance", as showed in the next image:

enter image description here

| improve this answer | |
  • $\begingroup$ Thank you for replying, MCunha, I am not sure how to apply the material to the particles, it only gets applied to the emitter. $\endgroup$ – Chris Mar 11 at 23:06
  • $\begingroup$ Thats quite easy: first you add a shape for your particles (example a sphere, like i did - the big green one). Select the emitter, go to particle settings, under "render", change from "halo" to "object" and select the "sphere". Then select the sphere, and give the material showed (my node or your node setup) $\endgroup$ – MCunha Mar 12 at 6:37
  • $\begingroup$ if you don't want to give it a sphere, under "particle settings" go to "viewport display" and change as showed in the last image i provided in the answer $\endgroup$ – MCunha Mar 12 at 6:39

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.