Jump to content

michaelw

Members
  • Posts

    22
  • Joined

  • Last visited

Personal Information

  • Name
    mike

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

michaelw's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. very cool. good luck with your new journey
  2. Hi Edward, I saw H12.5.371 production build came out, but I didn't find the openvdb header files. Any information about this?
  3. hi edward, thanks for your reply. Will this happen in the following months? or it will only be possible for the next major release (H13)? Yeah, i will try this today to see if it works. sure. But I mean some simple example that users can explore without all those configurations with dreamworks vdb code and sesi library (which is what i'm doing right now...). Just something like those sample code shipped with HDK (like that SOP_Star). Anyway, thanks for the information.
  4. hi there, I'm playing around the vdb with houdini but I noticed it doesn't work very well. For example, I tried to convert a grid to a VDB primitive as below: openvdb::FloatGrid::Ptr sphere_grid = openvdb::tools::createLevelSetSphere<openvdb::FloatGrid>(50.0, openvdb::Vec3f(1.5, 2, 3),0.5,4.0); sphere_grid->insertMeta("radius", openvdb::FloatMetadata(50.0)); sphere_grid->setName("LevelSetSphere"); GU_PrimVDB* vdb_ptr = GU_PrimVDB::buildFromGrid(*gdp, sphere_grid); [/CODE] but I got the following error message: [CODE]error: ‘buildFromGrid’ is not a member of ‘GU_PrimVDB’[/CODE] I don't understand this error because I already followed the guide from GU_PrimVDB.h [CODE]00103 // NOTE: For static member functions please call in the following 00104 // manner. <ptrvalue> = GU_PrimVDB::<functname> 00105 // i.e. partptr = GU_PrimVDB::build(params...);[/CODE] Anyone succeeded in using the "buildFromGrid" method? I was also wondering when will houdini ships the header files of the OpenVDB library. P.S it would be nice to see some HDK examples with OpenVDB Thanks,
  5. one houdini master helped me figured out. In case someone has the same question: GU_Detail* input_geo0 = new GU_Detail; GU_Detail* input_geo1 = new GU_Detail; duplicateSource(0, context,input_geo0); duplicateSource(1, context,input_geo1); GA_PrimitiveGroup* pr_a = input_geo0->newPrimitiveGroup("pr_a"); GA_PrimitiveGroup* pr_b = input_geo1->newPrimitiveGroup("pr_b"); for (GA_Iterator it(input_geo0->getPrimitiveRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pr_a->addOffset(offset); } for (GA_Iterator it(input_geo1->getPrimitiveRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pr_b->addOffset(offset); } gdp->clearAndDestroy(); GU_Detail* gdp1 = new GU_Detail; gdp1 -> merge(* input_geo0); gdp1 -> merge(* input_geo1); GU_Cookie m_cookie; m_cookie.setTolerance(0.0001); GA_PrimitiveGroup* m_pr_a = gdp1->findPrimitiveGroup("pr_a"); GA_PrimitiveGroup* m_pr_b = gdp1->findPrimitiveGroup("pr_b"); m_cookie.setGroups(m_pr_a, m_pr_b, 0, 0); m_cookie.cookie(*gdp1, 0, * gdp1->newPrimitiveGroup("a_in"), * gdp1->newPrimitiveGroup("a_out"), * gdp1->newPrimitiveGroup("a_overlap"), 1, * gdp1->newPrimitiveGroup("b_in"), * gdp1->newPrimitiveGroup("b_out"), * gdp1->newPrimitiveGroup("b_overlap"), 1, 1 ); GU_Detail *new_gdp = m_cookie.getDetail(); gdp ->merge(*new_gdp); gdp1->clearAndDestroy(); input_geo0->clearAndDestroy(); input_geo1->clearAndDestroy(); [/CODE]
  6. hi there, I tried to play around with hdk cookie (GU_Cookie) but it messed up. Basically I did these things in my code: 1. merge in input A and input B 2. create primitive and point groups for both inputs 3. call setGroups to setup groups 4. call cookie for the cookie operation With my understanding, the output should be in those [in/out/overlap] groups that I can check. But when I used two spheres for testing, the result is totally wrong. Anyone could give me a hint what I did wrong here? GU_Detail* input_geo0 = (GU_Detail *) inputGeo(0); GU_Detail* input_geo1 = (GU_Detail *) inputGeo(1); GA_PrimitiveGroup* pr_a = input_geo0->newPrimitiveGroup("pr_a"); GA_PrimitiveGroup* pr_b = input_geo1->newPrimitiveGroup("pr_b"); GA_PointGroup* pt_a = input_geo0->newPointGroup("pt_a"); GA_PointGroup* pt_b = input_geo1->newPointGroup("pt_b"); for (GA_Iterator it(input_geo0->getPrimitiveRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pr_a->addOffset(offset); } for (GA_Iterator it(input_geo1->getPrimitiveRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pr_b->addOffset(offset); } for (GA_Iterator it(input_geo0->getPointRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pt_a->addOffset(offset); } for (GA_Iterator it(input_geo1->getPointRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); pt_b->addOffset(offset); } gdp -> merge(* input_geo0); gdp -> merge(* input_geo1); GU_Cookie m_cookie; m_cookie.setGroups(pr_a, pr_b, pt_a, pt_; GA_PrimitiveGroup* a_in = gdp->newPrimitiveGroup("a_in"); GA_PrimitiveGroup* a_out = gdp->newPrimitiveGroup("a_out"); GA_PrimitiveGroup* a_overlap = gdp->newPrimitiveGroup("a_overlap"); GA_PrimitiveGroup* b_in = gdp->newPrimitiveGroup("b_in"); GA_PrimitiveGroup* b_out = gdp->newPrimitiveGroup("b_out"); GA_PrimitiveGroup* b_overlap = gdp->newPrimitiveGroup("b_overlap"); m_cookie.cookie(*gdp, 0, *a_in, *a_out, *a_overlap, 1, *b_in, *b_out, *b_overlap, 1, 1 ); [/CODE]
  7. thanks edward. this time it makes more sense to me:)
  8. Thanks edward. I saw that explanation in hdk document, but I thought it only happens within one sop. In my example, if I write the geometry to disk and read it back in, the primitive offset will be continuous. Does that mean all geometries written to disk will re-order their offset to match with their index?
  9. hi there, I'm still not very sure how Index and Offset works. With my understanding, if we do this: duplicateSource(0,context);[/CODE] the "gdp" should always have the offset continuous at very beginning (matching "index"), and if we delete some points or primitives later, the offset should be the same but the index will be re-ordered to be continuous. But this is not always the case. Here is one example confusing me for sometime: drop down a simple "box" SOP and then a "divide" SOP. Use "bricker polygons" option to divide it into a little more dense grid. In my case, I set them as "0.4, 0.4, 0.4". after this, append a very simple node I made to check for point offset, point index, primitive offset, primitive index. in this case: "point offset" matches "point index", both of them are continuous. but "primitive offset" doesn't match "primitive index". So can anyone explain how "offset" works internally in hdk? Could I say if I create a new gdp and use "appendOffset()", the offset numbers are continuous? Thanks,
  10. Hi SYmek, I compiled it with no error messages, but when I try to open the .rat file in Nuke I got the error message below: Read error: libHoudiniUT.so: cannot open shared object file:No such file or directory Nuke6.3v2 Houdini 12.0.581/Houdini 12.0.634
  11. hi sorry, I don't think the problem is that easy. I saw the post of syzmatrix on SideFX forum a couple of days ago and I tried to use the similar approach as yours, but I noticed that the motion looks weird. The actual result is a combination of the keyframe animation and the rigid body simulation. So the box are not actually "released". Check out the attached file. I added a ground inside DOP and therefore the expression in your activevalue DOP is changed to "$OBJID-2". I also changed the keyframe a little bit to see the result earlier. I think the question from syzmatrix is actually a very good request for this kind of feature. I remember the technical demo from 2012, the two buildings are colliding each other. The video shows the transition from keyframe to the dynamics simulation. I'm still wondering if there's any easy way inside houdini to do this kind of thing. box_not_working.hipnc
  12. you could find all vex functions available here And you could always check your vex code by right-clicking your VOP SOP and select "View VEX Code..."
  13. hi, just got two approaches. Clip SOP and Ray SOP rootsOfPolynomial2.hipnc
×
×
  • Create New...