Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Everything posted by resonanz

  1. Hi! I have a problem that is really stumping me. I have a large point cloud that comes from a 3D-scanner and I want to copy small boxes onto the points. But for this I need point-normals and i can´t figure out how to calculate the normals without primitives. If someone have an idea I would be deeply grateful. Thanks in advance!
  2. What is the best HDK equvalent of the neighbours() function in VEX and how do I find all triangles adjacent to edges, which in turn are connected to the same point? Thanks in advance!
  3. Adjacent primitives in HDK

    Thanks a Million! Works like a charm!
  4. Adjacent primitives in HDK

    Thanks Petz! I found buildRingZeroPoints() in the documentation but I'm having a hard time to understand how GEO_HedeInterface works. I was able to find all neighbour points around my current point but I'm not sure how I can import the edges between those points. Any hint would be helpful.
  5. If I have a point attribute of type array, how can I get that array and store the values in a UT_FloatArray? I tried the following but somehow it does not work. GA_ROHandleFA distH(gdp, GA_ATTRIB_POINT, "dist"); UT_FloatArray distances; for(GA_Iterator it(gdp->getPointRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); distances = distH(offset); } Thanks in advance!
  6. How to read array

    Perfect that´s it! Thanks a lot!
  7. How to read array

    You are right! Sorry about that! The problem is that GA_ROHandleFA is a handle for an array not a float like in your example. I did check if the handle is valid and it is but as soon as I try to get the array from the attribute with distH(offset) I get the following error message: "error C2064: term does not evaluate to a function taking 1 arguments". The thing is that I have no idea what other argument(s) I should use instead.
  8. parsing ifd files

    Does somebody know if it is possible to turn on "depth of field" in ifd-Files I have already written to disk. With mantra -q 8 I can turn it off but what if I would like to do the opposite and turn it on? Thanks in advance!
  9. Point Cloud Normals

    Sorry for raking up this old topic but I am again in a situation where I need to calculate point normals for a huge 3D-scan dataset. This time it is very important to have the normals ALL pointing outward, what is not possible to achieve with this method (AFAIK). What would be the best way to get normals with consistent orientation? Thank´s in advance!
  10. I am currently working on some older inlinecpp experiments to become more familiar with the HDK but I run into problems with the latest Houdin builds. Whenever the code compiles I get an error. If I click again on the node to force a recook everything works fine. After some trial and error I think I found the problem. It seems that hcustom is looking for "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Include" what does not exist on my computer. I am not sure why this path is needed because the compiler is somewhere else and I had never problems with it until I installed the latest houdini build. I tried different versions but always got the same error though hcustom builds the dso. In Houdini 12.1 everything compiles fine and as far as I can say this problem did not happen with older Houdini 12.5 builds. So my question now is if this is my mistake and something with my setup went wrong or is it maybe a bug? It´s hard to say for me with my very limited experience in C++ and the HDK. Btw. I am on Windows 7. Thanks in advance.
  11. cflags linking problems

    I am using just the compiler of Windows SDK. Yep, you are right. It would have been important to mention i guess. I will look for the path to mt.exe and log the bug today.
  12. cflags linking problems

    Hi Edward, no, without using --no-embed-manifest i get the same error as before. I guess the reason is still the same. Hcustom is looking for mt.exe in the path "C:\Program Files\Microsoft SDKs\Windows\v6.0A/Bin/x64/" what does not exist on my computer (I did install the SDK on F:\ instead of C:\). But as long as I use the --no-embed-manifest option everything works fine, so thanks again!
  13. cflags linking problems

    Thanks Edward that worked! And thanks for the fix in the latest Houdini build!
  14. cflags linking problems

    Thanks for your reply Edward! Yes, I am on VC 2008. When I use hcustom to build the SOP_Star.c example I get the same error, even thought it compiles. First I thought it might be a problem on my computer but I get the same warning on a different machine. The strange thing is that hcustom worked for me without any problems in older Houdini 12.5 builds. That's what I get when I compile with hcustom. Making 'sop_star.o' and 'C:/Users/X5340/DOCUME~1/houdini12.5/dso\sop_star.dll' from 'sop_star.c' CFLAGS = -TP -Zc:forScope -nologo -DVERSION="12.5.469" -DI386 -DWIN32 -DSWAP_BITFIELDS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DBOOST_ALL_NO_LIB -I . -I "E:/Microsoft Visual Studio 9.0/VC/include" -I "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Include" -I "E:/SIDEEF~1/HOUDIN~1.469/toolkit/include" -Ox -MD -EHsc -GR -bigobj -wd4355 -w14996 -DSESI_LITTLE_ENDIAN -DAMD64 -DSIZEOF_VOID_P=8 -DFBX_ENABLED=1 -DOPENCL_ENABLED=1 -DOPENVDB_ENABLED=1 -DMAKING_DSO -Fo"sop_star.o" -LD -link /libpath:"E:/Microsoft Visual Studio 9.0/VC/lib/amd64" /libpath:"C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib/x64" "E:/SIDEEF~1/HOUDIN~1.469/custom/houdini/dsolib/*.a" "E:/SIDEEF~1/HOUDIN~1.469/custom/houdini/dsolib/*.lib" -out:"C:/Users/X5340/DOCUME~1/houdini12.5/dso/sop_star.dll" Running: hcompile -e sop_star.c "E:\Microsoft Visual Studio 9.0\VC\bin\amd64\cl" -TP sop_star.c -DUT_DSO_TAGINFO='"3262197cbf3141062ab519875732aed33b5ed0e2ca30f9a73be4944b060abfd265f4068fd26220780602ade729c0311c3cabb1109c87a94441033de964f095bc41af51a0ed82588789268d0847ba11fcab4e97a9d5a2d947fba4540b0305b144c471f5509a20ec26a9"' -TP -Zc:forScope -nologo -DVERSION="12.5.469" -DI386 -DWIN32 -DSWAP_BITFIELDS -D_WIN32_WINNT=0x0501 -DWINVER=0x0501 -DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -DBOOST_ALL_NO_LIB -I . -I "E:/Microsoft Visual Studio 9.0/VC/include" -I "C:/Program Files/Microsoft SDKs/Windows/v6.0A/Include" -I "E:/SIDEEF~1/HOUDIN~1.469/toolkit/include" -Ox -MD -EHsc -GR -bigobj -wd4355 -w14996 -DSESI_LITTLE_ENDIAN -DAMD64 -DSIZEOF_VOID_P=8 -DFBX_ENABLED=1 -DOPENCL_ENABLED=1 -DOPENVDB_ENABLED=1 -DMAKING_DSO -Fo"sop_star.o" -LD -link /libpath:"E:/Microsoft Visual Studio 9.0/VC/lib/amd64" /libpath:"C:/Program Files/Microsoft SDKs/Windows/v6.0A/Lib/x64" "E:/SIDEEF~1/HOUDIN~1.469/custom/houdini/dsolib/*.a" "E:/SIDEEF~1/HOUDIN~1.469/custom/houdini/dsolib/*.lib" -out:"C:/Users/X5340/DOCUME~1/houdini12.5/dso/sop_star.dll" sop_star.c Creating library sop_star.lib and object sop_star.exp SDK: C:\Program Files\Microsoft SDKs\Windows\v6.0A Embedding manifest 'C:/Users/X5340/DOCUME~1/houdini12.5/dso\sop_star.dll.manifest' into 'C:/Users/X5340/DOCUME~1/houdini12.5/dso\sop_star.dll'' [/CODE] And that is the error. It is in German but It means that "C:\Program" is wrongly spelled or could not be found. I think it has something to do with the path to the SDK but for a c++ beginner like me this it just a guess. [CODE] Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden [/CODE] Many thanks!
  15. Fog-shader

    I have a question concerning fog-shaders. I am using it in an Atmosphere-obj to colorize parts of the image while rendering with an Environment-light. In the environment light "Render Light Geometry" is turned on but as soon as I use the fog-shader I cannot see the background anymore. Is there anything I could do to prevent this from happening? Thanks in advance!
  16. Fog-shader

    Thanks Roman, that´s what I was looking for!
  17. I am still struggling to sort arrays in the HDK and hence I have a couple of questions. For example, if I have added a float attribute to my primitives how can I sort the primitives according to these values? I know how to access and read the attribute into the HDK but have no idea what I should do next. And the other question is: How do I sort a UT_ValArray of vectors by the length of the vector? Here is what I have so far: GA_ROAttributeRef myattrib; myattrib = gdp->findPrimitiveAttribute("area"); GA_ROHandleF myhandle(myattrib.getAttribute()); for(GA_Iterator it(gdp->getPrimitiveRange()); !it.atEnd(); it.advance()){ cout << myhandle(it.getOffset()) << endl; } [/CODE] Any help would be appreciated!
  18. sorting array - again

    Many thanks guys, that´s alot of useful Information!!
  19. sorting array - again

    Thanks Graham, it´s starting to make sense now. But still one question remains. If I want to sort the primitives by an attribute, for example the area, do I have to create the list of floats first? Or, to rephrase the question, what would be the preferred way to have "area" accessible to sortPrimitiveList()?
  20. sorting array - again

    @Petz Thanks, works like a charm!! @Graham Thanks Graham! I have allready found sortPrimitiveList() in GU_Detail but I am not sure how to use it correctly. Thanks again!!
  21. Sort Arrays

    I have two UT_ValArray<float> and would like to sort one array by values of the other. In the documentation I found UT_ValArray.sort(comparator) but I have no idea how to write the comparision function. Would be great If someone with more programming experience than I have could help me out. Thanks!
  22. inlinecpp again

    Hi all!! After some time fiddling around without success I thought it´s time to ask... I have a simple C++ function in inlinecpp and would like to use the second imput of the node as const GU_Detail *. But this does not work althought it did in Houdini 11. As long as I use only one GU_Detail, not matter if const or not it works without problems. Is there something I am doing wrong with the new geometry-library or is it maybe a bug? code as follow import inlinecpp cppModule = inlinecpp.createLibrary( name = "do_something", includes = """ #include <GU/GU_Detail.h> """, function_sources = [""" void doSomething(GU_Detail *gdp, const GU_Detail *gdpTemp) { cout << gdp->getNumPoints() << endl; cout << gdpTemp->getNumPoints() << endl; } """]) cppModule.doSomething(hou.pwd().geometry(), hou.pwd().inputs()[1].geometry()) [/CODE]
  23. inlinecpp again

    Thanks Graham for taking a look! Yes I am on Windows 7 64bit and the error I get is: File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\inlinecpp.py", line 430, in createLibrary config=config) File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py", line 1182, in create_library include_dirs, link_dirs, link_libs) File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py", line 293, in __init__ catch_crashes) File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py", line 312, in _load self._load_existing() File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py", line 373, in _load_existing getattr(self._library, function.symbol_name())) File "C:\PROGRA~4\SIDEEF~1\HOUDIN~1.167\python26\lib\ctypes\__init__.py", line 366 , in __getattr__ func = self.__getitem__(name) File "C:\PROGRA~4\SIDEEF~1\HOUDIN~1.167\python26\lib\ctypes\__init__.py", line 371 , in __getitem__ func = self._FuncPtr((name_or_ordinal, self)) AttributeError: function '?doSomething@@YAXPEAVGU_Detail@@PEBVGU_Detail@@@Z' not fou nd [/CODE] Whatever causes the error it must be new in Houdini 12. When I tried it in Houdini 11 it works without any problems.
  24. Python Module

    I have a button and would like to call a function in a Python-Sop. It is not a problem as long as the function is stored in a Python Module under the Scripts tab but how can I call the function if it´s under the Code tab? hou.phm().doSomething() does not work in that case. Thanks in advance!
  25. Python Module

    Thanks Graham!