Author Topic: running HAPs with HAL6  (Read 6720 times)

danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
running HAPs with HAL6
« on: August 21, 2006, 02:09:26 pm »
Has anyone discovered a method of calling HAPs with HAL6, like animations, skin, background changes etc.  I thought since HAl can open an executable, perhaps a compiled exe loading a hap may work, that is if no one has found some other way, but I hate to rework the wheel if it's been done.  I haven't found much in the search except through the emotions and facial expressions.
 

Duskrider

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3316
  • Graphic King
    • View Profile
running HAPs with HAL6
« Reply #1 on: August 21, 2006, 02:26:15 pm »

This may be of help to you.
It's one idea anyway.
It's copy of my shylove hap in hal6


#Haptek  Version= 1.00 Name= Hap_Shy_and_In_Love  HapType= script FileType= text
##standard
\setname [figure= body_female name= fullBod]

\clock [t= 0.9]\settexture [tex= [data/standard/skins/br/s500.jpg]]
\LoadBackground [file= data/standard/backgrounds/backs/230.jpg]

\SetSwitchIntensity [switch= expMouthHappy f0= 0.600000 t= 0.4]

\SetSwitchIntensity [switch= expMouthSad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsSad f0= 0.385000 t= 0.4]

\SetSwitchIntensity [switch= expMouthMad f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= expBrowsMad f0= 0.000000 t= 0.4]

\SetSwitchIntensity [switch= expEyesTrust f0= 1.081500 t= 0.4]
\SetSwitchIntensity [switch= antiTrust f0= 0.166500 t= 0.4]

\SetSwitchIntensity [switch= expEyesDistrust f0= -0.500000 t= 0.4]
\SetSwitchIntensity [switch= antiDistrust f0= 0.000000 t= 0.4]
SetSwitchIntensity [switch= blinks f0= 1.000000 t= 0.4]

\SetSwitchIntensity [switch= expBrowsCurious f0= 1.215000 t= 0.4]

\SetSwitch [switch= ego state= up]

\SetSwitch [switch= agressMaster state= confront]

\SetSwitchIntensity [switch= energyHigh f0= 0.565000 t= 0.4]
\SetSwitchIntensity [switch= energyLow f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= talkBob f0= 0.947500 t= 0.4]
\SetSwitchIntensity [switch= headEvadeHighE f0= 0.300000 t= 0.4]
\SetSwitchIntensity [switch= headEvadeLowE f0= 0.300000 t= 0.4]
\SetSwitchIntensity [switch= HighEnergyNoise f0= 0.565000 t= 0.4]
\SetSwitchIntensity [switch= LowEnergyNoise f0= 0.000000 t= 0.4]
\SetSwitchIntensity [switch= browTalk f0= 0.565000 t= 0.4]
\SetSwitchIntensity [switch= visemes f0= 1.226000 t= 0.4]

\load [file= data/standard/skins/spreadFolder/1default.hap i0= 1]
\setlight [i0=0 i1= 0 r= 0.7 g= 0.4 b= 0.5]

\setreg [ figure=fullBod name=smile4 f0=0.1000 t=0.8]
\setreg [ figure=body_female name=smile4 f0=0.1000 t=0.8]

\load [file= data/standard/skins/spreadFolder/51eyes.hap]
\clock [t= 1]\load [file= data/standard/skins/br/2bre19.hap]


This loads my mood, skin, and background for Slylove.hap
At conclusion of 1 second the bottom line transfurs the action to 2bre19.hap which is my breathing and movements for this hap.


danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
running HAPs with HAL6
« Reply #2 on: August 21, 2006, 03:35:40 pm »
Thanks Dusky, looks like a cool hap, I'll try it out, but I was more interested in scripting a call to a hap like in HAL5 they were using
something like
If InStr(UserSentence, " sad ")<> 0 Then
HalCommands = "<HAPFILE>hidesadface.hap</HAPFILE>"
etc...

But, the only thing I can see in HAL6 is work on using the emotions to call a hap. I can't find any work done on animation haps, or backgrounds, or outfits.  It might be cool to just tell HAL to "run loadhap/shylove" and have HAL load the shylove.hap with an executable called loadhap compiled to work with a switch calling the hap, then it could load an animation hap, or an outfit, or background, or music, or whatever is in the hap, maybe all at once.  Just an idea unless someone's done something on it already.
 

vrossi

  • Full Member
  • ***
  • Posts: 150
    • View Profile
    • http://vrconsulting.it
running HAPs with HAL6
« Reply #3 on: August 21, 2006, 04:12:28 pm »

Hi, danbaltzell

if you download my vrHaptek plugin http://www.zabaware.com/forum/topic.asp?TOPIC_ID=2845
you will find several examples about running hap files and loading background images.

Here is a sample code:



' Starts walking
If InStr(vrUserSentence, " start walking ") <> 0 Then
   vrFile = "Walk.hap"
   GetResponse = "Where shall we go?"
