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.
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
