Layers Generate Custom Materials Without User Input

Hello,

I’ve encountered a problem in Rhino 8 where material assignments for layers are changing from the Default Material to a custom material. The custom materials are named “Custom(##)” where ## counts up from 1, and the colour of the material reflects the layer colour. At times I have had 30+ custom materials in the file, which are auto assigned to layers when they are generated. To clear them I set all layers to “Default Material” and then purge unused materials. However, this does not stick for long; It always reverts back to custom materials. Objects that I assign materials to are not affected, which is expected.

image|134x500

I haven’t run into this problem in other files on this work computer. I haven’t experienced it on my personal computer (Mac Mini M4 Pro / Intel MBP 2019).

System info for work machine is -

System Info

Rhino 8 SR12 2024-10-8 (Rhino 8, 8.12.24282.07001, Git hash:master @ 2f42167325d83e0da0f3fe08e796c2b26e602bc5)
License type: Educational, build 2024-10-08
License details: Cloud Zoo

Windows 11 (10.0.26100 SR0.0) or greater (Physical RAM: 32GB)
.NET 7.0.7

Computer platform: DESKTOP

Standard graphics configuration.
Primary display and OpenGL: NVIDIA Quadro RTX 4000 (NVidia) Memory: 8GB, Driver date: 6-25-2024 (M-D-Y). OpenGL Ver: 4.6.0 NVIDIA 556.12
> Accelerated graphics device with 4 adapter port(s)
- Secondary monitor attached to adapter port 0
- Windows Main Display attached to adapter port 1

Secondary graphics devices.
Intel(R) UHD Graphics 750 (Intel) Memory: 2GB, Driver date: 7-24-2024 (M-D-Y).
> Integrated graphics device with 3 adapter port(s)
- There are no monitors attached to this 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: 6-25-2024
Driver Version: 32.0.15.5612
Maximum Texture size: 32768 x 32768
Z-Buffer depth: 24 bits
Maximum Viewport size: 32768 x 32768
Total Video Memory: 8 GB

Rhino plugins that do not ship with Rhino
C:\Users\scrake\AppData\Roaming\McNeel\Rhinoceros\8.0\Plug-ins\Bella (813de3fb-18eb-405f-bfcd-b0b4d3da91fb)\24.4.0.0\bella_rhino.rhp “Bella” 24.4.0.0
C:\Users\scrake\AppData\Roaming\McNeel\Rhinoceros\packages\8.0\Lumion-LiveSync-for-Rhino\3.60.65\LumionPlugin.rhp “Lumion LiveSync for Rhino”
C:\Program Files\Enscape\Enscape.Rhino.Plugin-net48\Enscape.Rhino8.Plugin.dll “Enscape.Rhino8.Plugin” 4.1.1.35

Rhino plugins that ship with Rhino
C:\Program Files\Rhino 8\Plug-ins\SolidTools.rhp “SolidTools”
C:\Program Files\Rhino 8\Plug-ins\Commands.rhp “Commands” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\rdk.rhp “Renderer Development Kit”
C:\Program Files\Rhino 8\Plug-ins\AnimationTools.rhp “AnimationTools”
C:\Program Files\Rhino 8\Plug-ins\RhinoRenderCycles.rhp “Rhino Render” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\RhinoRender.rhp “Legacy Rhino Render”
C:\Program Files\Rhino 8\Plug-ins\rdk_etoui.rhp “RDK_EtoUI” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\import_ACAD.rhp “AutoCAD file import: import_ACAD”
C:\Program Files\Rhino 8\Plug-ins\NamedSnapshots.rhp “Snapshots”
C:\Program Files\Rhino 8\Plug-ins\MeshCommands.rhp “MeshCommands” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\RhinoCycles.rhp “RhinoCycles” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\Toolbars\Toolbars.rhp “Toolbars” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\3dxrhino.rhp “3Dconnexion 3D Mouse”
C:\Program Files\Rhino 8\Plug-ins\BlockEdit.rhp “BlockEdit” 8.12.24282.7001
C:\Program Files\Rhino 8\Plug-ins\Displacement.rhp “Displacement”
C:\Program Files\Rhino 8\Plug-ins\SectionTools.rhp “SectionTools”

His Stuart -

That would be the expected behavior if you run the SynchronizeRenderColors command with the “all layers” option. Can you see that command in the command history? Does the behavior go away when you disable the 3rd party plug-ins and restart Rhino?
-wim

Hi, Wim.

I tested the SynchronizeRenderColors to get an idea of the command; it is exactly what is happening.

I have disabled the Bella, Enscape + Lumion plugins, and reopened the file. The problem persists and I cannot see SynchronizeRenderColors in command history.

Command History

Blocking plug-in Bella.
Blocking plug-in Lumion LiveSync for Rhino.
Blocking plug-in Enscape.Rhino8.Plugin.
Loading Legacy Rhino Render, version 1.50, Oct 8 2024, 07:16:51
Opened AutoCAD file version AutoCAD 2007.

Model space objects read: 16707, skipped: 0
Paper space objects read: 0, skipped: 0
Block definition objects read: 0, skipped: 0
XRef objects read: 0, skipped: 0
Successfully read file “K:\15200\15229\Documentation\Production\Rhino\Working Folder_Display Suite\03 Model\15229 Display Suite_WF.3dm”
Creating meshes… Press Esc to cancel
1 open surface added to selection.
Command: CommandHistory

The problem / effect seems to occur when opening the file (I’m not certain if it occurs while working on the open file). As a note, the only thing I’ve done differently in this project, compared to my normal workflow, is use snapshots for setting up views. Could this be a cause?

Cheers,

Stuart.

Hi Stuart -
From that command history, it looks like you are opening a DWG or DXF file. Is that something that is referred to from the 3dm file?
Can you reproduce the issue with a simple new file from a factory-default template?
-wim

1 Like

Hi, Wim.

Thanks for the help, this has solved it. So the problem was within the DWG/DXF import options. When the option for “Set layer material to layer color” is checked, it applies to ALL layers, not just the layers from the DWG import. When unchecked, the material assignments remain as they were when the file was last saved.

I assume it runs SynchronizeRenderColors AllLayers or something similar, internally. Is this behavior expected? Should it only apply to the layers being imported?

Cheers,

Stuart.

Hi Stuart -

It’s not something I was expecting.
RH-85449 File IO: Import DWG Also Sets Material for Existing Layers
-wim

1 Like