HDK: triangulation

   3319   5   1
User Avatar
Member
18 posts
Joined: 10月 2006
Offline
Hi,

I'm working on a custom ROP which requires triangle faces. The Divide SOP can be used for triangulation but an automatic way would be more comfortable. Is there a class or method in the HDK I could triangulate a geometry with?

Thanks,
Peter
User Avatar
Member
48 posts
Joined: 9月 2006
Offline
Hm…. to treat primitives as triangle fans - simplest way, you even don't need to load Houidi itself with this task, it may be ROP's feature.
User Avatar
Member
18 posts
Joined: 10月 2006
Offline
I just wonder if the HDK has an implemented solution for the task or I have to implement it myself.
User Avatar
Member
48 posts
Joined: 9月 2006
Offline
Er… you even don't need to implement it, just use information provided by the way you preferred.
User Avatar
Member
790 posts
Joined: 4月 2020
Offline
Hello Peter,

Not sure if it is in there, but I found most solutions that are available in sops are also as a function in the GU_Detail, for this function I would try this maybe:

void GU_Detail::convexPoly ( GU_PrimPoly * pp,
unsigned maxpts = 3,
const GU_Detail * restgdp = 0
)

in GU_Detail.h

Polygon convexing: By default, the convexers will triangulate
00766 void convexPoly(GU_PrimPoly *pp, unsigned maxpts = 3, const GU_Detail *restgdp=0);
00767 void convex(unsigned maxpts=3, GB_PrimitiveGroup *primGroup=0, const GU_Detail *restgdp=0);
00768



If this does what you are after then I wonder what the restgdp does. I was about to warn against trouble with motion blur because op topology changes when triangulating, but actually the rest geometry might be the answer to that.

Hope that helps.

Koen
User Avatar
Member
18 posts
Joined: 10月 2006
Offline
Thanks Koen, that's what I was looking for.
  • Quick Links