WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 12-04-2007, 08:26 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Prioritizing events

My application involves a number of applications such as animations of avatars and some message boxes (drop down) which helps in communicating through selection of options. When I am trying to prioritize the animation of avatars to be followed by communication boxes, I am having a problem. In fact, my message boxes are coming first and then the avatar animation. Does the message boxes have a lower priority? In that case, if anyone can show me the way of changing the priority?

Thanks
Reply With Quote
  #2  
Old 12-04-2007, 10:29 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Sorry, I'm not exactly sure what you are asking. Can you post some sample code that illustrates your problem?
Reply With Quote
  #3  
Old 12-04-2007, 11:12 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Prioritizing events

My code is:

def mykey(key)
if key ==' ':
#perform some animation of an avatar (such as speaking)
male1.addAction(speech)
#Then starts the sequence of conversation exercise
choices = ["Hi..."]
answer = viz.choose("......",choices)
if answer == 0;
choices1 = ....


and this continues

viz.callback(viz.KEYBOARD_EVENT,mykey)

When I am running the above code, first my interaction boxes are appearing and then the animation of the Avatar. What I actually want is first the animation of the Avatar and then the sequence of conversation interaction.

Thanks
Reply With Quote
  #4  
Old 12-04-2007, 06:19 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
The viz.choose(...) command will block the main graphics loop until the user has selected an item. This means all rendering will stop until the user makes a decision. Your code starts the avatar animation and then immediately displays the dialog box. Do you want to display the input box after the avatar has finished the animation or do you want to display it while the avatar is performing the animation?
Reply With Quote
  #5  
Old 12-06-2007, 07:38 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Priritizing events

Thank you so much for the valuable information.

Actually, my screen will involve few avatars. I want all avatars to perform some animation. Then one avatar will come forward and initiate a conversation with the subject. Again, after a short conversation finishes, I want the avatar to perform some animation followed by some interation with the subject.

Sorry to ask so many questions. In fact, along with this, I am now into another problem solving. If you can please hep me out. I have developed a small interaction loop which goes on like a film (which I can convert to .avi format). What I want is that during the screen moving in a dynamic fashion, I want to correlate the pixels of the screen with an eyetracker. So, for this, is there any way, I can grab the pixel positions of different protions of the screen, such as eyes, body of the avatar or the surrounding environment objects. I have been able to set the fps(frame rate per second), but am not able to find out and store the pixel positions of the different frames constituting the dynamic film.

Uttama
Reply With Quote
  #6  
Old 12-06-2007, 03:42 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
You can use the viz.pick() command to convert a 2D screen position into the 3D object that is at that location. You can also use the viz.worldtoscreen() command to convert a 3D world position to a 2D screen position.
Reply With Quote
  #7  
Old 12-11-2007, 09:58 AM
Uttama_vizard Uttama_vizard is offline
Member
 
Join Date: Sep 2007
Posts: 60
Prioritizing Events

I have been trying using the pick() command. But, with it I am unable to pinpoint the pixel position of an object (say, an avatar's eyes) on a dynamic screen.

Does vizard support this?

Thanks

Uttama
Reply With Quote
  #8  
Old 12-11-2007, 08:44 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
In my previous post I mentioned that you can use the viz.worldtoscreen() command to convert a 3D coordinate to a 2D screen coordinate. If you know the 3D coordinate of the avatars eyes, then you can use this command to determine the 2D pixel coordinates.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
flockOfBirds events giancamati Vizard 3 07-03-2006 10:35 AM
collision events trigger Eunice Vizard 1 01-03-2006 10:39 AM


All times are GMT -7. The time now is 05:34 AM.


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