# 3D slicing using Dynamic Paint leaves holes where there shouldnt be any

I am using dynamic paint to take slices as an image sequence through a prexisting mesh (also created in blender). For this I create a plane and set that as a canvas which passes through my mesh object outputting a cross section every frame. I have played around with the parameters (dissolve time = 1 etc) and the output is clearly doing something right but leaves me with holes within my mesh. Hopefully the images below will explain this better.

These images are for the first slice (easiest to get images for). Ive circled an example of the issue.

UPDATE: Blend file now included.

Here is the code which assigns dynamic paint parameters Xmax, Ymax and Zmax, specify the location of the canvas.

context = bpy.context
active = context.active_object

print('Setting Up Ballast Brushes')

bpy.context.object.modifiers["Dynamic Paint"].ui_type = 'BRUSH'
bpy.ops.dpaint.type_toggle(type='BRUSH')

print('Setting Up Plane')

bpy.ops.mesh.primitive_plane_add(enter_editmode=False, align='WORLD', location=(0, 0, 0))
bpy.data.objects["Plane"].scale[0]=Xmax/2
bpy.data.objects["Plane"].scale[1]=Zmax/2
bpy.data.objects["Plane"].scale[2]=1
bpy.data.objects["Plane"].location[0]=Xmax/2
bpy.data.objects["Plane"].location[1]=0
bpy.data.objects["Plane"].location[2]=(Zmax/2)
bpy.data.objects["Plane"].rotation_euler[0] = 1.5708

print('Setting Canvas Parameters')

bpy.data.objects['Plane'].modifiers["Dynamic Paint"].ui_type='CANVAS'
bpy.ops.dpaint.type_toggle(type='CANVAS')
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].surface_format = 'IMAGE'
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].image_resolution = 1000
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].use_antialiasing = False
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].frame_end = endframe2
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].use_dissolve = True
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].dissolve_speed = 1
#bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].use_dissolve_log = False
#bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].dry_speed = 1
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].image_output_path = str(path)
bpy.ops.object.editmode_toggle()
bpy.ops.uv.smart_project() #the actual unwrapping operation
bpy.ops.object.editmode_toggle() #exiting edit mode
bpy.context.object.modifiers["Dynamic Paint"].canvas_settings.canvas_surfaces["Surface"].uv_layer = "UVMap"


• File is not attached ... use blend-exchange.comand given code copy&paste into you Q. Mar 1 at 13:13
• Hi apologies, I was trying to add it, but the file is too large I think, Ive added the python code as a placeholder until I can get the blend file on here Mar 1 at 13:15
• Apologies for the delay @vklidu blend file now uploaded Mar 1 at 13:27