WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rating: Thread Rating: 14 votes, 1.36 average. Display Modes
  #1  
Old 07-26-2017, 04:23 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Smile 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!!
Reply With Quote
  #2  
Old 07-27-2017, 11:54 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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:

Attached Thumbnails
Click image for larger version

Name:	avatar_offset.png
Views:	963
Size:	97.7 KB
ID:	940  
Reply With Quote
  #3  
Old 07-28-2017, 01:44 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Smile

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!!

Last edited by rajnishv; 07-28-2017 at 01:49 AM.
Reply With Quote
  #4  
Old 07-28-2017, 09:46 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
Do you have trackers assigned to the avatar's animator?
Reply With Quote
  #5  
Old 07-30-2017, 10:07 PM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
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!!!
Attached Thumbnails
Click image for larger version

Name:	handtrackers.png
Views:	639
Size:	86.0 KB
ID:	941   Click image for larger version

Name:	head_trackers.png
Views:	625
Size:	116.7 KB
ID:	942  
Attached Files
File Type: zip AvatarViewTest.zip (1.4 KB, 736 views)
File Type: zip vizconnect_Config.zip (3.4 KB, 744 views)
Reply With Quote
  #6  
Old 08-08-2017, 12:12 AM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Hi Jeff,
Waiting for ur reply for the problem to above post.
Thank You!!!
Reply With Quote
  #7  
Old 08-09-2017, 11:08 PM
rajnishv rajnishv is offline
Member
 
Join Date: Jan 2016
Location: Kalina,Sanatcruz(East),Mumbai,Maharashtra,India
Posts: 94
Hi Jeff,
Hope u r fine .
Need ur help on the above problem.
Pls assist me further.
Reply With Quote
  #8  
Old 08-10-2017, 12:01 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
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 10:44 AM.


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