Dynamic paint on fluid simulation issue in Cycles #43437

Closed
opened 2015-01-27 22:10:19 +01:00 by Tomas · 14 comments

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.PaintFluidSim.jpg

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.

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.![PaintFluidSim.jpg](https://archive.blender.org/developer/F139649/PaintFluidSim.jpg) 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.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Tomas self-assigned this 2015-01-27 22:10:20 +01:00
Author

Added subscriber: @tliriel

Added subscriber: @tliriel
Tomas was unassigned by Aaron Carlisle 2015-01-27 23:10:07 +01:00
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

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

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

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.
DynPaintFluidSim.blend

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. [DynPaintFluidSim.blend](https://archive.blender.org/developer/F139736/DynPaintFluidSim.blend)
Author

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.

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.
Author

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 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.

Added subscriber: @zeauro

Added subscriber: @zeauro

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.

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.

Added subscriber: @Sergey

Added subscriber: @Sergey

@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.

@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?

@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. @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, 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.

@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.

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Brecht Van Lommel self-assigned this 2015-05-07 00:38:46 +02:00

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.

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.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#43437
No description provided.