End If
' Stops walking
If InStr(vrUserSentence, " stop walking ") <> 0 Then
   vrFile = "StopWalk.hap"
   GetResponse = "Thanks, I was a bit tired!"
End If

'------------------
' If something was detected, then I give the Haptek command
'------------------
If vrFile <> "" Then
   HalCommands = "<HAPFILE>" & vrFile & "</HAPFILE>"
   HalBrain.ReadOnlyMode = True
End If



I hope this can be helpful

Bye

danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
running HAPs with HAL6
« Reply #4 on: August 21, 2006, 04:28:49 pm »
Thanks Vitorrio, I had downloaded many of your plug-ins in the past, but I had to restore and went back to the original brain last week, I never noticed that plug-in before though.  Last night I was trying a  

If InStr(UserSentence,"OUTFIT") <> 0 Then HalCommands = "<HAPFILE>" loadskin.hap "</HAPFILE>"

but wasn't getting a response and thought maybe it only worked for HAL5
and thought about the read only mode but still got nothing, maybe I forgot the &'s, I like how you've used the vrFile though, that make's it pretty handy.

Thanks for your help.

Dan
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
running HAPs with HAL6
« Reply #5 on: August 21, 2006, 04:32:29 pm »
danbaltzell,
  I was working with ver 5, using the full body girl, to detect trigger words for use with mood haps and skin haps. I was hoping to use Hals input to load haps when I switched to ver 6. I'm fairly happy with the mood haps in ver 6 and I'm using vrHaptek from virtualhumans which uses Hals input to trigger haps, ex: she nods when she says yes. I'd like to expand this for other animation and changing skins.
  Haptek has the Haptek SDK which would be useful for what your suggesting. You'd require scripting and possibly detection tables.
You could also do a search here and at DG, there are quite a few scripts around.
  Presently I'm trying to load body movement into Hal, the facial expressions are okay but the body has no movement at all.  Hope I've been of some help.  
    if InStr(UserSentence, " sad ")<> 0 Then
    HalCommands = "<HAPFILE>hidesadface.hap</HAPFILE>"
     frist line, if the user sentence contains sad then
     send Hidesadface.hap to the Haptek engine
Carl2

 

danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
running HAPs with HAL6
« Reply #6 on: August 21, 2006, 08:53:05 pm »
Yeah Carl that's what I'm after, I'm going to load Vitorrio's script script and check it out for for body movements, skins, etc.   Something like "how about that blue dress" to load the blue dress hap, or let's take a walk, etc.  Just like Vitorrio has done with the walking.  I think there's value there.  Thanks, I know you're also interested in this, I've read some of the past and I know you've had success with HAL5.  On another note, did you have success with two Hals communicating?  I thought it may be fun to see that.  Thanks for the help.

Dan
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
running HAPs with HAL6
« Reply #7 on: August 22, 2006, 07:25:32 am »
danbaltzell,
  I've got the second P4 up and running with linux and windows, I haven't put in the software, Hal or dragon yet and I'm unsure about putting in a second user for Hal so it hasn't been done yet.
  I've been trying to spend time talking with Hal, she's making progress but has a way to go. I was able to put the same type of scripting into Hal 6 as was in ver 5 to get skin changes.
  One objective I had was to get fullbod to load with a modified skin which vrossi's vrHaptek will do, I started using the uncompressed file and I think it may have made changes to my registry, so some scripting dosen't work for me.
  I remember thay have basic scripting to load moods which was revised to load skins and backgrounds (thay don't require tables), I'll see if I can find them.
Carl2
 

danbaltzell

  • Full Member
  • ***
  • Posts: 212
    • View Profile
    • http://geocities.com/danbaltzell/ai
running HAPs with HAL6
« Reply #8 on: August 22, 2006, 07:53:05 pm »
I don't think it made changes to the registry, just the script, but I'll back it up before I install, so I can go back.  I saw there were references to the emotions in Halcommands in the table, and thought it might need to be set there, but I'll keep plugging away when I get some time, thanks everyone for your help.
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
running HAPs with HAL6
« Reply #9 on: August 23, 2006, 05:15:06 pm »
danbaltzell,
 "I don't think it made changes to the registry, just the script"
I was refering to my using the uncompressedfullbod htr not the plugin, I tried using the uncompressed file the original htr contains to load a modified skin. Normal methods don't seem to work for me on this computer. Anyways it's always a good idea to have backups of the brain, I've destroyed a few.
  I think vr's plugin is great, Hal will be able to determine what she will wear and do. Good luck with it.
Carl2

 

Ashton10823

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • http://www.2-forex.com/currency/currency-exchange-yen.php
running HAPs with HAL6
« Reply #10 on: September 21, 2006, 11:23:56 am »
quote:
Originally posted by Duskrider

4]SetSwitchIntensity [switch= LowEnergyNoise f0= 0.


 "switch" is exceptional! I love it!