Phoenix FD : problem Mixing trickle of blood in a water river

Hi,

First of all here’s my infos.

3ds max 2015
Phoenix FD 2.2.0 Revision 24510
Vray 3.20.02
PC Windows 7

I want to create a river of water flowing through rocks into whom a trickle of blood follow the flow of the river.

I already do the technic of extract the RGB channel of my simulation that let me assign two colors on my fluid. My problem is that my two fluids have not the same properties. I want my blood ticker and less transparent than my water.

Thanks for your helps

the general solution for mixing liquids is to prepare two separate materials (water and blood) that look good, and use the blend material with a mask obtained by particle texture or rgb channel.
however, the blend material is designed for surface blending, not volume blending, so this works good for non transparent or semi transparent liquids, which is not satisfied for water.
so, my suggestion is to use one material, and mapped fog color , in vray 3 the fog color is mappable, hopefully this may help.
so, you have to prepare a map with the phoenix tools, that is completely white in the water areas and red in the blood areas.
our support team will prepare simple demo scene, because the setup is not easy, but the idea in few words is: in phoenix 2.2 the liquid simulation are performed in the same core as the smoke simulations, you can use the smoke channel to mark the blood source and in the rendering to use a dummy phoenix object that has “smoke” color adjusted with the color ramp to be white in the non smoke area and red in the smoke area. with the phoenix texmap you can transfer the smoke color to the liquid material fog color and hopefully this will give the desired result

Hi M. Katev,

thanks for the reply. I’m a little confuse about the second technic that seem to be the one that I need.

I will wait for the demo scene before asking questions.

Thanks again.

So I receive the test scene of Chaos Group. I test render the simulation and it seems that there is a little problem.

The mask create with the RGB channel like you propose is not 100% “pure”. I put a “composite” material with the two color I want with the “PhoenixFDtexmap” as mask on the red color. I put it in the diffuse slot to see the result easier. Like you will see in the first image, the color seems to get a little bit of each color. The white contain red and the red contain white on the edge.

In my case, I need the my water is 100% clear at the beginning of the simulation and then the blood will begin to mix in the water.

I let you a link to my scene too if you want to chek.

Thanks.



yes, the support guy already told me about this problem. in our old sample with mixing liquids was shown how to avoid this, but it’s harder to setup it, so my suggestion is just to use the particle based core, there mask is diffusing in the grid core, but the particle based core has no diffusion, and the liquid keeps the rgb channel pure. so, i will attach the setup scene later today or tomorrow, but you have to wait for tomorrows build, or to use a build from end of julay. the reason is that introducing the particle compression, the rgb channel was broken, it’s fixed already and will enter in the next nightlies.

Ok thanks !

I will wait for your scene. But where can I find the phoenix build that I need ?

the support guys told me that you have nightly build access, isn’t this correct?

well, your scene is ready.
the setup is a bit hard and tricky, as i said the blend material is not designed to work volumetric, it’s surface based.
i tried to set a map to the fog color parameter of the vray material, but it also didn’t give the needed result.
so, the current solution does not use any material tricks, because all they are surface based, i’m using our smoke shader to create the blood material.
here are the important points in this setup:
1. the blood source emmits white rgb channel
2. create a second phoenix simulator (in the scene it’s called fog) , and set it to render smoke, this means no self illumination (fire), simple red color, and texture based opacity
3. set in the texture slot of the fog phoenix texmap, and select the main simulator in it, set the rgb channel to be used
3. set the first simulator to be a gizmo (the new name is cutter geometry) of the second one (the fog)
4. assign simple water material to the first simulator
5. place the second simulator exactly to overlap the first one. this is very important, use the numerical input for the coordinates
the attached scene contains this setup, it is using the old liquid core, so it will work even with official build. i’m using nightly build, usually this is not a problem, there is a backward compatibility, but if the scene produces some problems, you can use a nightly.
blood_water_mix.zip (35.1 KB)

Hi M. Katev,

