Announcement

Collapse
No announcement yet.

simple meshVoxel copy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • simple meshVoxel copy

    Hi,

    I do have the following question:

    i have a meshvoxel v1 loaded from a .abc file. Now I need a simple copy v2 of this v1 in RAM where I can modify things like vertices later (but don't touch the original v1)

    in the vraymeshgeom sample provided I found the code to copy channel by channel and vertex by vertex and face by face from my original meshvoxel to the modified meshvoxel - this is my current working implementation.

    But probably I could get a good speed improvement when I could simply copy the original data as a stream or something.

    I tried the copy constructor the following way, but it does not work (voxel2 seems to have no data)...


    VUtils::MeshFile2 *pMesh1 = VUtils::newDefaultMeshFile2("E:\\001.ABC");

    int res = pMesh1->init("E:\\001_plg.ABC");

    pMesh1->setFramesPerSecond(25.0);

    VUtils::MeshVoxel *v1 = (pMesh1->getVoxel(1));

    VUtils::MeshVoxel v2 = VUtils::MeshVoxel(*v1);


    i use max 2015 with vray2.5.01

    thanks for the support in advance!

    regards
    Stefan
    Freelance 3D Artist

    https://www.deepframes.com

  • #2
    What you are doing now is the correct approach, although you can use memcpy() to copy the data for a channel, there is no need to do it element by element.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment

    Working...
    X