adding channels produces errors

Hi

I have imported a point cloud to gvdb as follows

gvdb.SetVerbose(true);
gvdb.SetProfile(false);
gvdb.SetCudaDevice(devid);
gvdb.Initialize();
gvdb.AllocData(m_pntpos, m_numpnts, sizeof(Vector3DF), true );
gvdb.AllocData(m_pntclr, m_numpnts, sizeof(uint), true );
memcpy(m_pntpos.cpu, positions.data(), sizeof(Vector3DF)*m_numpnts);
gvdb.CommitData(m_pntpos);
gvdb.CommitData(m_pntclr);
gvdb.SetPoints(m_pntpos, m_pntclr);

where positions.data() is a std::vector with the point cloud data.

Now i wish to configure the vdb grid and further write my kernels but if i add the following piece of code

gvdb.Configure(3,3,3,3,4);
 gvdb.AddChannel(0,T_INT,2);
 gvdb.SetVoxelSize(1.0f, 1.0f, 1.0f);
 gvdb.SetChannelDefault(8,8,8);

to the code above

gvdb.SetVerbose(true);
        gvdb.SetProfile(false);
        gvdb.SetCudaDevice(devid);
        gvdb.Initialize();


        gvdb.Configure(3,3,3,3,4);
        gvdb.AddChannel(0,T_INT,2); // it doesn't produce error if i comment this line.
        gvdb.SetVoxelSize(1.0f, 1.0f, 1.0f);
        gvdb.SetChannelDefault(8,8,8);

        gvdb.AllocData(m_pntpos, m_numpnts, sizeof(Vector3DF), true );
        gvdb.AllocData(m_pntclr, m_numpnts, sizeof(uint), true );

      
        memcpy(m_pntpos.cpu, positions.data(), sizeof(Vector3DF)*m_numpnts);
        gvdb.CommitData(m_pntpos);
        gvdb.CommitData(m_pntclr);
        gvdb.SetPoints(m_pntpos, m_pntclr);

Now my question is

  1. Why do i get an error CUDA ERROR: invalid argument (func: cuArray3DCreate, caller: AllocateTextureGPU)
    Error. Application will exit. when i add the addchannel line?
  2. How can I check if my point cloud has been imported correctly? Can i visualize it?
  3. I also wish to find out through some kernel the number of points in each of the voxels.
  4. What is the best way to figure out a size for the voxels?

Kindly advise.
rohit

Hi Rohit,

Well supported channel types are T_FLOAT and T_UCHAR.
Other channel types, such as T_INT, T_VEC3, are not fully supported yet. You should be able to create them, and write custom kernels for these types, but some functions may not be available with these types. If you still have issues please post details on this thread.

Regards,
Rama