Viewport colour (Solid shading mode, Object color) shows one colour but another is displayed instead for more than 4096 objects #79509

Closed
opened 2020-08-04 10:56:46 +02:00 by Dion Moult · 11 comments

System Information
Operating system: Gentoo Linux
Graphics card:

Blender Version
Broken: (example: 2.80, edbf15d3c0, master, 2018-11-28, as found on the splash screen) 2.83.3
Worked: (newest version of Blender that worked as expected) none

See attached Blend file.

  1. Create array of 100 x 100 cubes, and split by loose parts. This creates 10,000 cube objects.
  2. Run the following script to colour the cubes randomly:
import bpy
import random
for obj in bpy.context.visible_objects:
    x = random.randint(1,4)
    if x == 1:
        obj.color = (1,0,0,.2)
    elif x == 2:
        obj.color = (0,1,0,.2)
    elif x == 3:
        obj.color = (0,0,1,.2)
    else:
        obj.color = (1,1,1,.2)
  1. You will see a colourful mosaic of cubes. However, some colours are correct, some colours are wrong. Click some cubes to check. I think that after the 4,096th Cube, the colours start becoming wrong. All cubes prior to that object is the right colour. If you hide or show some cubes in the outliner, you will also see colours start randomly changing.

viewport-color-bug.blend

viewport-color-bug.zip

**System Information** Operating system: Gentoo Linux Graphics card: **Blender Version** Broken: (example: 2.80, edbf15d3c044, master, 2018-11-28, as found on the splash screen) 2.83.3 Worked: (newest version of Blender that worked as expected) none See attached Blend file. 1. Create array of 100 x 100 cubes, and split by loose parts. This creates 10,000 cube objects. 2. Run the following script to colour the cubes randomly: ``` import bpy import random for obj in bpy.context.visible_objects: x = random.randint(1,4) if x == 1: obj.color = (1,0,0,.2) elif x == 2: obj.color = (0,1,0,.2) elif x == 3: obj.color = (0,0,1,.2) else: obj.color = (1,1,1,.2) ``` 3. You will see a colourful mosaic of cubes. However, some colours are correct, some colours are wrong. Click some cubes to check. I _think_ that after the 4,096th Cube, the colours start becoming wrong. All cubes prior to that object is the right colour. If you hide or show some cubes in the outliner, you will also see colours start randomly changing. [viewport-color-bug.blend](https://archive.blender.org/developer/F8743992/viewport-color-bug.blend) [viewport-color-bug.zip](https://archive.blender.org/developer/F8744019/viewport-color-bug.zip)
Author

Added subscriber: @Moult

Added subscriber: @Moult
Member

Added subscriber: @nacioss

Added subscriber: @nacioss
Member

Yes i can reproduce it
image.png
And as you said it seems like after the 4096th cube it starts to give wrong viewport to object color property relation.
@fclem maybe for you?

Yes i can reproduce it ![image.png](https://archive.blender.org/developer/F8744104/image.png) And as you said it seems like after the 4096th cube it starts to give wrong viewport to object color property relation. @fclem maybe for you?
Member

Added subscriber: @fclem

Added subscriber: @fclem
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can also confirm.
This is only the case for Solid shading mode (set to Object color) though, Material Preview or Eevee Rendered mode seems fine (if you use the Object Info > color socket)

Can also confirm. This is only the case for `Solid` shading mode (set to `Object` color) though, Material Preview or Eevee Rendered mode seems fine (if you use the `Object Info` > color socket)
Philipp Oeser changed title from Viewport colour shows one colour but another is displayed instead to Viewport colour (Solid shading mode, Object color) shows one colour but another is displayed instead for more than 4096 objects 2020-08-04 11:51:44 +02:00

This issue was referenced by c15352dd67

This issue was referenced by c15352dd67f551f559c40d7d5e0402dc6ec2e913

This issue was referenced by cf3431e0e8

This issue was referenced by cf3431e0e860f91e8a8c74cb964e81456cada29d

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Clément Foucault self-assigned this 2020-08-05 19:38:01 +02:00
Author

You guys are awesome! Thank you so much!

You guys are awesome! Thank you so much!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79509
No description provided.