Attribute Node in Object Mode seems to have undocumented limit of 8 attributes in EEVEE, and exhibits unpredictable behaviour when more are used #92448
Labels
No Label
Meta
Good First Issue
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds, Tests & Devices
Module
Python API
Module
Rendering & Cycles
Module
Sculpt, Paint & Texture
Module
User Interface
Module
VFX & Video
Priority
High
Priority
Low
Priority
Normal
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
11 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender-manual#92448
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: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA TITAN X (Pascal)/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 471.68
Blender Version
Broken: version: 2.93.5, branch: master, commit date: 2021-10-05 12:04, hash:
blender/blender@a791bdabd0
Short description of error
While using the Attribute node to get float data from Object attributes, there seems to be a limit of 8 attributes, and which 8 you get is not always predictable (leading to some very hard-to-debug behaviour). Perhaps it's related to evaluation order?
Here's a simple bar graph shader with bars linked to the object's custom parameters. As you can see in these screenshots, in Cycles it displays 32 bars (as intended), in EEVEE it only shows 8.
I'm not sure if this is a limitation or a bug. I'd love to have more than 8 (this test uses 32, and my shader requires ~60!) but if that's not possible I think the limitation should at least be listed in the manual, perhaps in one of these:
https://docs.blender.org/manual/en/latest/render/eevee/limitations.html or .
Exact steps for others to reproduce the error
bug_shaderProblemB_001.blend
The graph now displays only the first 8 parameters 😿
bug_shaderProblemB_001.blend
Added subscriber: @df-1
blender/blender#92433 was marked as duplicate of this issue
Interestingly, the EEVEE limit seems to be 8 inputs for Vectors as well as Floats, so by packing the float data into Vec3 you can get 24 values in to the shader, you can see in the screenshot that it handles 24 fine, adding any more doesn't work though
Attribute Node in Object Mode seems to have undocumented limit of 8 float attributes in EEVEE, and exhibits unpredictable behaviour when more are usedto Attribute Node in Object Mode seems to have undocumented limit of 8 attributes in EEVEE, and exhibits unpredictable behaviour when more are usedAdded subscriber: @RoyTheKoi
It's worth noting that the alpha channel is accessible too, providing a maximum of 4 channels per attribute.
If precision is not a big priority there may be a workaround. I just tested a method that allows packing up to three lower precision values into a single float, theoretically allowing 8x4x3 = 96 unique channels of attributes. The float packing method I used here was adapted from this article: http://emmettmcquinn.com/blog/graphics/2012/11/07/float-packing.html
Note that I'm using 3.0 Alpha which is why custom properties can show as colours, though the main idea should still work for 2.93.
Cool, nice data packing @RoyTheKoi! Yes I came to a similar conclusion about RGBA, I'm now packing my data into 8 x RGBA channels set to the Raw Data type, for 32 float channels. I managed to split my single shader into two so it just about works for my use case, otherwise I'd have to either use your packed floats approach or split the packed data between custom attributes and vertex data channels. It's a pretty long-winded workaround but hey if it means I can get back to work then I'm happy :-) Thanks!
Added subscriber: @iss
Changed status from 'Needs Triage' to: 'Confirmed'
I can confirm, that there is limit of 8 attributes. Confirming, since this is undocumented limitation.
Added subscriber: @lichtwerk
note this limit:
Not sure where the others are taken though.
Related D12969: Eevee: support accessing custom mesh attributes
Added subscriber: @Hetarek
Added subscriber: @ChristophWerner
Is there a way to increase or double the amount of attributes in the future? The current limit can be annoying in production.
Added subscriber: @Cyrill-Vitkovskiy
Added subscriber: @FLEB
Added subscriber: @Blendify
Changed status from 'Confirmed' to: 'Resolved'
This limitation has been documented in rBM9630
Hi, sorry, is the packing code convertible to Geometry Nodes (no code/drivers)? Thanks. I wanted to implement this but I don't know how to do it