Mesh.TextureCoordinates Rhino3dm Problem

Hi there,

I wrote a plugin for vvvv to read *3dm files. Updated it to version 8.
Now I have a strange behavior. I have an old file made with rhino7 and several objects where i made a simple planar mapping. If i read this file with my plugin, i have the right result of UV coordinates coming out of Mesh.TextureCoordinates. Now if I do the same with Rhino8 I only get 0 and 1 values instead of the right values of the mapping. Also tryed to save it as R7 file but, it did not change.
As it still works with the old file it most certainly is not on the plugin side, or something changed with Mesh.TextureCoordinates in rhino3dm version8? Also there is this new CachedTextureCorrdinates…do I have to use that one? How it would be applied, cause I did not find yet a way to get the needed Texture GUID. Any help or hint is much appreciated…
Thats how I read them:


I know vvvv is not so common, but the nodes you see are just the provided c# properties/methods, so its easy to understand…

I think this exactly the same issue as @Jussi_Aaltonen just replied for here:

Hi
You need to set the texture coordinates from a mapping before using them.

The principle is this:

  • Object’s material has a list of textures
  • Each texture defines the texture mapping channel to use
  • Texture mapping from that channel is used to create a set of cached texture coordinates

I need to check what are the methods available in Rhino3dm to do that.

I was not able to access the texture mappings from rhino3dm. Filed a bug for that: RH-81650 Accessing object texture mappings in rhino3dm

2 Likes

Thank you for your answers.
I tried the function from @nathanletwory but that did not help yet.
After a few test with different version, I can say that if I read the Mesh.TextureCoordinates with Rhino3dm Version 8.6 it is working, if the mapping is done in Rhino7. If i save a file as Rhino7 from within Rhino8 it does not work, and a Rhino8 file as well does not work.
Btw I am using the RenderMeshes of all the Objects…

Oh, that was for modifying surface parameter mapping on mesh objects. It’s something else. Sorry I missed that.

Yes, but unfortunately it is a bit of a coincidence.