Raycast and replaceMesh #38335

Closed
opened 2014-01-23 15:25:50 +01:00 by Fred-Eric Kirsi · 14 comments

Win 7, Geforce 730m

Broken: 2.67.0

Raycasting on a mesh which has two materials gives wrong materials on wrong faces, when replace mesh is used even once.
It seems to affect only one triangle on a square mesh in the physics view ( triangle mesh?) only.
The same setup i am using works by only removing the connection to the replace mesh actuator.

I use replace mesh to update the phys mesh.
I detect the material on the mesh with python:
rayCast(to, from, distance, property, face, xray, poly)
mat_name = ray[-1].getMaterialName()
The face it hits gives wrong material.

I suggest looking at my post on BA forum:
http://blenderartists.org/forum/showthread.php?322524-Impaling-projectile-and-equipment-parenting&p=2562865&viewfull=1#post2562865

Pictures:
The cones should impale the wood (brown) and ignore the steel(grey).
First_2.png
First_3.png
Oh_jolly.PNG
The last one in particular:
"Splitting the mesh into two planes (top plane wood, bottom plane metal) the script works.
So from this I then joined the split planes using CTRL + J"
And the problematic face changed into the upper one.

Blend:
raycast_replaceMesh_2_(1)_(1).blend
Press space to execute script.
Manually re/dis-connect replace mesh.

In the console i print The material recieved and the objects name.
None of the Cone_Lower duplicates should recieve the Material Wood, but they do....

Hopefully this is the right place, as i got no answer in my thread where to report bugs.

Win 7, Geforce 730m Broken: 2.67.0 Raycasting on a mesh which has two materials gives wrong materials on wrong faces, when replace mesh is used even once. It seems to affect only one triangle on a square mesh in the physics view ( triangle mesh?) only. The same setup i am using works by only removing the connection to the replace mesh actuator. I use replace mesh to update the phys mesh. I detect the material on the mesh with python: rayCast(to, from, distance, property, face, xray, poly) mat_name = ray[-1].getMaterialName() The face it hits gives wrong material. I suggest looking at my post on BA forum: http://blenderartists.org/forum/showthread.php?322524-Impaling-projectile-and-equipment-parenting&p=2562865&viewfull=1#post2562865 Pictures: The cones should impale the wood (brown) and ignore the steel(grey). ![First_2.png](https://archive.blender.org/developer/F73987/First_2.png) ![First_3.png](https://archive.blender.org/developer/F73990/First_3.png) ![Oh_jolly.PNG](https://archive.blender.org/developer/F73992/Oh_jolly.PNG) The last one in particular: "Splitting the mesh into two planes (top plane wood, bottom plane metal) the script works. So from this I then joined the split planes using CTRL + J" And the problematic face changed into the upper one. Blend: [raycast_replaceMesh_2_(1)_(1).blend](https://archive.blender.org/developer/F73978/raycast_replaceMesh_2__1___1_.blend) Press space to execute script. Manually re/dis-connect replace mesh. In the console i print The material recieved and the objects name. None of the Cone_Lower duplicates should recieve the Material Wood, but they do.... Hopefully this is the right place, as i got no answer in my thread where to report bugs.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @vegetablejuicef

Added subscriber: @vegetablejuicef

I was pointed to a workaround:
triangulating the mesh before manually seems to solve the problem!

Still, i would expect this to work also with square mesh.

I was pointed to a workaround: triangulating the mesh before manually seems to solve the problem! Still, i would expect this to work also with square mesh.

Added subscriber: @Ace_Dragon

Added subscriber: @Ace_Dragon

Some advice, I think it would help if you retested for the issue in one of the latest buildbot builds, there's been so many changes since 2.67 that one wouldn't know for sure if it since has been fixed, taken a different form, or is still there as is.

That's what a lot of other people do and it often leads to their reported issues fixed.

Some advice, I think it would help if you retested for the issue in one of the latest buildbot builds, there's been so many changes since 2.67 that one wouldn't know for sure if it since has been fixed, taken a different form, or is still there as is. That's what a lot of other people do and it often leads to their reported issues fixed.

Tested it with: blender-2.69-fd0b104-win64
from : http://builder.blender.org/download/

The problem persists.
No change.

Hopefully this was meant by " latest buildbot builds ", as i have no idea what you suggested for me to do otherwise.

Tested it with: blender-2.69-fd0b104-win64 from : http://builder.blender.org/download/ The problem persists. No change. Hopefully this was meant by " latest buildbot builds ", as i have no idea what you suggested for me to do otherwise.

By buildbot, I was meaning this.
http://builder.blender.org/download/

But since I cannot recall changes to the rayCast() function from the release logs, I would have reason to believe the bug will still be there.

By buildbot, I was meaning this. http://builder.blender.org/download/ But since I cannot recall changes to the rayCast() function from the release logs, I would have reason to believe the bug will still be there.

Well, what now?
Is it a bug?
Is it being worked on?

I have been messing around with this since first of January.
Kinda wish to get some confirmation whether i am mad or this IS a thing.

Well, what now? Is it a bug? Is it being worked on? I have been messing around with this since first of January. Kinda wish to get some confirmation whether i am mad or this IS a thing.

Added subscriber: @raco

Added subscriber: @raco

Bug confirmed with Blender 2.71 hash 80d3eb6 (2014-07-18).

Bug confirmed with Blender 2.71 hash 80d3eb6 (2014-07-18).

This issue was referenced by 6ee0327594

This issue was referenced by 6ee0327594b2308b3111e1b8a7e52ed5959899fc

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 6ee0327594.

Closed by commit 6ee0327594.

This issue was referenced by 8647c7d501

This issue was referenced by 8647c7d5010a844349ea6f7d180408cafbbb4848
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
5 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#38335
No description provided.