WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Prioritizing events (https://forum.worldviz.com/showthread.php?t=1285)

Uttama_vizard 12-04-2007 08:26 AM

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

farshizzo 12-04-2007 10:29 AM

Sorry, I'm not exactly sure what you are asking. Can you post some sample code that illustrates your problem?

Uttama_vizard 12-04-2007 11:12 AM

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

farshizzo 12-04-2007 06:19 PM

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?

Uttama_vizard 12-06-2007 07:38 AM

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

farshizzo 12-06-2007 03:42 PM

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.

Uttama_vizard 12-11-2007 09:58 AM

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

farshizzo 12-11-2007 08:44 PM

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.


All times are GMT -7. The time now is 07:46 AM.

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