Interpolated VertexMap from SDS Object?

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!


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.

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

Hi Frank,

thanks for keeping us updated. Much appreciated.

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.

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