Jump to content

Search the Community

Showing results for tags 'array'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Lounge/General chat
    • Education
    • Jobs
    • Marketplace
  • Houdini
    • General Houdini Questions
    • Effects
    • Modeling
    • Animation & Rigging
    • Lighting & Rendering + Solaris!
    • Compositing
    • Games
    • Tools (HDA's etc.)
  • 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

Product Groups

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Name


Location


Interests

  1. Hi guys, I have a group of points (called "Indomain" group) and I would like to append all of them to an array. Here is my VEX codes but it doesn't work. I also need to create a ramp from the minimum @ptnum (point number) to the maximum @ptnum in that group. Thanks for helping. Array.hip
  2. Hello, I need help to connect points with a single line without crossing it, the points are out of order so it does not work to use the Add node. I am trying to use For Each and arrays in VEX but nothing works for me. I have a "start" and "end" group with the correct points, I need to iterate from point 0 looking for the nearest point and add a polygon, I have tried everything but nothing works. I attached a test scene. Any help will be welcome Thanks!! PtsToLine.hiplc
  3. I created a python SOP_Node, there's a class inside that with a list class member, I want to create an array attribute for the node and put that list on the array attribute. I studied all the method that exists for creating attribute but I couldn't figure that out. Please help me. BEST REGARDS.
  4. Hello ODFORCE community! First time around here and I hope you can help me with a rather simple(?) case of referencing an attribute to a node. So my situation is the following: I'm trying to feed a number of pre-made curves (from Illustrator) into a File node. In order to do so, I thought I could build a string array in an attribute (detail) wrangle, with the paths to the .ai files, and then extract each file path by feeding a chi() to select each array item. So far so good. What I've noticed is that File nodes don't store data. Is that correct? I connected the attrib wrangle and I couldn't see any attributes (I tested on other node in case was a coding mistake, but they worked fine). So... that's when I land in this question of how to import data in the file path of a File node (Geometry File is the name). I attach 3 snapshots. One with the mentioned nodes,a second one with the array (I've only included one file path xD, just testing) and a last one with the error showed in the File node. I tried adding the "`" "to_feed" is the attribute wrangle "ref_string" the attribute "0" as... I'm retriving the the index = 0 of the array? That one I don't have it clear Anyways, doesn't work : / Is there a way to make it work? Can I retrieve a non-connected attribute into a File node geo path? Alternatives? Thanks in advance!
  5. Helloo ! I can't understand why I can't put my "list[c]" in my vector variable here is my script in attribut wrangle: float list[]; vector distanceListDetail[]; list= {1,2,3,4,5}; distanceListDetail = {{1,1,22},{2,3,1},{1,2,3},{3,2,1},{0,1,0}}; for (int c = 0; c < len(list); c++) { printf("%f\n", list[c]); vector test = { 0,list[c], 0}; push(distanceListDetail, test); } the problem is here it gives me an error and I can't understand why even by setting the value by hand it works if someone can help me : vector test = { 0,list[c], 0}; thanks for your help Killian
  6. Hi ! Just like in the title, I need to find all the nearests primitives from a point and put them into an array ! I tried with the "xyzdist" fuction and other techniques but still doesn't work :"/ Do you guys have an idea on how to solve this ? Thank you all !
  7. Hello guys, I created an array in a point wrangle, then I tried to call its value in the next wrangle, but it fails! How can I fix it? Thanks for helping.
  8. Hi folks, I'm having a bit of trouble with exporting an array of integers to alembic. When i create an array on the geometry and export it to alembic and import it back into Houdini again, the array is changed to an integer with the value of 0. Even if I fill in the attribute name in the ropAlembic node at the `detail array attributes`, it's converted to an integer again. Is this something alembic can't handle or am I doing something wrong? I'm totally confused right now! Hopefully somebody can help? Thnx!
  9. Hello. I have an array attribute and I need to figure out min values among all first, second, third, etc elements of arrays. If I were about to know the exact length of array (let's say 3) I would do this... iterate insider forloop "distances" append values to three new arrays and find min values with min function. min(distancesone[0]), min(distancestwo[1]), min(distancesthree[2])...... My problem is that I don't know the exact number of array and min() is useless as long as I can't manually create arrays of specific number elements. So the question is how can I figure put the min value among distances[0] elements, then [1], [2] and so on... Thank you.
  10. is there any guide to work with array nodes in VOP? I used for loop to do the job but the result was odd
  11. I got an array of point numbers int searchPts[] = [0, 1, 2, 3] that I want to pass into the pcfind function as a ptgroup so it only operates on those points. How do I convert this to a string of "0 1 2 3"? Is this how I should even approach it? pcfind(<geometry>geometry, string ptgroup, string Pchannel, vector P, float radius, int maxpoints) Thanks!
  12. i@iterations = len(chs("../NETWORK_CONTROLLER/c2p_querstrbn")); s@myArray = chs("../NETWORK_CONTROLLER/c2p_querstrbn"); i[]@myintArray = {}; s[]@mystrArray = {}; //remove spaces from string array, get len() of string array if (i@iterations >2) { i@iterations += 1; i@iterations /= 2; } //create arrays from preselection int i; for(i=0; i < i@iterations*2; i++) { i@stringtointeger = atoi(s@myArray[i]); append(i@myintArray, i@stringtointeger); } // remove spaces from int Array i[]@cleanArray = i@myintArray[0::2]; // convert back to string to read in with copy to points target points later for(i=0; i < i@iterations; i++) { s@integertostring = itoa(s@mystrArray[i]); append(i@mystrArray, s@integertostring); } hey all, vex noob here. I am trying to append values from an integer array to a string array. looping over array entries with atoi works fine to extract the strings and append them to an int array. but the other way around using itoa gives me this error: Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Error in VOP 'snippet1'. Warning: Errors or warnings encountered during VEX compile: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53). Error: Vex error: /obj/geo1/pointwrangle4/attribvop1/snippet1: Call to undefined array index operator 'int string[][int]'. (33,53) i'll try to sum up the context quickly: I have a controller node where I can enter the points I want to copy objects to. now when I copy to point 0 1 2 3, another copy node should copy other objects to points 4 5 6 7. when I enter 0 1 2, the other copy should go to 3 4 5 etc.
  13. Hi all, Noob question... I want to read the 3 components of a specific vector that belongs to a vector array as shown in attached screenshot I don't know where and in which format I have to put the point index and vector index. someone know how to do that ? thank you Alex
  14. 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!
  15. Hi, In Python, we can create a "quick array" with conditions in a single line: a1 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] a2 = [0, 2, 4, 6, 8] a3 = [i for i in a1 if i not in a2] >>>> a3 == [1, 3, 5, 7, 9] In vex, I know how to do it the long way: int a1[] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; int a2[] = [0, 2, 4, 6, 8]; int a3; foreach( int i; a1 ){ if( find(a2, i) >= 0 ){ append(a3, i); } } >>>> a3 == [1, 3, 5, 7, 9] Is there a faster way to do this kind of things, maybe like in Python? Thanks!
  16. Hi guys, Im a little stumped on a vex issue im having whilst trying to utilize the nearpoints function when building an array. The idea is that i have multiple curves, each with different colour values, which i group the end points of and then run a function which gathers all the nearest points to each of these endpoints and assigns them to an array. (this is currently working as can be seen in my spreadsheet.) However, i then wish to take this array that has been created for each of the endpoints and run an if statement through it that says if the points in the array have a different colour value to the end point they belong to then add them to a group. Im then hoping to perform a nearpoint function using this group as a filter to get the nearest point that belongs to any curve other than itself. Im unfortunately having an issue with this if statement as it seems to only output points 0-9 regardless of the previous rules set in the code. Help is really appreciated as im truly stumped on this one. Thanks in advance guys! Nearest_Points_Array_Problem.hip
  17. 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
  18. Hi, I'm trying to store a size of some objects into an array using 'foreach loop'. And it works in a single pass mode, but not in normal mode. And I have no idea why Try to switch single pass mode on and off and check attributes on detail stacked_boxes_q.hipnc
  19. Hi Guys, I am wondering if there is any way in vex to compare between two arrays to get the difference. Please let me know is there any way to do this, below is what I am trying to do s[]@attribsA = detailintrinsic(0, "pointattributes"); s[]@attribsB = detailintrinsic(1, "pointattributes"); s[]@AB = @attribsA - @attribsB; //need mismatched attributes in a s[]@BA = @attribsB - @attribsA; //need mismatched attributes in b Thanks a lot in advance!
  20. Hi! I'm struggling to understand how arrays work Could somebody please explain why am I seeing different results in geometry spreadsheet and in console made by 'printf' function? I mean, why does every primitive in spreadsheet contain the same set of points in its arrays? I'm puzzled. One more question: How can I compare contents of different arrays? primitives_array_q.hipnc
  21. Hi everyone ! I'm learning VEX (from CGwiki and Entagma) and I don't understand why the result of the following code is 0 whereas it should be 3... what did I misunderstand ? int myarray[] = {2, 3, 4, 5}; int foo = myarray[1]; printf("%i \n",i@foo); Thanks ! Alexandre
  22. Hi, I've been trying for a couple of hours to get my array points into a group. The idea is that I want to delete every face that is not colliding with a ray/line (first collision/one collision point per face). I used "intersectionanalysis", which gave me the points and faces I want to preserve but now I'm not able to group those array points or blast them any other way. Please let me know if you have an idea. Thanks raycollisionTest.hip
  23. I'm making an effect very much like this one from Entagma: https://vimeo.com/194277211 I've adjusted it a little and I noticed that some of the curves that get created collapse onto each other. I think it even happens at the very first frame. You can see that by the white parts of the lines. Those are the last created points. When two white parts meet, it means the curves collapsed and continues as 1 curve. What the setup does is it has a bunch of points as the active searching points. Each of these find target points in front of them and saves those in an array. Then a random point from within the array gets chosen and used to make the polywire. Sometimes, mainly at the very beginning, the searching points are close enough together so that they might find the same target points. This is where I believe the issue lies. What I would like to achieve is that I can check between the arrays on each of the points to see if they have similar target points and if so, remove those from one of the arrays. Or that when points get targeted by one searching point, they instantly get marked so that they can't be found again before the end of the timestep/solve. At this moment, I'm still trying to figure that one out. Any tips for this are much appreciated. Eckhart ObjectMaterialize.v005_00.hip
  24. Hi there, I'm trying to wrap my head around custom vex functions, mainly from a theoretical point at this stage so not really addressing a specific use, just general knowledge. When I create a VEX function I believe that I have to specify exactly what type of data it is expecting from the arguments and exactly what type of data it will return. eg. function int my_function(float a){ return int(a); } in which case I have to feed it an INT argument and it will always return an INT value. My question is this, is there any way of creating a VEX function which can accept multiple arguments, but not fail if one or more of those arguments are absent when the function is called? Or better yet a way of taking a single argument with out specifying what type of data that argument should be? I'm guessing that this is somehow possible as most of the existing Houdini VEX functions work with multiple flavours of input. Thanks in advance. M
  25. Hi there, I'm playing around with creating some custom VEX functions and came across something a bit odd that I just can't seem to get working. If I want to create a custom function that returns an array, say a vector array I will need to declare the return type at the beginning, according to the docs the following should work // A function which returns an array of vectors vector[] rgb_array() { ... }; However if I run this in a wrangle I get a syntax error on line1. Is this a bug? Or am I declaring my function type incorrectly? Thanks in advance m
×
×
  • Create New...