Jump to content

Maurits

Members
  • Content count

    72
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Maurits

  1. For Each problèm in Houdini 17

    Hi @6ril The easiest way would be to create the attribute value when you create the groups. Otherwise I found a way using Python to do it afterwards it's less ideal but should still work. example.hip
  2. Python Module import problem?? Python panel

    Do you get any specific error message? import os print os.name I tried the above code in a python panel and get a output.
  3. Removing neighbour prims

    Hey. You could try to add a prim attribute to each prim as you make them then it's simply deleting all prims that don't match the desired value. The solution somewhats depends on how you make the branche. For example if you use a for loop to add a new set of braches each loop, you would store the iteration number on the prim. Afterwards you could say blast everything that has a iteration number higher then X
  4. This could be done using a single wrangle node in point mode as well I think. masking use of the following function. int nearpoint(<geometry>geometry, string ptgroup, vector pt) the pseudo code would look something like this // Create string with corrcet group name "Level_%D", own_level-1 //find near point using created group string // if point found move self to location of found point Afterwards use the fuse node to fuse everything together.
  5. Hey If I remember correctly the order of text in the console does not always match up with the order of processing. An easy check I always do it to use removepoint(0, @ptnum); In your case I would place this inside the If block, so it should only remove the last clean point, then by changing the last_clean to a different value you can check if everything works. If it works only the point matching the last_clean should disappear. printf( "last_clean=%d\n", int(detail( 0, "last_clean"))); printf( "ptnum=%d\n", @ptnum ); if( detail( 0, "last_clean" ) == @ptnum ){ printf( "test\n"); removepoint(0, @ptnum); }
  6. SOP Solver with changing numpt

    Hello xmasophie Without seeing the nodes I can only guess, but the npoint() expression might help you get the correct number of points. It returns the number of points the targeted node has.
  7. Hey syzygy It seems that point 0 is skipped. Are you using any groups ordo you have any value in the group parameter of the wrangle node by any change. Otherwise first test if it runs over all point by removing everything except printf( "ptnum=%d\n", @ptnum ); This should print out every point number.
  8. For Each problèm in Houdini 17

    Seems you might wan't to try the for each connected piece. By default it creates and runs over pieces of geometry that are connected. But you can also change the attribute it uses to isolate pieces to something else, for example give each group an unique value in a single attribute and use that attribute for the loop.
  9. Hello all. I'f been looking into the creation and use of custom nodes shapes with good succes. But I got stuck on trying to embed the custom node shape into an HDA. With the goal to share the HDA with others, and that the node keeps it shape despite someone not having the Json file for the shape it self. I was able to include the Json file into the HDA, but I'm not sure how to have the node use the shape described by the file. Hope some one here can help me out.
  10. custom handles

    Hi anthonyblanchettepotvin Sorry for the really late response. From what i can getter from the code and looking at the nodes. cpn == Parm name of the parm containg the base positions of the custom parms. cpo == the Parm expresion for cpn cn == Parm name of the parm containing the offset position relative to the value contained in cpn co == The parm expresion for cn These variables in the first python node mainly help setup the location and exprespion scripts used to control the location of each extra handle. Hope it might still be of some use.
  11. Hey I think the intersect_all function in Vex is what you are looking for. http://www.sidefx.com/docs/houdini/vex/functions/intersect_all.html
  12. SOPGI vex raytracer

    Really cool project. Gone have a look at the code and the set up when i have the time.
  13. Procedural Coral Reef

    Cool project and some nice tricks for the creation of the reef.
  14. Fun with python

    I wanted to see if I could play a video in Houdini using some python. With this as the result. Don't think it's the first time this is done but it is still nice to see. The result
  15. Nearpoint question

    Hallo Julien I think you're current set up would return the same point every time it resulting in a array of 0's This is caused by the nearpoint function. This returns the first point it find near the provided coordinates with should be point 0. In addition you say to find the nearest point in the provided point group that only contains point 0. The following code should do what you wan't. int points_visited[]; // A list of points already visited int curr_point = 0; // current point to look from int max_distance = 100; // maximum search distance int max_points = 10; // max number of points to find vector P = point(0, "P", curr_point); //Stores the position of the points where looking from int handle; // variable for the point cloud for(int i = 0; i < 10; i++){ handle = pcopen(0, "P", P, max_distance, max_points); // Create a new point cloud containing all points in order from closest to farthest while(pciterate(handle)){ // Iterate over the point cloud pcimport(handle, "P", P); // Load new Position pcimport(handle, "point.number", curr_point); // Get point number if(find(points_visited, curr_point) < 0){ // See if point number is already in the visited array append(points_visited, curr_point); //if not add point to array pcclose(handle); // Close the PC break; // Stop the while loop } } } printf("%d\n", points_visited);
  16. custom handles

    Hallo Konstantin I finally had time to go trough my old work and find an example file. It takes a curve or line and creates transform handles for each point. The handles are then linked to parameters. From the parameters they could be linked back to attribute data. I't might be possible to directly attach handles to attribute data but i'm not sure about that. Hope this helps you on your way. custom handles.hipnc
  17. Hallo all. If been trying to get the HDK to work on my pc, but what ever I try it fails to compile. I tried both visual studio 2012 and 2015, and using the command line hcustom, I have 2 version of Houdini on my PC Houdini 15.0.465,Houdini FX 16.0.504.8 on a windows 10 pc. Searching for possible solutions didn't yield any results either, so I was hoping someone here could help me out. Thanks in advance . Included are the error logs for both VS. vs2012.txt vs2015.txt vc2012.log vs2-15.log
  18. Can't get HDK to compile

    Not sure, I did what you advised and removed or changed some of the environment variables.But I got something to work with Getting VS to work is just a luxury for me now. Thanks for the help!
  19. Set angle between poly

    Maybe this helps. its written for adding 45 degrees to the up normal, but the code could maybe also be used or converted to work for your goal. v@up; float angle = radians(45); float cs = cos(angle); float sn = sin(angle); @up.x = v@at.x * cs - v@at.z * sn; @up.z = v@at.x * sn + v@at.z * cs;
  20. custom handles

    Hey You can add handles and link them to parameters using hscript. What I did was use Python and from there call hscript to create handles, Unfortunately at this point in time i don't have any example code or files. Have a look at http://www.sidefx.com/docs/houdini/commands/pomadd But i do remember having difficulties deleting the handles afterwards, and having memory leaks. It's not much but hope it helps.
  21. Can't get HDK to compile

    I Got hcutom to compile a sample node, and it works in 16 event though hcustom crashes afterwards, but that could be the same as another post about it crashing on windows 10. Unfortunately Visual studio still fails to compile for me at this time. At least i can start with experimenting and learning to make node's / vex functions Unfortanite i't did not help I tried 2015 with the latest stable build of Houdini 16 but still it failed.
  22. I have a similar problem when compiling using hcustom.
  23. Can't get HDK to compile

    Unfortanite i't did not help I tried 2015 with the latest stable build of Houdini 16 but still it failed. HDK_test.log
  24. Question: hou.playbar.play()

    I had a similar issue where after changing frame it would stop playing. From what I got out of it is that the set frame and play command are executed within a single frame and therefore do not work as intended. In my case I fixed is by setting the set frame on the start of the code and the play at the end, so by the time the play was called enough time had passed. The code below might offer some help. it used a event callback to see if the frame has changed to frame 1 before calling the play option. Afterwards it removes the callback. def outputPlaybarEvent(event_type, frame): if event_type == hou.playbarEvent.FrameChanged and frame == 1: print event_type hou.playbar.play() hou.playbar.removeEventCallback(outputPlaybarEvent) return False hou.playbar.addEventCallback(outputPlaybarEvent) hou.setFrame(1)
  25. Getting vectors from edges

    Hey try in a wrangle sop: vector P2 = point(0, "P", @ptnum+1); v@normal = normalize(@P-P2); This will generate a normalised normal from point 0 towards point . But the basis is to subtract position B from position A. You do might have to add an exception for the last point so it used point 0.
×