Jump to content

philpappas

Members
  • Content count

    44
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Community Reputation

1 Neutral

About philpappas

  • Rank
    Peon

Personal Information

  • Name
    philpappas
  1. Straighten Curve Segments?

    Is this possible with the current sop nodes or do i need vex for this? black is the input curve and blue should be the output. i nt to achieve the same result you have with a blast node but keeping the inbetween (orange) points
  2. Where can i find every available global variable?? specifically i am looking for the number of points, i think its something like $NPT but i would like to have a list of every global variable so that i can search. its really difficult to find it, i only managed to find some about frames etc but nothing more. A link would be much appreciated
  3. Smooth Curve Bumps

    I have some curves i want to smooth out but not everywhere. i need to keep the peak of every bump at the same height and ease in and out.
  4. Python write vector attribute to text file

    thanks a lot, it works (not so fast though if you have thousands of values ) import hou import numpy as np node = hou.pwd() # get the current node geo = node.geometry() #get geometry of node # Read the attributes into numpy arrays pos_array = np.frombuffer(geo.pointFloatAttribValuesAsString('pos'), dtype=np.float32) dir_array = np.frombuffer(geo.pointFloatAttribValuesAsString('dir'), dtype=np.float32) i read the point attributes directly from the python node, absolute paths wont help a lot because i'm working in an asset. i also found this blog and the code takes about the same time to write the text file. http://astroukoff.blogspot.com/2018/05/data-from-houdini-to-unity-via-text-file.html this is the code i used (one attribute at a time though): node = hou.pwd() # get the current node geo = node.geometry() #get geometry of node myTxt = file("$HIP/POSITION.txt", "w") #create file, w = write mode for point in geo.points(): #iterate through each geo point pos = point.attribValue("pos") #save position in a pos var s = str(pos) #write position to s string myTxt.write(s) #write s string into a file myTxt.close()
  5. Hello, i think this will be simple for someone more experienced. i have two vector primitive attributes and i want to write them in a text file so-------> v1.x, v1.y v1.z, n1.x, n1.y ,n1.z , v2.x, v2.y v2.z, ....etc for each primitive this is how far i am now ############# READ ATTRIBUTES ###################### for prim in geo.prims() : pos = hou.Vector3(prim.attribValue('pos')) dir = hou.Vector3(prim.attribValue('dir')) data = str(pos) + "," + str(dir) ############# WRITE TO TEXT FILE ###################### myfile = '$HIP/lattice.txt' with open(myfile, 'w') as f: for item in data: f.write("%s\n" % item) spits out this nonsense, splits every character to a new line [ - 1 7 5 2 , - 1 1 9 . 0 3 , 1 4 6 4 ] , [ 0 , 3 0 . 9 0 1 4 , 0 ]
  6. Random Sequence jpg to each grid

    ohhh snap this works didnt know about attribute string edit! only problem is that the textures do not show up on the viewport but only on render for some reason, just an average solid color of the image no it works. this method with the image path inside an attribute overriding the material texture is straightforward but doesnt play live. the fps drop to 1.5. do you think this is normal? considering i'm loading 50 different sequences. Could there be another technique that plays live?
  7. Random Sequence jpg to each grid

    thanks for sharing that but if im not mistaken i dont think its the same thing im looking for. They use one image sequence as a list of images and assign them to different grids. i have multiple sequences that i want assign to different grids and i want them to play. my problem so far is that i cant get tha $F to work when its coming inside a primitive string attribute. i also tried making a simple material builder with an image string parameter which i override inside sop level. also didnt work. i think i;m missing something simple here but i have no clue. Here is my file take a look test.hip
  8. Random Sequence jpg to each grid

    i'm sorry for the late reply seems i forgot to subscribe to the thread. Can you explain a bit more?Can you provide an example? inside my python node i just export a string at the end "img_$F4.jpg" but this string doent get evaluated inside my principled shader for some reason(?) how can i use the eval() method? So right now i have a string primitive attribute with an image sequence path like "img_$F4.jpg" and i pass this attribute to my principled shader in base color texture. its not working. if i dont add the $F4 and leave it at img_0001.jpg it works, but doesnt recognise the sequence. So my goal here is to have multiple sequences and assign them to different grids
  9. UVing curved grids

    yeah i think that will work, maybe i should lay out the uv like that. uv.y=0 or uv.y=1 depending on the group and then the same for the corner points to ensure everything is square
  10. UVing curved grids

    i have this scene made of simple curved planes i want to uv. The desired result would be a perfect 1x1 square filling one uv tile for every surface and then moving to the next. i thought uv flatten would do the job but for some reason it doesnt work as expected even though its just curved surfaces almost flat,no weird curvatures. Any tips much appreciated! uv.bgeo uv.hip
  11. Choose Randomly with even distribution

    thanks a lot for the pointers! i will try both when i find time and get back to you that is actually a very good idea
  12. Unroll cylindrical-like surface

    thanks!! works great!
  13. I have this expression to choose from a set of numbers randomly. (1,2,3,4,5,6....49,50) floor(rand($PT*ch("seed"))*detail("../node/","total",0)) My problem is that out of 50 numbers that i have only 23 make it after the expression. How can i make sure every number gets picked?
  14. Is there an easy way to unroll a cylinder in xyz coordinates? like you do with uv flatten but in xyz coordinates
  15. Instancing Lights

    rendering 10.000 instanced lights takes forever. Instancing is supposed to make this happen, no? am i over the threshold or is there another way im not seeing? light_instancing.hip
×