WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Regarding the Vizconnect Avatar male_2 and MainView (https://forum.worldviz.com/showthread.php?t=6044)

rajnishv 07-26-2017 04:23 AM

Regarding the Vizconnect Avatar male_2 and MainView
 
Hi Jeff,
Coming back after too many days on World Viz.
I am preparing a demo in which the vizconnects avatar (male_2) should be seen in 3rd Person Perspective as same as 3rd person percective u executed in you below post.


I tried your code from the POST and the same i have to implement using Vizconnect but failed to do and the viewpoint and avatar male_2 rotates randomly:-

http://forum.worldviz.com/showthread.php?t=2746


Also tried with vizconnect:-
My Code With Vizconnect:-

Code:

avatar = vizconnect.getAvatar('male_2').getRaw()
#avatar.state(2)

link = viz.link(viz.MainView,avatar)

OR

linkk = viz.link(avatar,viz.MainView)
linkk.preTrans([0,-1.8,2])


How to achive the logic you mentioned in the POST:

http://forum.worldviz.com/showthread.php?t=2746


Using Vizconnect.

Waiting for ur reply.
Thank You!!

Jeff 07-27-2017 11:54 PM

1 Attachment(s)
Try adding a group tracker and placing that between the avatar head slot and the display in the vizconnect scenegraph. Then open up the offsets dialog for the group tracker and apply preTrans Y and Z offsets to move the display above and behind the avatar:

http://forum.worldviz.com/attachment...1&d=1501224830

rajnishv 07-28-2017 01:44 AM

Yes i did the same thing as u have replied,but was missing due to some offsets values for group tracker and now it works like a charm.

Now i want to apply a walking and idle animation on some key events,
i tried some logic,but the character male_2 does not walk on some animation instead it shakes with random left right.


My Code which does not play walk and idle animation for the avatar male_2 which i got from vizconnect nicely and properly as same as animation seen in inspector on key events:-





Code:


#getting the handle of avatar from vizconnect

avatar = vizconnect.getAvatar('male_2').getRaw()
avatar.state(1)

#Playing walk animation on some key events

def onKeyDOWN(key):
    if key == 'w' or key == 's' or key == 'a' or key == 'd' or key == 'q' or key == 'e':
        print 'w  and s key pressed'
        avatar.state(2)
    elif key == "r":
        print 'R key pressed'

viz.callback(viz.KEYDOWN_EVENT,onKeyDOWN)


#Playing idle animation on some key events

def onKeyUp(key):
    if key == 'w' or key == 's' or key == 'a' or key == 'd' or key == 'q' or key == 'e':
        print 'w  and s key released'
        avatar.state(1) #looping idle animation
    elif key == "r":
        print 'R key released'

viz.callback(viz.KEYUP_EVENT,onKeyUp)


How can i play animation nicely for the character male_2 which i got above from vizconnect.

Pls assist me further.

Thank You!!

Jeff 07-28-2017 09:46 PM

Do you have trackers assigned to the avatar's animator?

rajnishv 07-30-2017 10:07 PM

4 Attachment(s)
Thanx for the reply Jeff,
PFA of the screenshot of head and hand trackers.
Also find the attachment of the main python script and the vizconnect file for reference.

Will wait for ur reply.

Thank You!!!

rajnishv 08-08-2017 12:12 AM

Hi Jeff,
Waiting for ur reply for the problem to above post.
Thank You!!!

rajnishv 08-09-2017 11:08 PM

Hi Jeff,
Hope u r fine .
Need ur help on the above problem.
Pls assist me further.

Jeff 08-10-2017 12:01 AM

Do you want the avatar hand to move with a tracker but the rest of the body to follow a canned animation? The vizconnect IK animator is controlling the avatar and there's not a built in way to merge tracking and an animation. It should be possible to extract the data from one avatar playing a canned animation and apply that to additional trackers on the IK avatar. This is what the code in the avatar IK demo (File > Quick Open > Type: ik_demo) does. In your case some of the trackers would be using actual tracking data while others would be using data from the canned animation.


All times are GMT -7. The time now is 12:49 PM.

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