There appears to be no way to layer materials with Fluids.
As far as I can determine, the Arnold Layer Shader material is completely non-functional with 3ds Max Bifrost Fluids.
It also appears that the 3ds Max native Blend node is non-functional with Fluids.
This is a major failure of functionality because users need to shade various parts of the fluid differently. Without the ability to layer materials, there are severe limitations in what can be accomplished.
Solved! Go to Solution.
Solved by Stephen.Blair. Go to Solution.
Yes, those are surface shaders. Not sure what effect you are after, but the volume maps allow you to shade the fluids differently.
What is it you want to do? explain in detail.
We have OSL so we can blend like we want, no need for legacy nodes.
A fluid rendered as an Arnold Surface gives you an Arnold bifrost_polymesh node, which is a shape node. So it can have a surface shader.
Looks like a bug to me. With a layered shader on a fluid (rendered as an Arnold Surface) I get the first input to the layered shader.
I used an operator to assign the layered shader to the fluid, and that worked. That makes me think it's a translation error (unless there's some reason I don't know about for disallowing layered shaders on fluids).
layer_shader isn't a legacy node.
Can OSL nodes blend closures? That's good to know
Here I blend a noise and a bitmap on the Layer closure construct.
The workflow is semi broken and can lead to think its not working, but it does.
So while its both broken and working on the same time, it should be fixed.
You are missing some kind of catch and clear for node hookups, as I can force in a blend with multiple layers resetting hooks and hook them up after the blend closure is assigned.
There is only 1 correct workflow, I found so far, and that is not just hooking things up. You need to assign the layer closure to the fluid, and then hook up the sub components, any other sequence will fail.
MAXtoA expects two shader connections:
If you plug a Layer Shader into the first slot of a Multi/Sub-Object (or a Mix shader), then that Layer Shader is used for the fluid.
Thank you for your answers.
The effect I am trying to achieve is a pseudo-foam shading effect. One material for the non-turbulent, laminar flow, and another material for the turbulent, bubbly "foam". I should be able to pipe the laminar material into one layer, the turbulent material into another layer, and mask them with fluid surface channel data such as Vorticity. I can do this easily in Maya.
I don't know how to use Operators yet. If that is the only way to make this work, then I'd categorize that as a bug.
I do not believe that OSL map nodes can blend materials, but I can try that.
I don't see why a Multi/Sub-Object Material would be relevant to assigning a Layer Shader to the fluid. There are no foam particles in my simulation.
I do not understand what Mads's screen capture is showing me. My Slate graph looks very similar to the screen capture, I guess there's something about Operators not being shown in this screen capture? I am pretty sure I did follow the chronological order of assignments... assign the Layer Shader material first, then connect the child materials to the Layer Shader inputs. It did not work for me. But I can try again.
> I don't see why a Multi/Sub-Object Material would be relevant to assigning a
> Layer Shader to the fluid. There are no foam particles in my simulation.
Whatever shader is assigned to the fluid, the first connected shader will be used for fluids, the second for foam.
You have a layer shader connected, so the first connected shader is used.
So if you want to use a layer shader for fluids, set up a shader tree like this (you can use either a Mix shader or the Multi/Sub-Object Material)
Thank you Stephen, I will try that. But I'm scratching my head because this is just not right. The Layer Shader functionality should be completely independent of the Multi/Sub-object functionality. There should be no mapping of Layer Shader inputs to Material IDs. In other words, everything going through the Layer Shader should go to Material ID #1. To my understanding, Layer Shaders is not a tool for routing materials to different Material IDs. It is supposed to be a compositing tool that performs masking operations independent of any consideration of Material ID.
This is definitely a problem. And since it is also occurring with the 3ds Max legacy Blend node, it may be a problem that transcends Arnold, and something that needs to be addressed by the Max team.
Confirmed, thank you Stephen. I've logged this as a bug:
Stephen Blair has tracked down the problem. The Layer Shader node is mapping each shader input to a corresponding Material ID. This is wrong. The Layer Shader node (and the Blend node) should not interact with Material IDs in any way. If I assign a Layer Shader material to a Fluid, I absolutely do not expect that Layer 1 will automatically map to Material ID #1 (fluid surface) and Layer 2 will automatically map to Material ID #2 (foam particles). This is definitely a bug. Compositing nodes should not have any interaction with Material IDs whatsoever. As a workaround, the user can send the Layer Shader material to input 1 of a Multi/Sub-object material, thereby reassigning the Layer Shader output to Material ID #1 only. Please fix this. Thanks.
Can't find what you're looking for? Ask the community or share your knowledge.