KX_PolyProxy has incorrect getVertexIndex results #38030
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
8 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#38030
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?
This is a serious flaw in the API, which has occurred somewhere between Blender 2.64 and HEAD.
The values from getVertexIndex are (I believe) per bucket, which isn't respected in the getVertex call. I'm not sure whether the issue is in RAS_MeshObject or whether it is before this point, but essentially calling offset = slot->AddVertex(texvert) returns the bucket vertex index
Changed status to: 'Open'
Added subscriber: @AngusHollands-4
Revision:
dee33e8097
Author: Campbell Barton ideasman42@gmail.com
Date: 01/05/2013 23:41:55
Message:
fix [#34609] mesh.getVertex doesn't work as spected with poly.getMaterialIndex() and poly vertex indexes
revert r22906 (own old commit, was incorrectly trying to make vertex indices absolute)
Modified: source/gameengine/Ketsji/KX_PolyProxy.cpp
Modified: source/gameengine/Rasterizer/RAS_Polygon.cpp
Modified: source/gameengine/Rasterizer/RAS_Polygon.h
This seems to be the culprit
Added subscriber: @ThomasDinges
"Unbreak now" is only meant for Release show stoppers.
My apologies, I had intended to set to medium.
@AngusHollands-4 I am not sure I understand the problem.
The documentation says this:
"Returns the mesh vertex index of a polygon vertex This index and the one returned by getMaterialIndex() are needed to retrieve the vertex proxy from MeshProxy."
The commit
dee33e8097
is already correcting something, are you saying it has a bug or that it is supposed to do something different?I really don't know what this does or is supposed to do.
Originally, the commit by Campbell appeared to break things. Since then the issue has disappeared, so I think this can be closed!
great! :)
Changed status from 'Open' to: 'Resolved'
Changed status from 'Resolved' to: 'Open'
Added subscriber: @Pickledtezcat
I'm having trouble with this still, with Blender 2.72b (and before). Rather than open a new bug I'm going to reopen this one as it seems to be the same problem that never went away.
Some more details:
When using
The getVertexIndex() call is getting the wrong index in the following situations:
For illustration I've used a property to store xyz co-ordinates in poly groups captured from the mesh and then render.drawline to illustrate the results. You can see that all quad meshes and all triangle meshes are fine, but everything else just returns the wrong indexes. The objects are the same, just with some quads triangulated.
You can recreate the bug using this Blend:
poly_problems.blend
Just run the game engine.
In a nutshell the problem is that the poly.getVertexIndex as well as the poly.v1 poly.v2 poly.v3 poly.v4 functions (I tested them too with the same result) to return constituent vertices of a polygon are broken. They only work when all polys are of one type, either quads or triangles and only one material is present.
Added subscriber: @JacobMerrill-1
Added subscriber: @JorgeBernalMartinez
This issue was referenced by
2a305580b2
Changed status from 'Open' to: 'Resolved'