WIP: Hydra: Per-vertex color attributes #114585

Draft
Vasyl Pidhirskyi wants to merge 5 commits from Vasyl-Pidhirskyi/blender:per-vertex-color into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

Purpose

Add support for Per-vertex color attributes.

Technical steps

Added support for displayColor and displayOpacity.

Notes For Reviewers

Render Delegate uses default vertex Color Attributes if no material assign to material.

Ref: #110765

### Purpose Add support for Per-vertex color attributes. ### Technical steps Added support for displayColor and displayOpacity. ### Notes For Reviewers Render Delegate uses default vertex Color Attributes if no material assign to material. Ref: https://projects.blender.org/blender/blender/issues/110765
Vasyl Pidhirskyi added 2 commits 2023-11-07 17:15:29 +01:00
Vasyl Pidhirskyi requested review from Bogdan Nagirniak 2023-11-07 17:38:24 +01:00
Vasyl Pidhirskyi requested review from Georgiy Markelov 2023-11-07 17:38:38 +01:00
Vasyl Pidhirskyi added 2 commits 2023-11-09 13:54:07 +01:00
Georgiy Markelov approved these changes 2023-11-09 15:19:59 +01:00
Georgiy Markelov left a comment
Member

Works fine.

Works fine.
Bogdan Nagirniak added 1 commit 2023-11-09 17:46:37 +01:00
Bogdan Nagirniak approved these changes 2023-11-09 17:47:51 +01:00
Bogdan Nagirniak left a comment
Contributor

Made some code simplification and improvement.
Tested - works good

Made some code simplification and improvement. Tested - works good
Vasyl Pidhirskyi requested review from Brecht Van Lommel 2023-11-09 19:28:00 +01:00
Vasyl Pidhirskyi requested review from Brian Savery (AMD) 2023-11-09 19:28:01 +01:00
Brecht Van Lommel requested changes 2023-11-09 19:39:09 +01:00
Brecht Van Lommel left a comment
Owner

For me the bullet point in #110765 meant adding support for vertex color attributes to be used by materials.

This makes it fall back to vertex colors if there is no material, but that's not consistent with how Blender works. Blender just uses the default material then, not vertex colors.

So I'm not really sure about the purpose of this PR as is. I can see the use if the Hydra renderer was used similar to workbench in Blender, for editing rather than final renders. But that's not what Hydra is used for at the moment.

For me the bullet point in #110765 meant adding support for vertex color attributes to be used by materials. This makes it fall back to vertex colors if there is no material, but that's not consistent with how Blender works. Blender just uses the default material then, not vertex colors. So I'm not really sure about the purpose of this PR as is. I can see the use if the Hydra renderer was used similar to workbench in Blender, for editing rather than final renders. But that's not what Hydra is used for at the moment.
Author
Member

I think we can utilize MaterialX nodedef <geompropvalue> for NodeShaderVertexColor to pass the vertex color attribute to Hydra. So Color Attribute node will work the same way as it works for Cycle and Eevee.

I think we can utilize MaterialX nodedef `<geompropvalue>` for `NodeShaderVertexColor` to pass the vertex color attribute to Hydra. So `Color Attribute` node will work the same way as it works for Cycle and Eevee.

Yes, more generally it should be possible to export any type of attribute and use it this way. The code does not have to be vertex color specific.

There is a question about performance and memory usage. Many of the attributes may not actually be used by materials. For the best performance you'd need to analyze the materials and figure out which attributes they actually use.

Yes, more generally it should be possible to export any type of attribute and use it this way. The code does not have to be vertex color specific. There is a question about performance and memory usage. Many of the attributes may not actually be used by materials. For the best performance you'd need to analyze the materials and figure out which attributes they actually use.
Brian Savery (AMD) approved these changes 2023-11-15 00:47:22 +01:00
Vasyl Pidhirskyi changed title from Hydra: Per-vertex color attributes to WIP: Hydra: Per-vertex color attributes 2023-11-27 14:46:32 +01:00
This pull request has changes conflicting with the target branch.
  • source/blender/io/usd/hydra/mesh.cc
  • source/blender/io/usd/hydra/mesh.h

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u per-vertex-color:Vasyl-Pidhirskyi-per-vertex-color
git checkout Vasyl-Pidhirskyi-per-vertex-color
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
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, Assets & 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
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
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
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
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#114585
No description provided.