Rendering Mixing Fluids projects: combining different materials (Mantra)?

   7166   7   1
User Avatar
Member
11 posts
Joined: 9月 2016
Offline
Hi there,
Coming from blender 3D, I started Houdini a month ago because I'm particularly interested in Mixing Fluids. And Houdini has far more options on this matter.
This week I followed two tutorials about Mixing Fluids: by Peter Quint https://vimeo.com/55764136 [vimeo.com] (from 13:39 min) and a brand new webinar by Jeff Wagner https://vimeo.com/182074285 [vimeo.com] , from 39:20 min. I got both Mixing Fluid projects to work. In Render View the two colors combine and particles collide perfectly.
The problem a came across is: I don't know how to exactly RENDER the Fluid projects. Especially on the materials part. (I know how to add (Mantra) materials in Shop, cameras, lights etc). But, how can I add two different materials that collide with eachother in the Render View? Just like they do in the 3D Scene Viewport. I've looked around, but there arent't that much tutorials wich explain how to add materials to FLIP Fluid projects, let alone mixing fluids. Could can anyone help me out with this? Thanks in advance!

Attachments:
Jeff_Wagner_01.hipnc (1.9 MB)

User Avatar
Member
53 posts
Joined: 8月 2009
Offline
In general you have a single material for both parts of the fluid but use attributes to modify the look of the material for different parts of the fluid. one of Houdini's great strengths is that materials can be written to pick up attributes from geometry. Some of the built in shaders have a ‘use point color’ option this will pick up the color from an attribute called Cd attached to your geometry.

The example you've worked through gives you a Cd attribute on the fluid points. When you convert the points to a surface you need to ensure that the Cd attribute is transferred - there are options on the fluid surface node to select the attributes to transfer. Then use a material that has a use point color option.

If you really want to use two different materials you will need to separate the fluid particles into two different objects, convert them into surfaces separately and then apply a different material to each.
Peter Quint
User Avatar
Member
11 posts
Joined: 9月 2016
Offline
Hi Peter,

Thanks a lot for your explanation! Much appreciated!

Unfortunately I didnt get it to work… yet.

I followed your example of splitting particlefluidsurface in two, by adding Delete nodes with differences in $VELOCITY Filter Expressions. (https://vimeo.com/55764136) [vimeo.com] from 16:22 min.
The problem I come across here, is that the particlefluidsurface nodes looks diffent in the tutorial video: I only have tab called ‘Parameters’ with ‘Surfacing’ ‘Filtering’ and ‘Regions’, so I'm missing the ‘ATTRIBUTES’ (v Cd) tab you are using in the tutorial. Maybe a difference in Houdini 12 and Houdini 15?

I thought maybe the Basic Liquid is part of the problem too. So I changed the standard Basic Liquid material, to a standard Plastic shader (with the use of Point Color selected). Unfortunately nothing happens.

Your last suggestion of separating Fluid Particles into two different objects. Is that possible AFTER the simulation is done? So after baking the particle simulation?

Also in the Jeff Wagner webinar i'm stuck on the render/Mantra part.
My ultimate goal is to render an animation, of 2-3 emitted fluids falling down, colliding with eachother in different colors. It may not be so difficult, but I'm doing something wrong.

My project till so far in the attachment.

Happy to hear, thanks in advance!



Attachments:
POGING_FLIPH12_II_01.hipnc (1.1 MB)

User Avatar
Member
53 posts
Joined: 8月 2009
Offline
The transfer attributes options should be on the output tab of the fluid surface node.

https://www.sidefx.com/docs/houdini/nodes/sop/particlefluidsurface [sidefx.com]
Peter Quint
User Avatar
Member
11 posts
Joined: 9月 2016
Offline
Hi there,

Thanks for the extra info. I've spent a lot of hours trying, but it doesn't work out. I've problably overlooked something, somewhere.
It's getting pretty frustrating, having to combine different tutorials, most of them outdated. In this 2012 tutorial https://vimeo.com/38879512 [vimeo.com] for example, I need a VopSop node, but it's nowhere to be found in H15.
I feel like crying and returning to Blender again XD. But I know Houdini has the technology I need for this specific project.

Would it be possible to take look at my uploaded file, you can find above? And show me what I'm doing wrong?

Thanks a lot!
User Avatar
Member
419 posts
Joined: 2月 2012
Offline
You can use the AttrbiuteVOP is pretty much the same as the old VOPSOP.

You are missing adding the Color attribute on our fluidCompress1 an also on your particlefluidSource2 if you added there you will see the color.

Attachments:
POGING_FLIPH12_II_01.hipnc (1.1 MB)

User Avatar
Member
11 posts
Joined: 9月 2016
Offline
Yes! Thanks a lot Sepu!

You really helped me out here!!

User Avatar
Member
11 posts
Joined: 9月 2016
Offline
Hi there everybody,

I have managed to make the 3 colors mix within one Material. It looks nice!
BUT, now I would like to make an hairgel-like, semi-transparent mix of colors. Trying out different materials, it seems impossible to do this. It's like the Cd point attribute is overruling opacity? I'm using the Plastic material right now, but also when I try BasicLiquid, there's no opacity visible.

I also saw this ( http://www.sidefx.com/forum/topic/14223/ [sidefx.com] ) post on the forum, basically the same question, but it's still not working for me.

Happy to hear from you! Thanks in advance!
  • Quick Links