Shifted paint:
Fixed Paint:
Plane dimensions: 0.1 by 0.1
For the paint to come out correctly, i had to translate the entire brush geometry by 0.001 in every axis before calculating the dynamic paint, then i reverted it after, i did the translations with geometry nodes.
Brush Nodes:
If your brush has a scale different from one, you will need to divide the translation by the scale:
If your brush has a rotation, you will need to rotate the translation by the inverse rotation of the brush:
In large scales, the offset would be practically imperceptible, but at smaller scales, like a canvas with centimeters, the offset starts to be very visible, some smaller brushes will not even paint the canvas, since the raytrace would start too far from them.
The problem cause, i tested it, but only a single time:
/* a simple hack to minimize chance of ray leaks at identical ray <-> edge locations */
add_v3_fl(ray_start, 0.001f);
This line of code in the file dynamic_paint.c seems to translate raytrace origins by the vector (0.001, 0.001, 0.001) when using a mesh type brush. When i removed it, the expected behaviour appeared.
I tested before and after removing the code line, but did it only one time since Visual Studio doesn't like to build things fast in my PC.
If someone could test it, the code line is in the following method:
/*
* Paint a brush object mesh to the surface
*/
static void dynamic_paint_paint_mesh_cell_point_cb_ex(void *__restrict userdata, const int id, const TaskParallelTLS *__restrict UNUSED(tls))
Here's the file i did for this:
Edit:
I tested again with and without the code line: