Jump to content

Search the Community

Showing results for tags 'hdk'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • General
    • Lounge/General chat
    • Education
    • Jobs
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • Coders Corner
    • HDK : Houdini Development Kit
    • Scripting
    • Shaders
  • Art and Challenges
    • Finished Work
    • Work in Progress
    • VFX Challenge
    • Effects Challenge Archive
  • Systems and Other Applications
    • Other 3d Packages
    • Operating Systems
    • Hardware
    • Pipeline
  • od|force
    • Feedback, Suggestions, Bugs

Found 64 results

  1. We pull out service information about the processes and sign next to the node. The plugin is compiled for Linux, Windows. Houdini HDK 17.0 Plugin Link: https://drive.google.com/open?id=1KKri5K-m41ZRr4XukwqTYHmeGGz_e6f_
  2. Hi, I`m trying to create a SOP node, that basically does the same thing as the copytopoints SOP in Houdini but with a Box deformation added to it. Now I was able to copy the detail from the second Input into the gdp, but I find myself unable to access the newly added geo to actually offset it to the corresponding point in the first input. I want to add that I am a noobie when it comes to HDK (as you can probably see) and any help is much appreciated and thanks in advance. OP_ERROR SOP_copyPTs::cookMySop(OP_Context &context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context) >= UT_ERROR_ABORT) return error(); const GU_Detail *firstGDP = inputGeo(0, context); const GU_Detail *secondGDP = inputGeo(1, context); UT_AutoInterrupt progress("still copying..."); duplicateSource(0, context); GA_RWHandleV3 Phandle(gdp->findAttribute(GA_ATTRIB_POINT, "P")); GA_Offset firstPToff; GEO_CopyMethod copymethod = GEO_COPY_ADD; GA_FOR_ALL_PTOFF(firstGDP, firstPToff) { if (progress.wasInterrupted()) break; gdp->copy(*secondGDP, copymethod, true, false, GA_DATA_ID_CLONE); UT_Vector3 Pvalue = Phandle.get(firstPToff); } Phandle.bumpDataId(); return error(); } i got it to work! (propably a pretty bad way to do it but it works) (orientation is working as well now but its not in the code down below) I am still very interested how experienced users would have written it. :S GA_FOR_ALL_PTOFF(firstGDP, gridPoints) { if (progress.wasInterrupted()) break; GU_Detail *newgdp = new GU_Detail(); GA_RWHandleV3 newPhandle(newgdp->findAttribute(GA_ATTRIB_POINT, "P")); newgdp->copy(*secondGDP, copymethod, true, false, GA_DATA_ID_CLONE); GA_Offset spherePoint; UT_Vector3 pointPos = Phandle.get(gridPoints); GA_FOR_ALL_PTOFF(newgdp, spherePoint) { UT_Vector3 spherePos = newPhandle.get(spherePoint); UT_Vector3 addedPos = spherePos + pointPos; newPhandle.set(spherePoint, addedPos); } gdp->copy(*newgdp, copymethod, true, false, GA_DATA_ID_CLONE); }
  3. I am asking because of this text in documentation (https://www.sidefx.com/docs/hdk/_h_d_k__intro__compiling.html#HDK_Intro_Compiling_CustomAllocators):
  4. I was working on some custom json nodes. I wanted to export some data using json format, so I did that like as follow in cookMySop: UT_JSONValueMap *rootMap = new UT_JSONValueMap; UT_JSONValue *floatV = new UT_JSONValue(35.0); rootMap->append("Value1", floatV); rootValue->setMap(rootMap);//rootValue is an object of UT_JSONValue rootValue->saveToFile("G:\\test.json"); after that, I wanted to remove temp exporting data: rootValue->setNull(); delete rootMap; rootMap = nullptr; delete floatV; floatV = nullptr; however, using "delete" caused an error. without "delete" everything works fine, but I am afraid there can be some memory leakage. is there something wrong?
  5. I'm looking for documentation or an example of creating a SOP with the HDK that can be used in a compiled "for each" loop, as described here: https://www.sidefx.com/tutorials/houdini-16-masterclass-compiled-sops/ Thanks!
  6. Hi everyone Is it possible to store a sparse_matrix data structure across multiple time steps without reforming it at every time step ? I am writing a custom dop solver, so I would like to store it as subdata but I am not quite sure how to do it so any help would be greatly appreciated. I have not really been able to find any examples of this in the documentation ...
  7. Hello, I started learning hdk. I need to find a nearest point, what the best way to do this? I have an example code in attachments. But it doesn't work as expected. Thanks sandDunes.cpp sandDunes.h
  8. I can follow the code written in Tutorial and can be compiled. Parameter can be created. However, there is no way to create an attribute. mycircle.h #include <SOP\SOP_Circle.h> #include <OP/OP_Parameters.h> class SOP_MyCircle : public SOP_Circle { public: SOP_MyCircle(OP_Network *net, const char *, OP_Operator *op); static OP_Node *MyConstructor(OP_Network *net, const char *name, OP_Operator *op); static OP_TemplatePair *buildTemplatePair(); protected: OP_ERROR cookMySop(OP_Context &context); private: fpreal COLORX(fpreal t) { return evalFloat("color", 0, 0); } fpreal COLORY(fpreal t) { return evalFloat("color", 1, 0); } fpreal COLORZ(fpreal t) { return evalFloat("color", 2, 0); } }; mycircle.cpp #include <UT/UT_DSOVersion.h> #include <OP/OP_OperatorTable.h> #include <OP/OP_Operator.h> #include <OP/OP_Context.h> #include <OP/OP_Network.h> #include <SOP/SOP_Node.h> #include "mycircle.h" #include <stdio.h> static PRM_Name colorName("color", "Color"); static PRM_Default colorDefaults[] = { PRM_Default(1), //r PRM_Default(0), //g PRM_Default(2) //b }; static PRM_Template newParmsTemplates[] = { PRM_Template(PRM_RGB, 3, &colorName, colorDefaults), PRM_Template() }; OP_Node *SOP_MyCircle::MyConstructor(OP_Network *net, const char *name, OP_Operator *op) { return new SOP_MyCircle(net, name, op); } SOP_MyCircle::SOP_MyCircle(OP_Network *net, const char *name, OP_Operator *op):SOP_Circle(net, name, op) { } OP_TemplatePair *SOP_MyCircle::buildTemplatePair() { OP_TemplatePair *old, *my; my = new OP_TemplatePair(newParmsTemplates, 0); old = new OP_TemplatePair(SOP_Circle::myTemplateList, my); return old; } OP_ERROR SOP_MyCircle::cookMySop(OP_Context &context) { SOP_Circle::cookMySop(context); fpreal now = context.getTime(); fpreal clr_r = COLORX(now); fpreal clr_g = COLORY(now); fpreal clr_b = COLORZ(now); GA_Attribute *cd_attr = gdp->addFloatTuple(GA_ATTRIB_PRIMITIVE,"Cd",3); GA_RWHandleV3 h(cd_attr); GA_Offset off = 0; h.set(off, UT_Vector3(clr_r, clr_g, clr_b)); return error(); } void newSopOperator(OP_OperatorTable *table) { table->addOperator( new OP_Operator("myCircle", "myCircle", SOP_MyCircle::myConstructor, SOP_MyCircle::buildTemplatePair(), 0, 0) ); } mycircle.cpp
  9. Hi, Im here because I need some lights. Currently I created a simple Vex code to simulate gravity on a set of points using a solver node. https://youtu.be/1w-swIRCvjA It was very fun and easy to do it in VEX, but what I want to do is learn HDK so I don´t have idea how to do it in C++. I've researched a lot and founded writing DOPs could be an option, unfortunately the documentation about writing a simple DOP is not so clear. BW I googled to see if there is a simple example but it looks all the available codes are very old. I don´t know if some one may point me in the correct direction to do a simple solver and if writing a custom DOP is the correct way of do it. Thank you.
  10. If I have a face primitive, how do I find the faces which share an edge with the face? I don't seem to be able to find a function in GEO_HedgeInterface which will do this. And GU_Detail::buildRingZeroPrimitives appears to return all faces which share a point with the face in question, which is not what I need. In VEX, I've done this in a attribute wrangle which runs over primitives by calling primhedge(), which gives me a half-edge in the face, which I can then use to circulate around the face and query for edge neighbours. Any help immensely appreciated! ~Kevin
  11. Hi, I'm new to both houdini and HDK. Curretnly I'm trying to import some raw image into the houdini. There are no headers in those raw images and each pixel is a 4 byte floating point value. I've tried both plugin way just like what IMG_SAMPLE does and FBio table way but both of them failed. Neither the structure of plugin nor the structure of image loading program used in FBio table was well explained or companied with a good sample. I'm kind stucked, so can someone please help me with it in ways like explaining it in a little bit more detail or informing me any already existing plugin or tools I can use. Thx a lot! Cheers!
  12. Hi! I'm new to HDK and starting with some samples. I managed to make several samples such as SOP_Star.C work but failed to compile IMG sample which is a plugin used to add new file format support to houdini. I'm useing VC14 and Houdini 15.5.717 I'm compiling with nmake, Makefile and command line tool of Visual studio 2015. And whenever I try to compile IMG sample with command "nmake Makefile.nmake", it tells me " 'sesitag' is not recognized as an internal or external command, operable program or batch file. NMAKE: fatal error U1077: 'sesitag' : return code '0x1' " Any idea how to solve this out?
  13. Does anyone know whether or not a fisheye projection is possible to write for the viewport? I'm looking around on behalf of a friend, and I think it might be possible, from perusing the HDK, but can't tell for sure. If anyone knows whether this is possible or impossible, either way, it'd be great to know. Thanks!
  14. Ephere is a small company specializing in hair and fur software. We're looking for an experienced HDK developer and Houdini user to help us with writing and porting some of our tools inside Houdini. This is a remote contract offer and we are looking for a long term collaborator. If you want to participate in a fun project with some exciting and challenging work please contact me at marsel.khadiyev@ephere.com Marsel Khadiyev
  15. I am a beginner who studied HDK. I use VC14(visual studio 15), Houdini 15.5. I study many examples in SOP folder and etc... There are two questions. First, GA_PointGroup * mygroup; GEO_Point * ppt; GR_FOR_ALL_GPOINTS_NC(gdp, GEO_Point, pt) { mygroup->add(ppt->getNum()); } This Code should be fixed by reference HDK Documents(Geometry Porting Cookbook) http://www.sidefx.com/docs/hdk/_h_d_k__g_a__porting.html#HDK_GA_PortingCookbook_Simple_Name_Translation /* *Adding To A Group * *GB Code *group->add(prim->getNum()) *==> *GA Code *group->add(*prim); *group->addIndex(prim->getNum()); */ GA_PointGroup * mygroup; GEO_Point * ppt; GR_FOR_ALL_GPOINTS_NC(gdp, GEO_Point, pt) { mygroup->add(*ppt); mygroup->addInex(ppt->getNum()); } I changed like this. But mygroup->add(*ppt); still error... Is There any way? Second, I have one more question about GEO_PointList For the Documents, GB_ElementList GB had arrays of pointers to objects. As these objects no longer exist, code using element arrays should likely be re-written to be more efficient. The GA version of element lists return by value (not by reference). // GB Code GEO_PointList &pnts = gdp->points(); ==> // GA Code GEO_PointList pnts = gdp->points(); But there is no GEO_PointList.. I check it existed 13.0 not 15.0 I traverse 13.0 HDK Documents related GEO_PointList.. It's so difficult to find out the replacements. I search for Major Changes and HDK Forums, Documents. I cannot find. I want use points() function.. OTL
  16. In the SOP_Node.h header there are two helper functions that return an OP_ERROR: cookInputPointGroups() cookInputPrimitiveGroups() I need one for vertex groups and i'm not sure what i need to do to recreate the same behavoir as the other two. What do i need to do to make a cookInputVertexGroups() helper function? Cheers
  17. Mixed Mode Debugging

    Has anyone tried getting Mixed Mode debugging with Python Tools for Visual Studios to work? Houdini ships with 2.7.5 but it's compiled with msvc 14, which I must assume means SideFX compiles the binaries with likely significant source modifications. It seems like the only way Mixed Mode debugging between Python and C++ can work is if Houdini ships with the python symbols? Or am, as per usual, wrong?
  18. I have a few PRM_Templates I need to hide and unhide based on the tools ui. I can get the functionality I want using enableParm() and setVisibleState() with evalInt() in cookMySop. BUT that only works once the sop node has been cooked/connected. so if i drop down a newly created node all the PRM_Templates are showing, how do i set them to hidden initially? Also would I need to use updateParmsAndSpareParmsFlags()? Not sure when I would need to call that function Cheers
  19. Hi all, I'm trying to dabble in a bit of HDK programming, however I can't seem to get off the ground: I have an HDK 15.5.564 installation and Visual Studio 2015 (VC14 Update 3). Upon loading up the command line tools and running 'hcustom -s geoisosurface.C' a window pops up telling me that hcustom.exe has stopped working. I use Visual Studio to debug and see if I can get a better idea of what the error is and it yields the following message: Unhandled exception at 0x00007FFAE44373F3 (ntdll.dll) in hcustom.exe: 0xC0000374: A heap has been corrupted (parameters: 0x00007FFAE448F6B0). Anyone else encounter this problem? Is there a step in the process that I'm missing here? Any help would be appreciated. Cheers!
  20. The most powerful wrangle operator due to the sheer fire power of the HDK. Performance increase can vary from a few times to thousands of times depending on the scenario.
  21. Greeble plugin for Houdini

    Hi guys, here is a new plugin for you: Hreeble https://www.youtube.com/watch?v=2hQzy26cGaw Finally we can build a Star Wars ships with a few mouse clicks! Source code and complied version for Houdini 15.0.347(Windows and OSX) available here: UPDATE: Update a video with some new features. Cheers, Alex.
  22. ROP Subnetwork Node

    I'm trying to create a custom ROP_Node implementation that works like a subnet. I want the user to be able to dive into the node and add a select set of stock ROP nodes. The node will expose a couple of simple parameters. I've subclassed ROP_Node and overridden isNetwork to return 1. I've also created a custom OP_OperatorFilter to expose only the nodes I want allowed internally in the node. This allows me to create the node in houdini and dive into it, but I'm unable to add any nodes inside. I get permission errors whenever trying to do this. I've tried changing the flag when adding the node to operator table in newDriverOperator(). I've tried OP_FLAG_NETWORK, OP_FLAG_GENERATOR and a combination of & and | those two together. The permission issue doesn't go away. Is creating a subnet-like ROP node possible? I feel like I'm missing a subtle piece of implemenation. I've attached an image of the error I get. Thanks for the help.
  23. Advanced Houdini Programming Course

    Hi Houdini enthusiasts! , I'm very exciting to say that we are ready to start our course in english! Houdini Tool Development was very successful in Russian language, and we get a lot of requests from our foreign friends to make an english version.So here is a little demo i've recorded to show you what to expect from this amazing course https://www.youtube.com/watch?v=ITa33iMpePY&feature=youtu.be This course will be 4 month long and contains 16 video lectures. One lecture per week. Each lecture - 3-4 hours long. Each Monday, starting from 21 Sep. new lecture video will be uploaded and link will be shared with you. Skype Group will be created where you can ask questions any time on weekdays. Detailed program: here UPDATE: For those of you guys interested only in HDK part of this course, it is possible to apply only on that part. Just contact us via email and you'll be on board right away.
  24. Attributes compare

    Hey guys I have a simple enough problem i wanted to solve in HDK, and i managed to do it, however im sure there has to be a more elegant solution with enough knowledge of HDK classes. I wanted to do a simple sop that compares the same user chosen attribute from two different inputs, and either groups the difference as points group, or deletes points that have the same attrib value across both inputs. Basically i just have the same point cloud on both inputs, the second input has a timeshift node that looks up the previous frame. Its a simple enough exercise, however i have to ask if anyone knows if im reinventing the wheel, if the interface for doing stuff like this is more simple to use, or could give me some hints on how to do it better. Now the problem i came across was how would one define an array to hold values of an attribute of type we dont know in advance? Ive used a hacky solution where i would do the following in cookMySop() //get ptrs to our input geoconst GU_Detail *firstInput = inputGeo(0); const GU_Detail *secondInput = inputGeo(1); //find if attr exist in those geos, lookup is our string that holds the attr name user chose from the UI const GA_Attribute *fattr = firstInput->findAttribute(GA_ATTRIB_POINT, lookup); const GA_Attribute *sattr; //get our total numpts std::cout << "total num of pts (1): " << firstInput->getPointMap().indexSize() << std::endl; // std::cout << (GA_StorageClass)fattr->getStorageClass() << std::endl; //if we have hooked a second input, find attrs and get total numpts if(secondInput) { sattr = secondInput->findAttribute(GA_ATTRIB_POINT, lookup); std::cout << "total num of pts (2): " << secondInput->getPointMap().indexSize() << std::endl; } // If source attribute doesn't exist, error. if (!fattr || !sattr) { addError(SOP_ATTRIBUTE_INVALID, (const char *)lookup); return error(); } //define our arrays UT_ValArray<int32> ptNumListFirst; UT_ValArray<int32> ptNumListSecond; UT_ValArray<int32> ptNumListDiff; //only if our attr is not string shall we compare, have no idea how to figure out string yet if(fattr->getStorageClass() == GA_STORECLASS_INT) { std::cout << "Yes it is a numeric!" << std::endl; //feed our list of attr values in the array FIRST GEO gdp->getPointAttributeAsArray(fattr,gdp->getPointRange(), ptNumListFirst); //if we have connected the second geo if(secondInput) { //feed our list of attr values in the array SECOND GEO secondInput->getPointAttributeAsArray(fattr,secondInput->getPointRange(), ptNumListSecond); //compare our first and second input list and feed the diff in the third input //this is our class method compareUTArrays(ptNumListFirst, ptNumListSecond, ptNumListDiff); } } I actually dont allow the user to pick an attrib from the list thats not int or the node errors out, so basically im forcing the user to choose an int attr. Im sure there is a better way of doing this. Also i tried using the sortedIntersection() method of the UT_ValNumeric array type, however i could never get the difference to be calculated so i had to write my own implementation of the method (compareUTArrays()). Also in the end i use this approach to get the pts in an array that either needed to be grouped or deleted, im not entirely sure if its the "proper" way of doing things: //if we ticked new group, create a new group for pts if(newGrp || deletePts) { //create our new group GA_PointGroup *diffGrp; diffGrp = gdp->newPointGroup(grpName, false); //create a temp group we will delete later if we need to delete points GA_PointGroup *delGrp = gdp->newPointGroup("__tempDelGrp__", false); //get the handle to our int attribute //would prefer if i could somehow make the handle type recognize the attr data type GA_ROHandleI lookup_attr(fattr); int32 value; //iterate thru all points for(GA_Iterator it(gdp->getPointRange()); !it.atEnd(); ++it) { GA_Offset offset = *it; value = lookup_attr.get(offset); std::cout << value << " is value of pts attr" << std::endl; //iterate thru the array and if we have found same attr value add it to the group for(UT_ValArray<int32>::const_iterator itarr = ptNumListDiff.begin(); itarr != ptNumListDiff.end(); ++itarr) { if(value == *itarr) { diffGrp->addOffset(offset); continue; } } } //the diff between the first and second input is found in the diff array //however we need to delete everything thats not the diff, and that is the second inputs members translated into first for(GA_Iterator it(secondInput->getPointRange()); !it.atEnd(); ++it) { GA_Offset offset = *it; delGrp->addOffset(offset); } if(deletePts) { gdp->destroyPointOffsets(GA_Range(*delGrp)); gdp->destroyGroup(delGrp); } } Now i guess i can use the GA_Attribute.getStorageClass and a switch or if statement and initialize my arrays according to the type, but like i said somehow im sure there has to be a more intelligent way of doing this Also im a bit confused about the bumpDataId, what should i do in this case? If i just group my points and dont even modify the geo or attrib values, should i signal houdini to bumpDataId and whats the syntax for doing that? If i delete points however im sure i have to inform houdini that ive modified geo, which class or method should i use to do something like that? I hope all of this makes sense, let me know if it doesnt ill try and elaborate better Any help would be greatly appreciated Thanks Serge
  25. Houdini Tool Development

    Great news from School Online VFX! We are going to start English group on the program Houdini Tool Development. The first lesson is beginning on September 19th. This program will be useful for technical specialists, engaged in Pipeline construction, instruments creation, technology development, etc. We are waiting for houdini VFX artists, especially FX TD and all Houdini artists, who want to explore Python and improve the quality and productivity of their work. See details and videos: http://onlinevfx.ru/course-and-masters/142-houdini-tool-development-eng