Wrong result when projecting texture from camera on object with modifier. #79714

Closed
opened 2020-08-11 17:16:14 +02:00 by Martijn Versteegh · 13 comments

System Information
Operating system: Linux-5.4.0-42-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce GTX 760/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21

Blender Version
Broken: version: 2.8x range, 2.91.0 Alpha, branch: master, commit date: 2020-08-11 14:14, hash: a3af59f8e3
Worked: N/A
Short description of error
I want to project a texture from the camera on an object with a mirror modifier. To do this I make sure the UV map is confined to the left half of UV space and set 'Offset U' in the mirror modifier to .5. When I project the texture from the camera in 2.83 I get a stippled result, mostly correct with black stipples.

I tried to reproduce the bug in my 2.91 alpha git debug build to investigate some more, but when trying the project in that version I get a crash (assert failed)

Exact steps for others to reproduce the errorbug-texture-project-mirror-mod.blend

(you can skip these steps if you use the attached .blend)

  • delete the left face of the default cube.

  • move the cube 1 to the right.

  • set the object origin to the world origin

  • add a mirror modifier, change 'Offset U' to .5 (in 'data')

  • generate an UV map (smart uv project or whatever)

  • got to the UV editing tab and scale the UV map with .5 in the X direction, making sure it is confined to the left half of the UV space.

  • click the camera object and add a background image
    (steps up to now lead to the attached .blend)

  • Go to texture paint mode

  • Do 'Apply camera image' (it's in the 'options' menu at the top right of the 3d view) and choose the loaded image.

  • crash (or wrong stippled result in 2.83)

BLI_assert failed: blender/source/blender/blenkernel/intern/DerivedMesh.c:891, mesh_calc_modifiers(), at '(mesh_input->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0'

**backtrace of the crash**

- 0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
- 1  0x00007ffff77e0859 in __GI_abort () at abort.c:79
- 2  0x000000000c225e2c in _BLI_assert_abort () at blender/source/blender/blenlib/intern/BLI_assert.c:50
- 3  0x00000000034c4eaa in mesh_calc_modifiers (depsgraph=0x7ffff1374908, scene=0x7ffff617fc08, ob=0x7ffff70d4a08, useDeform=1, need_mapping=false, dataMask=0x7fffffffaeb0, index=-1, use_cache=false,
allow_shared_mesh=false, r_deform=0x0, r_final=0x7fffffffae50) at blender/source/blender/blenkernel/intern/DerivedMesh.c:891
#4  0x00000000034c89a1 in mesh_create_eval_final_render (depsgraph=0x7ffff1374908, scene=0x7ffff617fc08, ob=0x7ffff70d4a08, dataMask=0x7fffffffaeb0) at blender/sou
rce/blender/blenkernel/intern/DerivedMesh.c:1995
#5  0x00000000041401a8 in proj_paint_state_mesh_eval_init (C=0x7ffff7053c08, ps=0x7fffffffaff0) at blender/source/blender/editors/sculpt_paint/paint_image_proj.c
:4040
#6  0x0000000004141734 in project_paint_begin (C=0x7ffff7053c08, ps=0x7fffffffaff0, is_multi_view=false, symmetry_flag=0 '\000') at blender/source/blender/editors/
sculpt_paint/paint_image_proj.c:4485
#7  0x00000000041466ad in texture_paint_camera_project_exec (C=0x7ffff7053c08, op=0x7fffbb5d8008) at blender/source/blender/editors/sculpt_paint/paint_image_proj.c
:6118
#8  0x00000000035eb6d6 in wm_operator_invoke (C=0x7ffff7053c08, ot=0x7ffff154ee48, event=0x0, properties=0x7fffffffd510, reports=0x0, poll_only=false, use_last_properties=true) at /home/martijn/p
rogs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1308
#9  0x00000000035ebebb in wm_operator_call_internal (C=0x7ffff7053c08, ot=0x7ffff154ee48, properties=0x7fffffffd510, reports=0x0, context=6, poll_only=false, event=0x0) at /home/martijn/progs/ble
nder-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1544
#10 0x00000000035ebf56 in WM_operator_name_call_ptr (C=0x7ffff7053c08, ot=0x7ffff154ee48, context=6, properties=0x7fffffffd510) at blender/source/blender/windowman
ager/intern/wm_event_system.c:1558
- 11 0x000000000428f65e in ui_apply_but_funcs_after (C=0x7ffff7053c08) at blender/source/blender/editors/interface/interface_handlers.c:904
- 12 0x00000000042aaae6 in ui_popup_handler (C=0x7ffff7053c08, event=0x7fffbb845788, userdata=0x7ffff06ec3c8) at blender/source/blender/editors/interface/interface_
handlers.c:10913
#13 0x00000000035e9abf in wm_handler_ui_call (C=0x7ffff7053c08, handler=0x7fffbb7d9068, event=0x7fffbb845788, always_pass=0) at blender/source/blender/windowmanage
r/intern/wm_event_system.c:634
#14 0x00000000035ef4b7 in wm_handlers_do_intern (C=0x7ffff7053c08, event=0x7fffbb845788, handlers=0x7fffbb8b7f18) at blender/source/blender/windowmanager/intern/wm
_event_system.c:2751
#15 0x00000000035ef92e in wm_handlers_do (C=0x7ffff7053c08, event=0x7fffbb845788, handlers=0x7fffbb8b7f18) at blender/source/blender/windowmanager/intern/wm_event_
system.c:2862
- 16 0x00000000035f0cf8 in wm_event_do_handlers (C=0x7ffff7053c08) at blender/source/blender/windowmanager/intern/wm_event_system.c:3287
- 17 0x00000000035e4b33 in WM_main (C=0x7ffff7053c08) at blender/source/blender/windowmanager/intern/wm.c:475
#18 0x00000000031552f6 in main (argc=1, argv=0x7fffffffdc38) at blender/source/creator/creator.c:546


**System Information** Operating system: Linux-5.4.0-42-generic-x86_64-with-debian-bullseye-sid 64 Bits Graphics card: GeForce GTX 760/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 435.21 **Blender Version** Broken: version: 2.8x range, 2.91.0 Alpha, branch: master, commit date: 2020-08-11 14:14, hash: `a3af59f8e3` Worked: N/A **Short description of error** I want to project a texture from the camera on an object with a mirror modifier. To do this I make sure the UV map is confined to the left half of UV space and set 'Offset U' in the mirror modifier to .5. When I project the texture from the camera in 2.83 I get a stippled result, mostly correct with black stipples. I tried to reproduce the bug in my 2.91 alpha git debug build to investigate some more, but when trying the project in that version I get a crash (assert failed) **Exact steps for others to reproduce the error**[bug-texture-project-mirror-mod.blend](https://archive.blender.org/developer/F8769865/bug-texture-project-mirror-mod.blend) (you can skip these steps if you use the attached .blend) - delete the left face of the default cube. - move the cube 1 to the right. - set the object origin to the world origin - add a mirror modifier, change 'Offset U' to .5 (in 'data') - generate an UV map (smart uv project or whatever) - got to the UV editing tab and scale the UV map with .5 in the X direction, making sure it is confined to the left half of the UV space. - click the camera object and add a background image (steps up to now lead to the attached .blend) - Go to texture paint mode - Do 'Apply camera image' (it's in the 'options' menu at the top right of the 3d view) and choose the loaded image. - crash (or wrong stippled result in 2.83) ``` BLI_assert failed: blender/source/blender/blenkernel/intern/DerivedMesh.c:891, mesh_calc_modifiers(), at '(mesh_input->id.tag & LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT) == 0' **backtrace of the crash** - 0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 - 1 0x00007ffff77e0859 in __GI_abort () at abort.c:79 - 2 0x000000000c225e2c in _BLI_assert_abort () at blender/source/blender/blenlib/intern/BLI_assert.c:50 - 3 0x00000000034c4eaa in mesh_calc_modifiers (depsgraph=0x7ffff1374908, scene=0x7ffff617fc08, ob=0x7ffff70d4a08, useDeform=1, need_mapping=false, dataMask=0x7fffffffaeb0, index=-1, use_cache=false, allow_shared_mesh=false, r_deform=0x0, r_final=0x7fffffffae50) at blender/source/blender/blenkernel/intern/DerivedMesh.c:891 #4 0x00000000034c89a1 in mesh_create_eval_final_render (depsgraph=0x7ffff1374908, scene=0x7ffff617fc08, ob=0x7ffff70d4a08, dataMask=0x7fffffffaeb0) at blender/sou rce/blender/blenkernel/intern/DerivedMesh.c:1995 #5 0x00000000041401a8 in proj_paint_state_mesh_eval_init (C=0x7ffff7053c08, ps=0x7fffffffaff0) at blender/source/blender/editors/sculpt_paint/paint_image_proj.c :4040 #6 0x0000000004141734 in project_paint_begin (C=0x7ffff7053c08, ps=0x7fffffffaff0, is_multi_view=false, symmetry_flag=0 '\000') at blender/source/blender/editors/ sculpt_paint/paint_image_proj.c:4485 #7 0x00000000041466ad in texture_paint_camera_project_exec (C=0x7ffff7053c08, op=0x7fffbb5d8008) at blender/source/blender/editors/sculpt_paint/paint_image_proj.c :6118 #8 0x00000000035eb6d6 in wm_operator_invoke (C=0x7ffff7053c08, ot=0x7ffff154ee48, event=0x0, properties=0x7fffffffd510, reports=0x0, poll_only=false, use_last_properties=true) at /home/martijn/p rogs/blender-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1308 #9 0x00000000035ebebb in wm_operator_call_internal (C=0x7ffff7053c08, ot=0x7ffff154ee48, properties=0x7fffffffd510, reports=0x0, context=6, poll_only=false, event=0x0) at /home/martijn/progs/ble nder-git/blender/source/blender/windowmanager/intern/wm_event_system.c:1544 #10 0x00000000035ebf56 in WM_operator_name_call_ptr (C=0x7ffff7053c08, ot=0x7ffff154ee48, context=6, properties=0x7fffffffd510) at blender/source/blender/windowman ager/intern/wm_event_system.c:1558 - 11 0x000000000428f65e in ui_apply_but_funcs_after (C=0x7ffff7053c08) at blender/source/blender/editors/interface/interface_handlers.c:904 - 12 0x00000000042aaae6 in ui_popup_handler (C=0x7ffff7053c08, event=0x7fffbb845788, userdata=0x7ffff06ec3c8) at blender/source/blender/editors/interface/interface_ handlers.c:10913 #13 0x00000000035e9abf in wm_handler_ui_call (C=0x7ffff7053c08, handler=0x7fffbb7d9068, event=0x7fffbb845788, always_pass=0) at blender/source/blender/windowmanage r/intern/wm_event_system.c:634 #14 0x00000000035ef4b7 in wm_handlers_do_intern (C=0x7ffff7053c08, event=0x7fffbb845788, handlers=0x7fffbb8b7f18) at blender/source/blender/windowmanager/intern/wm _event_system.c:2751 #15 0x00000000035ef92e in wm_handlers_do (C=0x7ffff7053c08, event=0x7fffbb845788, handlers=0x7fffbb8b7f18) at blender/source/blender/windowmanager/intern/wm_event_ system.c:2862 - 16 0x00000000035f0cf8 in wm_event_do_handlers (C=0x7ffff7053c08) at blender/source/blender/windowmanager/intern/wm_event_system.c:3287 - 17 0x00000000035e4b33 in WM_main (C=0x7ffff7053c08) at blender/source/blender/windowmanager/intern/wm.c:475 #18 0x00000000031552f6 in main (argc=1, argv=0x7fffffffdc38) at blender/source/creator/creator.c:546 ```
Author
Member

Added subscriber: @Baardaap

Added subscriber: @Baardaap

#78198 was marked as duplicate of this issue

#78198 was marked as duplicate of this issue
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Can confirm.

Can confirm.
Member

Could be any modifier, really by the way.

Could be any modifier, really by the way.
Philipp Oeser changed title from Crash (in 2.91 alpha git debug build) or wrong result (in 2.83 ) when projecting texture from camera on object with mirror modifier. to Crash (in 2.91 alpha git debug build) or wrong result (in 2.83 ) when projecting texture from camera on object with modifier. 2020-08-12 16:38:37 +02:00

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Sybren A. Stüvel self-assigned this 2020-08-13 14:29:18 +02:00

I also get a stippled result in the 2.90 branch (ada98869df):

image.png

I also get a stippled result in the 2.90 branch (ada98869df): ![image.png](https://archive.blender.org/developer/F8776886/image.png)
Member

It is broken throughout the 2.8 series

It is broken throughout the 2.8 series

I think I have a fix ready, will have to do some more checking to confirm.

I think I have a fix ready, will have to do some more checking to confirm.
Sybren A. Stüvel changed title from Crash (in 2.91 alpha git debug build) or wrong result (in 2.83 ) when projecting texture from camera on object with modifier. to Wrong result when projecting texture from camera on object with modifier. 2020-08-14 15:26:35 +02:00

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke

This issue was referenced by 5195d346f4

This issue was referenced by 5195d346f436539b71d2897c0a14021c0eff3ab3

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#79714
No description provided.