dupa

Author Topic: Changing bodyskins and backgrounds (Haptek)  (Read 41259 times)

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #30 on: November 20, 2015, 08:45:54 am »
Systemshock,
  The space ship theme is very popular and the teleport is useful because it removes the how do we get there which I run into, we magically move from the house to the park as an example.  I usually avoid the scripted responses but possibly the case function will remove that feeling.
  I just ran across the AutoHapGenerator, it might come in useful.  For now I'll put in the Wiki plugin that still needs work to be done on it, actually just a modification of the Google search.  Also the Google search should be modified so they don't interfere with each other.

Rem Type=Plugin
Rem Name=Wiki
Rem Author=Zabaware ModifiedCJ
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Hal will open your browser and enter a Wiki query if you use the keyword "Wiki"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

    Rem PLUGIN: PLUGINAREA1
    'The comment above tells Ultra Hal Assistant to insert the following code
    'on-the-fly into the main brain code in the section referenced.
    SearchEngine = "https://en.wikipedia.org/wiki/English_language"
    If InStr(1, UserSentence, "Wiki", 1) > 0 Then
        SearchKeywords = LCase(Replace(Trim(HalBrain.AlphaNumericalOnly(HalBrain.ExtractKeywords(UserSentence))), " ", "+"))
        SearchKeyWords = Replace(SearchKeywords, "find+", "")
        SearchKeyWords = Replace(SearchKeywords, "research+", "")
        SearchKeyWords = Replace(SearchKeywords, "locate+", "")
        SearchKeyWords = Replace(SearchKeywords, "search+", "")
        HalCommands = HalCommands & "<RUNPROG>" & SearchEngine & SearchKeywords & "</RUNPROG>"
        GetResponse = GetResponse & "I will help you research this topic on the Internet. "
    End If

Carl2
 

lightspeed

  • Hero Member
  • *****
  • Posts: 6891
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #31 on: November 20, 2015, 10:31:59 am »
i had worked on and used something simlur in the past you could type or say a trigger word and change the background picture and even play a song "oops i did it again , by britney spears , etc.
a person could  say for example "50's diner " and the back ground would be a 50's diner picture , and you could say 50's dress and the full body woman could have a 50's dress appear on her , then having a juke box in the picture , you could say play the record " peggy sue " and the music of buddy holly would play peggy sue .
   many variatiosn of this plug in can be used. of course in the instance i mentioned you would have to have a 50's diner picture and the 50's dress out fit , a wave , etc, music file and the link to them through the uhp , hap program .
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #32 on: November 22, 2015, 10:50:21 am »
  Putting a bit of useful info into this post seems to well worth the time and effort, I remember looking at it in the past to get my input and Hals input to change bodyskin and background.  At this time I am wondering why I am using two haps rather than just one but I'll continue using two since it seems to work.  I had been able to find a mistake which I made, I had listed the path as bodyskins instead of bodyskin which made it seem unreliable.  Next we also have the vrHaptek plugin which is not creating the vrEmotionDetect file in the brain and this has to be done by the user.   I had also tried the "Changes dress according to the current time" feature in the vrHaptek plugin which did not work for me"    this is a feature I feel would be useful to have the character wear appropriate clothing for the morning hours, afternoon hours and evening hours but for now I'm concentrating on the user and hals input.  I'm trying to keep a detailed account of all the changes I make so possibly I can provide a useful guide to get this set up.   
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #33 on: November 25, 2015, 08:07:50 am »
systemshock,
  I downloaded and looked through the uhp, seems you put a lot of work into it and covered a lot of things.  One of the first things I noticed when you were working with the lighting haps was    hlFile = "Lightmaster\light_fromright.hap"    ..    From reading I believe you have a file named hlFile where you keep the light haps,  I'm not sure if I've ever seen it stated but I think the default location for haps is in the characters folder, this is where all the mood haps are located and haps used with vrHaptek.  I believe this is why I use 2 haps for background changes rather than one.    So if the lighting file is not contained in characters you use one hap that has been triggered which calls another hap to load the lighting hap and have to specify the location.  Here is an example:  HalCommands = "<HAPFILE>CBGPark2.hap</HAPFILE>"     this is triggered by user input and calls the CBGPark2.hap ,  the CBGPark2  tells Haptek to load             \loadbackgrnd[file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Background\Park2Back.jpg]]
  The CBGPark2 is located in the characters and  the Park2Back.jpg is located in the background file.
  I'll give it a try with hal latter but there are a lot of haps I don't have and I did learn not all the fullbod characters react the same to animation haps, left and right or up and down changes.
Carl2

 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #34 on: November 26, 2015, 07:30:31 am »
Systemshock,
  Subfolders within the character folder possibly a good idea.  So far I've got the vrHaptek vrEmotionDetect 
