liuping207

liuping207

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Use HDK to implement vex neighbours () March 4, 2021, 11:04 a.m.

First of all, I used the GU_Detail::buildRingZeroPoints() function to find neighbors. This function has very good performance. Then I want to find the neighbor point of the neighbor, this function cannot do it.

So I used GEO_HedgeInterface to achieve it, but the performance is very low.
this code same as GU_Detail::buildRingZeroPoints():
std::vector<GA_Offset> neighbours(GU_Detail* gdp, GEO_HedgeInterface& halfEdgeIfer, const GA_Offset &ptnum)
{

    // build a list
    std::vector <GA_Offset> nbs;
    //
    GEO_Hedge iterEdge = halfEdgeIfer.firstIncidentEdge(ptnum);
    GEO_Hedge endEdge = iterEdge;
    while(1){
        auto srcptoff = halfEdgeIfer.srcPoint(iterEdge);
        auto endptoff = halfEdgeIfer.dstPoint(iterEdge);
        std::vector<GA_Offset>::iterator srcpt_find = std::find(nbs.begin(), nbs.end(), srcptoff);
        std::vector<GA_Offset>::iterator endpt_find = std::find(nbs.begin(), nbs.end(), endptoff);
        if (srcptoff != ptnum && (srcpt_find == nbs.end())) {
            nbs.emplace_back(srcptoff);
        }
        if (endptoff != ptnum && (endpt_find == nbs.end())) {
            nbs.emplace_back(endptoff);
        }
        iterEdge = halfEdgeIfer.nextIncidentEdge(iterEdge, ptnum);
        if (iterEdge == endEdge) 
            break;
    }
    return std::move(nbs);
}

How to achieve higher performance in this way? In other words, there are other methods that have the same performance as GU_Detail::buildRingZeroPoints()

thanks

Arnold Shader HAPI_Initialize() Problem Dec. 20, 2018, 2:02 a.m.

node_initialize
{
	HAPI_CookOptions cookOptions = HAPI_CookOptions_Create();
	HAPI_Session session;
	HAPI_CreateInProcessSession(&session);

	ENSURE_SUCCESS(HAPI_Initialize(&session,
		&cookOptions,
		true,
		-1,
		nullptr,
		nullptr,
		nullptr,
		nullptr,
		nullptr));


}
node_update
{
	
}
......


Then find a problem that debuger located this function:HAPI_Initialize()


and in maya log have this error message:
Houdini Engine could not load

but in standalone program,that have not find this problem.

Can someone help me
thanks.

HDK-getPos3() problem March 14, 2015, 10:42 p.m.

lockInputs(context);
duplicateSource(0,context);
GU_Detail *input_geo_1 = (GU_Detail *)inputGeo(1);

std::cout<<input_geo_1->getGEOPoint(0)->getPos3()<<std::endl;


this getPos3() function always get wrong position.
please help me
thanks
:x