Page MenuHome

Culling not working correctly when using array modifier
Closed, ResolvedPublic


System Information
Windows 10, GTX1070

Blender Version
Broken: Blender 2.8 Alpha 2 e66084268cc

Short description of error

When you add an array modifier to an object, and move the original object off-screen ( with the cloned objects still on-screen ), the cloned objects disappear.

Exact steps for others to reproduce the error

  1. Start a new scene
  2. Add an array modifier to the cube ( make the count something like 10 )
  3. Move the group so that the original cube is off-screen - the rest of the cubes will disappear.

Note that if you save and re-load this file, the culling is fine, so I wasn't able to attach a .blend to show this.

Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Confirmed, Medium.

Can confirm, indeed caused by rBe66084268ccc.

This is not only affecting view culling but also Bounds display_type etc..
(Interestingly before that commit [while dimension were broken] bounds drawing was actually fine...)

You can also go in and out of editmode (or change some prop on the array modifier) to get your proper bounds back (BKE_mesh_eval_geometry() gets called), but as soon as you start transforming, you will loose it again (because BKE_object_eval_done() kicks in again)

Still not familiar enough with dependency graph, @Bastien Montagne (mont29): looks like bbox is calculated for "non-obdata-evaluated" object? (need to read more [depsgraph-]code here...)

I think the bounding box is being computed too early, after the transform but before modifiers are evaluated.

It might need to be in both the object transform and mesh update, because they could be updated independently.

btw. we have another (possibly related) boundingbox issue in T57070...

Just a follow up here, current bbox code is actually a real nightmare to follow, and is doing lots of bad things (now that we are in COW era)… Still working on trying to understand what happens, and how to fix it. :|