Jump to content


  • Content count

  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Posts posted by resonanz

  1. 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.





  2. 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!

  3. 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!

  4. Do you have MSVCDir variable set correctly? If not, add it and set its value to point to VC folder. Read this.

    BTW. You are using Windows SDK or VS 2008?

    I am using just the compiler of Windows SDK.

    Ah, that's a critical piece of information that was missing, that you had installed the Windows SDK into your F:\ drive. Can you find the exact path of where mt.exe is on your F: drive? Then, please log a thorough bug report at sidefx.com.

    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.

  5. Does the latest Houdin build now work for you without the --no-embed-manifest option?

    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!

  6. 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"
    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''

    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.

    Der Befehl "C:\Program" ist entweder falsch geschrieben oder konnte nicht gefunden werden

    Many thanks!

  7. 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.

  8. 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!

  9. You can use the sortPrimitiveList() with the float * signature to essentially sort by attribute value/expression using some supplied list of values.

    The following 2 lines mimics 4 primitives (0,1,2,3) with respective attribute values (1,3,2,0). After sorting, they will be sorted in increasing order of the corresponding values.

    float order[4] = {1, 3, 2, 0};

    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()?

  10. 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;

    Any help would be appreciated!

  11. 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.


  12. 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
    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__
    File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py",
    line 312, in _load
    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

    Whatever causes the error it must be new in Houdini 12. When I tried it in Houdini 11 it works without any problems.

  13. 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())


  14. 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!