Grease pencil: Reproject strokes bad behavior when used in orthographic free navigation. #88313
Labels
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#88313
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 457.30
Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-14 16:16, hash:
d4a36c7ad5
Worked: (newest version of Blender that worked as expected)
Short description of error
When reprojecting on surface in free navigation + orthographic mode, the strokes are traversing the mesh and stopping on back instead of front.
note : In ortho-camera the reproject works correctly.
Inverting mesh normals doesn't seem to affect anything.
Exact steps for others to reproduce the error
Open attached blend
01
01_reproject_surface_in_ortho_view.blend
After meddling a bit with my file, trying to invert mesh normals and other thing I sadly cannot remember to reproduce, I got another weird error. In the same configuration the reprojection just doesn't do anything -> see "bugged" file
02
02_bugged__no_reproject_surface_in_ortho.blend
Added subscriber: @Pullup
Added subscribers: @lichtwerk, @antoniov
Changed status from 'Needs Triage' to: 'Confirmed'
@lichtwerk Could you help here? The problem is in
ED_gpencil_stroke_reproject()
function when the mode is Surface (line 1278). I had this code with the old method of the reprojection (used in Draw mode), but it was changed to useED_transform_snap_object_project_ray()
function, but I have no idea how works this function and why it is doing the reprojection in the back of the surface.Added subscriber: @mano-wii
Not sure if this is the "fault" of
ED_view3d_win_to_ray
(ED_view3d_win_to_vector
specifically), or ratherED_transform_snap_object_project_ray
(and friends) -- if you negate the ray normal in ortho, all is fine.note: this was swapped in
f54ed9f5e0
Got to go now, can dig deeper tomorrow, maybe @mano-wii knows right away?
As far as I can see the
ray_start
is located inside the object. Thus the points are projected on the first surface that it finds. (i.e, the other side of the mesh).If ray must start from the
clip_min
, the function that should be called isED_view3d_win_to_ray_clipped
instead ofED_view3d_win_to_ray
.But I suppose the ray must start from the point of GPencil.
If so, use the coordinates of the GPencil as
ray_start
:LGTM, thx checking @mano-wii
This makes sense, see the comment for
ED_view3d_win_to_origin
@mano-wii Your fix works perfect. You can commit the fix...or if you cannot do it now, I can commit setting you as Author.
This issue was referenced by
729c579030
This issue was referenced by
5400be9ffe
Changed status from 'Confirmed' to: 'Resolved'