Stretched textures in D5

This is a n00b question. Only recently I got into PBR rendering. I just don’t know where to look: When I import a rectangular surface from Rhino into D5, the textures of the PBR materials are stretched according to the aspect ratio of the surface.

Should I correct that in D5 or in Rhino?

Is there a way to do UV unwrapping so that squares in the texture stay squares when mapped?

Is there no simple solution?

I assume, this is quite a n00b question.

Hi @feklee ,

If D5 can read the WCS mapping method from Rhino, that would be the easy way.


If it doesn’t, which is likely in my experience with external renderers, use a box or planar mapping method for the rectangular surface in it’s texture mapping properties within the Properties panel. Then set the plane or box mapping widget to a square aspect ratio using the grid when defining it.

Thanks for the explanation, @BrianJ! On my system, a PC, it looks a bit different. But I did apply box mapping, and I did draw a cube as a box. Still, the mapping is distorted when previewed with _UVEditor:

Hi @feklee ,

I was also on Windows for the last screenshot, but it shouldn’t matter either way. Here I don’t see the issue you mentioned in the UVeditor.

Here’s a file so we are on the same page…
BoxMap.3dm (2.7 MB)

This screenshot shows the mapping widget displayed for the copy of the surface that has Box mapping applied and the box map being set to one unit square.

This screenshot shows the UVeditor…

Upload your file if you see the same as I showed with mine.

Thank you! I did some more tests. All I did was create a plane and _ApplyBoxMapping to it. I didn’t assign a texture. Results:

  • 2024-03-26_box_mapped_plane.3dm (on the left in screenshot below): When imported directly into D5, which can read 3DM, then the texture is stretched. I scaled the texture uniformly by 100.

  • 2024-03-26_box_mapped_plane.fbx (on the right): This is the above file exported to .FBX. The texture is not distorted. I scaled the texture uniformly by 0.1 to match the size. I have no idea, why there is a difference in scale. Apparently, 3DM files and FBX files are handled quite differently when it comes to textures.

In a nutshell: _ApplyBoxMapping plus export to FBX solves the issue.

However there is one thing that I still don’t understand, and it may be something fundamental. As you can see in the screenshot below, the preview texture in the _UVEditor still shows up stretched. Why is that?

Try D5 live-sync plugin as far as I know it can persevere Rhino mapping

Thanks, I should have a look, but I also want to understand what is going on. Rendering is not really my thing. I try to avoid it as much as I can. But if I continue working on that project, then I may also look into other renderers, maybe even native Cycles. My major gripe with D5 is that it doesn’t support realistic looking semi-transparent materials.

If you mean Raytraced or Rhino Render, then go for it!

Hi @feklee ,

I don’t see the texture stretched in the UVeditor here with your 3dm file. Your box map size looks fine too as shown so I am wondering if the issue on your end is somehow system specific. Provide the results of the SystemInfo command and I can tell more.

Regarding needing to use FBX for D5 to understand the mapping assigned to the surface, this is not surprising. I’ve found that often external renderers can’t read the mapping and repeat values in the 3dm due to limited support for the format on their end. Using FBX, OBJ or gLTF as open file formats that can carry UVs can help. Alternately, custom mapping where you use the Unwrap command is also the most successful means of getting UVs out of Rhino in my experience.

_SystemInfo says:

Rhino 8 SR5 2024-3-12 (Rhino 8, 8.5.24072.13001, Git hash:master @ e3530849b75f00b2b977766a567ae29b055837e9)
License type: Commercial, build 2024-03-12
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 16GB)
.NET 7.0.15

Computer platform: LAPTOP  - Plugged in [17% battery remaining]

Hybrid graphics configuration.
  Primary display: Intel(R) UHD Graphics 620 (Intel) Memory: 1GB, Driver date: 6-24-2021 (M-D-Y).
    > Integrated graphics device with 3 adapter port(s)
        - Windows Main Display is laptop's integrated screen or built-in port
  Primary OpenGL: NVIDIA RTX A2000 12GB (NVidia) Memory: 12GB, Driver date: 2-7-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 551.52
    > Integrated accelerated graphics device with 4 adapter port(s)
        - Video pass-through to primary display device

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 2-7-2024
  Driver Version: 31.0.15.5152
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 12282 MB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino 8\Plug-ins\Commands.rhp	"Commands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\WebBrowser.rhp	"WebBrowser"	
  C:\Program Files\Rhino 8\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 8\Plug-ins\RhinoScript.rhp	"RhinoScript"	
  C:\Program Files\Rhino 8\Plug-ins\IdleProcessor.rhp	"IdleProcessor"	
  C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp	"MeshCommands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp	"Grasshopper"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp	"RhinoCodePlugin"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp	"Displacement"	
  C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp	"SectionTools"	

When I click Pack texture meshes in _UVEditor, then the squares in the texture are preserved, albeit the texture is scaled.

Thank you for the explanation regarding FBX vs. 3DM!

The only thing I see in your system info is the old driver for the Intel GPU. Run the command Notifications > In the Notifications panel you will see messages about driver updates for the graphics cards in your computer > Double click the “i” in the blue circle to get a link to “Check Now” from the respective manufacturer. Download and install the latest driver for the Intel card and then restart your computer.

