Page MenuHome

Fix T93467: Use world background color when rendering pose library previews
ClosedPublic

Authored by Yuchen Wen (ksar) on Dec 5 2021, 12:50 AM.

Details

Summary

T93467: Use World background color when rendering pose library previews

Try to fix the background color of the preview image in the pose library by changing the alpha mode after identifying the operation by name.
I'm not should if there is any other way to identify the operation is from the pose library, so I use the first two characters of "Armature" as the basis for whether to change the alpha mode from R_ALPHAPREMUL to R_ADDSKY.

Also, under the draw-type OB_SOLID, the world background color is ignored, the background color only shows up when changing the draw-type to OB_RENDER (see image below).

I'm not sure which type of background is required.

Diff Detail

Repository
rB Blender

Event Timeline

Yuchen Wen (ksar) requested review of this revision.Dec 5 2021, 12:50 AM
Yuchen Wen (ksar) created this revision.
Sybren A. Stüvel (sybren) requested changes to this revision.Dec 6 2021, 6:00 PM

Thanks for the patch, and nice analysis of the options.

Since the action_preview_render() function was added purely for the pose library, I think it's fine to always render with R_ADDSKY. The code shouldn't make use of the ID name. As those are set by artists, they could be anything. For example, the rig of Spring in my test file is named Spring.high_proxy, and the Ellie rig from Sprite Fright is named RIG-Ellie.

For me it works fine, by the way, with draw type set to OB_SOLID, when I change the viewport color instead of the world shader nodes:

This I think is a nicer way to go about things, as OB_RENDER can cause significantly longer render times (it could start rendering with EEVEE or Cycles), so I'd propose to keep it set to OB_SOLID.

This revision now requires changes to proceed.Dec 6 2021, 6:00 PM

PS: I can update & commit the patch if you want, or you can update it yourself and then I'll accept & commit it. Just let me know what you'd prefer.

Thanks for your review and inform! I will update a new patch with OB_SOLID and R_ADDSKY .

This revision is now accepted and ready to land.Dec 7 2021, 2:20 PM