Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login
    1. Maxon Developers Forum
    2. manvydas
    M
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 3
    • Best 1
    • Controversial 0
    • Groups 0

    manvydas

    @manvydas

    1
    Reputation
    3
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    manvydas Unfollow Follow

    Best posts made by manvydas

    • RE: Importing a skeletal mesh using the Cineware SDK

      Thank you for the valuable information.

      Implementing CreateSceneFromC4D() appears to be what I am missing. Since we never cared about skeletal transforms, we were relying on, as you put it, the fastest way to extract the actual geometry of the object, which was working really well for the previous simpler cases.

      I'm currently working on other tasks, so, I haven't validated everything yet, but this seems to be the solution. I won't hesitate to ask if I run into other problems when I return to the importer, but this looks doable now. Thanks again for the help!

      posted in Cineware SDK
      M
      manvydas

    Latest posts made by manvydas

    • RE: Importing a skeletal mesh using the Cineware SDK

      Thank you for the valuable information.

      Implementing CreateSceneFromC4D() appears to be what I am missing. Since we never cared about skeletal transforms, we were relying on, as you put it, the fastest way to extract the actual geometry of the object, which was working really well for the previous simpler cases.

      I'm currently working on other tasks, so, I haven't validated everything yet, but this seems to be the solution. I won't hesitate to ask if I run into other problems when I return to the importer, but this looks doable now. Thanks again for the help!

      posted in Cineware SDK
      M
      manvydas
    • RE: Importing a skeletal mesh using the Cineware SDK

      Hello. Thanks for the reply!

      Sorry if I wasn't clear enough. We have a working importer already, but the requirement to import skeletal meshes from C4D files is a new one. I'm certain that most of the code in the importer is good already, since it's not a new thing and only skeletal meshes are causing us trouble. Also, we always check for the presence of caches. That's why I went straight to something that looked odd to me.

      I was comparing everything (bind pose matrices, keyframes, etc.) to our FBX importer which has always supported skeletal meshes. After we convert the C4D data to our own coordinate spaces, the values read from the FBX and the C4D files are almost identical. Bind pose matrices and final keyframe transforms match closely. The only thing that appears to be significantly different is the vertex data.

      I don't think I can share the complex models, but I have a simpler one that we made just for testing. Please excuse the programmer "art" 😁 , but it's simple and still shows what I mean. We imported an FBX to C4D and exported the file again. Both as an FBX and as a C4D file. I'm attaching the C4D file.

      Spike_new.c4d

      I've also saved the vertices right after import to OBJ files. These are pre-converted to our own coordinate spaces, but, other than some axis flips or swaps, there should be no additional transforms on top of this vertex data. I'm attaching those OBJs as well.

      obj_vertices.zip

      As you can see, with the FBX import, I get the vertices in the bind pose. With the C4D import, I get an already deformed object.

      To read the vertices, we use a function that overrides PolygonObjectData::Execute(). Inside it, we just access the vertex data through these functions (after a bunch of asserts and checks):

      	PolygonObject *op = static_cast<PolygonObject*>(bo);
      	const Vector *vertices = op->GetPointR();
      	Int32 vertexCount = op->GetPointCount();
      	const CPolygon *polygonIndices = op->GetPolygonR();
      	Int32 polygonCount = op->GetPolygonCount();
      

      The rest is just regular vertex data reading, followed by some coordinate space changes. I'm not seeing any transforms being applied on our end.

      Any ideas how to solve this would be greatly appreciated! Thanks!

      posted in Cineware SDK
      M
      manvydas
    • Importing a skeletal mesh using the Cineware SDK

      Hello, I'm trying to get skeletal meshes imported into our software by using the Cineware SDK. I've finally got most of the transforms and keyframe handling in order, but it appears that the vertex data already has some sort of a transform baked in.

      I'm attaching a screenshot to show you what I mean. That leg should not be twisted like that in the bind pose.
      05d83ab5-3c69-4851-9cd6-672f87e2a56c-image.png

      Is there a way to get the raw non-transformed vertex data somehow? If not, what transform is being applied there and what do I need to do to get a clean bind pose object for our animation system?

      Thanks!

      posted in Cineware SDK c++ windows
      M
      manvydas