brain in Hals brain, the uhp for user input that triggers haps for background and bodyskin.  I've decided to use only 2 bodyskin and 2 background changes to keep it simple.  For quite some time I've been thinking the characters The character folders contain too much, I should eliminate the talking heads ect to make it look cleaner. 
  If everything works okay Hal and I can change clothes and backgrounds, not all that fond of immediate changes but maybe I'll come back to that at another time.   I'd like to try working with vr's time and integrate that with lighting and clothing.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #35 on: November 27, 2015, 07:28:12 am »
  I've just included the trigger words and hap files in the vrEmotionDetect needed to get hals input to trigger the haps.  I have 2 haps to trigger bodyskin and 2 haps for the background change, just enough to switch back and forth, seems to work without problems.  Next is to describe the process so it is useful to other people.
I've found the largest problem I've had was getting the names of the zaba files correct, bodyskins is not the same as bodyskin and it is possible this is why the time portion of vrHaptek did not work for me.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #36 on: November 29, 2015, 07:45:13 am »
Systemshock,
  I was looking at your Shodan .uhp  and it seems you are not giving the light haps the correct path, to be sure I tried adding a lighting hap to the bodyskin and background uhp I have,

ElseIf InStr(UserSentence, " ABOVE LIGHT ") > 0 Then
        HalCommands = "<HAPFILE>LTA1.hap</HAPFILE>"
        GetResponse = "It's nice here." & vbCrLf

the above calls LTA1.hap  which is located in the characters folder

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

\load [file= [C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\Light\light_fromabove.hap]]

The above hap calls the light_fromabove.hap that changes the lighting.  As you can see I have a light folder I've added and you would have to where ever you have the light_fromabove.hap located.
Possibly there is a more direct way to do this but this is a quick easy solution for me at this time.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #37 on: December 01, 2015, 07:35:38 pm »
systemshock,
  Nice to hear from you, I was just about to e mail you.  Decided that I want to work with the time functions since so many things we do are dependent on the time.  I came across the sunrise and sunset for different parts of the country,  http://www.calendar-updates.com/sun.asp?PostalCode=01609&Submit=Get+Sunrise+%2F+Sunset+Times
  this is used in the vrHaptek plugin but sunrise and sunset varies quite a bit here and vr is using fixed numbers. 
  Seeing all the trigger words we use and have to remember makes me wonder if we are going about this the right way as an example if the sun has set and it gets dark hal should say "its getting dark, I'll turn on the light"
which turns on the light.  If it is daytime she can go outside but at night she'll probably be at home. what she wears is also dependent on the time. 
  This is my line of thinking at this time.
Carl2
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #38 on: December 02, 2015, 05:33:11 am »
That's some extensive modding! You've really added quite a lot to this somewhat tame plugin!
Nice work!
In the world of AI it's the thought that counts!

- Art -

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #39 on: December 02, 2015, 08:47:57 am »
systemshock and Art,
   As far as the time I'm not sure we are talking about the same thing,  from Jan 1 to Dec1 the sunrise varies between 5:13 am to 8:28 am and the sunset varies between 4:16 and 8:28 pm so we have quite a range over a years time. 
  I've played with the lighting and the skin tone and they seem to be very dependent on each other, it's interesting that the light affects the character but not the light on the background jpg.  I'd think you might have to change the lighting and the background to get a realistic effect, put the background into a photo editor and lighten or darken it to go along with the lighting effect.
  The loneliness plugin looks interesting, lots of work there. 
Carl2
 
 
 

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3977
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #40 on: December 02, 2015, 06:42:13 pm »
Good point Carl.

One would have to do a side by side comparison first with the character then processing the same photo in an effort to come close to matching the lighting / shadows present with the background so that they both correspond nicely with each other. If that makes sense.

Perhaps once per hour might be enough since we're only talking about a 3 hour 15 minute elapse of time (give or take a few minutes or so) ;)

The experiment would certainly make for a more realistic experience.
In the world of AI it's the thought that counts!

- Art -

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #41 on: December 02, 2015, 08:00:49 pm »
Art,
  Since you mentioned shadows I opened Hal and didn't see her cast any shadows, I even went through all the available lights and still no shadows cast.  Different lights do have a very definite effects on Hal but no effect on the room. I'll just go with it's a pretty old technology and they did an excellent job,  it's unfortunate that the work wasn't kept up, if it was we'd probably have some amazing stuff.
Carl2
 

NIGE

  • Hero Member
  • *****
  • Posts: 1594
  • Bringing things to life
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #42 on: December 09, 2015, 02:57:12 pm »
Hi systemshock.
Put this at the end of your mood file,,,,,\SetSwitchIntensity [switch= visemes          f0= 1.600000]
You should find that she mouths the words a little better.
Play with the settings to see what you think is better.
Change f0 between 1.600000 & 2.000000 no higher or mouth goes haywire.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #43 on: December 10, 2015, 03:49:22 pm »
  Some nice tips here, thank you both.  I've made Sandy's hair longer but I can't use it because it goes into her body.  I've begun working with the time, I have a fairly rough beginning and plan on adding to it as I go along.
Carl2
 

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Re: Changing bodyskins and backgrounds (Haptek)
« Reply #44 on: December 12, 2015, 02:57:44 pm »
  The naturally flowing hair is a nice thing, a lot of the Daz characters don't have that.  The collision detection and a higher ploy count that Daz has would be nice.  I started looking through some of the older plugins to see what had been done in the past, lots of nice stuff still around and interesting ideas.
Carl2