dupa

Author Topic: gestures for body_female  (Read 6525 times)

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
gestures for body_female
« on: November 12, 2010, 08:16:41 am »
  I've been doing some work with the Haptek body_female (jiggly) and came across some animations or gestures for body_female.   Thay are numbered 1 through 78 and include a default to get the character back to the original position.  Thay work the way thay should but the movement happens at once instead of being a movement for a second or so.  Not sure where the files came from, I found them on an old CD.
Here is a sample of the code used:


#Haptek  Version= 1.00 HapType= command FileType= text

\setname [figure= body_female name= fullBod]
\setname [figure= standard name= fullBod]

\setreg [ figure=fullBod name=HeadSideBend f0=-0.2000 t=2]
\setreg [ figure=fullBod name=HeadForward f0=0.0000 t=2]
\setreg [ figure=fullBod name=HeadTwist f0=0.0000 t=2]

\setreg [ figure=fullBod name=NeckForward f0=0.0000 t=2]
\setreg [ figure=fullBod name=NeckTwist f0=0.0000 t=2]
\setreg [ figure=fullBod name=NeckSideBend f0=0.0000 t=2]

\setreg [ figure=fullBod name=LShoOut f0=-1.1000 t=2]
\setreg [ figure=fullBod name=RShoOut f0=-1.1000 t=2]
\setreg [ figure=fullBod name=LShoForward f0=0.0000 t=2]
\setreg [ figure=fullBod name=RShoForward f0=0.0000 t=2]
\setreg [ figure=fullBod name=RShoTwist f0=0.0000 t=2]
\setreg [ figure=fullBod name=LShoTwist f0=0.0000 t=2]

\setreg [ figure=fullBod name=LClavicalForward f0=0.3000 t=2]
\setreg [ figure=fullBod name=RClavicalForward f0=0.3000 t=2]
\setreg [ figure=fullBod name=LClavicalUp f0=0.0000 t=2]
\setreg [ figure=fullBod name=RClavicalUp f0=0.0000 t=2]

 This moves the arms straight out, I've tried changing the time from 2 to 5 and it still happens instantly.
Carl2

 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #1 on: November 13, 2010, 07:26:50 am »
  I tried the script with some changes and found I can reduce the whole thing to:

#Haptek  Version= 1.00 HapType= command FileType= text
\setname [figure= body_female name= fullBod]
\setname [figure= standard name= fullBod]
\setreg [ figure=fullBod name=LShoOut f0=-2.1000 ]
\setreg [ figure=fullBod name=RShoOut f0=-2.1000 ]
\setreg [ figure=fullBod name=LClavicalForward f0= 2.000   ]
\setreg [ figure=fullBod name=RClavicalForward f0= 2.000   ]

I've tried using the clock function without any results.
Carl2


 

raybe

  • Hero Member
  • *****
  • Posts: 1067
    • View Profile
Re: gestures for body_female
« Reply #2 on: November 13, 2010, 02:39:57 pm »
Sorry Carl but I didn't understand the area of your post when you mention "but the movement happens all at once instead of being a movement for a second or so" Do you mean the whole gesture runs at one time and then resets when 'triggered' since you also mention that the clock function plays no role.

raybe
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #3 on: November 13, 2010, 06:14:54 pm »
  The frist  script shown is a partial copy of a hap file called  5armsup.hap, it contains more scripting for other body parts with a value of zero.  Every hap tested works, shows some movement.  the problem I'm running into is as soon as the hap is put in it the final state is shown vs watching the arm go up.
\setreg [ figure=fullBod name=LClavicalForward f0=0.3000 t=2]
  To me the above means the figure fullBod will move the LCavicalForward .3 whatever in a timeperiod of 2 seconds.  The body_female is now fullBod because is changed in a line above.
In the past I was scripting using animations from the body_female.def using switches and states which work fine for me. 
example:  \Clock [t= 10.0 ] \setSwitch [figure=body_female switch=  considering   state=  start  ]
                     in 10 seconds body_female begins an animation " considering " that last a few seconds
another ex:  \Clock [t= 2.4 ] \Translate [x= 3 y= 6 z= 20 t= 3]
                         at 2.4 seconds the character will move to the position shown taking 3 sec to             complete.
  A clock is included in the setreg " t= 2 " but dosen't appear to function.  I've got 78 animations, some unique but to really be  useful it has to take time for the motion.
Carl2
 

NIGE

  • Hero Member
  • *****
  • Posts: 1592
  • Bringing things to life
    • View Profile
Re: gestures for body_female
« Reply #4 on: November 13, 2010, 08:24:36 pm »
Carl2,
Try this one,

#Haptek Version= 1.00 HapType= script FileType= text
##standard

\setname [figure= body_female name= fullBod]
\setname [figure= ladybod name= fullBod]
\setname [figure= torso name= fullBod]



\clock [t= 0]\setreg [figure=fullBod name=headforward f0= 0.1500 t= .1]
\clock [t= .1]\setreg [figure=fullBod name=neckforward f0= 0.1200 t= .1]
\clock [t= .2]\setreg [figure=fullBod name=torsobow f0= -0.4200 t= .1]
\clock [t= .3]\setreg [figure=fullBod name=headforward f0= 0.2500 t= .1]
\clock [t= .4]\setreg [figure=fullBod name=neckforward f0= 0.2200 t= .1]
\clock [t= .5]\setreg [figure=fullBod name=torsobow f0= -0.9200 t= .1]



