View Full Version : Dynamic texture?

10-08-2003, 05:29 AM
Now I want to use dynamic texture function in my application.
by either image sequences or avi file as input textures. But I need to dynamic update my input textures, but by both image sequences and avi file method, I think vizard only load input textures into memory at first time, so even input texture has been changed, the vizard don't load it.
So is there any way to solve this problem?
Thanks in advance.


10-08-2003, 10:27 AM
Hi Howard,

Have you taken a look in the "C:\Program Files\Vizard20\tutorial\textures" directory. There are two sample scripts that show how to use an mpg video file and texture swapping. Also, if you are saying that a texture file is being changed during the program you can perform the "load" command on a texture. This will change the image file associated with that texture. Take a look at the Command Reference in the documentation under Multimedia:Image for more information on the "load" command.

Also, don't forget that you can add textures at any time in your program, not just at startup. Hope this helps!

10-08-2003, 11:45 AM
Yes, I studied those two programs. now I have two questions.

I tried to load a dynamic texture by image swapping, but vizard said I can't load more than 200 images in one script, is that correct? if it is, that means I need to convert image sequences into avi or mpg file as dynamic texture if I want to play back a long time image squences, right?

In my application, at startup, my script will load some pre-calculated image sequences as texture, meanwhile, my system will get continous images as input, after doing simple works on those images, then tranfer them into vizard to be new textures. is vizard able to do that job?

Thank you very much.


10-08-2003, 12:07 PM
Hi Howard,

The latest version of Vizard increased the texture limit, I believe it is 1000. You might want to update to the latest version. If you need more than 1000 textures then you might consider converting them to an AVI or MPEG video file.

Regarding your second question, is your system constantly changing the images while the script is running? Also, are these new images going to replace previous images? If you don't mind, could you explain exactly what you are trying to do, so that I could come up with the best solution. I'd like to mention that Vizard has a dynamic texture plugin, so that might come in handy here.

10-08-2003, 12:38 PM
Yes, my system will constantly update images while the script is running, replacing previous image will be better, otherwise my machine will explode(kidding). :)
Right now we have a large video sequences. we have to convert it into images so that we can do some modifiction on every frame. then we want to play back those images in vizard enviroment. but we want to deal with those images and play images at same time.

Thank you so much

BTW, is there any email address for consultant?


10-08-2003, 12:54 PM

In that case all you really need to do is add a texture and change its image every time your system updates it. In the following example I'm assuming the name of your image file is "image.bmp".
texture = viz.add('image.bmp')

def mytimer(num):
#Reload the image file to the texture

#Start a timer that will continuously update the texture
This example isn't too good because it will constantly reload the image, it would be better if you only reloaded the image when it is changed.

If you need any consulting you can email support@worldviz.com

10-08-2003, 01:17 PM
Hi, farshizzo
Thank you very much