Changing vertex position creates permanent lag in rasterizer and cpu. #43761

Closed
opened 2015-02-21 12:04:37 +01:00 by Fred-Eric Kirsi · 11 comments

System Information
Win 7 64 bit , Geforce 730m i5 3230m

Blender Version
Broken: 2.71

Short description of error
When setting the coordinate of (even) a single vertex (vertex.setXYZ) the rasterizer goes crazy.
http://blenderartists.org/forum/showthread.php?362541-Vertex-manipulation-and-rasterizer-issue

""" I confirmed that it is the display lists being rebuilt every frame that causes the problem.
If you disable Display Lists under Properties -> Render -> System,
the performance becomes the same as if you had already moved a vertex and does not change when you do.""" - qoute from Mobius

Exact steps for others to reproduce the error

import bge
cont = bge.logic.getCurrentController()
own = cont.owner


def main():  
    
    if cont.sensors['Keyboard'].positive:
        print( " Manipulate mesh " )
       
        sceneObjects       =   bge.logic.getCurrentScene().objects
        obj         =   sceneObjects["wave_0_0"]  
        print( obj)   
        mesh        =   obj.meshes[0]
        
        mesh_vert   =   mesh.getVertex(0,0) 

      # THIS IS THE PROBLEM
        mesh_vert.setXYZ( (0,0,0) )
     ########
            
main()

The size of the mesh increases the performance hit so this can be seen better on huge meshes that otherwise run fine in game.

Here is the gif where you can see it before and after changing one vertex position.
YUXmJtr.gif

hacks that work

  • replaceMesh
  • deleting the object, changing the inactive layer's object vertex and spawning that object again in the same code run(logic tic).

changng the vertex during the code run/(logic tic) when the object was added (addObject)

what i would like
""I don't know much about display lists or even if patching the BGE so it only rebuilds the display list once would be a performance improvement over calling replaceMesh.""" - Also from Mobious
Maybe that.

blend
vertexAccesProblem_(1).blend

**System Information** Win 7 64 bit , Geforce 730m i5 3230m **Blender Version** Broken: 2.71 **Short description of error** When setting the coordinate of (even) a single vertex (vertex.setXYZ) the rasterizer goes crazy. http://blenderartists.org/forum/showthread.php?362541-Vertex-manipulation-and-rasterizer-issue """ I confirmed that it is the display lists being rebuilt every frame that causes the problem. If you disable Display Lists under Properties -> Render -> System, the performance becomes the same as if you had already moved a vertex and does not change when you do.""" - [qoute from Mobius](http://blenderartists.org/forum/showthread.php?362541-Vertex-manipulation-and-rasterizer-issue&p=2820807&viewfull=1#post2820807) **Exact steps for others to reproduce the error** ``` import bge cont = bge.logic.getCurrentController() own = cont.owner def main(): if cont.sensors['Keyboard'].positive: print( " Manipulate mesh " ) sceneObjects = bge.logic.getCurrentScene().objects obj = sceneObjects["wave_0_0"] print( obj) mesh = obj.meshes[0] mesh_vert = mesh.getVertex(0,0) # THIS IS THE PROBLEM mesh_vert.setXYZ( (0,0,0) ) ######## main() ``` The size of the mesh increases the performance hit so this can be seen better on huge meshes that otherwise run fine in game. Here is the gif where you can see it before and after changing one vertex position. ![YUXmJtr.gif](https://archive.blender.org/developer/F145093/YUXmJtr.gif) **hacks that work** - replaceMesh - deleting the object, changing the inactive layer's object vertex and spawning that object again in the same code run(logic tic). # changng the vertex during the code run/(logic tic) when the object was added (addObject) **what i would like** ""I don't know much about display lists or even if patching the BGE so it only rebuilds the display list once would be a performance improvement over calling replaceMesh.""" - [Also from Mobious](http://blenderartists.org/forum/showthread.php?362541-Vertex-manipulation-and-rasterizer-issue&p=2820852&viewfull=1#post2820852) Maybe that. **blend** [vertexAccesProblem_(1).blend](https://archive.blender.org/developer/F145097/vertexAccesProblem__1_.blend)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @vegetablejuicef

Added subscriber: @vegetablejuicef
Member

Added subscriber: @MikeErwin

Added subscriber: @MikeErwin

Added subscriber: @panzergame

Added subscriber: @panzergame

Hi vegetablejuicef, it seems that your mesh is enormous, if you make parts of your mesh and modify it differently it can be better.

Hi vegetablejuicef, it seems that your mesh is enormous, if you make parts of your mesh and modify it differently it can be better.

Hi, sorry for the late response.

Surely, that is possible and advised, but that should not excuse the issue at hand.

The thing is( or was) that I had a energy beam that blasted through the whole map:
Either i edit 1 big mesh and get a huge lag.
Edit 4 medium meshes and get 4 medium lag spikes = huge lag.
Or I edit 10 smaller chunks which causes 10 * ( lag / 10 ) = still the same.
You get it by now I hope.

Of course, as the "fix" for this can be applied to the smaller meshes over several frames,
but then instead of being short and painful, it will be unresponsive visually and still lag.

The size of the mesh is not important, the sizehere was just toillustrate the problem.
It was made so that my old HD5770 could choke a little.

So yeah, I can try to shove the problem under a carpet or at least ask for it to be looked at here.

Hi, sorry for the late response. Surely, that is possible and advised, but that should not excuse the issue at hand. The thing is( or was) that I had a energy beam that blasted through the whole map: Either i edit 1 big mesh and get a huge lag. Edit 4 medium meshes and get 4 medium lag spikes = huge lag. Or I edit 10 smaller chunks which causes 10 * ( lag / 10 ) = still the same. You get it by now I hope. Of course, as the "fix" for this can be applied to the smaller meshes **over several frames**, but then instead of being short and painful, it will be unresponsive visually and still lag. The size of the mesh is not important, the **size**here was just to**illustrate the problem.** It was made so that my old HD5770 could choke a little. So yeah, I can try to shove the problem under a carpet or at least ask for it to be looked at here.

Added subscriber: @AngusHollands-4

Added subscriber: @AngusHollands-4

This has been noticed before, we should look at this at some point (i.e, not low)

This has been noticed before, we should look at this at some point (i.e, not low)

This issue was referenced by 3b359f1fea

This issue was referenced by 3b359f1feaa1b8784a6a5b1f1bd7d12a2d4acb20

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 3b359f1fea.

Closed by commit 3b359f1fea.
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#43761
No description provided.