import GameLogic as GL
cont = GL.getCurrentController()
own = cont.getOwner()
mesh = own.getMesh()
array = mesh.getVertexArrayLength(0)
for v in range(0,array):
vert = mesh.getVertex(0,v)
uv = vert.getUV()
uv[1] = uv[1]+0.05
vert.setUV(uv)
Is it possible to move individual UV-vertexes? I already have a script made by Doc Holiday that makes the Uv scroll down (meaning that it too moves the uv-coordinates through the Y-axis).
Doc holidays script does move individual vertexes. It goes through the list of vertexes and moves each one up individually. The problem with moving them individually, is deciding WHICH one you want to move.
Vertices are numbered according to face order - 1. vertex in 1. face has index 0, 2. vertex in 1. face has index 1, 3. vertex in 1. face has index 2, 1. vertex in 2. face has index 3 (if 1. face is triange)…
Warning: Vertex in the one face has different index than the same vertex in other face.
You have to know, how faces of mesh are ordered (check it in Blender, maybe using some script), and use this information in GameBlender for vertex access.
I have created realtime graph generator - in game it receives data and according to them modifies 3d graph. I used two scripts, one to generate mesh for graph (in Blender), and second to manipulate with vertices (in GameBlender).
I’m sorry, I don’t have permission to publish that source file. But I found out, that manipulating with many vertices in the mesh consumes resources and time very much. I tried to modify hundreds of vertices every frame and it pulled Logic up to 80%.
Last version I did modified only few vertices by frame, and that keeped Logic very low.
There is a screenshot with running graph.