Cycles: Objects are invisible in viewport when an object scale is 0 #118325
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
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
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#118325
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Fedora Linux
Graphics card: AMD
Blender Version
Broken: 4.0.2
Worked: (newest version of Blender that worked as expected)
Short description of error
When one scale of an object is 0, it's invisible in the shaded viewport with Cycles, but it shows up in the render.
Exact steps for others to reproduce the error
Hi @max-mustermann,
Thank you for reporting this issue. I can confirm the problem you described, where objects with a scale of 0 on one axis are invisible in the shaded viewport with Cycles, but they show up in the final render.
I will forward this issue to our development team for further investigation.
I have checked version 3.3.1, and the same thing happens there too.
taking this one
@max-mustermann hi , you indicated that some version of blender worked as intended , can you tell me which one it is ?
Hi @HamilcarR, It was broken in every version that I tested, down to 3.3.1.
But it only happens in CPU mode, not when using
GPU Compute
in the CyclesRender Properties
Your Fix makes it seem like it also happens with small values that are not 0, but I can't trigger any bug with any other value greater than 1*10⁻¹⁹. How did you do it?
Yeah , the fix isn't ready yet .
this problem makes me scratch my head a bit ... The reason why it's not present in gpu rendering is because embree is used for CPU rendering, and for the viewport shading , it uploads the transformation matrix in the API.
There, embree probably computes the new AABB of the object according to the new transformation matrix , and when you put a scale dimension to 0 , the AABB becomes degenerate , and it messes with ray intersections , hence why you could see other objects behind the one with 0 scale.
when you put a value < 1e-23 , there's another problem , there is an intersection , but the object becomes totally dark.
Also , I noticed a glitchy behavior with the final render as well concerning this issue , so it's not just the viewport shading .
Even with my "fix" :
The scale factor at which an object becomes totally dark depends on the distance to the viewport camera, so maybe it is a floating point precision limitation. But that distance is different between viewport and final render (it's lower in the final render), which can lead to objects being dark in the final render, but not the viewport.
Does the viewport use more precision than the final render somewhere?
Not from what I've seen , but I could have missed something, I don't know embree that well .
They do use two different modes ,
RTC_GEOMETRY_TYPE_INSTANCE
for the viewport andRTC_GEOMETRY_TYPE_TRIANGLE
for the final render , could be that .I need to investigate this a bit more on embree's side , and check what's happening behind the scenes for a more elegant solution .
Maybe we even have two distinct bugs on our hands, here .