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


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • 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 81 results

  1. Hello, I am trying to start Learning Houdini HDK so i started by compiling the sample files. I managed to compile with hcustom, everything worked fine so i tried with cmake. generating the project worked but when i open the solution file in visual studio and i build i get a lot of errors saying impossible to initialize member "....". I'm on Windows 10 i use Houdini 17.5.425 and visual studio Community 15 2017 and cmake 3.18. Any ideas why i get all these errors ? should I upgrade to Houdini 18 ? I can work with hcustom for now because i'm just Learning but I would be very happy to undertand why it doesnt work. Thanks !
  2. ACM Transactions on Graphics "Generalized non-reflecting boundaries for fluid re-simulation" How do I build the HDK for this paper? website: http://alas.dk/publications/2016/GNRBfFRS/ Download HDK Source Code: http://pub.ist.ac.at/group_wojtan/projects/2016_Bojsen-Hansen_GNRBfFRS/2016_Bojsen-Hansen_GNRBfFRS.zip I tried halfway through with Visual Studio 2015 and it looked like I could build with Houdini 17.0, but I got so many errors with Houdini 18. I'm a beginner in programming, but I'm very interested in the HDK for this paper and would like to install it on Houdini. Thank you.
  3. Hello, I'd like to perform matrix multiplication between 2 of 3x3 matrices(not coefficient-wise) and outer product between 2 vectors using HDK. So I'd like to know if the * operator supports matrix multiplication and outer product of vectors as in the example code below. UT_Matrix3 A = ... UT_Matrix3 B = ... UT_Matrix3 C = A * B // matrix multiplication UT_Vector3 u = ... UT_Vector3 v = ... UT_Matrix3 X = u * v // outer product If not, is there a function/operator to do matrix multiplication and outer product? Thank you.
  4. hello everyone,i'm learning c++ and I'm new to Houdini HDK. I was reading another topic, someone told that you can use example files and manipulate them. so I have some questions for you: as you can see the header code and it's definition namespace HDK_Sample { /// Run a sin() wave through geometry by deforming points /// @see @ref HOM/SOP_HOMWave.C, SOP_HOMWave, SOP_CPPWave class SOP_PointWave : public SOP_Node { public: SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op); virtual ~SOP_PointWave(); static PRM_Template myTemplateList[]; static OP_Node *myConstructor(OP_Network*, const char *, OP_Operator *); /// This method is created so that it can be called by handles. It only /// cooks the input group of this SOP. The geometry in this group is /// the only geometry manipulated by this SOP. virtual OP_ERROR cookInputGroups(OP_Context &context, int alone = 0); protected: /// Method to cook geometry for the SOP virtual OP_ERROR cookMySop(OP_Context &context); private: void getGroups(UT_String &str){ evalString(str, "group", 0, 0); } fpreal AMP(fpreal t) { return evalFloat("amp", 0, t); } fpreal PHASE(fpreal t) { return evalFloat("phase", 0, t); } fpreal PERIOD(fpreal t) { return evalFloat("period", 0, t); } /// This is the group of geometry to be manipulated by this SOP and cooked /// by the method "cookInputGroups". const GA_PointGroup *myGroup; }; using namespace HDK_Sample; void newSopOperator(OP_OperatorTable *table) { table->addOperator(new OP_Operator( "hdk_pointwave", "Point Wave", SOP_PointWave::myConstructor, SOP_PointWave::myTemplateList, 1, 1, 0)); } static PRM_Name names[] = { PRM_Name("amp", "Amplitude"), PRM_Name("phase", "Phase"), PRM_Name("period", "Period"), }; PRM_Template SOP_PointWave::myTemplateList[] = { PRM_Template(PRM_STRING, 1, &PRMgroupName, 0, &SOP_Node::pointGroupMenu, 0, 0, SOP_Node::getGroupSelectButton( GA_GROUP_POINT)), PRM_Template(PRM_FLT_J, 1, &names[0], PRMoneDefaults, 0, &PRMscaleRange), PRM_Template(PRM_FLT_J, 1, &names[1], PRMzeroDefaults), PRM_Template(PRM_FLT_J, 1, &names[2], PRMoneDefaults), PRM_Template(), }; OP_Node * SOP_PointWave::myConstructor(OP_Network *net, const char *name, OP_Operator *op) { return new SOP_PointWave(net, name, op); } SOP_PointWave::SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op) : SOP_Node(net, name, op), myGroup(NULL) { mySopFlags.setManagesDataIDs(true); } SOP_PointWave::~SOP_PointWave() {} OP_ERROR SOP_PointWave::cookInputGroups(OP_Context &context, int alone) { return cookInputPointGroups( context, // This is needed for cooking the group parameter, and cooking the input if alone. myGroup, // The group (or NULL) is written to myGroup if not alone. alone, // This is true iff called outside of cookMySop to update handles. // true means the group will be for the input geometry. // false means the group will be for gdp (the working/output geometry). true, // (default) true means to set the selection to the group if not alone and the highlight flag is on. 0, // (default) Parameter index of the group field -1, // (default) Parameter index of the group type field (-1 since there isn't one) true, // (default) true means that a pointer to an existing group is okay; false means group is always new. false, // (default) false means new groups should be unordered; true means new groups should be ordered. true, // (default) true means that all new groups should be detached, so not owned by the detail; // false means that new point and primitive groups on gdp will be owned by gdp. 0 // (default) Index of the input whose geometry the group will be made for if alone. ); } OP_ERROR SOP_PointWave::cookMySop(OP_Context &context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context) >= UT_ERROR_ABORT) return error(); duplicatePointSource(0, context); fpreal t = context.getTime(); float phase = PHASE(t); float amp = AMP(t); float period = PERIOD(t); if (error() >= UT_ERROR_ABORT) return error(); if (cookInputGroups(context) >= UT_ERROR_ABORT) return error(); GA_Offset ptoff; GA_FOR_ALL_GROUP_PTOFF(gdp, myGroup, ptoff) { UT_Vector3 p = gdp->getPos3(ptoff); p.y() += SYSsin( (p.x() / period + phase) * M_PI * 2 ) * amp; gdp->setPos3(ptoff, p); } if (!myGroup || !myGroup->isEmpty()) gdp->getP()->bumpDataId(); return error(); } my first question is: we have this int header file : SOP_PointWave(OP_Network *net, const char *name, OP_Operator *op); where is it's definition in *.c file? ----------------------------------------------------------------------------------------------------------------------------------------- my second question is: void newSopOperator(OP_OperatorTable *table) { table->addOperator(new OP_Operator( "hdk_pointwave", "Point Wave", SOP_PointWave::myConstructor, SOP_PointWave::myTemplateList, 1, 1, 0)); } why this function is void? I know because it won't return anything, but why it shouldn't? why newSopOperator's parameter is a class (i know a class is custom data type) but why? and what is table in the parameter? ----------------------------------------------------------------- BEST REGARDS
  5. Hello, guys! For example, I have a button with a callback function and some float value: PRM_Template(PRM_CALLBACK, 1, &someBtnName, 0, 0, 0, &callbackFunc), PRM_Template(PRM_FLT, TOOL_PARM, 1, &someValueName, PRMzeroDefaults), ... int callbackFunc(void *data, int index, fpreal t, const PRM_Template *tplate) { ... } How to change value of a float control from the callbackFunc function?
  6. Hello, I'm working on a big project which uses 3rd party library and I get some strange results if I try to interrupt my nodes. At first i thought that I'm doing something wrong and UT_AutoInterrupt send to callback of this library is not working properly, so I took example node that comes with Houdini SOP_Flatten, removed almost all code from cookMySop() and tried to interrupt it. This is what I get: There should be only Warning set. But I do get additional Error. And I don't know from where it come from. This is the code I have in cookMySOp(): OP_ERROR SOP_Flatten::cookMySop(OP_Context &context) { OP_AutoLockInputs inputs(this); if (inputs.lock(context) >= UT_ERROR_ABORT) return error(); auto progress = UT_AutoInterrupt(""); for (auto i = 0; i < 10000; i++) { if (progress.wasInterrupted()) { this->addWarning(SOP_MESSAGE, "Test interrupted."); return error(); } std::cout << "YAY: " << i << "\n"; } return error(); } Anybody knows why I do get this additional Error state when interrupting the node? I'm on H18.0.348.
  7. Houdini HDK

    hello, nowadays I'm working on Houdini HDK I created a discord server to help each other this is the discord's link: https://discord.gg/RtNRscp and this is my blog:https://aminkhormaei1.wixsite.com/base i put solutions inside my blog. please share this post, maybe your friends are into developing a plugin for Houdini BEST REGARDS
  8. Hi, I want to start learning the hdk and by creating simple standalone application. I managed to get the example of the docs compiling and it is creating a sphere so everything is fine. For that, I was using a simple console application. But as soon as I add the Qt5 Core library so I can create my interface, it's not compiling anymore, if I don't include the library in my main file. Here is my error: undefined reference to `QApplication::setCustomDPIOverride(int)@Qt_5 This is in libHoudiniUI.so Does any of you have any idea of what can causes this? edit: For those of you who are interesteed, I managed to recently find the solution. I didn't have the exact same version of Qt as Houdini is using, and also there was some issues with cmake file
  9. I wrote an article that is probably only of interest for the .1% It is a crash introduction to HDK, C++ and the mesh laplacian. https://mbaadsgaard.com/portfolio/laplacian-eigenvector-plugin-for-houdini/ Feedback is, of course, also welcome
  10. Geodesics in Heat

    Hi everyone! I've made an illustration video-tutorial about the Heat Method application to point clouds by Keenan Crane et al, Yang Liu et al and others.
  11. So I'm still building some microsolver nodes for water simulation. I noticed that all the microsolver I made including the Gas Add from the HDK sample all have a grey input point on the left. All built-in in gas node do not. Seems like this doesn't effect the execution result but I'm still curious how do I make a node that looks exactly like the built-in ones. And also, enable bypass on these nodes doesn't seem to work. Do I need to manually skip in solveGasSubclass()?
  12. I'm learning HDK and fluid sim by swapping out microsolver nodes in Houdini's built in FLIP solver. I've successfully changed the GasExternalForce node to my simple gravity node. It works okay but there's a small problem that bugs me a lot. So here's the implementation in the built in solver: There's a gravity node in the Auto DOP network (looks like the order doesn't really matter. I tried putting the gravity node before the flipsover and nothing changed.) And then in the flipsolver there's a GasExternalForces microsolver that apply forces on the particles. I deleted the gravity node and changed the GasExternalForces node to my implementation: bool SIM_HZExternalForce::solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep) { SIM_Geometry* geo = (SIM_Geometry*)obj->getGeometry(); if (!geo) { return false; } GU_DetailHandle gdh = geo->getOwnGeometry(); const GU_Detail* gdp_in = gdh.readLock(); // Must unlock later GU_Detail* gdp_out = gdh.writeLock(); GA_RWAttributeRef p_ref_vel = gdp_out->findPointAttribute("v"); GA_RWHandleT<UT_Vector3F> p_vel(p_ref_vel.getAttribute()); if (p_vel.isInvalid()) { return false; } for (GA_Iterator it(gdp_out->getPointRange()); !it.atEnd(); it.advance()){ int pid = it.getOffset(); UT_Vector3F vel = p_vel.get(pid); vel[1] -= timestep * 9.80665f; p_vel.set(pid, vel); } gdh.unlock(gdp_out); gdh.unlock(gdp_in); // Successful cook return true; } The problem is, the velocities in the first frame are all zero in the official implementation: But in my implementation, the velocities got changed in the first frame: I really want to know where this discrepancy comes from. Any suggestions? I've uploaded the source code and scene file if anyone is interested. GravityTest.zip
  13. I'm trying to work on a VDB SOP but I'm having problems compiling. I'm windows with Houdini 16.5 and I'm getting "unresolved externals". Along with the usual inclusions I have: #include <GU/GU_PrimVDB.h> #include <openvdb/openvdb.h> #include <openvdb/Grid.h> I'm compiling with cmake which looks like this cmake_minimum_required( VERSION 3.6 ) project( HDK_VolumeDeform ) list( APPEND CMAKE_PREFIX_PATH "$ENV{HFS}/toolkit/cmake" ) find_package( Houdini REQUIRED ) set( library_name SOP_VolumeDeform ) add_library( ${library_name} SHARED SOP_Volume_Deform.C SOP_Volume_Deform.h ) target_link_libraries( ${library_name} Houdini) SET(COMPILE_FLAGS "-TP -std=c++11 -DOPENVDB_3_ABI_COMPATIBLE") add_definitions(${COMPILE_FLAGS}) SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}") target_include_directories( ${library_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ) houdini_configure_target( ${library_name} ) Strangely enough, the program does compile if I don't try use iterators, though I'm sure there is a lot that would break it. I've also tried with Hcustom, but running with that yields the same problems. Does anyone have any suggestions? Thank you very much!
  14. I need to have context for some calculations inside newContextData method of COP2_Node class. Is it safe to call getContext from inside this method?
  15. I need to know the size of the COP2 node for some input node. I can get a sequence info (TIL_Sequence) by calling getSequenceInfo member function of COP2_Node class. But it has only resolution info (getRes function), which is a visible size of the image, not an actual size.
  16. Hi guys, I need to make a login GUI in Houdini so that users can input their usename and password to log into our internal server to download assets for editing. The username control is easy but the password one is hard in that it needs to mask the input, e.g. with ‘*’. Is there any way to make this happen? Thanks for any inputs! I'm working on Houdini 16.5 and our plugin needs to know the login status, so it's better that the suggested way can communicate the status between C++ code. Thanks, Quan
  17. Hi everyone. I encountered a few problems compiling HDK assets for Houdini 17 using cmake. Houdini seems unable to detect the assets even though they build just fine without error. I use the community edition of visual studio 2015 update 3, and as far as I can tell, this is the correct version for Houdini 17 ?? When I try a simple SOP_Star example with Hcustom it does not work either as I get the error: Failed to run C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\Hostx86\x64\cl with error 2: The system cannot find the file specified. This path does not seems to exist but when I use cmake it targets this dir: This path exists in Visual studio 2017 but not in 2015. However, when I try with cmake, it finds the compiler here: CProgram Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe And creates the solution just fine. When I build the solution however, it does not show up in Houdini... I have been using a similar procedure to compile assets with cmake for earlier versions of Houdini with no issues. Reading thourgh the HDK docs for comiling with cmake, they suggest parsing the argument "Visual Studio 14 2017 Win64" Does this version even exist ? I have not been able to locate it... I have tried to compile with VS 2017 as well without luck. So do anyone know what the problem might be ?
  18. 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_
  19. 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); }
  20. 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):
  21. 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?
  22. 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!
  23. 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 ...
  24. 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
  25. 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
×