Jump to content

Deoxygenated hdk documentation


Recommended Posts

I don't think it's available for a long time now, not to mention it wouldn't be much of help considering changes in HDK happened in recent years.  Current HDK documentation (in doxygen format) both as an online pages and downloadable are on SideFX site: https://www.sidefx.com/docs

Also note probably little outdated $HFS/toolkit/slides/HDK12_Intro.pdf which covers a lot about Houdini's general concepts.

I presume  you're still struggling with HDK, but as long as you won't ask specific questions ("how to do x thing"), no one really can help you.

 

 

 

 

Link to comment
Share on other sites

Okay I know you are right but Isn't it silly to ask about the exact way to define a paramater?? I read a kot of ways but I don't understand what is prm_list and how we put paramaters there...

Also I don't understand the mechanism of working with geometry , I don't understand what is gu_detail ... Is it a class having the geometry information? How do we then add attributes to it??

 

I feel that I am a little stupid (too stupid) so i don't ask these questions.

Link to comment
Share on other sites

There is no stupid questions as long as you are not asking about things written on first page of the manual...

On the other hand these questions have their answers on docs site and pdf I mentioned earlier (have you read it?). Pretty much every example of SOPs have parameters and deals with geometry. Yes, Houdini's parameters interface is a little nightmare, but even with copy/paste approach you can do most. 

// An array of names and labales used in GUI.
static PRM_Name names[] = {
    PRM_Name("my_float",   "My Float Parameter"),
    PRM_Name("my_int",  "My Int Parameter"),
};

// PRM_Template has many, many variants accomodeted to different scenarios. These two are the simplest cases. 
PRM_Template
SOP_MySuperPlugin::myTemplateList[] = {
    PRM_Template(PRM_FLT, 1, &names[0], PRMoneDefaults, 0, &PRMscaleRange),
    PRM_Template(PRM_INT, 1, &names[1], PRMzeroDefaults),
    PRM_Template(),
};

 

Quote

, I don't understand what is gu_detail ... Is it a class having the geometry information? 

Yes, in fact it is Houdini's geometry container. Read its header carefully as you will be working with it a lot. 

Quote

 How do we then add attributes to it??

You should read at least this: https://www.sidefx.com/docs/hdk/_h_d_k__geometry.html

// create geoemtry container 
// (any geometry supported by Houdini can be stored here)
GU_Detail gdp;
// create 100 points inside.
gdp.appendPointBlock(100); 
// create point atribute, called 'N', with length 3. 
GA_Attribute * na = gdp.addFloatTuple(GA_ATTRIB_POINT, "N", 3)
// handler simplifies access to attribute per point. You almost never should use row attribute like above.
GA_RWHandleV3 normal_h(na); 
// offset we will use to access specific point
GA_Offset ptoff;
GA_FOR_ALL_PTOFF(&gdp, ptoff) { // handy macro simplifying iteration over points
 	auto pos = UT_Vector3{static_cast<float>(ptoff),0,0}; // lets create some positions, UT_Vector3 holds most vectors like pos/normals, colors etc. 
  	gdp.setPos3(ptoff, pos); // handly shortcut for setting points' position. You could also set position the same way we set normals bellow. 
  	normal_h.set(ptoff, UT_Vector3{0,1,0});
}

Did you read and compile any examples? All of above is from examples...

Link to comment
Share on other sites

15 hours ago, mranosa said:

A lot of times I don't understand c++ syntax though my knowledge in the language is not bad

Don't take it in a wrong way, but I smell contradiction (not that I don't like contradictions in general).

Paste in a line you don't understand as an example, and we will see what's wrong with it. Perhaps those people from SideFX do it all wrong? :) 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...