Jump to content

Kalina

Members
  • Content count

    20
  • Donations

    0.00 CAD 
  • Joined

  • Last visited

Everything posted by Kalina

  1. I'm trying to figure out how to create an OpenVDB volume by writing out the voxels, to make a custom SOP. The OpenVDB Hello World example goes something like this: // Initialize the OpenVDB library. This must be called at least // once per program and may safely be called multiple times. openvdb::initialize(); // Create an empty floating-point grid with background value 0. openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create(); // Get an accessor for coordinate-based access to voxels. openvdb::FloatGrid::Accessor accessor = grid->getAccessor(); // Define a coordinate with signed indices. openvdb::Coord xyz(5, 5, 5); // Set the voxel value at (5, 5, 5) to 1. accessor.setValue(xyz, 1.0); But now how would I get this to work in Houdini in my "cookMySop()" function? How do I attach this grid to a GU_PrimVDB (or something) to actually create the OpenVDB primitive in Houdini? Could I get a Houdini-specific "Hello World" example?
  2. OpenVDB Hello World

    Updating from Houdini 16.0.504.20 to 16.0.577 fixed the issue.
  3. OpenVDB Hello World

    OK, I'll try downgrading from 4.9.3
  4. OpenVDB Hello World

    Thanks, but that didn't help. The issue is still the same. A bit more info that may be relevant, though: I am on CentOS 6, which comes pre-packaged with gcc4.4. You may notice that my Makefile points to CXX=/share/apps/bin/gcc ...where I have gcc4.9.3, which I'm trying to use instead. Am I using the wrong gcc version, or pointing to it incorrectly?
  5. OpenVDB Hello World

    I'm using whatever came with Houdini16. Should I be using a different one?
  6. OpenVDB Hello World

    Here is the full problematic code: SOP_Testing.C: #include "SOP_Testing.h" #include <UT/UT_DSOVersion.h> #include <OP/OP_OperatorTable.h> #include <OP/OP_AutoLockInputs.h> using namespace AVL_Testing; PRM_Template SOP_Testing::myTemplateList[] = { PRM_Template() }; void newSopOperator(OP_OperatorTable *table) { OP_Operator *op; op = new OP_Operator("avl_testing", "Testing", SOP_Testing::myConstructor, SOP_Testing::myTemplateList, 0, 0, NULL, OP_FLAG_GENERATOR ); table->addOperator(op); } OP_Node* SOP_Testing::myConstructor(OP_Network *net, const char *name, OP_Operator *op) { return new SOP_Testing(net, name, op); } SOP_Testing::SOP_Testing(OP_Network *net, const char *name, OP_Operator *op): SOP_Node(net, name, op){} SOP_Testing::~SOP_Testing() {} OP_ERROR SOP_Testing::cookMySop(OP_Context &context) { openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create(); openvdb::FloatGrid::Accessor accessor = grid->getAccessor(); openvdb::Coord xyz(5,5,5); accessor.setValue(xyz, 1.0); xyz.reset(0,0,0); accessor.setValue(xyz, 1.0); GU_PrimVDB::buildFromGrid((GU_Detail&)*gdp, grid, NULL, "gridName"); // Crashes on this line! // Complains about openvdb::v3_3_0_sesi::math::Transform::Transform(std::shared_ptr<openvdb::v3_3_0_sesi::math::MapBase> const&) return error(); } SOP_Testing.h: #ifndef __SOP_Testing_h__ #define __SOP_Testing_h__ #include <GU/GU_PrimVDB.h> #include <SOP/SOP_Node.h> namespace AVL_Testing { class SOP_Testing : public SOP_Node { public: static OP_Node *myConstructor(OP_Network*, const char *, OP_Operator *); static PRM_Template myTemplateList[]; protected: SOP_Testing(OP_Network *net, const char *name, OP_Operator *op); virtual ~SOP_Testing(); virtual OP_ERROR cookMySop(OP_Context &context); }; } #endif Makefile: CXX=/share/apps/bin/gcc HOU_VERSION = 16.0 DSONAME = SOP_Testing.so LOCATION = ~/houdini${HOU_VERSION}/dso/ SOURCES = SOP_Testing.C include $(HFS)/toolkit/makefiles/Makefile.gnu OPTIMIZER = -g HOUDINI_DSO_ERROR = 2 CPPFLAGS += -fPIC install: mkdir -p ${LOCATION} cp ${DSONAME} ${LOCATION}
  7. OpenVDB Hello World

    I just updated to Houdini16, and all of a sudden this same little code snippet doesn't work anymore. Houdini crashes on the line: GU_PrimVDB* vdb = GU_PrimVDB::buildFromGrid((GU_Detail&)*gdp, grid, NULL, "gridName"); ...with no log or helpful error message, just: undefined symbol: _ZN7openvdb11v3_3_0_sesi4math9TransformC1ERKSt10shared_ptrINS1_7MapBaseEE Deciphering that with c++filt shows that it's complaining about: openvdb::v3_3_0_sesi::math::Transform::Transform(std::shared_ptr<openvdb::v3_3_0_sesi::math::MapBase> const&) ...even though I'm not even using a transform. Any thoughts?
  8. Here is a simplification of my problem: I have two side-by-side volumes, and one of them has voxels that are twice the size of the other's. Or, another way of wording it – I have two volumes that are the same size, with resolutions e.g. 10x10x10 and 20x20x20. When I render the image, there is a seam between the two volumes. This seam is not there if the two volumes were have the same voxel size. How do I remove this seam? Is there something I can do in the shader? seam.hipnc
  9. I would really appreciate help with doing the simplest possible volume render using RenderMan in Houdini. I always just get a black image. I think my issue is that I don't know how to set up a volume shader... A sample .hip file, or just telling me which nodes to use, would be very appreciated.
  10. Some more advanced questions that I have, if you're feeling especially helpful: * How do I render a VDB? * What is the difference between the "RenderMan (rib)" and "RenderMan RIS (ris)" out nodes?
  11. How to write to VDB?

    Scripting in python, I can programmatically create a volume sop and then use setVoxel() or setAllVoxels() to fill in the voxels with data. ( http://archive.sidefx.com/docs/houdini15.0/hom/hou/Volume ) How can I do this with a VDB? I thought it should be somewhat similar, but there are no "set" functions I can call. ( http://archive.sidefx.com/docs/houdini15.0/hom/hou/VDB )
  12. OpenVDB Hello World

    Thank you, I got it working! openvdb::FloatGrid::Ptr grid = openvdb::FloatGrid::create(); openvdb::FloatGrid::Accessor accessor = grid->getAccessor(); openvdb::Coord xyz(5,5,5); accessor.setValue(xyz, 1.0); xyz.reset(0,0,0); accessor.setValue(xyz, 1.0); GU_PrimVDB* vdb = GU_PrimVDB::buildFromGrid((GU_Detail&)*gdp, grid, NULL, "gridName");
  13. OpenVDB Hello World

    Thanks, but that didn't get me very far. I now have: openvdb::GridBase::Ptr grid = openvdb::FloatGrid::create(); GEO_PrimVDB* vdb = GU_PrimVDB::buildFromGrid((GU_Detail&)gdp, grid, NULL, "gridName"); which segfaults and crashes: AP_Interface::coreDumpChaser(UTsignalHandlerArg) <libHoudiniUI.so> AP_Interface::si_CrashHandler::chaser(UTsignalHandlerArg) <libHoudiniUI.so> signalCallback(UTsignalHandlerArg) <libHoudiniUT.so> UT_Signal::UT_ComboSignalHandler::operator()(int, siginfo*, void*) const <libHoudiniUT.so> UT_Signal::processSignal(int, siginfo*, void*) <libHoudiniUT.so> [0xf70e] <libpthread.so.0> GA_PrimitiveFactory::lookupDefinition(GA_PrimitiveTypeId const&) const <libHoudiniGEO.so> GA_PrimitiveFactory::create(GA_PrimitiveTypeId const&, GA_Detail&, long) const <libHoudiniGEO.so> GEO_Detail::insertPrimitive(GA_PrimitiveTypeId const&, GEO_Primitive const*) <libHoudiniGEO.so> GU_PrimVDB::build(GU_Detail*, bool) <libHoudiniGEO.so> GU_PrimVDB::buildFromGridAdapter(GU_Detail&, void*, GEO_PrimVDB const*, char const*) <libHoudiniGEO.so>
  14. I created a custom SOP. Sometimes I can cook it successfully, other times it segfaults. It seems to always segfault after the "cookMySop()" function completes (i.e., outside of the code that I wrote???). When it segfaults, it either gives me one of two error logs, or no error log at all. Here are the two error logs. Can anyone make sense of them and direct me in a direction that I can start to look to debug this? Log version 1: Caught signal 11 AP_Interface::coreDumpChaser(UTsignalHandlerArg) <libHoudiniUI.so> AP_Interface::si_CrashHandler::chaser(UTsignalHandlerArg) <libHoudiniUI.so> signalCallback(UTsignalHandlerArg) <libHoudiniUT.so> UT_Signal::UT_ComboSignalHandler::operator()(int, siginfo*, void*) const <libHoudiniUT.so> UT_Signal::processSignal(int, siginfo*, void*) <libHoudiniUT.so> [0xf70e] <libpthread.so.0> UT_StringArray::entries() const <libHoudiniUT.so> GT_AttributeMap::GT_AttributeMap(GT_AttributeMap const&) <libHoudiniGEO.so> GT_AttributeList::addAttribute(char const*, UT_IntrusivePtr<GT_DataArray> const&, bool) const <libHoudiniGEO.so> GT_PrimVolume::getPointPrimitive() <libHoudiniGEO.so> GR_PrimVolume::update(RE_Render*, UT_IntrusivePtr<GT_Primitive> const&, GR_UpdateParms const&) <libHoudiniAPPS3.so> GUI_GeoRender::updatePrimitives(RE_Render*, GR_DisplayOption*, UT_Array<UT_IntrusivePtr<GT_Primitive> >&, GT_RefineParms&, GR_UpdateReason, GR_DecorationOverride, char const*) <libHoudiniAPPS3.so> GUI_GeoRender::update(RE_Render*, GR_DisplayOption*, GUI_SetupResult, GR_DecorationOverride, char const*, bool&) <libHoudiniAPPS3.so> GUI_DetailLook::updateForRender(RE_Render*, GUI_DisplayOption&, RE_LightList*, GR_DecorationOverride, char const*, bool&) <libHoudiniAPPS3.so> DM_VPortAgent3D::setupGeometry(RE_Render*) <libHoudiniAPPS3.so> DM_VPortAgent3D::renderViewport(RE_Render*, int, int, bool, bool) <libHoudiniAPPS3.so> DM_VPortAgent3D::doRender(RE_Render*, int, int) <libHoudiniAPPS3.so> DM_Viewport::doRender(RE_Render*, int, int) <libHoudiniAPPS3.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Viewport::reRender(RE_Render*, bool) <libHoudiniUI.so> UI_Window::renderChildViews(RE_Render*) <libHoudiniUI.so> UI_Window::doRedraw() <libHoudiniUI.so> UI_Queue::doWindowRedraws() <libHoudiniUI.so> UI_Queue::processNextEvent() <libHoudiniUI.so> UI_Queue::drain() <libHoudiniUI.so> UI_Queue::eventLoop() <libHoudiniUI.so> main_part2(int, char const* const*) <libHoudiniUI.so> main <libHoudiniUI.so> [0x1ed1b] <libc.so.6> _start <houdini-bin> Log version 2: Caught signal 11 AP_Interface::coreDumpChaser(UTsignalHandlerArg) <libHoudiniUI.so> AP_Interface::si_CrashHandler::chaser(UTsignalHandlerArg) <libHoudiniUI.so> signalCallback(UTsignalHandlerArg) <libHoudiniUT.so> UT_Signal::UT_ComboSignalHandler::operator()(int, siginfo*, void*) const <libHoudiniUT.so> UT_Signal::processSignal(int, siginfo*, void*) <libHoudiniUT.so> [0xf70e] <libpthread.so.0> RE_TextureFont::getGlyphInfo(unsigned int) <libHoudiniUI.so> RE_TextureFont::getStringWidth(unsigned char const*, unsigned char const*, UT_Unicode::transform const*) <libHoudiniUI.so> SI_DopeSheet::renderFrameIndex(RE_Render*, float, float, int, int, int, int, double) <libHoudiniUI.so> SI_DopeSheet::renderFrameIndicator(RE_Render*, int, int, float, float) <libHoudiniUI.so> SI_DopeSheet::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRenderKids(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Window::doRender(RE_Render*, int, int) <libHoudiniUI.so> UI_Feel::renderMe(RE_Render*, int, int) <libHoudiniUI.so> UI_Window::doRedraw() <libHoudiniUI.so> UI_Queue::doWindowRedraws() <libHoudiniUI.so> UI_Queue::processNextEvent() <libHoudiniUI.so> UI_Queue::drain() <libHoudiniUI.so> UI_Queue::eventLoop() <libHoudiniUI.so> main_part2(int, char const* const*) <libHoudiniUI.so> main <libHoudiniUI.so> [0x1ed1b] <libc.so.6> _start <houdini-bin>
  15. edward, thanks for the suggestion. I couldn't get valgrind working at first, but I just figured it out. I'll report back if I have more questions or relevant findings.
  16. Thanks, will do.
  17. I currently am using a File SOP and a GEO_IOTranslator to read in a custom data file. However, I'd like the user to be able to edit some parameters when reading in the file, so I would like to create a custom File-like SOP. How would I go about doing this? I'm trying to create a SOP based on SOP_Star.C, but that's probably not the best resource. How do I load and read a file? Could you point me at some examples to look at?
  18. I want to create a plugin that allows me to import a camera path. Specifically, the format of my external file is: translationX_frame1, translationY_frame1, translationZ_frame1, rotationX_frame1, rotationY_frame1, rotationZ_frame1 translationX_frame2, translationY_frame2, translationZ_frame2, rotationX_frame2, rotationY_frame2, rotationZ_frame2 translationX_frame3, translationY_frame3, translationZ_frame3, rotationX_frame3, rotationY_frame3, rotationZ_frame3 ... I don't really know where to begin. It would make sense to me to be able to create a camera, just set the translation and rotation at each frame. Can I do this in the HDK? Do I want to write a GEO_IOTranslator for this? If so, would I have to create a camera path somehow, or could I just create a camera? Would that be an OBJ_Camera? I would really appreciate being pointed in the right direction, or some help to get a simple example working; e.g. creating a camera looking at (0,0,0) and moving it from (0,0,1) at frame 1 to (0,0,2) at frame 2.
  19. Camera IO Translator

    Thank you thank you thank you THANK YOU! A CL_ClipReader is what I want in the end, but I couldn't find any examples or information about this, so this will be complicated for a beginner like myself (any advice?). For now, I wrote a simple python wf-to-clip converter script and edited CHOPio, and it works beautifully.
  20. Camera IO Translator

    It doesn't appear that I can use CHOPS. The file type is .wf, and trying to load it into a File CHOP in Houdini gives me "Unable to read file". http://www.sidefx.com/docs/houdini13.0/nodes/chop/file seems to confirm that this is not a valid file type. Also, this .wf file format that I described is the simpler of two camera path file formats that I will need to be able to import, so I thought I would start working on just that one... But the other file type is .vd, and I would like to be able to read in both in a somewhat similar manner if possible (e.g. programmatically, via a plugin). If you must know, the other format looks ilke this: fps 30.00000000 keys 3 0 : 1.02890467643737793 0.0280741788446903229 0.161896556615829468 -8.01320744 -3.913378 -78.6056137 0.00999999978 60 15 : 1.02306999999999992 0.0306226999999998917 0.264749000000000012 -8.99072453 -14.2586266 -69.5562738 0.01 60 32 : 1.01645994186401367 0.0335110984742641449 0.381316006183624268 -8.13035774 -26.0038414 -59.277462 0.00999999978 60 It's not frame-by-frame; here interpolation must be done between keys 0, 15, and 32.
×