Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Today
  3. Hey, Highly recommend to check out this video, maybe there is a solution for what you trying to do. it's 2 part video.
  4. why does my FEM object intersect itself

    It's little hard to find the problem without looking at the scene and checking FEM parameters, there is few possibilities : 1. crank up substeps in fem solver and also collision passes. 2. check solidobject( model tab) setting in dops, make sure you have some numbers for shape stiffness and volume stiffness. 3. also check collision tab and make sure everything is checked on. 4. Remesh your geometry before converting to solidembed or solidconform.
  5. Combine Multiple Primitives As One Primitive

    Yes, they come in as one shape. There has always been a little mel script that could do this for you, but I'm not sure if it was ever available in any of the menus. Possibly. I haven't done it in a few years.
  6. [Solved] Custom LiDAR importer with python

    Hey @bunker yes - the build in LiDAR Import is cool. But it has no settings to filter the classifications and that was the goal, at least for me. What do you mean loading under a second to load? Also the wetransfer I uploaded some posts above? Damn, you must have a NASA super computer @pezetko gonna go for a nap now, than I try. Thx again for that lessons in python. Learned so much today! Already used the script in an HDA to use in UE4 - gonna show some stuff tomorrow! Have a good night guys, sant0s
  7. Yesterday
  8. FX Reel 2020

    Inspiring.
  9. [Solved] Custom LiDAR importer with python

    just in case, did you try this? https://www.sidefx.com/docs/houdini/nodes/sop/lidarimport.html edit: worked for me with H18.0.327, even on my 11 years old macbook pro, it takes under a sec to load
  10. [Solved] Custom LiDAR importer with python

    If you have any memory issue just check latest update version that using try/except block https://forums.odforce.net/applications/core/interface/file/attachment.php?id=56259 I'm not sure if laspy does implement context management protocol (so using "with File() as file_pointer:" statement may not close the file at exit) Just verified that and with File() as fp: statement works as it should.
  11. Combine Multiple Primitives As One Primitive

    It seems using vicvvsh's technique does the trick, even with multiple curves. Each @name comes in as one object into Maya. right, but are you saying that if you display Shape nodes in the outliner and expand the object it contains just one Shape even if more curves were exported for that object? As I said Maya didn't used to be able to have multiple curves in one Shape node, but that could have changed as I haven't used Maya for quite some time
  12. Vellum stopped attribute not working

    ok thanks again for your help
  13. (127) Houdini DSO Error

    I installed the demo of Redshift into Houdini 18.0.499 Since then if I try to use Mantra I get this error: (127) Couldn't load C:/PROGRA......./dso/mantra/TIL_DeonoiseOptixGI.dll. Missing symbol registerProcedural This has also effected every installation within my Launcher but my original 18.0.391 I first installed seperate to the launcher is fine. I really don't know where to start debugging this! The issue is too that when I set off a render in Mantra it now has this pop up every single frame and won't move onto the next frame until you have clicked it out.
  14. [Solved] Custom LiDAR importer with python

    You are welcome. Submitting RFEs doesn't hurt. C++ implementation is still much faster than laspy, but it's possible to do an easy and quick specific modification for las import until LIDAR Import SOP gets some improvements without going the C++ route. I attached an example with adding classification as an attribute (added closing the las file to avoid memory issues). I added an updated file: pz_load_las_with_python_classification_attribute_memory_fix.hipnc as it looks like context management protocol is not implemented in laspy (with File(): block will not close the file at exit) so I switched to try/except/finally instead. It will not error on the node, so watch python console for exception logging.
  15. [Solved] Custom LiDAR importer with python

    @pezetko That is freaking awesome!!!!! Thank you so much for your help. I hope SideFX gonna read that post and implement a better LiDAR Importer in on of there future releases since you can do so much cool stuff with it now. Muito obrigado! Here a screenshot of the seperated classifications. Still smiling all over my face
  16. [Solved] Custom LiDAR importer with python

    The classification works fine. But with inFile = inFile.points[I] you are overwriting inFile object with multi-dimensional arrays of all attributes so you no longer get them by .x/.y/.z or other named properties. I uploaded a modified scene, where you can set classification and then it returns only a subset of points that match the correct classification. inFile.points[I] Returns subset of points in an array where I is True inFile.Classification == 2 Returns array of True/False values to determine which points are classified with id 2. Another approach would be adding Classification as an attribute to all points and then use vex expressions, groups, or other partitioning mechanisms to separate points. pz_load_las_with_python_classification.hipnc
  17. Hi, why does my FEM object intersect itself and how can I fix it?
  18. Hi there, I'm importing the hou module into a custom python script and I would like to have multiple scenes opened at the same time. This is how it is implemented: import sys from importlib import reload sys.path.append(HOUDINI_PATH) try: import hou except ImportError: print('houdini.py: There was a problem loading the hou module') box_hip = hou.hipFile box_scene = box_hip.load(path/to/box_scene.hipnc) print(box_hip.name()) # ==> box_scene.hipnc CORRECT reload(hou) sphere_hip = hou.hipFile sphere_scene = sphere_hip.load(path/to/sphere_scene.hipnc) print(sphere_hip.name()) # ==> sphere_scene.hipnc CORRECT # Let's print the name of box_hip again print(box_hip.name()) # ==> sphere_scene.hipnc WRONG As you can see, even though I've reloaded the hou module, it's still using the same hou instance for both hip files and therefore always returning the data of the latest loaded scene. Is there a way to have different instances of the hou module so I can load and work on multiple different hip files in the same script? I've also tried to assign hou to different variables with no luck. Any help would be highly appreciated, thanks in advance!
  19. [Solved] Custom LiDAR importer with python

    And here a link to the classifications: https://geodetics.com/lidar-point-clouds/
  20. [Solved] Custom LiDAR importer with python

    @pezetko works perfect, so good! But somehow I dont get the classification anymore. I was trying something to change your script to that, but it doesnt work and leads to a crash: file_path = hou.evalParm("lidar_file") I = inFile.Classification == 2 inFile = File(file_path, mode='r') inFile = inFile.points[I] Do you have an idea why that doesnt work? When exporting with outFile it works.
  21. [Solved] Custom LiDAR importer with python

    @pezetko awesome - gonna try it in some minutes. Did you try inFile.Classification == x ? Thats the idea of the custom LiDAR importer. Than you can for example build a Heightfield only from the ground points(in most cases its classification 2) and than filter out only the vegetation (normaly class 3,4 and 5), buildings (class 6), water (class 9) and build HF masks from that. But thanks alot, cannot wait to test, that will save so much time instead of going over a GIS application
  22. [Solved] Custom LiDAR importer with python

    Hi, pretty neat library! Thank you for the tip. There is no need for csv, you can do a lot with laspy and numpy itself. Attached example scene to load data from las file. Seems that Lidar Import SOP ignores scale and offset. To make it work (18.0.499, Python 2.7 branch) I cloned the https://github.com/laspy/laspy repository. Then copied content of laspy folder to $HOME/Houdini18.0/python2.7libs/laspy so I have $HOME/houdini18.0/python2.7libs/laspy/__init__.py (and rest of the library) and it's possible to load it into Houdini with import laspy in Python shell. (Numpy is already included with Houdini) I used example file from repository: https://github.com/laspy/laspy/blob/master/laspytest/data/simple.las import logging from laspy.file import File import numpy as np node = hou.pwd() geo = node.geometry() file_path = geo.attribValue("file_path") inFile = File(file_path, mode='r') try: # --- load point position coords = np.vstack((inFile.x, inFile.y, inFile.z)).transpose() scale = np.array(inFile.header.scale) offset = np.array(inFile.header.offset) # there is no offset in simple.las example from laspy library # offset = np.array([1000, 20000, 100000]) # just for testing that offset works # geo.setPointFloatAttribValues("P", np.concatenate(coords)) # same as Lidar Import SOP - seems that it ignores scale (and offset?) geo.setPointFloatAttribValues("P", np.concatenate(coords*scale+offset)) # --- load color color = np.vstack((inFile.red, inFile.green, inFile.blue)).transpose() geo.addAttrib(hou.attribType.Point, "Cd", (1.0,1.0,1.0), False, False) # add color atttribute geo.setPointFloatAttribValues("Cd", np.concatenate(color / 255.0)) # transform from 1-255 to 0.0-1.0 range) except Exception: logging.exception("Processing lidar file failed") finally: inFile.close() pz_load_las_with_python.hipnc
  23. [Solved] Custom LiDAR importer with python

    Btw, here is the scene file and the wetransfer to the *.*las file (Its from slovenia geo department, so available for public, but the website seems to be down at the moment and I dont find any other example file) Just in case someone wanna test around https://wetransfer.com/downloads/4f62b5945e9108a9dea3fdd9b965a24820200711140423/c0518a1995a0223d571f55ec142e893c20200711140439/1921cf and the link to the LiDAR module: https://pypi.org/project/laspy/ lidar_importer_v1.hiplc
  24. [Solved] Custom LiDAR importer with python

    Actually I dont need the outFile since I dont want to write out a new *.*las - and I am not sure, but do I actually need the 'with'? Wouldnt something like that already come closer: import hou import re from laspy.file import File import numpy as np inFile = File('Z:\lidar\GK_463_69.las', mode='r') I = inFile.Classification == 2 #outFile = File('Z:\lidar\output1.las', mode='w', header=inFile.header) inFile.points = inFile.points[I] x = inFile.X y = inFile.Y z = inFile.Z #print(X) #print(Y) #print(Z) for i in inFile: if i == 0: continue pt = geo.createPoint() x = float(row[x]) y = float(row[y]) z = float(row[z]) pt.setPosition(hou.Vector3(x, y, z))
  25. [Solved] Custom LiDAR importer with python

    It looks like your are trying to read from an out file that was opened with mode 'w'. Wouldn't you need to read from the in file? reader = pt_reader(inFile) I think I would use standard Python file operations. Do your LIDAR files meet the requirements of the laspy API?
  26. [Solved] Custom LiDAR importer with python

    @Atom Thanks for the link - just trying to understand your code there But do you have an idea, whats wrong with my last with-for script? With CSV it works similar - but I guess I am mixing something since the 'with outFile' gives me already the error.
  27. [Solved] Custom LiDAR importer with python

    Update: I am trying to modify the CSV reader to read the coordinates, but something there is not working - brain overheating. from laspy.file import File import numpy as np inFile = File('Z:\lidar\GK_463_69.las', mode='r') I = inFile.Classification == 2 outFile = File('Z:\lidar\output13.las', mode='w', header=inFile.header) outFile.points = inFile.points[I] x = inFile.X y = inFile.Y z = inFile.Z #print(X) #print(Y) #print(Z) with outFile as f: reader = pt_reader(f) for i in pt_reader: if i == 0: continue pt = geo.createPoint() x = float(row[x]) y = float(row[y]) z = float(row[z]) outFile.close()
  28. [Solved] Custom LiDAR importer with python

    You could check out my Moon DEM Python reader. I believe those original NASA files were in a similar format.
  1. Load more activity
×