<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to get bitmaptexture coordinates property from UVTransform matrix in 3ds Max Programming Forum</title>
    <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060136#M446</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15858506"&gt;@Phil_Morgan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;What should be changed in your function in order to fix these inaccuracies?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;We don’t need to change anything. We just need to understand how the order of the scale components depends on the angle values. Once you figure that out, the problem will solve itself.&lt;/P&gt;&lt;P&gt;I enjoy solving puzzles, but it’ll have to wait until I have some free time.&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 15:59:14 GMT</pubDate>
    <dc:creator>denisT.MaxDoctor</dc:creator>
    <dc:date>2024-10-02T15:59:14Z</dc:date>
    <item>
      <title>How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044043#M432</link>
      <description>&lt;P&gt;Hello everyone!&lt;BR /&gt;&lt;BR /&gt;From a bitmaptexture, you can get the transform values ​​from the &lt;STRONG&gt;.coords.UVTransform&lt;/STRONG&gt; property in a matrix like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 339px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1413840i83BD1FC08D758D5B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(matrix3 [1.96962,0.173648,0] [-0.347296,0.984808,0] [0,0,1] [0.268068,-0.282018,0])&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Is there any way to get back the values ​​of the texture coordinate properties "&lt;STRONG&gt;Offset&lt;/STRONG&gt;", "&lt;STRONG&gt;Tiling&lt;/STRONG&gt;" and "&lt;STRONG&gt;Angle&lt;/STRONG&gt;" from the matrix data obtained in the .coords.UVTransform property?:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="matrix_to_bitmap-property.jpg" style="width: 339px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1413841iECCEEB0497218F7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="matrix_to_bitmap-property.jpg" alt="matrix_to_bitmap-property.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 12:16:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044043#M432</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-25T12:16:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044176#M433</link>
      <description>&lt;P&gt;This should help:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;show b.coords
  .blur : float
  .mapping
  .mapChannel : integer
  .mappingType : integer
  .UVW_Type : integer
  .U_Mirror : boolean
  .V_Mirror : boolean
  .U_Tile : boolean
  .V_Tile : boolean
  .showMapOnBack : boolean
  .Noise_On : boolean
  .Noise_Animate : boolean
  .UVTransform
  .realWorldScale : boolean
  .realWorldHeight : float
  .realWorldWidth : float
  .phase : float
  .U_Offset : float
  .V_Offset : float
  .U_Tiling : float
  .V_Tiling : float
  .U_Angle : angle
  .V_Angle : angle
  .W_Angle : angle
  .Noise_Amount : float
  .Noise_Size : float
  .Noise_Levels : integer
  .Blur_Offset : float
false
&lt;/LI-CODE&gt;
&lt;P&gt;To answer you question - you can use these properties&lt;/P&gt;
&lt;P&gt;.U_Offset, .V_Offset, .U_Tiling, .V_Tiling, .U_Angle, .V_Angle, .W_Angle&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 13:08:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044176#M433</guid>
      <dc:creator>MartinBeh</dc:creator>
      <dc:date>2024-09-25T13:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044569#M434</link>
      <description>&lt;P&gt;No, it won't help me. You probably misunderstood my question. I need to get the values ​​of the &lt;STRONG&gt;"Offset", "Tiling" and "Angle"&lt;/STRONG&gt; properties &lt;STRONG&gt;FROM a MATRIX&lt;/STRONG&gt; that was obtained from a texture map's &lt;STRONG&gt;.coords.UVTransform&lt;/STRONG&gt; property. &lt;U&gt;I don't have the original texturemap&lt;/U&gt;, but I do have the data from the &lt;STRONG&gt;.coords.UVTransform&lt;/STRONG&gt; property from original texturemap. Now I need to create a texture map by applying the data from this matrix to it.&lt;BR /&gt;After some experimentation, I was able to get the values ​​for the "Angle" and "Tiling" properties by taking them this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;mySourceUVTransformMatrix=(matrix3 [1.96962,0.173648,0] [-0.347296,0.984808,0] [0,0,1] [0.268068,-0.282018,0])

