Jump to content

Search the Community

Showing results for tags 'array'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering
    • Compositing
    • Games
  • 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 12 results

  1. Creating a force array in vex

    Hi all, I am struggling to write a force array per particle, i have an float array per particle named "upforce" and i want to use this array as my "y" force. Any tips? Thanks
  2. Read point array attribute from detail wrangle

    I am in a detail wrangle and want to read the first component of a point array attribute. Unfortunately neither point() nor attrib() seem to offer this. I couldnt find suitable array functions, either. int npts = npoints(0); i[]@prim_list[npts]; for(int i = 0; i < npts; i++){ @prim_list[i] = point(0, "sourceprim", i).[0]; // try to access first component }
  3. VEX array of structs

    Hello, I'm a newbie with vex and I'm trying to create an array of structs. In my wrangle node I defined the struct in the outer code section as suggested here my struct looks like this: struct node { int pt; int nbrs[ ]; } In my code I later declare node nd; node array[ ]; I manage to initialise the nd variable normally. Then I tried the following int pt = nd.pt; //works fine int nbrs[] = nd.nbrs; //works fine array[0] = nd; //seems to work fine pt = array[0].pt; //nope nd = array[0]; //nope By doesn't work I mean that the node turns red saying the following Error The sub-network output operator failed to cook: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1 Warning: Errors or warnings encountered during VEX compile: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1). Errors or warnings encountered during VEX compile: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1). Error: Vex error: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1) Failed to resolve VEX code op:/obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1 Unable to load shader 'op:/obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1'. Warning Errors or warnings encountered during VEX compile: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1). Warning Errors or warnings encountered during VEX compile: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1). Warning Vex error: /obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1: Internal compiler error. (15,1) Failed to resolve VEX code op:/obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1 Unable to load shader 'op:/obj/new_version/tree/growing_alg/find_neighbour/outer_code/attribvop1' Any ideas? Thank you Marta
  4. Hello! First time poster (also posted on sidefx forums) ~ I have a wrangle set after an assemble sop and am currently having success with: string shatter_points = chs('Pieces_to_Break'); if(@name != shatter_points) removepoint(0,@ptnum); Where Pieces_to_Break can contain one name. Effectively this deletes all but the named packed primitive. I'd like to amend this so that I can enter an array of pieces to “keep”. Any thoughts? Thanks in advance!!
  5. Hello! First time poster (also posted on sidefx forums) ~ I have a wrangle set after an assemble sop and am currently having success with: string shatter_points = chs('Pieces_to_Break'); if(@name != shatter_points) removepoint(0,@ptnum); Where Pieces_to_Break can contain one name. Effectively this deletes all but the named packed primitive. I'd like to amend this so that I can enter an array of pieces to “keep”. Any thoughts? Thanks in advance!!
  6. VEX supports array function?

    Hi, this is my first post here. I've been trying to call a vector array function in VEX, but it either returned "Internal Compiler Error" or "Syntax error, unexpected identifier, expecting ';'". I also checked Array help file and the example as below didn't work at all: To specify a literal array, use curly braces, with the array members separated by commas: vector[] rgb_array() { return { {1, , }, {, 1, }, {, , 1} }; } Here is the simple code I tried to compile, but it returned an error message "Syntax error, unexpected identifier, expecting ';'." vector an_array[] = {{1,1,1}, {2,2,2}}; vector a[]; vector[] testFunction(vector[] a){ return a; } a=testFunction[an_array]; Does anyone know if VEX supports array function? Thank you very much!
  7. Hello, Trying to read a vector array from another point at a certain index. From my understanding of Houdini something like this should work. vector tempArray[] = point(0,"vectorArrayAttrib",pointToReadFrom); vector v = tempArray[index]; Unfortunately this method is returning an empty array from the point() function. If this is not the right way to go about doing this please let me know. Any help welcomed. Thanks.
  8. Hello,I'm attempting to create the slitscan/timeshift effect. I'm creating a vector array in a for loop, each loop has an attrib from map and a wrangle that appends Cd to a vector array. It works when the attrib from map is always reading from the same file. When I change the attrib from map file read expression to anything that has to do with $F or the meta nodes iteration Houdini crashes. I have a test scene that has documentation and even nodes setup to create test frames to work with.If it is a matter of the way that multiple files cannot be read at once please let me know. If someone knows of a better way to read from multiple files at once and/or achieve this effect please let me know. I'm aware that after effects has this effect and uses gradients to determine which frame to look up color from. While that method is great, I'd like to be able to write the gradients/lookups in vex to achieve results. Any help greatly appreciated. -T concept_025_slitScan_v001.hiplc
  9. Hi I need an array wich stores a range of numbers, starting at zero and ending at @numpt (total amount of points in a geometry). Is there a fast way to do this apart from filling the array in a for loop? Thanks
  10. Ok, I have many objects separated into point groups by unique suffixes. I'd like to split the suffix integer value from the array of group names. Then assign that integer to a custom attribute. I'm terrible at VEX so any suggestions would be greatly appreciated.
  11. Access array attribute wrangle

    Hey, I have a bunch of points with 3 float attributes, b[0] b[1], b[2] If I want to access only the second attribute, specifically through a wrangle (for learning), how would I do this? I've tried @foo = point(@p,"b",1) but that only returns the first attribute value. Presumably because I'm not asking for an array? Thanks!
  12. A VOP performs a pointcloud lookup and uses while loop in oder to take advandage of the pcimport node to get distance,ptnum ,P etc. How can I store the result of each loop in a while node in vops? Each loop gives me a point but I only get the last point out of the node( although I have set max number of points to a number higher than one.. ) Maybe somehow push/append them into an array so I can call the later on? If that is the way, arrays in vops need inline code (afaik..) and I haven't managed to figure i out... One of my goals is to draw multiple lines that connect the look up point with a number of points on the pointcloud(= max number of points) without puting the VOP and the Foreach node into another ForEach node out side the vop (because it is not fast). I hope all this makes sense ......thanks ps. play a bit with the slider of "max number of points". Slide it from 1 to 4 and you'll see the line jumbing to the next point. I want to be able to store these points without movin the slider.. Push in array.hip
×