Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    Interpolated VertexMap from SDS Object?

    SDK Help
    0
    4
    371
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      Helper
      last edited by

      On 11/05/2017 at 04:53, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   18 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Hi folks,

      supposed, I have a PolygonObject that carries one or more VertexMap tags. I stick this PolygonObject into an SDS Object, and now I want to sample those VertexMaps on the SDS mesh. How would I do that? Simply using the original VertexMap does not work, as the SDS mesh of course has a different topology.

      The VertexMap shader can do this (not in the viewport, but very well during rendering), so it is possible.

      Thanks for any hints!

      Cheers,
      Frank

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 16/05/2017 at 01:02, xxxxxxxx wrote:

        OK, so there seems to be no "official" way to do that in Cinema.

        The problem is, that there is no mapping information, so basically, one cannot know which of the VertexMap tags on the SDS mesh has originated from which of the tags on the original PolygonObject. There are, however, assumptions one can make, and those work surprisingly well (as long as no changes are made internally to the way the SDS object creates the tags on its cache).

        My assumption was: When the SDS object creates the tags on its cache, it probably iterates the original tags and processes them one by one. Therefore, it is likely that the order of tags on the cache corresponds to the order of the original tags.

        So I tried this: Find the index n of a tag on the PolygonObject. Then iterate through the tags on the SDS cache until the nth tag. That's the tag you're looking for.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 16/05/2017 at 06:18, xxxxxxxx wrote:

          Hi Frank,

          thanks for keeping us updated. Much appreciated.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 16/05/2017 at 06:29, xxxxxxxx wrote:

            It's not a working solution, just idea.

            Since you know the start, sds just divde polygon. And looking this plugin it's seem possible for a sds mesh to retrieve the original mesh. 
            http://code.vonc.fr/?a=41

            So you may found algorithm for retrieve pt_id to SDS mesh to no SDS mesh.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post