Jump to content

Gorrod

Members
  • Content count

    40
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    1

Gorrod last won the day on July 30 2017

Gorrod had the most liked content!

Community Reputation

37 Excellent

1 Follower

About Gorrod

  • Rank
    Peon

Personal Information

  • Name
    Ben
  • Location
    Stuttgart

Recent Profile Visitors

1,462 profile views
  1. 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.
  2. 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
  3. 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.
  4. 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.
  5. 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
  6. 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.
  7. 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
  8. VELLUM PRESSURE

    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
  9. 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
  10. 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
  11. 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
  12. You have not plugged in your @P attribute into the pcopen. Fix that and you're good to go. The VOPSOP might bind the position automatically if not done manually.
  13. I don't know if this is all you are asking for but just multiply your displacement with some values you get from attributes or geometry? Here's a file of what im thinking of: mask shader with geo.hip
  14. You can also use the "op:" expression (e.g. op:`opfullpath("../../yourVolume/OUT")` ) in the filename to direct to a sop, so you don't have to save your volumes/vdbs to disk first.
  15. distance fading in pyro

    Transform the surface position you read with the global variables vop to world space or use the rest pos vop and it works. multiply distance in shader.hipnc
×