Page MenuHome

GPencil: Fix asset preview
AbandonedPublic

Authored by Antonio Vazquez (antoniov) on Jul 6 2021, 5:42 PM.

Details

Summary

The problem was that camera was too near of the object and needed to be moved back.

Also, the angle of the camera is wider in order to get better image.

Diff Detail

Repository
rB Blender
Branch
temp-fix-gp-asset-preview (branched from master)
Build Status
Buildable 15647
Build 15647: arc lint + arc unit

Event Timeline

Antonio Vazquez (antoniov) requested review of this revision.Jul 6 2021, 5:42 PM
Antonio Vazquez (antoniov) created this revision.
Julian Eisel (Severin) requested changes to this revision.Jul 6 2021, 8:14 PM

Manually offsetting the camera like done here shouldn't be needed (would break if the objects are larger or scaled in some dimension), that signals to me that the ED_view3d_camera_to_view_selected() doesn't work correctly. I checked that and indeed, grease pencil objects weren't handled by it. Created D11833: GPencil: Make camera "Frame Selected" logic work with GPencil objects.
Looks like this (without touching the preview rendering code):


I'm open to further tweaks to the rendering (e.g. the lens and camera angle), although I think what's in the screenshot looks pretty fine already. I think grease pencil objects can also have some depth, right? For that case I think keeping the slight angle that the camera has may be a good idea.

This revision now requires changes to proceed.Jul 6 2021, 8:14 PM

We are going to use a better approach.