University of Southern CaliforniaUSC
USC ICT TwitterUSC ICT FacebookUSC ICT YouTube

Misunderstanding of the gaze functionality. | General SmartBody Discussion | Forum

Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Misunderstanding of the gaze functionality.
January 8, 2016
7:43 am
Avatar
Member
Members
Forum Posts: 11
Member Since:
July 29, 2015
sp_UserOfflineSmall Offline

Hey!

 

I have a question / need some explanation about the gazing functionality.

I setup a scene with a male (ChrBrad) at position SrVec(.5, 0, 0) and HPR of SrVec(-45, 0, 0) and a female (ChrRachel) at position SrVec(-.5, 0, 0) and HPR SrVec(45, 0, 0).

I run: bml.execBML('ChrBrad', '<gaze target="ChrRachel:spine4"/>') (spine4 is classified as chest but it seems that the character does look the other character's face)

and the result was the male character looking into the distance behind the female character.

So I took the GazeDemo script and tinkered with it, and it seems the source of the problem is the HPR setup, while at the 17 angle it looks proper, at 45 it does not (the command bml.execBML('ChrRachel', '<gaze sbm:joint-range="EYES CHEST" target="gazeTarget"/>') didn't seem to look proper either at 45)

 

Images from my tinkering session:

http://s14.postimg.org/hxx2tqs...../gaze1.png

http://s9.postimg.org/r41ry3kd...../gaze2.png

 

I thought maybe the angle and / or the distance attribites would help. Both sound very ambiguous to me, and upon trying the angle attribute it had no visible effect. Am I understanding gazing wrong?

January 8, 2016
5:55 pm
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

It might be because the character isn't able to turn the entire amount; by using only (CHEST EYES) you are ignoring the BACK joint that allows the character to see at far greater angles.

Does it work if you execute:

bml.execBML('ChrRachel', '<gaze sbm:joint-range="EYES BACK" target="gazeTarget"/>

 

instead of:

bml.execBML('ChrRachel', '<gaze sbm:joint-range="EYES CHEST" target="gazeTarget"/>

 

?

 

Ari

January 9, 2016
10:28 am
Avatar
Member
Members
Forum Posts: 11
Member Since:
July 29, 2015
sp_UserOfflineSmall Offline

Still the same output, ChrRachel is looking to the right of the gaze target from the viewer's perspective, I tried recording it but Open Broadcaster Software wouldn't pickup the viewer movements for some reason.

It's quite easy to reproduce, just take SmartBody/data/example/GazeDemo.py and change both characters to have a HPR of SrVec(+/-45, 0, 0).

Anyways in the end I decided to just use the HPR of SrVec(17, 0, 0) like in the GazeDemo.py example, and it's working perfectly.

January 11, 2016
9:59 am
Avatar
Admin
Forum Posts: 983
Member Since:
December 1, 2011
sp_UserOfflineSmall Offline

One more thing you can try:

 

there are Euler angle limits on the gaze angle for each body part, so on page 118 of the SmartBody manual:

 

gaze.limitHeadingChest 15

 

you can try making these limits larger to see if that fixes your problem:

scene.getCharacter("mycharacter").setDoubleAttribute("gaze.limitHeadingChest", 40)

When I get a chance, i'll look into this problem.

 

Ari

Forum Timezone: America/Los_Angeles

Top Posters:

jwwalker: 80

jyambao: 52

rbaral: 47

adiaz: 30

WargnierP: 29

lucky7456969: 28

mbarros: 28

avida.matt: 26

JonathanW: 24

laguerre: 23

Member Stats:

Guest Posters: 69

Members: 122211

Moderators: 3

Admins: 4

Forum Stats:

Groups: 1

Forums: 5

Topics: 531

Posts: 2495