Maniphest T93179

Eevee Attribute Rendering Has Some Left Out Nodes Comparing with Cycles
Closed, ResolvedBUG

Assigned To
Kévin Dietrich (kevindietrich)
Authored By
Zijun Zhou (Eary)
Nov 18 2021, 3:55 AM
Tags
  • BF Blender
  • EEVEE & Viewport
  • Geometry Nodes
  • Nodes & Physics
Subscribers
Brecht Van Lommel (brecht)
Kévin Dietrich (kevindietrich)
Pratik Borhade (PratikPB2123)
Zijun Zhou (Eary)
Tokens
"Love" token, awarded by kursadk.

Description

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce MX130/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.49

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-11-18 00:40, hash: rBceec40097583
Worked: none

Short description of error
It seems it's forgotten that Vertext Color node and UV Map node can also read generic attributes, at least Cycles reads it. The fact that Eevee doesn't should be considered a bug.

Exact steps for others to reproduce the error
Turn on Rendered View Shading on the Left Side Viewport and Comapre Cycles and Eevee Results.

Revisions and Commits

rB Blender
D13730

Event Timeline

Zijun Zhou (Eary) created this task.Nov 18 2021, 3:55 AM
Zijun Zhou (Eary) added projects: EEVEE & Viewport, Geometry Nodes.
Zijun Zhou (Eary) updated the task description.
Zijun Zhou (Eary) updated the task description.Nov 18 2021, 4:03 AM
Zijun Zhou (Eary) updated the task description.
Pratik Borhade (PratikPB2123) updated the task description.Nov 18 2021, 6:51 AM
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Nov 18 2021, 7:08 AM

Hi, thanks for the report. I can reproduce this issue on master.

For now, Issue can be fixed by using Attribute node instead of specific nodes.

Pratik Borhade (PratikPB2123) added a project: Nodes & Physics.Nov 18 2021, 7:08 AM
Brecht Van Lommel (brecht) added subscribers: Kévin Dietrich (kevindietrich), Brecht Van Lommel (brecht).Nov 18 2021, 3:23 PM

CC @Kévin Dietrich (kevindietrich).

Kévin Dietrich (kevindietrich) added a comment.Nov 19 2021, 3:35 PM

Is this even a bug? The UV map (CD_MLOOPUV/CD_MTFACE) is being overwritten by a point attribute (with CD_PROP_FLOAT3 type here) so the attribute lookup fails as the UV Map node is requesting a CD_MTFACE (similarly for the vertex color). We could use CD_AUTO_FROM_NAME in the UV Map and Vertex Color nodes to avoid further complicating the attribute lookup logic in the render code, which will fix the issue. But overwriting such standard attributes in Blender is going to make exporters (like Alembic or USD) fail.

Cycles works here because it just requests the attribute by name, with no type constraint.

Brecht Van Lommel (brecht) added a comment.Nov 22 2021, 6:32 PM

It could be argued this is a bug in Cycles, though solving it there does not really make it easier for users to set up correct shaders for geometry nodes. As far as I can tell the downside of CD_AUTO_FROM_NAME would be cases where UV maps and vertex loops have the same name. Though Cycles also has that and I think we might as well make it consistent.

In T93179#1256385, @Kévin Dietrich (kevindietrich) wrote:

We could use CD_AUTO_FROM_NAME in the UV Map and Vertex Color nodes to avoid further complicating the attribute lookup logic in the render code, which will fix the issue. But overwriting such standard attributes in Blender is going to make exporters (like Alembic or USD) fail.

It's not clear to me how Alembic and USD are related to this bug. Are you saying that changing the shader nodes would have some negative impact on them? Or that the fact that geometry nodes write to general attributes instead of UV maps and vertex colors is a problem independent of this, and that we should address that as the root cause instead or in addition to this?

If so, I think we should make the shading nodes consistent regardless. The geometry nodes team is aware of the interop issues between general attributes and UV maps and vertex colors, though I'm not sure if there is a concrete plan to tackle that.

kursad k (kursadk) awarded a token.Nov 24 2021, 5:32 PM
Kévin Dietrich (kevindietrich) added a comment.Jan 4 2022, 11:53 AM
In T93179#1258121, @Brecht Van Lommel (brecht) wrote:

It's not clear to me how Alembic and USD are related to this bug. Are you saying that changing the shader nodes would have some negative impact on them? Or that the fact that geometry nodes write to general attributes instead of UV maps and vertex colors is a problem independent of this, and that we should address that as the root cause instead or in addition to this?

I meant the latter, but I was thinking out loud mostly. My two statements were not meant to follow logically each other. I realized while looking into this that changing the UV maps type information with geometry nodes that exporting UV maps will fail in Alembic as it looks for a CD_MLOOPUV of the same name (CD_PROP_FLOAT2 could work, but even that is not well supported by geometry nodes currently).

Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".Feb 1 2022, 11:58 PM
Kévin Dietrich (kevindietrich) closed this task as Resolved by committing rB281bcc1c1dd6: Fix T93179: geonodes UVs and Vertex colors do not work in EEVEE.May 3 2022, 10:50 PM
Kévin Dietrich (kevindietrich) claimed this task.
Kévin Dietrich (kevindietrich) added a commit: rB281bcc1c1dd6: Fix T93179: geonodes UVs and Vertex colors do not work in EEVEE.