Remesh adds points on borders {[SOLVED]}

   500   4   1
User Avatar
Member
1252 posts
Joined: April 2017
Offline
Hi!

I have to quad topo that I want to remesh to have more polygons inside the shape. Its important that the borders are not affected but I can see some points get added. Anyway to change that behavior? I tried the Hard Edges Group but it doesnt work...
Edited by olivierth - Sept. 24, 2026 10:08:58

Attachments:
Houdini_Remesh_Borders_01.jpg (81.7 KB)
Houdini_Remesh_Borders_02.jpg (123.1 KB)

-Olivier
User Avatar
Member
8380 posts
Joined: Sept. 2011
Offline
RIP
User Avatar
Member
66 posts
Joined: Aug. 2014
Offline
Best I can think of is something like this - set all the border points to have a targetmeshsize that roughly matches the local length of the longest polygon edge, and all the interior points to something smaller, then use Adaptive edge lengths mode, Gradation of 1.0, and switch on the Mesh Size Attribute control attrib.

This won't be a guarantee that it'll avoid splitting border edges, but you should be able to "massage" the values to have the effect you want.

(Edit: found doing a 2-pass thing with some inward value spreading to yield a bit cleaner result while letting you push the inner target size a little lower)

(Edit 2: border_preserve_remesh_03.hiplc - or... one with a guaranteed border-preserving tidy-up step)
Edited by VortexVFX - Sept. 24, 2026 00:32:14

Attachments:
border_preserve_remesh.hiplc (83.3 KB)
border_preserve_remesh_02.hiplc (90.0 KB)
border_preserve_remesh_03.hiplc (99.7 KB)

Dan Wood
User Avatar
Member
35 posts
Joined: Aug. 2021
Offline
Hello. This method doesn't create any additional points on the unshared edge regardless of remesh resolution. I first group unshared primitives, then drop ground expand to better control how much falloff I want to have when remeshing. It will prove useful when creating high res remeshes (like in the example hip file below). But you can bypass groupexpand node if you are doing mid-res remeshes. Then I measured per-primitive perimeters/lengths. That's the current remesh size, while on the other hand, in VEX, I modified remesh size for all primitives that don't belong to our unshared primitive group

if(inprimgroup(0, "hardedges", @primnum) != 1){
    @perimeter *= chf("remesh_res");
}

Then we promote @perimeter to point level (remesh only accepts point attribute) and use "maximum" promotion method so we don't create a falloff gradient inside our unshared primitive group, but rather away from it as much as possible.
In remesh node you don't need to change Relative Density, Gradation, etc. Just use remesh_res spare parameter to control resolution.

I hope it helps!
Edited by Italimpex Productions - Sept. 24, 2026 09:41:57

Attachments:
SIDEFX_EDGE_REMESH_V01.hip (110.3 KB)
pre_remesh.png (877.9 KB)
post_remesh.png (1.1 MB)

Italimpex Productions
CGI Studio specializing in directing and producing advertisements & films
User Avatar
Member
1252 posts
Joined: April 2017
Offline
Hi!

Thanks for all the troubleshooting but I figured a method that works everywhere (no mistakes so far).

I created an outline curve of all my geo patches and split all points on those curves. I end up with every curves having exactly 2 points.

From the remeshed points (only on the unshared ones), I check if I'm exactly at the same position than the curve points. If not, I snap to a point on the nearest curve.

my 2 scripts are:

Group_unshared_Points

int nbrs[] = neighbours(0, @ptnum);
int len = len(nbrs);
i@group_unshared = 0;
for(int i=0; i<len; i++)
    {
    int ptheA = pointhedge(0, @ptnum, nbrs[i]);
    int ptheB = pointhedge(0, nbrs[i], @ptnum);
    if(ptheA == -1 || ptheB == -1)
        {
        @group_unshared = 1;
        break;
        }
    }

FIX_Snap_mid_points
int nearpt = nearpoint(1, @P);
vector nearpos = point(1, "P", nearpt);
if(distance(@P, nearpos) > 0.00001)
    {
    int primhit;
    vector UVs;
    float dist = xyzdist(1, @P, primhit, UVs);
    int primpts[] = primpoints(1, primhit);
    @P = point(1, "P", primpts[0]);
    }
Edited by olivierth - Sept. 24, 2026 10:07:52

Attachments:
Houdini_Remesh_Borders_03.jpg (70.5 KB)
Houdini_Remesh_Borders_04.jpg (92.3 KB)

-Olivier
  • Quick Links