Page MenuHome

Dynamic paint on fluid simulation issue in Cycles
Closed, ArchivedPublic

Description

In Cycles, the F12 render has some issues applying dynamic paint to a fluid simulation mesh. The dynamic paint does render in the viewport, but not with the F12 render. When I apply the fluid to the mesh making it a normal mesh, it will render by F12. But then you will loose the animated simulation. I think it must be a bug since the viewport render works on the fluid simulation, but not with the F12 render. Also, after trying to render the scene by F12, the viewport render will not render the dynamic paint anymore. You need to refresh the frame to make the dynamic paint come back in the viewport render.

1: The fluid simulation (dynamic paint canvas)
2: A stationary mesh (dynamic paint brush) which the fluid simulation goes through.
3: Scene rendered in the viewport (works fine)
4: Scene rendered with normal render (F12) (does not render the dynamic paint).

The canvas wetmap is applied to an attribute input that is Fac connected to a mix shader.

Event Timeline

Tomas (tliriel) claimed this task.
Tomas (tliriel) raised the priority of this task from to 90.
Tomas (tliriel) updated the task description. (Show Details)
Tomas (tliriel) added a project: Cycles.
Tomas (tliriel) edited a custom field.
Tomas (tliriel) added a subscriber: Tomas (tliriel).

Can you post a .blend you may have to use this website if this website gives you an error www.pasteall.org

Thomas Dinges (dingto) lowered the priority of this task from 90 to 30.Jan 28 2015, 4:36 PM

Here is the .blend. The fluid simulation needs to be baked.
You also need to press add on the dynamic paint output every time you open the file in order to make the wetmap paint appear.

Aaron Carlisle (Blendify) raised the priority of this task from 30 to Normal.Jan 28 2015, 9:12 PM

Forgot to mention that there is something strange going on on frame 99 (only) with the wetmap/paintmap where it creates a meshy pattern on the fluid.

I hope this bug is not a dust collector. The dynamic paint and fluid sim/ocean modifier goes hand in hand when creating fluid stuff, so I would be really happy if someone could take the task and fix this.

The issue here is that the dynamic paint does not render if the fluid simulation is set as the canvas. However, the dynamic paint renders perfectly on a ocean modifier that is set as the canvas. I'm not a programmer, but guess the ocean modifier has some codes that could be pointing to a solution for the fluid sim to work.

I don't think it is a bug but rather a limitation. IMHO, it never worked.

Dynamic Paint was firstly created with Blender Internal as a renderer in mind.
It was able to render foam as fluid particles from fluid simulation.
So, wetmaps were made to create wet obstacles, to color obstacles when fluid goes away.
Obstacles are supposed to be canvas and fluids brushes for wetmaps.

I think that dynamic paint can not bake vertex group information for fluid geometry that is changed at each frame.
Ocean modifier is a kind of displaced grid that does change its vertices order at each frame.

IMHO, if you obtain a result in viewport, it is just because viewport refresh is trying to refresh a dp_wetmap group that can not really be written in DP cache.
And render is only directly reading an empty DP cache.

@ronan ducluzeau (zeauro), i don't really see atm why this setup will work for BI and rendered viewport in Cycles and not for final Cycles render.

@Tomas (tliriel), trying to use your file to see the issue tho. That's what i'm having: http://www.pasteall.org/pic/show.php?id=83714 Guess it's different from what you expect.

So what are exact steps of reproducing the issue from the file attached here?

@Sergey Sharybin (sergey), after baking fluids, you have to change fluid resolution from Geometry to Final.
Then, in mesh properties, select same vertex color layer that the one used in shader.

I did not write that this setup will work for BI. It does not work for BI in viewport and final render.

I wrote that to obtain the foam effect for BI, the expected correct setup use particles.
So, wetmaps were thought to use only the inverse setup with fluid as DP brush and obstacles as DPcanvas.

Like many physics, DPresult is probably based on what is displayed in viewport. So it works for viewport.
But I think that cache files generated by baking DP have probably no sense (because of fluid topology changes) while they are used for F12 render.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Unknown Status.May 7 2015, 12:38 AM
Brecht Van Lommel (brecht) claimed this task.

Yes, this a classic issue with all types of physics caches. The dynamic paint modifier is preceded by a subsurf modifier that has different viewport and render resolutions. The paint is baked at viewport resolution, and then it doesn't work at render resolution.

The solution is to set the viewport and render subdivisions to the same value, and if you need any additional subdivisions for rendering, do those in a modifier after the dynamic paint or physics modifiers. It's an annoying issue but not considered a bug at the moment.