Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won


Everything posted by Atom

  1. Arrange Nodes By Material Usage

    Ah, thanks again. I have not spent a lot of time in using the Material panel. But now that I see the SELECT button I probably won't need my script after all.
  2. Arrange Nodes By Material Usage

    Hmm... Where is this select button located? I don't see one in the SHOP network area and the basic select tool has no options to select from material. Using version 14.
  3. Vine Around Trunk?

    @eetu: Thanks for the example file, that shows me how to setup the wire capture and wire deform. However, I still don't have the look I am going for. In your example file you have added a third line to my initial scene. I want the vine line to wrap around the trunk line but I am not seeing that. I do see that both lines are deforming to the third line added. When I try to swap my trunk for the third line, I get no vine at all... Do I need three lines to use a wirecapture/deform setup? Also, why are some of the node connection dotted lines and others are solid. Does that indicate errors or mis-connection types? @gaurav: Thanks for the file, but that is too complicated for me at this time. I can't even locate a WireCapture anywhere in that file?
  4. Hi All, I am trying to calculate the "from" "to" parameters for a Renderman light shader using the Houdini matrix information. The "from" is easy, it is simply the location extracted from the matrix. n = hou.node(light_name) if n != None: mtx = n.worldTransform() # from pos=mtx.extractTranslates() It is the "to" value that I am having trouble with. I realize I need to use the rotation information projected along a vector to produce a new location but I am not quite sure how to do that using Houdini Python. Here is an example I found in some Blender python code accomplishing the same task. How would I translate that to Houdini based Python? m = ob.matrix_world loc = m.to_translation() lvec = loc - (m.to_quaternion() * mathutils.Vector((0,0,1)))
  5. Calculate "from" "to" using Matrix?

    Thank you Symek, I am finally getting back to this task. Your code example helps a lot!
  6. Rendering Meteor

    Thanks for the example file Marty. I baked out the RED boxes then took that filename and pasted in the top of the GREEN box. I baked out the GREEN boxes and then took that file name and pasted it into the File node for viewport display. Now I have real-time playback.
  7. some particles tests

    I tried RonensArt BoxInk file but all I get are grey spheres. What is the trick to making it look like ink?
  8. FLIP Output - Best way

    One advantage of .sim files is that you can re-skin the fluid sim if you like from .sim files. If you receive a .BGEO sequence, you are stuck with the quality of the geometry exported. Imagine you are on the receiving end of a deliverable.
  9. Rendering Meteor

    So how do you cache a smoke sim? I click on Save To Disk inside the pyro_sim network but nothing seems to happen. I have pointed the output file to a valid folder. I can cache about 60 frames in memory, but how would I make longer simulation? Also, once I have sim files, where do I install them so I can get real-time playback? Thanks
  10. Flip Fluids meshing help

    This video tutorial might help you out.
  11. What if you don't kill the particles? Scale them to zero instead.
  12. Short and sweet OP centric lessons

    I have put together a short tutorial on how to install a mocap BVH file into the Default Mocap Biped 1 character that ships with Houdini 14. You can view it here: The attached ZIP file contains the .CMD/.BCLIP files that this video lesson uses. Archive.zip
  13. Calculate "from" "to" using Matrix?

    Can someone help with this it has been over a week and I still need to accomplish this goal. Where is the begging emoticon...?
  14. I have a headlight lens mesh I want to turn into a geometry light. I create an area light and then change it's type to Geometry. I pick the headlight mesh for the geometry slot of the light. So which transform is now valid? The lamp object or the mesh object? Can I just place my geometry lights at world origin and light will successfully emit from the faces of the reference geometry?
  15. Calculate "from" "to" using Matrix?

    I tried rotating it right but it did not work. Does anyone know how to calculate the "from" "to" parameters for a Renderman light shader using the Houdini matrix information?
  16. Bloody spammers

    A question is a good idea, but potential new users don't know about shop pop vop sop stuff.
  17. Hi All, I have a mesh that has two materials applied to different faces. I fill the mesh with points from volume. At this time, I have lost the face groups. The intention is to "melt" this object but how do I maintain my multi-material placement throughout the process without losing the groups? Even if I do maintain the groups, somehow, my final mesh is a result of a Convert VDB whose faces probably no longer match the first groups values? Do I have to create a separate mesh for each material and melt them all separately?
  18. Houdini 15 Wishlist

    Fix the bugs that prevent R14 from working on MacMINI. I am basically stuck at R13 unless this gets done.
  19. Hi All, I am playing around with a RIB exporter to try out the Renderman system. I have some python code that exports the Matrix for objects, lights and the camera but it does not always work. I am wondering if there is some difference between the two systems that is causing the camera to point the wrong way and thus render black images sometimes. Does anyone have any example python code that would show how to export the Houdini Matrix to a Renderman Transform?
  20. Houdini Matrix to Renderman Transform?

    After reading some more on the subject I have come to the conclusion that the camera needs some additional matrix in order to function as a camera in the scene. This is still an assumption and I wish someone who actually knew this stuff would chime in on a way to proceed. So here goes. A second matrix is created based upon the screen windows settings, projection type, fov, clipping planes and aperture of the camera. def view_plane(camera_name, winx, winy, xasp, yasp): n = hou.node(camera_name) if n != None: #/* fields rendering */ ycor = yasp / xasp use_fields = False if (use_fields): ycor *= 2 # Fetch values from the named camera. nc = n.parm("near").eval() fl = n.parm("focal").eval() wx = n.parm("winx").eval() wy = n.parm("winy").eval() ap = n.parm("aperture").eval() pt = n.parm("projection").eval() # Projection type. if (pt == 1): # Orthographic proection. #/* scale == 1.0 means exact 1 to 1 mapping */ pixsize = n.parm("orthowidth").eval() elif (pt == 0): # Perspective projection. sensor_size = 32.0 #Blender default. pixsize = (sensor_size * nc) / fl else: # Unsupported projection type at this time. pixsize = 1.0 apx = ap apy = (winy * ap) / (winx * xasp) if apx > apy: # Horizontal. viewfac = winx else: # Vertical. viewfac = ycor * winy pixsize /= viewfac #/* extra zoom factor */ pixsize *= 1 #params->zoom #/* compute view plane: # * fully centered, zbuffer fills in jittered between -.5 and +.5 */ xmin = -0.5 * winx ymin = -0.5 * ycor * winy xmax = 0.5 * winx ymax = 0.5 * ycor * winy #/* lens shift and offset */ dx = wx * viewfac # + winx * params->offsetx dy = wy * viewfac # + winy * params->offsety xmin += dx ymin += dy xmax += dx ymax += dy #/* the window matrix is used for clipping, and not changed during OSA steps */ #/* using an offset of +0.5 here would give clip errors on edges */ xmin *= pixsize xmax *= pixsize ymin *= pixsize ymax *= pixsize else: xmin = 0.0 xmax = 1.0 ymin = 0.0 ymax = 1.1 return xmin, xmax, ymin, ymax def projection_matrix(camera_name): n = hou.node(camera_name) if n != None: rx = n.parm("resx").eval() ry = n.parm("resy").eval() ap = n.parm("aperture").eval() nc = n.parm("near").eval() fc = n.parm("far").eval() pr = n.parm("aspect").eval() apx = ap apy = (ry * ap) / (rx * pr) if apx > apy: aspect_ratio = apx/apy else: aspect_ratio = apy/apx left, right, bottom, top = view_plane(camera_name, rx, ry, pr, pr) farClip, nearClip = fc, nc Xdelta = right - left Ydelta = top - bottom Zdelta = farClip - nearClip ''' # Original Blender matrix mapping. mat = [[0]*4 for i in range(4)] mat[0][0] = (nearClip * 2 / Xdelta) mat[1][1] = (nearClip * 2 / Ydelta) mat[2][0] = ((right + left) / Xdelta) #/* note: negate Z */ mat[2][1] = ((top + bottom) / Ydelta) mat[2][2] = (-(farClip + nearClip) / Zdelta) mat[2][3] = -1 mat[3][2] = ((-2 * nearClip * farClip) / Zdelta) return sum([c for c in mat], []) ''' # I wonder if I have this mapping correctly? Porting this technique from a Blender script. mat = hou.Matrix4( (( nearClip * 2 / Xdelta),0,0,0, 0,(nearClip * 2 / Ydelta),0,0, ((right + left) / Xdelta),((top + bottom) / Ydelta),(-(farClip + nearClip) / Zdelta),-1, 0,0,((-2 * nearClip * farClip) / Zdelta),1) ) return mat else: return None def export_transform(file, ob_name): n = hou.node(ob_name) if n != None: if n.type().description() == 'Camera': # Special matrix output for camera. m = projection_matrix(ob_name) mtx = n.localTransform() * m else: mtx = n.worldTransform() file.write('Transform %s' % rib(mtx))
  21. Hi All, When I fetch the Matrix4 from a Houdini object I notice the numbers for rotation don't match what is displayed in the Transform panel. Does this mean Houdini is stores rotate value as radians for the Matrix?
  22. Houdini Matrix to Renderman Transform?

    I am still working on this. Does anyone understand matrix math and can explain it in working python code? I can get coordinates out to the RIB file, but they are just wrong at render time. I keep flipping axis thinking I'll just land on the right combination that works but I think I have been through all the possible combinations and there is always a flaw. I find mixed conclusions on the net as to weather or not Houdini is Left or Right handed axis system. One of the employees on the Renderman forum claims that renderman is a left-handed system. But I really don't know what that means at the math level. I do know that in all other exporters I have written that the matrix calculations are only a few lines of code. That is why I am surprised that there is not just some example code out there already. I guess this thread will become the definitive guide that Google search engines will stumble upon when other users attempt to convert Houdini coordinates to Pixar Renderman coordinate system. This python code will calculate the matrix transformation from the Houdini camera to the Pixar Renderman camera.
  23. Houdini Matrix to Renderman Transform?

    I did have a look at those files. I found some code to calculate the FOV but nothing concrete about the matrix.
  24. Houdini Matrix to Renderman Transform?

    I made a little bit of progress in trying to export coordinates to renderman. I discovered that order of operation is very important when dealing with explicit LOC/ROT/SCALE. While my render output looks much close to the viewport than the previous post I still find that certain camera angles simple don't work, I get a black render (probably because the camera is looking at nothing). I wish someone could explain what is wrong with my code or post a correction to this def. I have incorporated the detection of translation order into this revision. I also set aside a special case for the camera matrix in case I need to process it differently than the rest of the objects in the scene. def export_transform(file, ob_name): n = hou.node(ob_name) if n != None: xOrd = n.parm("xOrd").eval() # Translation Order. rOrd = n.parm("rOrd").eval() # Rotation Order. if n.type().description() == 'Camera': world_mtx = n.worldTransform() else: world_mtx = n.worldTransform() world_mtx = n.worldTransform() mMirror_XY = hou.Matrix4( (-1,0,0,0, 0,-1,0,0, 0,0,1,0, 0,0,0,1) ) mtx = mMirror_XY * world_mtx * mMirror_XY pos=mtx.extractTranslates() rot=mtx.extractRotates() scl=mtx.extractScales() if xOrd == 0: # Translation order: Scale Rot Loc. file.write('Scale %f %f %f' % (scl[0],scl[1],scl[2])) if rOrd == 0: # Rotation Order: X Y Z file.write('Rotate %f %f %f %f' % (-rot[0],1,0,0)) file.write('Rotate %f %f %f %f' % (rot[1],0,1,0)) file.write('Rotate %f %f %f %f' % (rot[2],0,0,1)) else: print "WARNING:Unsupported rotation order [%s]." % rOrd file.write('Translate %f %f %f' % (-pos[0],pos[1],pos[2])) else: print "WARNING:Unsupported translation order [%s]." % xOrd
  25. Python Ldraw coding help

    Have you tried simply adding a Facet node at the end of the current results?