Jump to content

konstantin magnus

Members
  • Content count

    437
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

  • Days Won

    12

konstantin magnus last won the day on September 15

konstantin magnus had the most liked content!

Community Reputation

179 Excellent

5 Followers

About konstantin magnus

  • Rank
    Illusionist

Contact Methods

  • Website URL
    http://www.konstantinmagnus.de

Personal Information

  • Name
    Konstantin
  • Location
    Stuttgart, Germany

Recent Profile Visitors

4,947 profile views
  1. Load ASCII PTX data into Houdini

    With a single point cloud you could only create points for lines in your file that contain exactly 7 values (standing for Px, Py, Pz, I, Cr, Cg, Cb): import csv node = hou.pwd() geo = node.geometry() path = node.evalParm('path') geo.addAttrib(hou.attribType.Point, 'Cd', (-1.0,-1.0,-1.0)) geo.addAttrib(hou.attribType.Point, 'intensity', -1.0) def add_point(position, color, intensity): pt = geo.createPoint() pt.setPosition(hou.Vector3(position)) pt.setAttribValue('Cd', color) pt.setAttribValue('intensity', intensity) with open(path) as f: reader = csv.reader(f) for row in reader: values = row[0].split() if len(values) == 7: pos = tuple([float(i) for i in values[0:3]]) ins = float(values[3]) clr = tuple([float(i)/255.0 for i in values[4:7]]) add_point(pos, clr, ins) And perhaps filter out 'missing points' by removing any point that was set to 0,0,0: if(length(v@P) < 0.001){ removepoint(0, @ptnum); } py_import_ptx_02.hiplc
  2. Monitor setup for Houdini/compositing

    If you need 4K I would not take any screen smaller than 27". And on a dual monitor setup I would not take anything bigger than 27" either.
  3. Load ASCII PTX data into Houdini

    Here is description of the PTX format: https://w3.leica-geosystems.com/kb/?guid=5532D590-114C-43CD-A55F-FE79E5937CB2 It seems to contain position, intensity and color data and supports multiple point clouds. I found some test data here: http://www.libe57.org/data.html
  4. Plus button for dynamically adding parameters

    Excellent! Thank you.
  5. Plus button for dynamically adding parameters

    Radical approach! ; ) I was rather expecting hints at parameter menu scripts, but rewriting the whole thing is of course another option.
  6. Plus button for dynamically adding parameters

    I am currently creating a little HDRI studio inside COP land. The user should be enabled to freely add "light sources" (aka spots and rectangles on the image canvas). How can I integrate a plus button in my parameter field? How can I duplicate parameters with it? Here is a mockup: Instead of adding more and more nodes, I would like to fill up arrays holding all spot positions, light intensities etc.
  7. Batch render objects

    Based on @Atom´s post I am currently writing my own render script (see below). But no matter where I put it (pre-render or pre-frame), the file node is only switching to the next mesh when I manually scrub through the timeline and click 'Render' in the render view. When I hit 'Render to Disk' however, Houdini creates only images showing the same object. Any ideas why the file node does not get updated here? # PRE-FRAME RENDER SCRIPT import hou, os, re # NODES node_import = hou.node('/obj/Mesh/import_file') node_render = hou.pwd() # INPUTS filetype_input = '.obj' filetype_output = '.png' path_models = r'C:\Users\konstantin\Documents\00_Eingang\Meshes' path_output = r'C:\Users\konstantin\Documents\00_Eingang\Renderings' # FUNCTIONS def search_files(root, type): print('Searching all {} files in {}'.format(type, root)) list_files = [] for path, subdirs, files in os.walk(root): for name in files: if name.endswith(type): path_full = os.path.join(path, name) list_files.append(path_full) #print('Found {}'.format(path_full)) return list_files def extract_filename(path): filename = os.path.basename(path) print('Extracting filename: {}'.format(filename)) return filename def set_import_file(node, path): print('Setting import file on {} to {}'.format(node, path)) node.parm('file').set(path) def set_render_file(node, path, name, type): path_full = path + '/' + name + type path_full = os.path.normpath(path_full) print('Setting file name on {} to {}'.format(node, path_full)) node.parm('vm_picture').set(path_full) # PROCESS file_list = search_files(path_models, filetype_input) for i, file_path in enumerate(file_list): if i + 1 == hou.frame(): file_name = extract_filename(file_path) + '_' + str(i) set_import_file(node_import, file_path) set_render_file(node_render, path_output, file_name, filetype_output)
  8. Batch render objects

    I was initially looking for a non-framebased solution, but this seems more straight-forward. Thank you!
  9. Tetrahedron Growth

    Cool, kind of unexpected!
  10. Batch render objects

    The instancing trick works! I can now render out all my meshes with one click (also added a lens shader to get more perspectives in the same image): Unfortunately the wedge ROP names files with seed numbers: "Mesh__wedge_instance_point_8.000000.png", where I would much rather like to get the original file name like "HANNIBAL_obj.png". Changing file names in the file node does not work, because backticks are apparently not accepted there. At least when I enter `point("../instance_point/", 0, "path", 0)` the file node errors out saying 'Unable to read file "0"'. I also tried setting the file node´s path from another python SOP: node_file = hou.node('/obj/mesh/import_mesh') point = geo.iterPoints()[0] path = point.attribValue('path') node_file.parm('file').set(path) .. which works the first time, but sadly the wedge node does not update it. Then I tried forced cooking via Python or laying out dummy wedge channels to all nodes that need updating to no avail. So is there any way to get the *.OBJ file names out of Wedge ROPs? Or any alternative routes to turn a folder full of meshes into renderings?
  11. Tetrahedron Growth

    I just did a similar thing without VEX. Maybe it helps you anticipate even more problems. tri_peak.hipnc
  12. Batch render objects

    Clever workflow! But how do I assign the file string to the instance node? (I found 'Delayed Load Shader' in Houdini´s documentation and 'Packed Disk Primitives' here: http://www.toadstorm.com/blog/?p=493, though I do hope there is a more direct way to swap out files).
  13. Batch render objects

    Hi JO, thanks for helping me! I thought about using a wedge SOP, as well, but what I really want to create is a render machine, that is sucking in upcoming OBJs, integrates them in a given scene and renders them out immediately. It can potentially be hundreds or thousands of different meshes, so I would only load them one after the other. Thats why I am rather thinking about a python script that manages all this: Create a list of mesh files from a directory, and iterate through these steps: Assign one of the meshes to file node Press render button on mantra ROP Wait for the rendering to finish, and go back to step 1 (until the list of mesh files is depleted) How can I make a python script wait until the render process is finished? And where would I put this script (post-render script)?
  14. Batch render objects

    I am working on a script to render all OBJ-files from a folder separatly in the same scene. How can I make a python script wait for a render to finish, so it can then load the next OBJ file? (I am not looking for a frame-based solution.)
  15. Plugin both versions in an attribwrangle. Then you can take over the rest attribute from the second input with: v@P = @opinput1_rest; Morphing between both positions would be: v@P = lerp(@P, @opinput1_rest, chf('morph') ); Point positions cannot be deleted, but you can set them all to zero: v@P = vector(0);
×