Re: [cgkit-user] video as a texture
Brought to you by:
mbaas
|
From: Matthias B. <mat...@gm...> - 2010-12-01 23:50:39
|
Hi Samuel, On 26.11.10 23:24, Samuel Potter wrote: > I'm using the OpenGL material, so setting the imagename property > would be a great way to go - I'm a little unsure of how to change the > parameter after instantiation, though... If you have an OpenGL material with a texture like this: mat = GLMaterial(..., texture=GLTexture(...), ...) then you can change the image file as follows: mat.getTexture(0).imagename = "myimage.jpg" > I thought of maybe using a > ValueTable and image paths, but something like ValueTable(type = > "string") didn't work. Yes, at the moment, such a value table can only be used for numeric types. For animating the above image name, I would suggest connecting a callback function to the STEP_FRAME event from where you can update your animated textures. See the last section in the animation tutorial. I hope that helped... Cheers, - Matthias - |