Fix #107062: support opacityThreshold when exporting USD #107149

Merged
Michael Kowalski merged 3 commits from wave/blender_wave_Apple:contribs/T107062_opacity_threshold into main 2023-05-01 17:28:30 +02:00

This PR addresses issue “USD export does not respect opacity threshold for clip alpha blend mode #107062”

This commit extends the USD Preview Surface material support to author the opacityThreshold attribute of materials on export, when the Alpha Clip blend mode is selected.

When authoring alpha cutouts in Blender, one sets the Blend Mode to "Alpha Clip", and the Clip Threshold to some value greater than zero.
When this case is detected on export, we now author the opacityThreshold attribute to match the specified clip threshold.

Note that opacityThreshold is already handled correctly on import, so this change allows the feature to be fully round-tripped.

This PR addresses issue “USD export does not respect opacity threshold for clip alpha blend mode #107062” This commit extends the USD Preview Surface material support to author the opacityThreshold attribute of materials on export, when the Alpha Clip blend mode is selected. When authoring alpha cutouts in Blender, one sets the Blend Mode to "Alpha Clip", and the Clip Threshold to some value greater than zero. When this case is detected on export, we now author the opacityThreshold attribute to match the specified clip threshold. Note that opacityThreshold is already handled correctly on import, so this change allows the feature to be fully round-tripped.
Michael B Johnson added 1 commit 2023-04-20 00:16:19 +02:00
033703c933 Fix T107062: support opacityThreshold when exporting USD
This commit extends the USD Preview Surface material support to author the opacityThreshold attribute of materials on export, when the Alpha Clip blend mode is selected.

When authoring alpha cutouts in Blender, one sets the Blend Mode to "Alpha Clip", and the Clip Threshold to some value greater than zero.
When this case is detected on export, we now author the opacityThreshold attribute to match the specified clip threshold.

Note that opacityThreshold is already handled correctly on import, so this change allows the feature to be fully round-tripped.
Michael B Johnson requested review from Sybren A. Stüvel 2023-04-20 00:16:33 +02:00
Michael B Johnson added the
Interest
Pipeline, Assets & IO
Interest
USD
labels 2023-04-20 00:16:51 +02:00
Michael B Johnson added 1 commit 2023-04-20 02:42:12 +02:00
Michael B Johnson requested review from Michael Kowalski 2023-04-20 02:43:10 +02:00
Sybren A. Stüvel changed title from Fix T107062: support opacityThreshold when exporting USD to Fix #107062: support opacityThreshold when exporting USD 2023-04-20 11:51:47 +02:00
Sybren A. Stüvel added
Module
Pipeline, Assets & IO
and removed
Interest
Pipeline, Assets & IO
labels 2023-04-20 11:52:01 +02:00
Bastien Montagne removed review request for Sybren A. Stüvel 2023-04-20 17:28:47 +02:00
Bastien Montagne requested review from Bastien Montagne 2023-04-20 17:28:47 +02:00
Bastien Montagne added this to the USD project 2023-04-20 17:29:53 +02:00
Michael Kowalski reviewed 2023-04-24 02:14:06 +02:00
@ -127,0 +129,4 @@
# Note that the scene file used here is shared with a different test.
# Here we assume that it has a Principled BSDF material with
# a texture connected to its Base Color input.
print(self.testdir)

I suspect this print statement was for debugging and should probably be removed.

I suspect this print statement was for debugging and should probably be removed.
Member

Indeed, thanks for catching that.

Indeed, thanks for catching that.
Matt-McLin marked this conversation as resolved

I have one comment about a very minor point above. Otherwise, these changes look good to me.

I have one comment about a very minor point above. Otherwise, these changes look good to me.
Michael Kowalski approved these changes 2023-04-24 02:35:31 +02:00
Michael B Johnson added 1 commit 2023-04-28 20:53:20 +02:00
buildbot/vexp-code-patch-coordinator Build done. Details
a31fb92e99
Remove debug print statement
Author
Member

fixed the print issue

fixed the print issue

@blender-bot build

@blender-bot build
Michael Kowalski merged commit 3c74575dac into main 2023-05-01 17:28:30 +02:00
Howard Trickey referenced this issue from a commit 2023-05-29 02:51:43 +02:00
Bastien Montagne removed this from the USD project 2023-08-25 23:52:19 +02:00
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
3 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#107149
No description provided.