I don't think a separate shader for this is necessary. You should be able to either:
- Texture it
- Mix multiple shaders using the mix shader.
- Use volumes to simulate particles in water.
I tried all the stuff, but I'm not getting the result, no math behind it, normally when mixing some color like R+G+B should = 1 (white), but no clue!
I'm looking for some thing like this:https://www.youtube.com/watch?v=IhW1v-K0qGI
Are you using Bifrost? If so you can blend by exposing properties from the fluid shape like density.
https://support.solidangle.com/x/c47hAw
I've also made an example scene showing mixing fluids using Bifrost ion Maya 2018 bifrost-mixcolors.zip
Thanks Ashley for a quick response
But unfortunately I'm using realflow, I'll try to apply your setup fro realflow Particles(mesh)
well the ParticleMesh in realflow by default has all the attributes to export, like Velocity, Force, Age,Density..etc..but the aiUserData node can't read them like you did with bifrost,
in the past I used Maya blindData, to extract all the data,but now with Maya2018 if you run the mel command blindDataEditor, Maya return the command itself in the script editor no panel, no attr.
So any how to solve this issue?
Is realflow able to export to colorPerVertex data on to the mesh?
If you export the alembic from realflow and import it via the mel script:
AbcImport -mode "import" -recreateAllColorSets "/path/to/alembic"
note the -recreateAllColorSets flag this isn't available from the Maya UI, but imports vertex color data, and MtoA will export this out, for the user_data shaders to be able to pick up. I haven't got realflow to test with, but this might be a solution.
Hi
Only: force, normal, neighbors, texture, age, isolation, viscosity, density, pressure, mass, temperature, vorticity, info.
Unfortunately there is no colorPerVertex Export in realflow!
I tried to export .ass mesh with .mtd, it load fine but can't render
Error: [polymesh] fluid_sim: incorrectly defined UV coordinates, missing either uvlist or uvidxs
So I've to move to Houdini
anyway thanks for you input