Need community help with a small test.

   1673   9   1
User Avatar
Member
102 posts
Joined: June 2023
Offline
File attached.
You should try to select the ring from the edges on the pig using double-click MMB or using the "A" key, in the area between the green stripes as in the screenshot. Is it working out or not?
And select the loop on the cube as on the screen by double-clicking LMB starting from any marked edge. Does not work ? What if you disable blast ? Works ?
Edited by HGaal - Nov. 18, 2023 14:34:55

Attachments:
loop1.png (1.3 MB)
ring1.png (2.4 MB)
bug selection.hipnc (241.4 KB)

User Avatar
Member
480 posts
Joined: Aug. 2014
Offline
Both selections don't work. Probably because of the presence of certain types of poles Houdini finds on its path. But I'm not sure why the selection in Houdini aborts completely, ergo: no edges are selected at all. In other software when I make this selection at least I get a selection of edges between ambiguous areas.

Interactive loop/ring selection in Houdini was always somewhat... um.... capricious? For the lack of a better word.
Edited by ajz3d - Nov. 18, 2023 17:18:49
User Avatar
Member
190 posts
Joined: Aug. 2018
Offline
Looks like a bug to me.
User Avatar
Member
102 posts
Joined: June 2023
Offline
In my opinion, this bug is due to the reason in the screenshot - the loop does not work if 2 conditions converge: 1) the loop is not closed 2) through N-gon.
Pure bug. But sidefx doesn't want to fix it. Very strange, right?

Attachments:
bug_loop.png (1.5 MB)

User Avatar
Member
4549 posts
Joined: Feb. 2012
Offline
Hi,

You can implement edge loop selection with this behaviour using VEX (Detail Wrangle):

function int [ ] GetPrimsFromEdge ( int input; int pt0; int pt1 )
{
    int prims [ ];
    int hedge = pointedge ( input, pt0, pt1 );
    if ( hedge != -1 )
    {
        int count = hedge_equivcount ( input, hedge );
        for ( int i = 0; i < count; ++i )
        {
            int pr = hedge_prim ( input, hedge );
            if ( pr != -1 )
            {
                append ( prims, pr );
                hedge = hedge_nextequiv ( input, hedge );
            }
        }
    }
    return prims;
}



int GetNextPoint ( int input; int edgept0; int edgept1; int currentpt )
{
    int ptneighbours [ ] = neighbours ( input, currentpt );
    
    int primpts [ ];
    int prims [ ] = GetPrimsFromEdge ( input, edgept0, edgept1 );
    for ( int i = 0; i < len ( prims ); ++i )
    {
        int count = primvertexcount ( input, prims [ i ] );
        for ( int f = 0; f < count; ++f )
        {
            int vertIndex = vertexindex ( input, prims [ i ], f );
            int pointIndex = vertexpoint ( input, vertIndex );
            append ( primpts, pointIndex );
        }
    }
    
    int uniquepts [ ];
    foreach ( int pt; ptneighbours )
    {
        if ( find ( primpts, pt ) < 0 )
            append ( uniquepts, pt );
    }
    
    if ( len ( uniquepts ) == 1 )
        return uniquepts [ 0 ];

    return -1;
}



void GroupEdgeLoops ( int input; string edgegroup, groupname )
{
    if ( edgegroup == "" )
    {
        setedgegroup ( geoself ( ), groupname, 0, 0, 0 );
        return;
    }
        
    int loopedgepts [ ] = { };
    int edges [ ] = expandedgegroup ( input, edgegroup );
    if ( len ( edges ) == 0 )
    {
        setedgegroup ( geoself ( ), groupname, 0, 0, 0 );
        return;
    }
        
    int count = int ( 0.5 * len ( edges ) );
    for ( int i = 0; i < count; ++i )
    {
        int edgepts [ ] = sort ( array ( edges [ 2 * i ], edges [ 1 + 2 * i ] ) );
        
        int index0 = find ( loopedgepts, edgepts [ 0 ] );
        int index1 = find ( loopedgepts, edgepts [ 1 ] );
        int edgefound = index0 % 2 == 0 && index1 % 2 == 1 && index1 == 1 + index0;
        if ( !edgefound )
        {
            for ( int c = 0; c < 2; ++c )
            {
                int points [ ];
                int pt0 = edgepts [ c ];
                int pt1 = edgepts [ 1 - c ];
                int currentpt = pt0;
                int lastPoint = pt0;
                append ( points, currentpt );
                int nextPoint = GetNextPoint ( input, pt0, pt1, currentpt );
                while ( nextPoint != -1 && nextPoint != lastPoint )
                {
                    pt0 = currentpt;
                    pt1 = nextPoint;
                    currentpt = pt1;
                    append ( points, currentpt );
                    nextPoint = GetNextPoint ( input, pt0, pt1, currentpt );
                }
                
                int ptcount = len ( points ) - 1;
                for ( int f = 0; f < ptcount; ++f )
                    setedgegroup ( geoself ( ), groupname, points [ f ], points [ 1 + f ], 1 );
            }
            setedgegroup ( geoself ( ), groupname, edgepts [ 0 ], edgepts [ 1 ], 1 );
        }
    }
}

GroupEdgeLoops ( 0, chs("group"), chs("vex_selectiongroup") );

Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | pragmaticvfx.gumroad.com
User Avatar
Member
448 posts
Joined: Aug. 2019
Offline
I agree this behavior is nonsense. Ngons shouldn't change how edge loop works. Is it reported?
User Avatar
Member
102 posts
Joined: June 2023
Offline
дождевик
I agree this behavior is nonsense. Ngons shouldn't change how edge loop works. Is it reported?
Yes, I reported it. But they don't want to fix it, as I understand it. C'est la vie. Although I believe that such ridiculous bugs in the most basic things greatly spoil the reputation of programmers. You can understand bugs in complex algorithms, but not in basic tools.
User Avatar
Member
102 posts
Joined: June 2023
Offline
Bug fixed! Great job, SideFX! Just great! You are best !
User Avatar
Member
53 posts
Joined: Aug. 2013
Offline
HGaal
Bug fixed! Great job, SideFX! Just great! You are best !

Did they fix it?
User Avatar
Member
102 posts
Joined: June 2023
Offline
coccosoids
HGaal
Bug fixed! Great job, SideFX! Just great! You are best !

Did they fix it?
Yes, in the latest build.
  • Quick Links