# Mesh.TextureCoordinates Rhino3dm Problem

**URL:** <https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429>\
**Category:** rhino3dm\
**Tags:** windows\
**Created:** [April 19, 2024, 10:58am UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429 "2024-04-19T10:58:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![moritzcramer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/moritzcramer/32/744330_2.png) [@moritzcramer](https://discourse.mcneel.com/u/moritzcramer)\
**Post date:** [April 19, 2024, 10:58am UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/1 "2024-04-19T10:58:14Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/4/9/d/49dcabec9ddab9a915ac3a03c79c868b90042083.png)  
I know vvvv is not so common, but the nodes you see are just the provided c# properties/methods, so its easy to understand…

---

<div class="post-metadata">

**Author:** ![nathanletwory](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/nathanletwory/32/482880_2.png) [@nathanletwory](https://discourse.mcneel.com/u/nathanletwory)\
**Post date:** [April 19, 2024, 1:16pm UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/2 "2024-04-19T13:16:12Z")

</div>

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

> [@Texturing problem or bug? R7 vs R8](https://discourse.mcneel.com/t/texturing-problem-or-bug-r7-vs-r8/180021/8):
>
> I know it sounds stupid. I’ll try to explain. The mesh objects you have in the 3dm file use material with a base color texture. That base color texture uses texture mapping from channel 1. Those mesh objects have surface parameter mapping on channel 1 (all meshable objects have that by default). Surface parameter mapping computes texture coordinates by applying a transform to surface parameters. So in order to modify the surface parameter mapping one needs to modify the surface parameters. It…

---

<div class="post-metadata">

**Author:** ![Jussi\_Aaltonen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jussi_aaltonen/32/494409_2.png) [@Jussi\_Aaltonen](https://discourse.mcneel.com/u/Jussi_Aaltonen)\
**Post date:** [April 22, 2024, 7:58am UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/3 "2024-04-22T07:58:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jussi\_Aaltonen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jussi_aaltonen/32/494409_2.png) [@Jussi\_Aaltonen](https://discourse.mcneel.com/u/Jussi_Aaltonen)\
**Post date:** [April 22, 2024, 11:44am UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/4 "2024-04-22T11:44:06Z")

</div>

I was not able to access the texture mappings from rhino3dm. Filed a bug for that: [RH-81650](https://mcneel.myjetbrains.com/youtrack/issue/RH-81650) Accessing object texture mappings in rhino3dm

---

<div class="post-metadata">

**Author:** ![moritzcramer](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/moritzcramer/32/744330_2.png) [@moritzcramer](https://discourse.mcneel.com/u/moritzcramer)\
**Post date:** [April 24, 2024, 3:19pm UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/5 "2024-04-24T15:19:57Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![Jussi\_Aaltonen](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/jussi_aaltonen/32/494409_2.png) [@Jussi\_Aaltonen](https://discourse.mcneel.com/u/Jussi_Aaltonen)\
**Post date:** [May 6, 2024, 1:18pm UTC](https://discourse.mcneel.com/t/mesh-texturecoordinates-rhino3dm-problem/180429/6 "2024-05-06T13:18:21Z")

</div>

> [@moritzcramer](#):
>
> I tried the function from @nathanletwory but that did not help yet.

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

> [@moritzcramer](#):
>
> 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.

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