Anyone here improving the game engine?

This is a thing that I have been wanting for the game engine to have since day one (this is just because Blender can’t handle AVI): UV-IPO!

It would be great if you could put a Loc-ipo to every point in the uv map so you could make the image alive somehow…

Is this possible? AT ALL? IN ANY GAME-ENGINE?

Using python it is possible to control UV mapping in realtime. I haven’t really used the method myself yet, so I can’t give more specific details.

It’s an undocumented feature…

You can also animate a series of frames on a UV mapped object with tiles.

Really? Since when is it possible? I’ve heard that it was impossible, but if I’m wrong, then that would be awesome!
Access to UV maps… :o

Yes, you can acces to UV coords.

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

That would move the uv cords trough Y axis.

Awesome! Thanks! :smiley:

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.

Can’t you number them or something? Is there NO WAY of knowing which vertex you’re moving?

Well, at least you could test in which order the vertexes are moved, so you could make a custom script for each UV-map…

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

That´s very interesting, ashsid! I would love to take a look in that Blend.

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.

That´s OK. Congratulations anyway! Amazing the broad spectrum of applications with Blender + Python.