myBitmapTex=Bitmaptexture()
bitmapAngle=mySourceUVTransformMatrix.rotationpart as eulerangles

--Tiling
myBitmapTex.coords.U_Tiling = mySourceUVTransformMatrix.scalepart[1]
myBitmapTex.coords.V_Tiling = mySourceUVTransformMatrix.scalepart[2]

-- Angle
myBitmapTex.coords.U_Angle = bitmapAngle.x
myBitmapTex.coords.V_Angle = bitmapAngle.y
myBitmapTex.coords.W_Angle = bitmapAngle.z&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I don't know how to get from this matrix the values ​​for the "Offset" property:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;-- Offset
myBitmapTex.coords.U_Offset = ?
myBitmapTex.coords.V_Offset = ?&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:55:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044569#M434</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-26T10:55:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044593#M435</link>
      <description>&lt;P&gt;Ah I see, sorry for the misunderstanding.&lt;/P&gt;
&lt;P&gt;I don't have first hand insights but "offset" seems to be the position row4 in the matrix, but needs the scaling/rotation removed...?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: At least without tiling/scaling, you can do this:&lt;/P&gt;
&lt;P&gt;myBitmapText.coords.U_Offset = mySourceUVTranformMatrix.position[1]&lt;/P&gt;
&lt;P&gt;myBitmapText.coords.V_Offset = mySourceUVTranformMatrix.position[2]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the online help for .UVTransform says: "Get the transformation matrix to convert the mapping coordinates into real-world size" - not sure whether this makes it dependent on the units setup in 3ds Max, too?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:43:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044593#M435</guid>
      <dc:creator>MartinBeh</dc:creator>
      <dc:date>2024-09-25T15:43:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044642#M436</link>
      <description>&lt;P&gt;Yes, the "Offset" property somehow relates to the data from row4, but I don't understand how, because when I set this data to "Offset" properties, the texture map looks completely different from the original map. I think there must be some function or formula to convert UVTransform data from the matrix back to texture map coords properties.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 15:39:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13044642#M436</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-25T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13046702#M437</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/369352"&gt;@MartinBeh&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;Ah I see, sorry for the misunderstanding.&lt;/P&gt;&lt;P&gt;I don't have first hand insights but "offset" seems to be the position row4 in the matrix, but needs the scaling/rotation removed...?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: At least without tiling/scaling, you can do this:&lt;/P&gt;&lt;P&gt;myBitmapText.coords.U_Offset = mySourceUVTranformMatrix.position[1]&lt;/P&gt;&lt;P&gt;myBitmapText.coords.V_Offset = mySourceUVTranformMatrix.position[2]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the online help for .UVTransform says: "Get the transformation matrix to convert the mapping coordinates into real-world size" - not sure whether this makes it dependent on the units setup in 3ds Max, too?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;To get the position values ​​from the 4th column of the matrix, instead of position[1] and position[2], you can also use row4[1] and row4[2] or translationpart[1] and translationpart[2]. But this is also not what you need, unfortunately. The numbers you get are not the same as those in the properties of the original texture map, which is why the new map does not look as it should. Yes, the online help says "&lt;STRONG&gt;Get the transformation matrix to convert the mapping coordinates into real-world size&lt;/STRONG&gt;", but there are no examples of how to do this anywhere.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:53:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13046702#M437</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-26T10:53:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13052622#M438</link>
      <description>&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;If I understand correctly, you're asking how Texturemap coordinate parameters (UV offsets, tiling, and angles) relate to the UVTransform matrix, right?&lt;/P&gt;&lt;P&gt;May I ask why you're interested? Is it just for academic purposes?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sun, 29 Sep 2024 07:26:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13052622#M438</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-09-29T07:26:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13052794#M439</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;If I understand correctly, you're asking how Texturemap coordinate parameters (UV offsets, tiling, and angles) relate to the UVTransform matrix, right?&lt;/P&gt;&lt;P&gt;May I ask why you're interested? Is it just for academic purposes?&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not exactly. As I wrote above, I need this to create a texture map based on the matrix data I have. But I don't have direct data for properties like "Offset", "Tiling" and "Angle" that I could just substitute into the corresponding properties of the new texture map. But I do have a UVTransform matrix, which I assume contains this necessary data. So I need a way to take this transform data into the "Offset", "Tiling" and "Angle" properties. I was able to get the values ​​for the "Tiling" and "Angle" properties, but I don't know how to get the values ​​for the "Offset" property from the matrix. The values ​​I get from the .translationpart section do not correspond to the "Offset" property values ​​of the original texture map.&lt;/P&gt;&lt;P&gt;So I have a simple question: can I get the &lt;STRONG&gt;U_Offset&lt;/STRONG&gt; and &lt;STRONG&gt;V_Offset&lt;/STRONG&gt; values ​​for a texturemap &lt;STRONG&gt;from a UVTransform matrix&lt;/STRONG&gt; via maxscript?&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 11:12:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13052794#M439</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-29T11:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053103#M440</link>
      <description>&lt;P&gt;How do you get the UVTransform matrix? You say you have a matrix but don't have UV coord parameters. Is it external data?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is that only “texturemap” can know how the coord parameters correspond to the matrix. The matrix is used by interactive rendering, and it is up to texturemap to tell the renderer how to interpret its coord parameters.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 16:40:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053103#M440</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-09-29T16:40:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053237#M441</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;How do you get the UVTransform matrix? You say you have a matrix but don't have UV coord parameters. Is it external data?&amp;nbsp;&lt;/P&gt;&lt;P&gt;The point is that only “texturemap” can know how the coord parameters correspond to the matrix. The matrix is used by interactive rendering, and it is up to texturemap to tell the renderer how to interpret its coord parameters.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I do have the UVTransform matrix. Hmm... Okay, I'll try to explain in more detail. I have a vrmat file, which describes the materials and their properties in xml format, including the properties of the texture maps used. I can load this file into VRayVRmatMtl and use it as a regular material, but this material with textures cannot be edited. I don't have the original material itself, I only have the vrmat file. But I need to make changes to this material, for this I need to recreate it in its original form so that I can make the necessary changes to it. In the vrmat file there are no separate properties of the texture "Offset", "Tiling" and "Angle", but there are matrix values ​​that are obtained from the UVTransform property. I was able to get values ​​for the "Tiling" and "Angle" properties (scalepart and rotationpart) from this matrix, but for the "Offset" property I can't convert the values ​​from the translationpart. If I apply the values ​​from the matrix as is, the texture does not look like it did in the original material.&lt;/P&gt;</description>
      <pubDate>Sun, 29 Sep 2024 19:06:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053237#M441</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-29T19:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053494#M442</link>
      <description>&lt;P&gt;The main issue with translating the matrix value to the coord parameters is the order of transforms. In the MAX matrix, the order is scale, rotation, position. After transforms, we obtain the position in the absolute coordinate system, which is equivalent to the translation offset. However, the order of the UV transform matrix is position, scale, rotation, where the final matrix is always rotated about the origin center, which is [0.5, 0.5, 1.0]. Therefore, to obtain UV offsets from the matrix value, you need to first rotate and scale it back from the current state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make a simple helper and check how parameters change the matrix:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;bm = meditmaterials[1] = bitmaptexture()
