Found 264 posts.
Search results Show results as topic list.
Technical Discussion » lerp, smooth and other
- Wish
- 282 posts
- Offline
Hi, rdg. I know math of interpolations. But I'm lazy a bit and I want to use already existing libs))) ops: ops:
Technical Discussion » lerp, smooth and other
- Wish
- 282 posts
- Offline
Technical Discussion » full path
- Wish
- 282 posts
- Offline
Do you know why there are two paths in getRelativePath()?
If the src path is a relative, then what is the second(destination) path? It is a pointer too.
If the src path is a relative, then what is the second(destination) path? It is a pointer too.
Technical Discussion » full path
- Wish
- 282 posts
- Offline
Hi, rafal. Yep, I know this stuff. But it doesn't work in my case. Why? I don't know. I'm trying to do this in such way:
UT_String obj, fullObj;
import(currobj, obj, 0);
OP_Node *currOp;
currOp->findNode(obj);
currOp->getFullPath(fullObj);
UT_String obj, fullObj;
import(currobj, obj, 0);
OP_Node *currOp;
currOp->findNode(obj);
currOp->getFullPath(fullObj);
Technical Discussion » full path
- Wish
- 282 posts
- Offline
Technical Discussion » Mantra Vray Transperency
- Wish
- 282 posts
- Offline
VRAY procedural is a houdini class which methods is used for creating geometry on the fly during render
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Hi!
Now everything is ok. But the result is less then output of measure sop in perimeter mode. It confusing me a little.
Everything is good with curve. Points are sitting in right places.
Now everything is ok. But the result is less then output of measure sop in perimeter mode. It confusing me a little.
Everything is good with curve. Points are sitting in right places.
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Hi, Mondi.
I found the core of my problem. This is not the arc length method. This is converting from gudetail geometry, which quered into procedural from obj, into GU_PrimNURBCurve.
GU_Detail *gdpSkin = (GU_Detail*)queryGeometry(handleSkin, samplesSkin);
GEO_PrimNURBCurve *gdpCurve = new GEO_PrimNURBCurve(gdpSkin);
gdpCurve = GU_PrimNURBCurve::build(gdpSkin, 4, 4, 0, 1, 1);
I' m sure that curve is ok, but all curves points is in the origin and not in positions of curve object, which is quered
I found the core of my problem. This is not the arc length method. This is converting from gudetail geometry, which quered into procedural from obj, into GU_PrimNURBCurve.
GU_Detail *gdpSkin = (GU_Detail*)queryGeometry(handleSkin, samplesSkin);
GEO_PrimNURBCurve *gdpCurve = new GEO_PrimNURBCurve(gdpSkin);
gdpCurve = GU_PrimNURBCurve::build(gdpSkin, 4, 4, 0, 1, 1);
I' m sure that curve is ok, but all curves points is in the origin and not in positions of curve object, which is quered
Technical Discussion » copyGeometry
- Wish
- 282 posts
- Offline
Hi! There is a NURB curve in sops. I want to build the same NURB curve with the same topology into the geometry shader.
Do you know how? Thanks
Do you know how? Thanks
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Ok, guys. Something awful.
const GU_Detail *cgdpSkin = new GU_Detail;
…………………………….
cgdpSkin = queryGeometry(handleSkin, samplesSkin);
GU_Detail *gdpSkin = (GU_Detail*)cgdpSkin;
GU_Detail *gdpCurve = new GU_Detail;
gdpCurve->copy(*gdpSkin);
GU_PrimNURBCurve *shaft = new GU_PrimNURBCurve(gdpCurve);
shaft = GU_PrimNURBCurve::build(gdpCurve, 4, 4, 0, 1, 1);
float start, end;
shaft->validRange(start, end);
std::cout << “start: ” << start << “ end: ” << end << std::endl;
float arcLenCurve = shaft->arcLength(0, 1, 0, 10);
std::cout << “arcLenCurve: ” << arcLenCurve << std::endl;
UT_Vector4 testpos;
int test = shaft->evaluatePoint(testpos, 0.5);
std::cout << “test: ” << test << std::endl;
std::cout << “x:” << testpos.x() << “ y:” << testpos.y() << “ z:” << testpos.z() << std::endl;
And all results:
start: 0 end: 2
arcLenCurve: 0
test: 0
x:0 y:0 z:0
Bad results. I want to take curve from sops and to create the same curve into my procedural. And than to calculate length of this curve and lengths of its segments.
Does anyone know what is wrong?
Thanks
const GU_Detail *cgdpSkin = new GU_Detail;
…………………………….
cgdpSkin = queryGeometry(handleSkin, samplesSkin);
GU_Detail *gdpSkin = (GU_Detail*)cgdpSkin;
GU_Detail *gdpCurve = new GU_Detail;
gdpCurve->copy(*gdpSkin);
GU_PrimNURBCurve *shaft = new GU_PrimNURBCurve(gdpCurve);
shaft = GU_PrimNURBCurve::build(gdpCurve, 4, 4, 0, 1, 1);
float start, end;
shaft->validRange(start, end);
std::cout << “start: ” << start << “ end: ” << end << std::endl;
float arcLenCurve = shaft->arcLength(0, 1, 0, 10);
std::cout << “arcLenCurve: ” << arcLenCurve << std::endl;
UT_Vector4 testpos;
int test = shaft->evaluatePoint(testpos, 0.5);
std::cout << “test: ” << test << std::endl;
std::cout << “x:” << testpos.x() << “ y:” << testpos.y() << “ z:” << testpos.z() << std::endl;
And all results:
start: 0 end: 2
arcLenCurve: 0
test: 0
x:0 y:0 z:0
Bad results. I want to take curve from sops and to create the same curve into my procedural. And than to calculate length of this curve and lengths of its segments.
Does anyone know what is wrong?
Thanks
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Hey Mondi!
I'm getting crash on the arcLenght.
gdpSkin is a quired sop geometry(a NURBS).
The task is simple. To take geo(NURB curve) from sops into geoshader(done). To convert this geo to temp NURB curve inside this shader and to calculate the length of the segment of this curve.
-1(error, as I now) - when I take borders of arc smth like u0 = 0.5, u1 = 0.8. And 0 if u0 = 0, u1 = 1;
I'm getting crash on the arcLenght.
gdpSkin is a quired sop geometry(a NURBS).
The task is simple. To take geo(NURB curve) from sops into geoshader(done). To convert this geo to temp NURB curve inside this shader and to calculate the length of the segment of this curve.
-1(error, as I now) - when I take borders of arc smth like u0 = 0.5, u1 = 0.8. And 0 if u0 = 0, u1 = 1;
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Some NURB stuff gave me -1 or 0 arc length
GU_PrimNURBCurve *shaft = new GU_PrimNURBCurve(gdpCurve);
shaft = GU_PrimNURBCurve::build(gdpCurve, 4);
GEO_Curve *test = shaft->extract(0.5, 1);
float arc = test->arcLength(0, 1);
GU_PrimNURBCurve *shaft = new GU_PrimNURBCurve(gdpCurve);
shaft = GU_PrimNURBCurve::build(gdpCurve, 4);
GEO_Curve *test = shaft->extract(0.5, 1);
float arc = test->arcLength(0, 1);
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
some updates, but results are the same
GU_PrimRBezCurve *shaft = new GU_PrimRBezCurve(gdpCurve);
shaft->build(gdpCurve, 1, 4, 0, 0);
GEO_Curve *test = shaft->getCurve();
float size = test->arcLength(0.1,0.5, 0, 1);
GU_PrimRBezCurve *shaft = new GU_PrimRBezCurve(gdpCurve);
shaft->build(gdpCurve, 1, 4, 0, 0);
GEO_Curve *test = shaft->getCurve();
float size = test->arcLength(0.1,0.5, 0, 1);
Technical Discussion » Arc length
- Wish
- 282 posts
- Offline
Hi. I want to know the arc length of the curve segment inside geometry shader. But mantra got crash.
GU_Detail *gdpCurve = new GU_Detail;
gdpCurve->copy(*gdpSkin);
GU_PrimRBezCurve *shaft = GU_PrimRBezCurve::build(gdpCurve, 1, 4, 0, 0);
{
int ind1, ind2;
GU_Curve *temp = shaft->cut(0, 1, ind1, ind2, 0);
GEO_Curve *test = (GEO_Curve*)temp;
float size = test->arcLength(0.1,0.5, 0, 1);
}
or
{
GEO_Curve *test = shaft ->getCurve();
float size = test->arcLength(0.1, 0.5, 0, 1);
}
GU_Detail *gdpCurve = new GU_Detail;
gdpCurve->copy(*gdpSkin);
GU_PrimRBezCurve *shaft = GU_PrimRBezCurve::build(gdpCurve, 1, 4, 0, 0);
{
int ind1, ind2;
GU_Curve *temp = shaft->cut(0, 1, ind1, ind2, 0);
GEO_Curve *test = (GEO_Curve*)temp;
float size = test->arcLength(0.1,0.5, 0, 1);
}
or
{
GEO_Curve *test = shaft ->getCurve();
float size = test->arcLength(0.1, 0.5, 0, 1);
}
Technical Discussion » NURB curve
- Wish
- 282 posts
- Offline
Technical Discussion » NURB curve
- Wish
- 282 posts
- Offline
Hi! I'm trying to make nurb curve by hdk. But houdini crashes each time.
GU_Detail *gdpline;
GU_PrimNURBCurve *line;
gdpline->clearAndDestroy();
line->build(gdpline, 3, 4, 0, 1, 1);
GU_Detail *gdpline;
GU_PrimNURBCurve *line;
gdpline->clearAndDestroy();
line->build(gdpline, 3, 4, 0, 1, 1);
Technical Discussion » vop -> add attribute -> string
- Wish
- 282 posts
- Offline
Hi! I'm watching add attribute vop right now and can't find “string” value of signature parm. :arrow:
Technical Discussion » scatter function
- Wish
- 282 posts
- Offline
Technical Discussion » bilinear interpolation
- Wish
- 282 posts
- Offline
-
- Quick Links