concerning the nightly build, when I look in the link of the folder that a member of Chaos group support send me, I only see something in the file “09.09.15” and it’s “Vrayblender…” so i’m assume that is vray for blender and not Pheonix like I need.

Thanks for the scene I will take a look at it now

EDIT: Nevermind with the access of the Nightly build it’s ok.

So I test the scene and I think I finally figure out how it’s set up. I apply the technic to my scene and it’s seems to be ok.

The only think that cause me a little bit of problem is that I would like to give transparence to my blood material. Presently, the water material is ok. But my blood material is completly opaque. I understand that the properties of my blood material is patiarly driven by my water material. But where can I change the transparency of my blood material.

PS: Do you think it will be possible in a futur Phoenix build that the material can be managed independently depending of the source ? Like in my case, the water material can be just applied of the Phoenix Source of my water and the blood material applied on the Phoenix Source of my blood.

the blood opacity is controlled by the “smoke opacity” options of the fog shader, you can use output map to modify the raw phoenix texmap that is used now. btw, i forgot to mention that you have to disable the shadows of the liquid.

Ok thanks I will take a look.

When you say that I need to disable the shadow, do you talk about “the affect shadow” option of the material ? So my water material need to have their shadow disabled too ?

i mean the “cast shadow” option of the object properties. the shadows must be disabled, because the fog that gives the red content of the blood becomes black. of course if you use caustics this hint is not valid, but i suspect there will be problems with the blood if caustics are used.

Phoenix Version : 2.2.0 Build ID : 1510226368

I start a new simulation with the lastest build to use the FLIP method that produce much better result. However, with the new configuration of simulator, I can’t reproduce the result with that I got with the old version when the liquid mixing. In the old build i was using two phoenix fd liquid simulator. But now the Liquid simulator doesn’t have the Fire ans smoke options anymore.

So now I got this set up. I use two simulator, one liquid simulator for my water and a fire simulator for my blood to have access “Fire and smoke options”.

I do exactly what I was doing with the old build, but the blood material do not even showing.

If you can take a look at my test scene it will be appreciated.

Thanks

ok, i will look into it, stay tuned

there were two missing things
- the simulator was not exporting the rgb channel as grid
- the blood shader (the smoke) had no content, really it does not need content because we use texture to render, but we reject simulators with no content from the rendering. perhaps we have to remove this restruction, but for now it exists.
there are two ways to add content, simulating several frames and enabling the “load nearest if missing” option in the input, or just using the content of the liquid simulator, as i did
151110_Chaos_Group_MIxing_Water_Blood_V01_01.zip (31.9 KB)

Oh god my bad, I know I missed something… Thanks a lot, again, M. Katev.

Have a nice day

Hi,

I got another little problem…

(I reformulate my problem more clearly)

See the pictures below. On the left side there is my Water that I put yellow to see the problem more clearly and on the right side of the picture there is my Blood material that I put red. My problem is that the Blood simulator seem to not only control the material of the first simulator, it seem that it also create a copy of the original geometry. The geometry created by the blood simulator overlap the first one and create some bug. I’m worried that this will cause flcikering problem on the render. As you can see on the picture below, you can clearly see the two geometry overlapping each others on the right side of the picture, creating a orange color instead of a pure red.

Yellow opaque water and red blood

Yellow water and red blood.

What I need is two distinct looking liquid that is mixing together ; Water and blood. I need to control its properties indiviually (Color, transparency, reflection, etc)


there is only one geometry, representing the liquid surface, it’s the same for the water and the blood. the smoke shader is those who makes the blood to be not like the water, and it must use the liquid simulator as cutter , this is all.

So what you say is that my scene is not set up correctly ? Because as you can see in the pictures below, I made two render. The first one with my water material greenish at 50% of transparency. You can see the Blood material, that is completly red, overlapping the water.

In the second picture, every setting is the same but there is only the blood material showing, the water simulator is hidden. As you can see the Blood material is suppose to be pure red. So what you say is that there is no way to made the water and the blood material completly independant ? Because the reflection of the blood is driven by the water material overlapping the geometry of the blood.

A close up of the blood part of the simulator, plus a part of my material settings.