when parameters bm change do format "&amp;gt;&amp;gt;%\n" bm.coords.uvtransform
&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Sep 2024 00:01:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13053494#M442</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-09-30T00:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13054618#M443</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;The main issue with translating the matrix value to the coord parameters is the order of transforms. In the MAX matrix, the order is scale, rotation, position. After transforms, we obtain the position in the absolute coordinate system, which is equivalent to the translation offset. However, the order of the UV transform matrix is position, scale, rotation, where the final matrix is always rotated about the origin center, which is [0.5, 0.5, 1.0]. Therefore, to obtain UV offsets from the matrix value, you need to first rotate and scale it back from the current state.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Make a simple helper and check how parameters change the matrix:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;bm = meditmaterials[1] = bitmaptexture()
when parameters bm change do format "&amp;gt;&amp;gt;%\n" bm.coords.uvtransform&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;Thanks Denis. Yes, I created the helper and saw how the matrix values ​​change, but I don't quite understand how I can do this "... &lt;STRONG&gt;to get the UV offsets from the matrix value, you first need to rotate and scale it back from its current state.&lt;/STRONG&gt;" Can you show me a simple example of how to do this in the matrix, and not directly in the texture map properties?&lt;BR /&gt;Here is a simple example of a UVTransform matrix, which was obtained from the following texture map values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="0.png" style="width: 296px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1416006iB45AE8A9A4AB66E1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0.png" alt="0.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;(matrix3 [1.96962,0.173648,0] [-0.347296,0.984808,0] [0,0,1] [-1.20914,-0.412254,0])&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get the U_Offset and V_Offset values ​​from this matrix, which were 0.5 and 0.25 respectively?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 299px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1416008iF7966E10E32524FC/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Maybe I ask a little stupid questions, but I'm just starting to study matrices and don't quite understand its logic yet. Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Sep 2024 13:07:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13054618#M443</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-09-30T13:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13058305#M444</link>
      <description>&lt;LI-CODE lang="general"&gt;fn decompuvmatrix mat =
