Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

8 Neutral

About DASD

  • Rank

Personal Information

  • Name

Recent Profile Visitors

2,899 profile views
  1. I guess you mean you are looking for the points that are closest? I would check the nearpoint() function and run that per point and have the points in the target group on the second input of the wrangle. In a detail wrangle, you might try something with pcopen where you open the point cloud of targets and iterate over that.
  2. Normals Curve Flow

    I think it's in since H16 or so: https://www.sidefx.com/docs/houdini/vex/functions/primduv.html Is it possible to use this to get a direction along the curvature of a polygonal object and if so, can someone give an example (vex) code? Or am I thinking about this wrong?
  3. FBX pivot to unity

    It's not you, it's Unity. By default Unity uses centered pivot for gizmo position rather than the pivot baked into geometry. Long story short, your world-origin of an object will be the world-origin for that mesh in Unity, but you have to “Toggle Handle Position” from “Center” to “Pivot” in the editor, to use it. See https://docs.unity3d.com/Manual/PositioningGameObjects.html [docs.unity3d.com] “Gizmo handle position toggles”
  4. Thank you very much! So I am looking at something like this and trying to make sense of it: #define SUBD_BBOX(TYPE,VEC_SIZE) \ void subd_curve_bbox_general(const float t0; const float t1; const TYPE C0; const TYPE p0; const TYPE diff; const TYPE C1; TYPE boxmin; TYPE boxmax) \ { \ /* Start with endpoints */ \ TYPE v0 = subd_curve_evaluate_general(t0, C0, p0, diff, C1); \ boxmin = min(boxmin,v0); \ boxmax = max(boxmax,v0); \ TYPE v1 = subd_curve_evaluate_general(t1, C0, p0, diff, C1); \ boxmin = min(boxmin,v1); \ boxmax = max(boxmax,v1); \ for (int i = 0; i < VEC_SIZE; ++i) { \ subd_curve_bbox_between(t0, t1, C0[i], p0[i], diff[i], C1[i], boxmin[i], boxmax[i]); \ } \ } \ void subd_curve_bbox(const float t0; const float t1; const TYPE pn1; const TYPE p0; const TYPE p1; const TYPE p2; TYPE boxmin; TYPE boxmax) \ { \ TYPE diff = (p1-p0); /* Vector from p0 to p1 */ \ TYPE C0 = 0.5*(diff + (pn1-p0));/* Average of neighbours of p0, minus p0 */ \ TYPE C1 = 0.5*((p2-p1) - diff); /* Average of neighbours of p1, minus p1 */ \ subd_curve_bbox_general(t0, t1, C0, p0, diff, C1, boxmin, boxmax); \ } \ void subd_curve_bbox_first(const float t0; const float t1; const TYPE p0; const TYPE p1; const TYPE p2; TYPE boxmin; TYPE boxmax) \ { \ TYPE diff = (p1-p0); /* Vector from p0 to p1 */ \ TYPE C1 = 0.5*((p2-p1) - diff); /* Average of neighbours of p1, minus p1 */ \ subd_curve_bbox_general(t0, t1, (TYPE)0, p0, diff, C1, boxmin, boxmax); \ } \ void subd_curve_bbox_last(const float t0; const float t1; const TYPE pn1; const TYPE p0; const TYPE p1; TYPE boxmin; TYPE boxmax) \ { \ subd_curve_bbox_first(1-t1, 1-t0, p1, p0, pn1, boxmin, boxmax); \ } \ /*empty line at end of macro*/ SUBD_BBOX(vector2,2) SUBD_BBOX(vector,3) SUBD_BBOX(vector4,4) #undef SUBD_BBOX #define SUBD_BBOX(TYPE,VEC_SIZE) \ seems to define some kind of block named "SUBD_BBOX" the "\" at the end of each line seem to be part of the definition of that block - but I am not sure about what it does TYPE and VEC_SIZE are arbitrarily named variables/placeholders/whateverYouCallThose, which are substituted with the given permutations: SUBD_BBOX(vector2,2) SUBD_BBOX(vector,3) SUBD_BBOX(vector4,4) The block is then truly concluded with: #undef SUBD_BBOX Do I get this right? Another thing I would like to do is, to create variations where certain parameters are optional, because they have "default values". I guess I can do this with the -D Preprocessor option? Do you know where there might be an example for something like this? Is this even the right command?
  5. Hi, I making a small VEX code library and I was wondering if there are any good techniques to reduce the amount of code duplication. For example I have a function that works with or without inputs and with different variables. For simplified example: vector pointPos(const int pointid){ return point(0,"P",pointid); } vector pointPos(const int input; const int pointid){ return point(input,"P",pointid); } Could this be reduced to something like: vector pointPos(const int input = 0; const int pointid){ return point(input,"P",pointid); } Is there anything like auto type recognition, or decorators, or anything else (aside from structs) that has improved your vex code?
  6. Custom struct as attribute

    Thank you!
  7. Custom struct as attribute

    I have a custom struct in VEX (Houdini 16.5). It's nothing special, just a few simple values combined (no arrays). Is it possible to create an attribute out of a custom Struct in vex? Is it possible to do that for an array of custom structs? I guess it's something like: adddetailattrib(0,"name","myStruct"); adddetailattrib(0,"name","myStruct[]"); setdetailattrib(0,"name",myStructObject,"set"); These kinda seem to succeed in creating an attribute, but I don't seem to be able to add values to those. Also I would like to be able to use the @ syntax for quickly defining attributes for custom structs. (Something like: myStruct@myAttribute;) Is that possible? (Note that I can create variables, with code like: myStruct myVariable = myStruct(1,2,3); and myStruct myArrayVariable[]; But I specifically am interested in creating attributes on the geometry that would persist between wrangle nodes and especially be visible in the geometry spreadsheet.)
  8. - I cannot believe I missed that. Thank you very much!
  9. Hi, can somebody provide a quick example of functional vex wrangle code that uses the expandedgegroup() vex function? I expect something like: i[]@display = expandedgegroup("edgez"); But the issue is that the "edgez" group is a group of edges and there is no edge context in attribwrangle. I am guessing my syntax is wrong, or am I missing a preparation step of some sort?
  10. f1480187 thank you for the great file! I expanded on this topic in another thread: https://www.sidefx.com/forum/topic/43073/?page=1#post-231651
  11. Thanks symek ! That syntax seems to be more up to date. Thank you f1480187 ! I also found that out that the preferences of Sublime text can be tweaked with: "hot_exit": false, "remember_open_files": false, so that sublime does not save the tabs from the previous session. Now the only thing left to do is to find a way to bypass the Houdini Editor. Anybody know how to get that fixed?
  12. Houdini Exhelp (Sublime)

    Also relevant to this thread:
  13. Houdini Exhelp (Sublime)

    This is great! - As far as I understand, when VEX gets an update these files will go out of date. Have you considered making the creation process of these files into a tutorial?
  14. I am looking into installing VEX syntax and Exhelp for Sublime text and that is easy and nice, but I realized I don't know of a good way to actually connect Sublime text to Houdini. Copy pasteing the code between Sublime text and Houdini everytime I want to test something seems like a pain. It would be so inconvinient that I wonder whether Sublime Text would be worth the effort. So how do you use it? Is there a way to hook Houdini and Sublime Text up to each other for a direct connection?
  15. What is it that you are trying to achieve? A procedural facade? What workflow do you seek to achieve? You will need to use stamping on the copy sop to put different models on different points. Keep in mind you can create arbitrary attributes with the attribute create SOP/ VOPs and manipulate those with VOPs.