Page MenuHome

Fix T69753 Instanced Metaballs not rendering but showing up in Viewport
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Apr 20 2020, 5:12 PM.

Details

Summary

This hides the original metaballs when they are used in
duplifaces/-verts instancing, and still shows the instanced metaballs.

The visibility of the original metaballs is now determined by the
visibility of the instancer. I'm not too thrilled about this, but at
least it gives users the ability to show/hide the metaballs for
viewport/render. Instead of linking this to the visibility of the
instancer, we could also introduce similar options for the metaballs
to determine their visibility separately.

Diff Detail

Repository
rB Blender

Event Timeline

Sybren A. Stüvel (sybren) requested review of this revision.Apr 20 2020, 5:12 PM
Sybren A. Stüvel (sybren) created this revision.
Sybren A. Stüvel (sybren) added inline comments.
source/blender/blenkernel/intern/mball_tessellate.c
1212–1214

Maybe some of this logic should be moved to BKE_object_visibility() itself?

source/blender/blenkernel/intern/mball_tessellate.c
1196

The patch could be extended to support other instancing methods as well, but these are relevant to T69753. Once this fix is accepted by the reviewers, we can look at extending.

Campbell Barton (campbellbarton) added inline comments.
source/blender/blenkernel/intern/mball_tessellate.c
1212–1214

If this duplicator logic can remain localized here, I wouldn't mind.

Moving into BKE_object_visibility makes sense if other callers need to inline these checks too.

A risk could be that the flags ob->parent->transflag for e.g. aren't valid, which could be difficult to debug.

source/blender/depsgraph/intern/depsgraph_query_iter.cc
221

Both uses of deg_object_hide_original are checking meta-ball types and ignoring, that function could have a comment regarding this.

This revision is now accepted and ready to land.Apr 21 2020, 3:56 PM
Sybren A. Stüvel (sybren) marked 2 inline comments as done.Apr 24 2020, 10:03 AM
  • Feedback from Campbell