Found 6 posts.
Search results Show results as topic list.
Houdini Indie and Apprentice » Houdini on Kubuntu 15.10
- ati3d
- 6 posts
- Offline
I also submitted this problem as a bug just now. Maybe they will look into it again if more people having this.
Technical Discussion » edge loop selection tool
- ati3d
- 6 posts
- Offline
Hi there! I just finished recently my edge loop selection tool. It could find and group the edgeloops on the geometry. Like when you select an edge an press SHIFT+L.
Here is the vimeo demonstration: https://vimeo.com/100791252 [vimeo.com]
Here is the vimeo demonstration: https://vimeo.com/100791252 [vimeo.com]
Technical Discussion » HDK GA_Edge question
- ati3d
- 6 posts
- Offline
Oh, this example code is really usefull. As my next step I also wanted to get an easier way to find out which primitives sharing that edge.
Now it is looking like this, and works perfect.
GA_OffsetArray fpPrims;
GA_OffsetArray spPrims;
GA_OffsetArray intersectedPrims;
GA_OffsetArray::const_iterator prim_it;
gdp->getPrimitivesReferencingPoint(fpPrims,*_firstPoint);
gdp->getPrimitivesReferencingPoint(spPrims,*_secondPoint);
fpPrims.sortedIntersection(spPrims,intersectedPrims);
//std::cout<<“Neighbour primitives:”<<std::endl;
GA_Edge edge(*_firstPoint,*_secondPoint);
int validEdge = 0;
if (intersectedPrims.entries() == 2)
{
for (prim_it = intersectedPrims.begin(); !prim_it.atEnd(); ++prim_it)
{
std::cout<<“PrimNum : ”<<gdp->primitiveIndex(*prim_it)<<std::endl;
if (gdp->getPrimitiveList().get(gdp->primitiveIndex(*prim_it))->hasEdge(edge) == 1)
{
validEdge++;
}
}
}
I was also looking into how to get the neighbourpoints of any of my selected point. It works fine, however I am getting the warning that GU_Detail::buildRingZeroPoints(…) are deprected, and so far I couldn't find anything to replace it.
UT_PtrArray<UT_PtrArray<GEO_Point*>*> ringzero;
UT_IntArray ringvalence;
gdp->buildRingZeroPoints(ringzero, &ringvalence);
UT_Array<int> neighbourPointsArray;
int entries;
entries = ringzero->entries();
for (int i = 0; i<entries; i++)
{
if (gdp->pointIndex(*_secondPoint) != (*ringzero)->getNum())
{
neighbourPointsArray.append((*ringzero)->getNum());
std::cout<<“NeighbourPoint: ”<<(*ringzero)->getNum()<<std::endl;
}
}
Now it is looking like this, and works perfect.
GA_OffsetArray fpPrims;
GA_OffsetArray spPrims;
GA_OffsetArray intersectedPrims;
GA_OffsetArray::const_iterator prim_it;
gdp->getPrimitivesReferencingPoint(fpPrims,*_firstPoint);
gdp->getPrimitivesReferencingPoint(spPrims,*_secondPoint);
fpPrims.sortedIntersection(spPrims,intersectedPrims);
//std::cout<<“Neighbour primitives:”<<std::endl;
GA_Edge edge(*_firstPoint,*_secondPoint);
int validEdge = 0;
if (intersectedPrims.entries() == 2)
{
for (prim_it = intersectedPrims.begin(); !prim_it.atEnd(); ++prim_it)
{
std::cout<<“PrimNum : ”<<gdp->primitiveIndex(*prim_it)<<std::endl;
if (gdp->getPrimitiveList().get(gdp->primitiveIndex(*prim_it))->hasEdge(edge) == 1)
{
validEdge++;
}
}
}
I was also looking into how to get the neighbourpoints of any of my selected point. It works fine, however I am getting the warning that GU_Detail::buildRingZeroPoints(…) are deprected, and so far I couldn't find anything to replace it.
UT_PtrArray<UT_PtrArray<GEO_Point*>*> ringzero;
UT_IntArray ringvalence;
gdp->buildRingZeroPoints(ringzero, &ringvalence);
UT_Array<int> neighbourPointsArray;
int entries;
entries = ringzero->entries();
for (int i = 0; i<entries; i++)
{
if (gdp->pointIndex(*_secondPoint) != (*ringzero)->getNum())
{
neighbourPointsArray.append((*ringzero)->getNum());
std::cout<<“NeighbourPoint: ”<<(*ringzero)->getNum()<<std::endl;
}
}
Technical Discussion » HDK GA_Edge question
- ati3d
- 6 posts
- Offline
Thank you!
By using gdp->getPrimitivesReferencingPoint() I could get all the primitives which connected to either one of the points of my edge, and then iterating over the primitives I am just calling the hasEdge() function. It works perfectly
By using gdp->getPrimitivesReferencingPoint() I could get all the primitives which connected to either one of the points of my edge, and then iterating over the primitives I am just calling the hasEdge() function. It works perfectly
Technical Discussion » HDK GA_Edge question
- ati3d
- 6 posts
- Offline
Hi Everybody,
I was wondering if anybody knows how to check if an edge is valid using HDK. For example in HOM there is this function hou.Geometry.findEdge(Point1,Point2) and it will return a hou.Edge object if the two points create an edge and None if they dont. So it is pretty simple and so far I can't find any equivalent in HDK for this. My first thought was that maybe GA_Detail class has some similar function but it doesnt. And the GA_Edge class has an isValid() function however, it always returns me 1 even if the points does not create an edge.
Does anybody has any recommandation about this?
Thanks
Ati
I was wondering if anybody knows how to check if an edge is valid using HDK. For example in HOM there is this function hou.Geometry.findEdge(Point1,Point2) and it will return a hou.Edge object if the two points create an edge and None if they dont. So it is pretty simple and so far I can't find any equivalent in HDK for this. My first thought was that maybe GA_Detail class has some similar function but it doesnt. And the GA_Edge class has an isValid() function however, it always returns me 1 even if the points does not create an edge.
Does anybody has any recommandation about this?
Thanks
Ati
Houdini Lounge » Attaching wires to simulating RBD object
- ati3d
- 6 posts
- Offline
Hello,
I am trying to create an iron concrete (reinforced concrete) looking like simulation. In the scene file I have a center concrete piece and it's neighbor pieces and those are connected to the center concrete whit reinforced bars. I want the concrete pieces as RBD, and the bars as wire objects. My general idea is to constrain to roots of the wires to the center concrete piece, and to the the end of each bar I want to constrain each neighbor concrete piece. However I am having problem because the wires doesn't really stick whit the center piece. To move the wires whit it piece in each step, I am moving the wires whit the transformation information of the center piece in the sopnet1 inside the dopnetwork. But it doesn't really work. I have tried it whit constraints, setting the gluetoanimation point attributes to 1 on the roots but it still doesn't want to work and I am running out of ideas why it is happening. Is there anybody who knows more about this wire and RBD interraction?
Thanks in advance!
Ati :wink: :cry: :cry: :cry: :cry:
I am trying to create an iron concrete (reinforced concrete) looking like simulation. In the scene file I have a center concrete piece and it's neighbor pieces and those are connected to the center concrete whit reinforced bars. I want the concrete pieces as RBD, and the bars as wire objects. My general idea is to constrain to roots of the wires to the center concrete piece, and to the the end of each bar I want to constrain each neighbor concrete piece. However I am having problem because the wires doesn't really stick whit the center piece. To move the wires whit it piece in each step, I am moving the wires whit the transformation information of the center piece in the sopnet1 inside the dopnetwork. But it doesn't really work. I have tried it whit constraints, setting the gluetoanimation point attributes to 1 on the roots but it still doesn't want to work and I am running out of ideas why it is happening. Is there anybody who knows more about this wire and RBD interraction?
Thanks in advance!
Ati :wink: :cry: :cry: :cry: :cry:
-
- Quick Links