@Jussi_Aaltonen Does the UVE use the GPU set for OpenGL or the Primary display?

UV Editor uses the same display code as the standard wireframe mode.

In the meantime I did a few updates, just now, and I assume I have the latest drivers now. According to _SystemInfo:

Rhino 8 SR5 2024-3-12 (Rhino 8, 8.5.24072.13001, Git hash:master @ e3530849b75f00b2b977766a567ae29b055837e9)
License type: Commercial, build 2024-03-12
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 16GB)
.NET 7.0.15

Computer platform: LAPTOP  - Plugged in [94% battery remaining]

Hybrid graphics configuration.
  Primary display: Intel(R) UHD Graphics 620 (Intel) Memory: 1GB, Driver date: 6-24-2021 (M-D-Y).
    > Integrated graphics device with 3 adapter port(s)
        - Windows Main Display is laptop's integrated screen or built-in port
  Primary OpenGL: NVIDIA RTX A2000 12GB (NVidia) Memory: 12GB, Driver date: 3-12-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 551.86
    > Integrated accelerated graphics device with 4 adapter port(s)
        - Video pass-through to primary display device

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: NVIDIA Corporation
  Render version: 4.6
  Shading Language: 4.60 NVIDIA
  Driver Date: 3-12-2024
  Driver Version: 31.0.15.5186
  Maximum Texture size: 32768 x 32768
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 32768 x 32768
  Total Video Memory: 12282 MB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino 8\Plug-ins\Commands.rhp	"Commands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp	"MeshCommands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp	"Grasshopper"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp	"RhinoCodePlugin"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp	"Displacement"	
  C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp	"SectionTools"	

With 2024-03-26_box_mapped_plane.3dm (see above), the UV mapping is still displayed as distorted in _UVEditor. No change:

Maybe it comes down to the settings in the Nvidia control panel, which I don’t recall touching:




Hi @feklee
Your Intel driver is still quite old. You need to manually go to the Intel website and find a newer. There’s a driver from '22.
HTH, Jakob

Thank you! I did that update as well. _SystemInfo now says:

Rhino 8 SR5 2024-3-12 (Rhino 8, 8.5.24072.13001, Git hash:master @ e3530849b75f00b2b977766a567ae29b055837e9)
License type: Commercial, build 2024-03-12
License details: Cloud Zoo

Windows 11 (10.0.22631 SR0.0) or greater (Physical RAM: 16GB)
.NET 7.0.15

Computer platform: LAPTOP  - Plugged in [45% battery remaining]

Standard graphics configuration.
  Primary display and OpenGL: Intel(R) UHD Graphics 620 (Intel) Memory: 1GB, Driver date: 10-28-2020 (M-D-Y). OpenGL Ver: 4.6.0 - Build 27.20.100.8935
    > Integrated graphics device with 3 adapter port(s)
        - Windows Main Display is laptop's integrated screen or built-in port
  Primary OpenGL: Intel(R) UHD Graphics 620 (Intel) Memory: 1GB, Driver date: 10-28-2020 (M-D-Y). OpenGL Ver: 4.6.0 - Build 27.20.100.8935
    > Integrated (slow!) graphics device with 3 adapter port(s)
        - Windows Main Display is laptop's integrated screen or built-in port

OpenGL Settings
  Safe mode: Off
  Use accelerated hardware modes: On
  Redraw scene when viewports are exposed: On
  Graphics level being used: OpenGL 4.6 (primary GPU's maximum)
  
  Anti-alias mode: 4x
  Mip Map Filtering: Linear
  Anisotropic Filtering Mode: High
  
  Vendor Name: Intel
  Render version: 4.6
  Shading Language: 4.60 - Build 27.20.100.8935
  Driver Date: 10-28-2020
  Driver Version: 27.20.100.8935
  Maximum Texture size: 16384 x 16384
  Z-Buffer depth: 24 bits
  Maximum Viewport size: 16384 x 16384
  Total Video Memory: 1 GB

Rhino plugins that do not ship with Rhino

Rhino plugins that ship with Rhino
  C:\Program Files\Rhino 8\Plug-ins\Commands.rhp	"Commands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk.rhp	"Renderer Development Kit"	
  C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp	"Rhino Render"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp	"RDK_EtoUI"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp	"Snapshots"	
  C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp	"MeshCommands"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp	"RhinoCycles"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Grasshopper\GrasshopperPlugin.rhp	"Grasshopper"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\RhinoCode\RhinoCodePlugin.rhp	"RhinoCodePlugin"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp	"Toolbars"	8.5.24072.13001
  C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp	"3Dconnexion 3D Mouse"	
  C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp	"Displacement"	
  C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp	"SectionTools"	

However:

  1. This did not fix the issue.

  2. I don’t understand why the Intel driver is relevant. After all, all my above tests were done with Rhino displaying through an Nvidia A2000 eGPU.

I finally did double check, and with the Nvidia A2000 disconnected, i.e. only the Intel GPU available, the issue also occurs.