(
	piv = transmatrix [0.5,0.5,0.5]
	xtm = xformmat mat piv
	pre_scl = xtm * inverse (scalematrix xtm.scale)
	pre_rot = pre_scl * inverse (xtm.rotation as matrix3)

	pos = -pre_rot.pos
	rot = xtm.rotation as eulerangles
	scl = xtm.scale

	#(pos, scl, rot)
)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 01 Oct 2024 22:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13058305#M444</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-10-01T22:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13059573#M445</link>
      <description>&lt;P&gt;Thank you very much Denis! I tried your code, but there is a small problem. If the rotation angle is less than 45 degrees, then everything is transformed correctly, but when the rotation angle is more than 45 degrees, then the scaling values ​​(U_Tiling and V_Tiling) are swapped and the position (U_Offset and V_Offset) become strange values. The problem also starts to occur when the rotation angle is -45 degrees.&lt;BR /&gt;Here are the original values ​​and the UVTransform matrix:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="source.png" style="width: 298px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1416890i0A01DB36918483E2/image-size/large?v=v2&amp;amp;px=999" role="button" title="source.png" alt="source.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(matrix3 [2.08398,0.71934,0] [-2.15802,0.694658,0] [0,0,1] [0.0345393,-0.740334,0])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And this is the result of converting this matrix back to values:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="result.png" style="width: 301px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1416891i832E6FF5F4B89BA8/image-size/large?v=v2&amp;amp;px=999" role="button" title="result.png" alt="result.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, when the rotation angle is 180 degrees, it becomes a negative value (-180), although the scaling and position are correct.&lt;BR /&gt;What should be changed in your function in order to fix these inaccuracies?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 12:26:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13059573#M445</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-10-02T12:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060136#M446</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15858506"&gt;@Phil_Morgan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;What should be changed in your function in order to fix these inaccuracies?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;We don’t need to change anything. We just need to understand how the order of the scale components depends on the angle values. Once you figure that out, the problem will solve itself.&lt;/P&gt;&lt;P&gt;I enjoy solving puzzles, but it’ll have to wait until I have some free time.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 15:59:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060136#M446</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-10-02T15:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060312#M447</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15858506"&gt;@Phil_Morgan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;What should be changed in your function in order to fix these inaccuracies?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can give you a clue... It seems that MAX transposes the UV matrix, which explains the swapping of scale components.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 17:12:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060312#M447</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-10-02T17:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060939#M448</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/1634609"&gt;@denisT.MaxDoctor&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/15858506"&gt;@Phil_Morgan&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;BR /&gt;What should be changed in your function in order to fix these inaccuracies?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I can give you a clue... It seems that MAX transposes the UV matrix, which explains the swapping of scale components.&lt;BR /&gt;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Thanks for the tip, Denis. After some experimentation and some changes to your function, I was able to correctly convert the UVTransform matrix back to the .coords map property values.&lt;BR /&gt;Here's what I got:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;fn decompuvmatrix mat =
