Search the Community
Showing results for tags 'hello world'.
Found 1 result
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?