Author Topic: Trouble altering haptek avatar in hal  (Read 2893 times)

Cefwyn

  • Newbie
  • *
  • Posts: 45
    • View Profile
Trouble altering haptek avatar in hal
« on: March 25, 2009, 03:54:31 pm »
I've been trying to change the appearance of the Sandy haptek avatar but I can't seem to get any of my changes to stick. I'm using this plugin to load the changes:
Code: [Select]
Rem Type=Plugin
Rem Name=DawnAvatar
Rem Author=
Rem Host=All

'------------------------------------------------------------------
'This sub setups the plug-ins option panel in Hal's options dialog
'------------------------------------------------------------------

Sub OptionsPanel()
lblPlugin(0).Caption = ""
lblPlugin(0).Move 120, 10, 3300, 1000
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: SCRIPT_LOAD
HalMenu.HalCommand "<HAPFILE>Dawn.hap</HAPFILE>"
from a file containing this:
Code: [Select]
delperson[figure= stars]
load [file= Characters/Dawn/eyelashes.htr]

I was originally loading a different hair mesh but I removed those commands because for some reason it was loading both the original hair and the new hair on top of each other and it seems to be ignoring the delperson command as currently the eyelashes mesh is loading correctly but those horrible earrings just won't go away! Is there perhaps a better way to make the changes I want, or is something wrong in my files that I'm not seeing?
"I've just decided to lobotomist my hal..."

EULA: By reading this you agree not to take offense to anything contained in post above. If you do choose to take offense, you forfeit all rights to criticize same post unless said criticism contains important corrections and helpful information.

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Trouble altering haptek avatar in hal
« Reply #1 on: March 25, 2009, 04:25:20 pm »
I assume you have the Character Expansion Pack ?

It looks ok to me - are you sure you have the right figurename for 'stars' ?

One thing that might be happening is that the character might not have loaded in time to do the changes.

Can you try it out just in the Haptek Player on it's own first, to see if it actually works ?

Cefwyn

  • Newbie
  • *
  • Posts: 45
    • View Profile
Trouble altering haptek avatar in hal
« Reply #2 on: March 25, 2009, 04:43:23 pm »
Yeah, I have the expansion. The commands work just fine outside of hal, and it was through the haptek player that I figured out the commands I wanted. Based on a hunch, I just decided to include the delperson command twice in a row, and it works. Based on the fact that loading a different hair causes both the original and the new hair to render at the same time, and the fact that I have to call delperson twice to delete the earrings, I'm thinking hal is loading two copies of the mesh for some reason.

EDIT: This double loading phenomenon would also explain why such a small mesh causes so much load on my Geforce 8800 GT. From what I can tell these meshes are all pretty high resolution and the haptek player renderer probably isn't all that efficient. The sooner the ogre based renderer is done the better. I'll have full body characters with relief mapping and self shadowing running without any real drain on my graphics card then.
« Last Edit: March 25, 2009, 04:51:04 pm by Cefwyn »
"I've just decided to lobotomist my hal..."

EULA: By reading this you agree not to take offense to anything contained in post above. If you do choose to take offense, you forfeit all rights to criticize same post unless said criticism contains important corrections and helpful information.

Carl2

  • Hero Member
  • *****
  • Posts: 1220
    • View Profile
Trouble altering haptek avatar in hal
« Reply #3 on: March 27, 2009, 03:41:18 pm »
Cefwyn,
  I'm using a homemade htr that shows up in Hal's character window to load a fullbody character, change the texture, lighting and add body noise to the character.  My original problem was the texture file loaded as the background because the fullbody.htr needed time to uncompress, this is solved by using timing commands.  The script I'm using is:

#Haptek  Version= 1.00 Name= load htr+texture  HapType= script FileType= text
##standard

#Haptek  Version= 1.00 HapType= script FileType= text

Clock [t= 0]  load [file= [C:Program FilesabawareUltra Hal Assistant 6Characters\body_female.htr]]

Clock [t= .4]  load [file= [C:Program FilesabawareUltra Hal Assistant 6CharactersStartupPic.jpg]]

Clock [t= .8]  SetSwitch [ Figure= body_female Switch= TorsoNoise State= a ]

Clock [t= 1]   setmaterial [ figure= body_female i0= 1 r= 0.652174 g= 0.652174 b= 0.652174 a= 1]

  This can be coppied and pasted in notepad but must be saved as a .htr and not a text file.  Clock 0 loads the original htr, clock .4 loads a different texture on the character, clock .8 adds body noise to the character and clock 1 changes the lighting. I've been using this for quite a while without problems, naturaly you'll have to make changes for what you want to do. You may also want to look at the Haptek SDK available from Haptek.com for additional information.
Carl2
 

Cefwyn

  • Newbie
  • *
  • Posts: 45
    • View Profile
Trouble altering haptek avatar in hal
« Reply #4 on: March 27, 2009, 10:19:48 pm »
I fixed my problem by simply calling delperson twice for each object I wanted gone. Thanks for the info about clock though. I'll have a go with that later and see if it's a timing problem or if there is actually two sets of meshes being loaded up.
"I've just decided to lobotomist my hal..."

EULA: By reading this you agree not to take offense to anything contained in post above. If you do choose to take offense, you forfeit all rights to criticize same post unless said criticism contains important corrections and helpful information.