#1
|
|||
|
|||
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 |
#2
|
|||
|
|||
Sorry, I'm not exactly sure what you are asking. Can you post some sample code that illustrates your problem?
|
#3
|
|||
|
|||
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 |
#4
|
|||
|
|||
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?
|
#5
|
|||
|
|||
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 |
#6
|
|||
|
|||
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.
|
#7
|
|||
|
|||
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 |
#8
|
|||
|
|||
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.
|
Thread Tools | |
Display Modes | Rate This Thread |
|
|
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 |