WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 10-08-2003, 05:29 AM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
Dynamic texture?

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

Howard
Reply With Quote
  #2  
Old 10-08-2003, 10:27 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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!
Reply With Quote
  #3  
Old 10-08-2003, 11:45 AM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
Thanks.
Yes, I studied those two programs. now I have two questions.

Question1:
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?

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

Howard
Reply With Quote
  #4  
Old 10-08-2003, 12:07 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
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.
Reply With Quote
  #5  
Old 10-08-2003, 12:38 PM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
Hi,
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?

Howard
Reply With Quote
  #6  
Old 10-08-2003, 12:54 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

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".
Code:
texture = viz.add('image.bmp')

def mytimer(num):
    #Reload the image file to the texture
    texture.load('image.bmp')

viz.callback(viz.TIMER_EVENT,mytimer)
#Start a timer that will continuously update the texture
viz.starttimer(0,0.01,viz.FOREVER)
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
Reply With Quote
  #7  
Old 10-08-2003, 01:17 PM
howard howard is offline
Member
 
Join Date: Oct 2003
Posts: 6
Hi, farshizzo
Thank you very much

Howard
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:21 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC