Haptek States

  • 5 Replies
  • 5427 Views
*

Carl2

  • Trusty Member
  • ********
  • Replicant
  • *
  • 560
Haptek States
« on: June 01, 2015, 10:54:54 pm »
  I've got Hal up and running again.  I opened the body_f_modestDef in wordpad to look at the State machine they have put in her.  These states are triggered by \setswitch [switch= wipe_tear state= start ] as an example.  I studied this ages ago and it's the first time I've seen it used which is interesting to me. I'm actually wondering what language they are using although I think this is probably done using a special piece of software to generate the code. 
  I've learned that 2048 is the largest jpg that can be used once again unfortunate because I'd like to get more detail in.
Carl2

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Haptek States
« Reply #1 on: June 02, 2015, 12:02:51 am »
im interested and a little confused.
what do you mean by state machine?   on a 2048x2048 jpeg?

*

Carl2

  • Trusty Member
  • ********
  • Replicant
  • *
  • 560
Re: Haptek States
« Reply #2 on: June 02, 2015, 02:50:47 pm »
  I'm not sure how familiar you are with Ultra Hal and the haptek characters but I'll try to explain to the best that I can.  The course was taught ages ago using some of the basic intergrated circuits, as an example for building a clock of which I built a few, when the clock is frist turned on the digits could be turned on in any number of states, all digits could turn on using one digit 0 through 9 so we build a reset circuit and when first turned on the clock reads a certain time,  For a 12 hr clock we look at the outputs of all the digits and when 12:59 is reached we  reset the clock to all 0's and give the hour digit a pulse to set it to 1:00.  So we look at the output or state to determine or set it up for the next state.  The first clock I made was with nixie tubes before led readouts not invented yet. 
  To get back to haptek which is also very old technology, no collision detection, low poly count, problem with joints bending correctly,   but on the plus side they do offer fleshy body parts.  Anyways haptek compresses  a whole series of files using one of the zip formats, when a character is used the files are uncompressed the haptek player is called and appears and the uncompressed files give the information to build the character.  The uncompressed files are put into the haptex player folder under temp and can be opened with notepad for smaller files and wordpad for large documents.  I was interested in the .phy files which delt with the physics used for fleshy body parts and can make changes. 
   Lately I began looking at the .def file and again looked at what I call their state machine.  We can call animations such as:
 
\setswitch [switch= hands_on_hips state= start]
\Load [file= [data/standard/safe_moods/Hap_Happy.hap]]
\setswitch [switch= wipe_tear state= start     ]
\setswitch [switch= weep_sad state= start      ]
\setswitch [switch= hand_clasp_sad state= start]
\setswitch [switch= big_sigh_sad state= start  ]
\setswitch [switch= hide_face_sad state= start ]
\setswitch [switch= arms_cross_sad state= start]
\setswitch [switch= shrug_sad state= start     ]
\setswitch [switch= lookleft state= a        ]
\setswitch [switch= lookright state= a       ]
\setswitch [switch= lookdown state= a        ]
\setswitch [switch= lookup state= a          ]
\setswitch [switch= grr state= a             ]
\setswitch [switch= grr state= off        ]
\setswitch [switch= winkright state= a       ]
\setswitch [switch= winkleft state= a        ]
\setswitch [switch= coyblink state= a        ]
\setswitch [switch= yawn state= a            ]
\setswitch [switch= shake_fist state= a       ]
\setswitch [switch= armattax state= off       ]
\setswitch [switch= armattax state= a         ]
\setswitch [switch= walk3 state= off          ]
\setswitch [switch= walk3 state= 1            ]
\setswitch [switch= h_gest_03 state=  a       ]
\setswitch [switch= considering state= start  ]
\setswitch [switch= inspect_nail state= start ]
\setswitch [switch= arms_crossed state= start ]
\setswitch [switch= hand_thru_hair state= a1  ]
\setswitch [switch= arm_swing state= a        ]
\setswitch [switch= hands_on_hips state= start]

Which end up running the animations and returning her to the home position. Hope I've been able to help and sorry for the length
Carl2

*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Haptek States
« Reply #3 on: June 02, 2015, 07:50:53 pm »
so its for animating the character as you chat to it.    So all states can be on at the same time, so you get to mix and match,  that sounds pretty cool.    I actually remember a Ken Perlin tutorial demonstrating this.

*

Carl2

  • Trusty Member
  • ********
  • Replicant
  • *
  • 560
Re: Haptek States
« Reply #4 on: June 03, 2015, 03:23:41 am »
  In this case the states are used for  animations, and no they are not all turned on at once.  I do have a case where when talking the character gestures with her hand, I'd like to be able to stop this at times so I began looking at the def file again.  Getting back to the having an animation run  you would choose an animation say hands on hip, you have to use hal to check your input, if the input contains a trigger word or words the hal brain can send out a hap to trigger the haptek player to have that particular animation run.
Here is an animation taken from the def file
#--STATE ID:  1--
StateProbability= 1.00
   StateName=                   a
   NextState=                   2
   MinPeriod=                   0.30
   MaxPeriod=                   0.80
   DecayTime=                   0.40
   AttackTime=                  0.40
   MaxAttack=                   0.25
   MaxDecay=                    0.25
   StateProbability=            1.00
   Rate=                        1.00
   ProximityDistance=           0.00
   TriggerParameter= Enter
   MaxEnterTriggerCount=        0
   TriggerParameterCommand=     \setSwitch [figure= body_f_modest switch= blinks state= slowend]               
   ParameterIntensity=        0.0873
   Parameter=                   HeadForward
   ParameterIntensity=        -0.0873
   Parameter=                   HeadTwist
   ParameterIntensity=        0.4000
   Parameter=                   LbrowUD
   ParameterIntensity=        -0.0524
   Parameter=                   HeadSideBend
   ParameterIntensity=        0.2000
   Parameter=                   lipcornerL3ty
This is for a left eye blink and the next state would be state 2 which puts more into the animation then it goes to state 0 that returns everything off the home of default position.  It's rather unfortunate but the TriggerParameterCommand show above will not work to trigger this. 
  Anyways I'm thinking this type of logic could be used in the brain.
Carl2



*

ranch vermin

  • Not much time left.
  • Terminator
  • *********
  • 947
  • Its nearly time!
Re: Haptek States
« Reply #5 on: June 03, 2015, 04:54:20 am »
State changing.

Even running a developing system could go through state changes,  that there could be a little variable store running as it goes, changing between behaviours, in the method itself, thats putting it through the baby steps to success, and running its detectors on the sensors,  which switch it.

 


Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Will LLMs ever learn what is ... is?
by frankinstien (Future of AI)
November 03, 2024, 08:11:00 pm
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
Attempting Hydraulics
by MagnusWootton (Home Made Robots)
August 19, 2024, 04:03:23 am
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

303 Guests, 0 Users

Most Online Today: 332. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles