Page MenuHome

Curves + Array Modifier with Object Offset transform incorrect in Cycles when using Collections
Open, Confirmed, MediumPublic


System Information
Operating system: Windows 10 x64
Graphics card: nVidia GTX 1080 (latest 418.81 2019-02-04 GeForce Experience driver)

Blender Version
Broken: 2019-02-10 blender-2.80-0b6dbbc306b0-win64 (and previous daily builds)
Worked: 2.79b

Short description of error

Using the Array Modifier with Object Offset produces incorrect transform when using Collections

Exact steps for others to reproduce the error

  • Load Factory Settings, go into Preferences and enable CUDA for GPU+CPU in System tab
  • In 3D View, Add a Curve (Shift-A > Curve > Path)
  • Go into Edit mode, grab and move the curve path away from the origin/center, maybe modify it a bit so it's not straight, exit Edit mode
  • In the Curve settings tab add some Bevel Depth to the curve, so it's solid (Geometry > Bevel > Depth)
  • Add an Empty (Shift-A > Empty > Plain Axis)
  • Select the Curve, go to Modifiers tab and add an Array
  • Disable Relative Offset, enable Object Offset, select the Empty as the source, increase the Count a few times
  • Select the Empty, rotate it on the Z axis to make the arrayed/duped curves spin around the Empty
  • Switch Shading to Rendered (currently EEVEE), everything looks correct, as it did in the Solid Shading mode
  • Change rendering to Cycles, GPU Compute, everything looks correct
  • Switch back to Solid Shading
  • Create a new Collection in the top level of the Scene Collection in the Outliner, name it 'Curves'
  • Move the Curve and the Empty to the newly created Collection
  • Switch Shading to Rendered again, everything still looks correct, switch back to Solid
  • Select the default Collection in the Outliner, and in the 3D View, add a Collection Instance (Shift-A > Collection Instance > Curves)
  • Grab the Instance Empty and move it away from the origin so it's not overlapping the original

  • Switch Shading to Rendered again, both Arrays are now offset incorrectly
  • Select and rotate the Empty, see that the transform alters unexpectedly, like the center point isn't where it should be
  • (if you switch to EEVEE here, everything is correct)

  • Drag the Curves Collection into the default Collection in the Outliner
  • Toggle Shading from Solid to Rendered again, and offsets are correct again

The same issue occurs if linking a Collection from an external .blend file too.



Event Timeline

db (phocomelus) updated the task description. (Show Details)

I get an assert when I switch between rendered and lookdev mode in this file.
Seems to be some synching issue between Blender and Cycles.
(not sure if this is directly related to the original bug report, but could be...)

__GI_raise(int sig) (/build/glibc-OTsEL5/glibc-2.27/sysdeps/unix/sysv/linux/raise.c:51)
__GI_abort() (/build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:79)
id_us_min(ID * id) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library.c:241)
foreach_libblock_remap_callback(void * user_data, ID * id_self, ID ** id_p, int cb_flag) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:247)
BKE_library_foreach_ID_link(Main * bmain, ID * id, LibraryIDLinkCallback callback, void * user_data, int flag) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library_query.c:630)
libblock_remap_data(Main * bmain, ID * id, ID * old_id, ID * new_id, const short remap_flags, IDRemap * r_id_remap_data) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:414)
BKE_libblock_relink_ex(Main * bmain, void * idv, void * old_idv, void * new_idv, const _Bool us_min_never_null) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:609)
BKE_id_free_ex(Main * bmain, void * idv, int flag, const _Bool use_flag_from_idtag) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/library_remap.c:872)
rna_Main_ID_remove(Main * bmain, ReportList * reports, PointerRNA * id_ptr, _Bool do_unlink, _Bool do_id_user, _Bool do_ui_user) (/home/jacques/blender-git/blender/source/blender/makesrna/intern/rna_main_api.c:137)
BlendDataMeshes_remove(struct Main * _self, ReportList * reports, struct PointerRNA * mesh, _Bool do_unlink, _Bool do_id_user, _Bool do_ui_user) (/home/jacques/blender-git/build_linux_debug/source/blender/makesrna/intern/rna_main_gen.c:3840)
BL::BlendDataMeshes::remove(BL::BlendDataMeshes * const this, BL::Mesh & mesh, bool do_unlink, bool do_id_user, bool do_ui_user) (/home/jacques/blender-git/build_linux_debug/source/blender/makesrna/intern/RNA_blender_cpp.h:42424)
ccl::free_object_to_mesh(BL::BlendData & data, BL::Object & object, BL::Mesh & mesh) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_util.h:113)
ccl::BlenderSync::sync_mesh(ccl::BlenderSync * const this, BL::Depsgraph & b_depsgraph, BL::Object & b_ob, BL::Object & b_ob_instance, bool object_updated, bool show_self, bool show_particles) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_mesh.cpp:1099)
ccl::BlenderSync::sync_object(ccl::BlenderSync * const this, BL::Depsgraph & b_depsgraph, BL::ViewLayer & b_view_layer, BL::DepsgraphObjectInstance & b_instance, float motion_time, bool show_self, bool show_particles, ccl::BlenderObjectCulling & culling, bool * use_portal) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_object.cpp:407)
ccl::BlenderSync::sync_objects(ccl::BlenderSync * const this, BL::Depsgraph & b_depsgraph, float motion_time) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_object.cpp:558)
ccl::BlenderSync::sync_data(ccl::BlenderSync * const this, BL::RenderSettings & b_render, BL::Depsgraph & b_depsgraph, BL::SpaceView3D & b_v3d, BL::Object & b_override, int width, int height, void ** python_thread_state) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_sync.cpp:203)
ccl::BlenderSession::synchronize(ccl::BlenderSession * const this, BL::Depsgraph & b_depsgraph_) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_session.cpp:864)
ccl::sync_func(PyObject * args) (/home/jacques/blender-git/blender/intern/cycles/blender/blender_python.cpp:384)
_PyMethodDef_RawFastCallKeywords (Unknown Source:0)
_PyCFunction_FastCallKeywords (Unknown Source:0)
_PyEval_EvalFrameDefault (Unknown Source:0)
__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval(PyFrameObject * __pyx_v_frame_obj, int __pyx_v_exc) (/io/ptvsd/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c:7190)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
_PyEval_EvalFrameDefault (Unknown Source:0)
__pyx_f_18_pydevd_frame_eval_22pydevd_frame_evaluator_get_bytecode_while_frame_eval(PyFrameObject * __pyx_v_frame_obj, int __pyx_v_exc) (/io/ptvsd/src/ptvsd/_vendored/pydevd/_pydevd_frame_eval/pydevd_frame_evaluator.c:7190)
[Unknown/Just-In-Time compiled code] (Unknown Source:0)
_PyFunction_FastCallDict (Unknown Source:0)
bpy_class_call(bContext * C, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) (/home/jacques/blender-git/blender/source/blender/python/intern/bpy_rna.c:7919)
engine_view_update(RenderEngine * engine, const struct bContext * context) (/home/jacques/blender-git/blender/source/blender/makesrna/intern/rna_render.c:216)
ED_render_scene_update(const DEGEditorUpdateContext * update_ctx, int updated) (/home/jacques/blender-git/blender/source/blender/editors/render/render_update.c:131)
DEG::deg_editors_scene_update(const DEGEditorUpdateContext * update_ctx, bool updated) (/home/jacques/blender-git/blender/source/blender/depsgraph/intern/
DEG_ids_check_recalc(Main * bmain, Depsgraph * depsgraph, Scene * scene, ViewLayer * view_layer, bool time) (/home/jacques/blender-git/blender/source/blender/depsgraph/intern/
BKE_scene_graph_update_tagged(Depsgraph * depsgraph, Main * bmain) (/home/jacques/blender-git/blender/source/blender/blenkernel/intern/scene.c:1505)
wm_event_do_depsgraph(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:340)
wm_event_do_refresh_wm_and_depsgraph(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:365)
wm_event_do_notifiers(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:523)
WM_main(bContext * C) (/home/jacques/blender-git/blender/source/blender/windowmanager/intern/wm.c:420)
main(int argc, const char ** argv) (/home/jacques/blender-git/blender/source/creator/creator.c:504)
Jacques Lucke (JacquesLucke) triaged this task as Confirmed, Medium priority.Mon, Feb 11, 12:23 PM