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

Closed
opened 3 years ago by Moult · 11 comments
Moult commented 3 years ago

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)
Moult commented 3 years ago
Poster

Added subscriber: @Moult

Added subscriber: @Moult

Added subscriber: @nacioss

Added subscriber: @nacioss

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?

Added subscriber: @fclem

Added subscriber: @fclem
Collaborator

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Collaborator

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

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

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)
lichtwerk 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 3 years ago
Owner

This issue was referenced by c15352dd67

This issue was referenced by c15352dd67f551f559c40d7d5e0402dc6ec2e913
Owner

This issue was referenced by cf3431e0e8

This issue was referenced by cf3431e0e860f91e8a8c74cb964e81456cada29d
fclem commented 3 years ago
Collaborator

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
fclem closed this issue 3 years ago
fclem self-assigned this 3 years ago
Moult commented 3 years ago
Poster

You guys are awesome! Thank you so much!

You guys are awesome! Thank you so much!
Sign in to join this conversation.
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Development Management
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/Triaging
legacy module/User Interface
legacy module/VFX & Video
legacy project/1.0.0-beta.2
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.91
legacy project/2.92
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.3
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Asset Browser (Archived)
legacy project/Asset Browser Project Overview
legacy project/Audio
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Asset Bundle
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Development Management
legacy project/Eevee
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Animation
legacy project/Game Audio
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Logic
legacy project/Game Physics
legacy project/Game Python
legacy project/Game Rendering
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/GPU / Viewport
legacy project/Grease Pencil
legacy project/GSoC
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Websites
legacy project/LibOverrides - Usability and UX
legacy project/Line Art
legacy project/Masking
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Performance
legacy project/Physics
legacy project/Pipeline, Assets & I/O
legacy project/Platform: FreeBSD
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Pose Library Basics
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Retrospective
legacy project/Sculpt, Paint & Texture
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/Triaging
legacy project/Undo
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
legacy project/Wintab High Frequency
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › EEVEE & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds Tests & Devices
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
papercut
performance
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information 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

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79509
Loading…
There is no content yet.