Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Gorrod last won the day on July 30 2017

Gorrod had the most liked content!

Community Reputation

38 Excellent

1 Follower

About Gorrod

  • Rank

Personal Information

  • Name
  • Location

Recent Profile Visitors

1,633 profile views
  1. POP attribute from VOLUME

    You are trying to transfer the volumes point attribute "Cd" to the points. If you apply a color to a volume with a color SOP it changes the Cd point or prim attribute which changes the visualization in the viewport, not the voxel data. Attribute from volume samples the voxel data at the specified position. Attached is a file which creates a 3 float Cd volume with some noise and then copies these values to the Cd attribute on the points: attrib_from_volume.hipnc
  2. Toggle on "Generate from Attribute" and create an attribute that ranges from 0.5 to 1. Where 0.5 will create 10 points and 1 will create 20.
  3. setdetailattrib "min" issue

    I wouldn't call it a bug as "min" and "max" modes are comparing your @noise values to 0.0 since neither min nor max detail attributes have been created yet and it needs some value to compare it to. For example if your @noise values are below 0.0, your min detailattrib will have the correct negative value. If all your values are below 0 you will have the same problem with the "max" mode.
  4. Working with primintrinsics in VEX

    I don't know why it doesnt work but you could just write the intrinsic to a string/int attribute before and then use the uniquevals function after. That's probably still more convenient and faster than using python. Also typename is a string, so declaring your foo array as an int would, if the function would work with intrinsics, result in an array with a bunch of -1s I think.
  5. Have you maybe tried setting every piece to the same size before copying them onto the points and scaling them. (e.g. setting the trace nodes "Scale To Size" parameter) as well as centering every piece to the origin? As I said before I can't open your file because of some gamedev tool that isn't loading or something, so I can't be of much help here.
  6. attribute transfer if attributes don't match

    Take a look at the nearpoint or nearpoints functions, these will do exactly what you want to I assume. Just write something like this into a pointwrangle int npt = nearpoint(0, "@id!="+itoa(@id), @P, chf("maxDist")); if(npt != -1 && @id > point(0, "id", npt)) { removepoint(0, @ptnum); } nearpoint.hipnc
  7. Declaring your function as an int doesn't work. Either write: int hasRes = teximport(s@imgFile, "texture:resolution", v@scale); or leave out the return value variable: teximport(s@imgFile, "texture:resolution", v@scale); As for Hscript vs Python vs Vex, there are numerous explanations already online. This is just how I see it: The short version is "HScript is Houdini's legacy scripting language." Which you can mostly use like you would with python for importing, renaming files and so on. That's pretty oldschool though, so as given in the documentation, you should rather use python for that now. However Hscript is the go to to use as expression functions for changing parameter values on nodes, like I do with the trace SOPs "file" parameter here. You could also do that in python, but it's a bit more cumbersome. Vex works a bit different and is mostly only used for editing geometry and geometry attributes as well as in shaders, cops and chops. For the geometry editing you could also use python, it would just be way slower since it is python and by default only single threaded. You can not use vex to change any parameters of nodes.
  8. Well you already know what to do. Just move/offset the pivot or point position of the point you're copying to and set the scale attribute. You can do that before copying your traced images, take a look at the instance attributes which will get picked up by the copytopoints sop. If you choose to use teximport vex function, you don't need to put it inside the for loop since it runs over all points anyway. Both python and vex have the same result, teximport, in my case, is just way faster.
  9. Hi, I'm not 100% certain I understand you correctly and this might be too obvious. You basicly just want to trace a bunch of images, copy those to point positions and apply attributes given by your json file. Since I don't have your json file and your hipfile crashes for me, here is a dummy scene with your pictures traced and assembled. Maybe this helps? assemblePic.zip
  10. Select node with Python

    You can set handles and the default state of your hda inside the type properties. So I would not try and select the node inside the hda at all, but rather promote the parameters and set the default state to stroke. Also take a look at the drawCurves SOP which is nothing else than just a HDA built around the stroke SOP. There has already been a nice explanation of this here: I hope this helps if you haven't found a solution by now anyway.
  11. Correct Normals but dark poly?

    The normals of the points are "fixed" but the actual normals of the primitives are not, this depends on the order of the vertices the primtive is build of. You could probably find a way to always order them in the right way in the first place but if you just want to fix them, here are a few options out of probably a lot more I can't think of with rebuilding them in vex included so it's easy to understand: Divide.hipnc

    I don't know much about how to control vellum correctly but I had a look at your file and it seems like the "pressure" type constraint is per piece, so there is only a single primtive for your entire sphere. You can't control the pressure on a per point basis. You would rather have to do the exact opposite and increase the restlength of every other constraint that is not pressure and increase the pressure at the same time to have an uneven amount of bloating. This might not be the ideal way of doing this but it might be what you're after: VELLUM_INFLATE_TEST_04.hipnc
  13. Grouping nearby points with VEX

    The biggest issue here I think is that wrangle nodes and for loops in wrangles do not have feedback. So if you change a group or attribute on a point in a point wrangle, another point being processed by that same pointwrangle can not read the result of any other iteration by that wrangle. Generally SOP nodes process their incoming geometry only. To circumvent that, you could either do a foreach loop with feedback and iterate over every point and create your groups like that or use a detail wrangle with a while loop and write everything you want to change and access at the same time into arrays and not attributes. My solution for your file would look like this, using a detailwrangle: int idx = 0; int pts[] = expandpointgroup(0, ""); int isGrouped[] = array(); foreach(int pt; pts) append(isGrouped, 0); int groupIdx = 0; while(idx < (len(pts))) { int pt = pts[idx]; if(!isGrouped[idx]) { foreach(int npt; nearpoints(0, point(0, "P", pt), chf("maxDist"))) { setpointgroup(0, "_"+itoa(groupIdx), npt, 1, "set"); isGrouped[npt] = 1; } groupIdx++; } idx++; } Group_points_with_Vex_ben.hipnc
  14. I guess i found a way to make it work by extracting the translation and then applying it to the matrix again. Doesn't change the fact that I have no clue why it doesn't work in the first place though. invertMatrixTransform_v02.hipnc
  15. Hi, I want to transform a volume by multiplying it's transform primintrinsic with a matrix. Works just fine until I try it with an inverted matrix. At seemingly random translation values the transform primintrinsic gets set to the identitiy matrix. I also noticed that at the same translation values the inverted matrix has some weird floats where it should just be 0. Am I missing something here on how to apply the inverted matrix properly, or what's going on with the invert()? invertMatrixTransform.hipnc