(
	piv = transmatrix [0.5,0.5,0.5]
	xtm = xformmat mat piv
	
	pre_scl = xtm * inverse (scalematrix xtm.scale)
	pre_rot = pre_scl * inverse (xtm.rotation as matrix3)

	scaleX = length [ xtm[1][1], xtm[2][1], xtm[3][1] ]
	scaleY = length [ xtm[1][2], xtm[2][2], xtm[3][2] ]
	scaleZ = length [ xtm[1][3], xtm[2][3], xtm[3][3] ]    

	tempZ = cross xtm[1] xtm[2]
	
	if (dot tempZ xtm[3])&amp;lt;0 then (
		scaleX = -scaleX
	)
	new_scl = (matrix3 [scaleX,0,0] [0,scaleY,0] [0,0,scaleZ] [0,0,0])
	
	pos = (inverse pre_rot).pos
	rot = xtm.rotation as eulerangles
	scl = new_scl.scale
	
	#(pos, scl, rot)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most likely, something in this function can be written differently and more correctly. But at the moment it works as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 21:37:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13060939#M448</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-10-02T21:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13061073#M449</link>
      <description>&lt;P&gt;I don't think what you are doing is correct. You have to transpose the matrix before using inverse scaling and rotation.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 23:17:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13061073#M449</guid>
      <dc:creator>denisT.MaxDoctor</dc:creator>
      <dc:date>2024-10-02T23:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get bitmaptexture coordinates property from UVTransform matrix</title>
      <link>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13062511#M450</link>
      <description>&lt;P&gt;Thank you, Denis!&lt;BR /&gt;Yes, you are right, it was enough to simply transpose the matrix and everything fell into place:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;fn transposeMat TM = (
	matrix3 [TM.row1[1], TM.row2[1], TM.row3[1]] \
		[TM.row1[2], TM.row2[2], TM.row3[2]] \
		[TM.row1[3], TM.row2[3], TM.row3[3]] [0,0,0]
)


fn decompuvmatrix mat = (
	piv = transmatrix [0.5,0.5,0.5]
	xtm = xformmat mat piv
	tm = transposeMat xtm
	pre_scl = xtm * inverse (scalematrix tm.scale)
	pre_rot = pre_scl * inverse (tm.rotation as matrix3)
	
	pos = (inverse pre_rot).pos
	rot = xtm.rotation as eulerangles
	scl = tm.scale

	#(pos, scl, rot)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But another problem was discovered: if the "&lt;STRONG&gt;Use Real-World Scale&lt;/STRONG&gt;" option is enabled in the map, then the values ​​for Offset&amp;nbsp;are incorrect, although the Size (U_Tiling and V_Tiling) and Angle are transferred correctly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source values U_Offset and V_Offset:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 323px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1417430i733105319883F56A/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;After receiving from the matrix:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 318px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1417431i48D9AC73BF05CE4A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know what to do with this yet, but I will continue to try to find a solution.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Oct 2024 13:56:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/3ds-max-programming-forum/how-to-get-bitmaptexture-coordinates-property-from-uvtransform/m-p/13062511#M450</guid>
      <dc:creator>Phil_Morgan</dc:creator>
      <dc:date>2024-10-03T13:56:57Z</dc:date>
    </item>
  </channel>
</rss>