\clock [t= 2]\setreg [figure=fullBod name=torsobow f0= -0.4200 t= .1]
\clock [t= 2.1]\setreg [figure=fullBod name=neckforward f0= 0.1200 t= .1]
\clock [t= 2.2]\setreg [figure=fullBod name=headforward f0= 0.1500 t= .1]
\clock [t= 2.3]\setreg [figure=fullBod name=torsobow f0= 0.0000 t= .1]
\clock [t= 2.4]\setreg [figure=fullBod name=neckforward f0= 0.0000 t= .1]
\clock [t= 2.5]\setreg [figure=fullBod name=headforward f0= 0.0000 t= .1]

Notice the very first line has=== HapType= script.
Timing will only work with this type of hap file.
« Last Edit: November 13, 2010, 08:33:13 pm by NIGE »

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #5 on: November 14, 2010, 08:35:08 am »
Nige,
  I copied and pasted the script into a text file and tried it, it works.  A little jerky but I'm sure this can be removed by increasing the number of movements for the gesture. 
  Towards the end of the line " t= .1 " what is the purpose of that statement?
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #6 on: November 14, 2010, 09:33:30 am »
  Just gave it a try after using 5 sets of inputs pasted a portion for an example

\clock [t= .00]\setreg [figure=fullBod name=headforward f0= 0.0500 t= .5]

\clock [t= .01]\setreg [figure=fullBod name=neckforward f0= 0.0440 t= .5]

\clock [t= .02]\setreg [figure=fullBod name=torsobow f0= -0.1900 t= .5]


\clock [t= .10]\setreg [figure=fullBod name=headforward f0= 0.1000 t= .5]

\clock [t= .11]\setreg [figure=fullBod name=neckforward f0= 0.0880 t= .5]

\clock [t= .12]\setreg [figure=fullBod name=torsobow f0= -0.3800 t= .5]


 Still have a jerky movement.

Carl2
 

NIGE

  • Hero Member
  • *****
  • Posts: 1592
  • Bringing things to life
    • View Profile
Re: gestures for body_female
« Reply #7 on: November 15, 2010, 12:23:39 am »
Hi Carl2,
Try this little program==== autohapgenerator.
I think this should get you there.
http://www.ultrahal.com/community/index.php?topic=5508.msg34137#msg34137

Un-zip & read the file, it tells you where to put everything.
« Last Edit: November 15, 2010, 12:27:53 am by NIGE »

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #8 on: November 15, 2010, 09:22:02 am »
Nige,
   I downloaded and installed the HapGenerator,  I'm running this in Win 7 and using the car.exe with it.  I have the four files loaded, I can load body_female,  but if I try to translate or change the position of the body I get the runtime error file not found.
Carl2
 

NIGE

  • Hero Member
  • *****
  • Posts: 1592
  • Bringing things to life
    • View Profile
Re: gestures for body_female
« Reply #9 on: November 16, 2010, 12:38:39 am »
Carl2, I'm running same as you with no worries.
Not used it for ages but had a quick go & made some adjustments & it seems to work ok.
Check to see if you have everything in the right place.
In C:\====nothing else.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #10 on: November 17, 2010, 08:52:15 am »
   I've made a little progress with the program,  and have a better idea on how to use it.  I can get it to antimate the character and generate script into the selected file. 
  "  you can set two "keyframes" an initial and a final. The program will then generate all the inbetween frames "   Are these the initial.hap and the final.hap sent in the program?
"  "Generate & Add to File", once you have set all the initial and final registers to your liking you can view the animation by clicking "Display Animation", however it is not until you click "Generate & Add to File" that the data is actually saved to the ".hap" file in "File Name". "
  Now I opened the generator, loaded the file Zbow.txt,  I can (button) Display Saved hap file,  (button) Reset character, (button) generate and add to file. 
  I can not  (button) load last animation from file. 
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #11 on: November 18, 2010, 08:55:05 am »
  After a lot of experimenting and trying this and that I was able to generate 5 seconds of body_female lowering her left arm and raising her right arm smoothly.  I just tired the hap in the hapregestry to be sure it will also work in a more standard hap player and again a nice long smooth movement. 
Nige,  thanks for pointing this program out
and
harry7_7s ,  Thanks for building the program, still working in win 7
Carl2

 
 

NIGE

  • Hero Member
  • *****
  • Posts: 1592
  • Bringing things to life
    • View Profile
Re: gestures for body_female
« Reply #12 on: November 19, 2010, 12:13:54 am »
Glad you got it working.
Saw your movie on the other site, very well done,
movements were great.
I think harry7_7s only came to drop that in, not seen him since.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: gestures for body_female
« Reply #13 on: November 19, 2010, 08:12:52 am »
  The video was done using script and timing for the switches and states in the def file, pretty easy and simple to do.  I ran across a large amount of haps for assorted animations but ran into the instant response and started the post.  Still have problems with the program (may be Win7 ) but I was able to get 1 animation to be written.  Trying to get a goodbye wave generated at this time.
Carl2