Scene.Ray_Cast misses/fails against CURVE Objects in multiple cases. #79194

Closed
opened 2020-07-23 16:57:08 +02:00 by Matt · 9 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67

Blender Version
Broken: version: 2.90.0 Beta, branch: master, commit date: 2020-07-22 14:02, hash: 0e280b96ca
Worked: None that I know of.

Short description of error
In testing an Addon I'm developing, I came across an issue when Raycasting to CURVE Objects via Scene.Ray_Cast. It appears it will NOT hit the Curve, even if it's displayed as 3D Mesh. Unless I Apply a subSurf Modifier or other modifiers (Bevel/Solidify), then it will detect it. It appears that until it's actually had some sorta of Mesh Modifier applied, it's not considered a Mesh, even though it's displayed as one....

I also hit another issue in 2.9 (build above), where if the CURVE Object is Active, but De-selected, it cannot be raycast against it, until another object has been set active. Then I can RayCast to the Curve once again. In 2.83 (a8441fc90086-windows64) this bug doesn't exist. I can RayCast to the Curve over and over, without issue, if its set active, but de-selected.

Exact steps for others to reproduce the error

  1. Install / Use the attached RayCast Modal Addon, or Raycast yourself with Scene.Ray_Cast against a Curve Object Displayed as 3D.
  2. Observe Raycast missing.
  3. Apply SubSurf Modifier or Solidify / etc
  4. Raycast again and notice Raycast now works.
  5. RayCast to empty area in the Scene, and Try to RayCast/Select Curve Object again.
  6. Notice that it doesn't become selected again, unless you Raycast to another object/Curve doesn't stay Active between Raycast.

Blender_2.9_Scene.Ray_Cast_Bug.blend

TT_Object_Select_Raycast.py

Unvown1QWd.gif

**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 980 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.67 **Blender Version** Broken: version: 2.90.0 Beta, branch: master, commit date: 2020-07-22 14:02, hash: `0e280b96ca` Worked: None that I know of. **Short description of error** In testing an Addon I'm developing, I came across an issue when Raycasting to CURVE Objects via Scene.Ray_Cast. It appears it will NOT hit the Curve, even if it's displayed as 3D Mesh. Unless I Apply a subSurf Modifier or other modifiers (Bevel/Solidify), then it will detect it. It appears that until it's actually had some sorta of Mesh Modifier applied, it's not considered a Mesh, even though it's displayed as one.... I also hit another issue in 2.9 (build above), where if the CURVE Object is Active, but De-selected, it cannot be raycast against it, until another object has been set active. Then I can RayCast to the Curve once again. In 2.83 (a8441fc90086-windows64) this bug doesn't exist. I can RayCast to the Curve over and over, without issue, if its set active, but de-selected. **Exact steps for others to reproduce the error** 1. Install / Use the attached RayCast Modal Addon, or Raycast yourself with Scene.Ray_Cast against a Curve Object Displayed as 3D. 2. Observe Raycast missing. 3. Apply SubSurf Modifier or Solidify / etc 4. Raycast again and notice Raycast now works. 5. RayCast to empty area in the Scene, and Try to RayCast/Select Curve Object again. 6. Notice that it doesn't become selected again, unless you Raycast to another object/Curve doesn't stay Active between Raycast. [Blender_2.9_Scene.Ray_Cast_Bug.blend](https://archive.blender.org/developer/F8716266/Blender_2.9_Scene.Ray_Cast_Bug.blend) [TT_Object_Select_Raycast.py](https://archive.blender.org/developer/F8716264/TT_Object_Select_Raycast.py) ![Unvown1QWd.gif](https://archive.blender.org/developer/F8716261/Unvown1QWd.gif)
Author

Added subscriber: @mattli911

Added subscriber: @mattli911
Author

Here's a GIF showing the same thing in 2.83, except that it doesn't have the 2nd issue with active object, as noted above.

2.83 has no problem selecting back and forth on the Curve if it's active but de-selected. But as I mentioned, raycast fails to hit the Curve still, unless it has a modifier applied.

Hv3agB4XaT.gif

Here's a GIF showing the same thing in 2.83, except that it doesn't have the 2nd issue with active object, as noted above. 2.83 has no problem selecting back and forth on the Curve if it's active but de-selected. But as I mentioned, raycast fails to hit the Curve still, unless it has a modifier applied. ![Hv3agB4XaT.gif](https://archive.blender.org/developer/F8716311/Hv3agB4XaT.gif)

Added subscriber: @mano-wii

Added subscriber: @mano-wii

This is a known issue that has already been addressed in #78434 (Support snapping to faces for objects with DispList (Curve, Surface, Metaballs and Text)).
Basically, this was never implemented.

This is a known issue that has already been addressed in #78434 (Support snapping to faces for objects with DispList (Curve, Surface, Metaballs and Text)). Basically, this was never implemented.

Closed as duplicate of #78434

Closed as duplicate of #78434
Author

In #79194#984146, @mano-wii wrote:
This is a known issue that has already been addressed in #78434 (Support snapping to faces for objects with DispList (Curve, Surface, Metaballs and Text)).
Basically, this was never implemented.

Ah, ok, great! That would be fixed in 2.91 then i would guess...?

> In #79194#984146, @mano-wii wrote: > This is a known issue that has already been addressed in #78434 (Support snapping to faces for objects with DispList (Curve, Surface, Metaballs and Text)). > Basically, this was never implemented. Ah, ok, great! That would be fixed in 2.91 then i would guess...?

Anyone can propose a patch and proceed with implementation.
In my case there are other items that have priority (#73993)

Anyone can propose a patch and proceed with implementation. In my case there are other items that have priority (#73993)
Author

Yeah that makes sense. Ok. I will just have to wait and see! I don't think there is a good way for me to get around the issue otherwise, in a performant way... using Python.
Unless I can temp. add some modifier/cheapest modifier possible to CURVE objects to get around it, during my Modal operator.
Is not a HUGE issue though, but more of an annoyance/thing I will have to note for now.

Thank you!

Yeah that makes sense. Ok. I will just have to wait and see! I don't think there is a good way for me to get around the issue otherwise, in a performant way... using Python. Unless I can temp. add some modifier/cheapest modifier possible to CURVE objects to get around it, during my Modal operator. Is not a HUGE issue though, but more of an annoyance/thing I will have to note for now. Thank you!
Author

For now i am using another workaround, where i just apply a modifier, like Decimate to a CURVE object, which causes Raycast to work, and the modifier does't impact the Object visually in any way, by default.
Definitely not ideal, but "works" in the meantime.

For now i am using another workaround, where i just apply a modifier, like Decimate to a CURVE object, which causes Raycast to work, and the modifier does't impact the Object visually in any way, by default. Definitely not ideal, but "works" in the meantime.
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
2 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#79194
No description provided.