Page 1 of 1

HUD mesh doesn't show up

Posted: Thu Jan 04, 2018 3:26 pm
by Raigiku
I've made a mesh for one of my new jedi powers (force cloak) but whenever I switch to it the mesh doesn't appear. I've already tried various rotation, scale and translation values with no success. I even made it be the same size as the default dc15a and gave it the same transform values in the extraweapons.hud and still it wouldn't show up.
Mesh
Hidden/Spoiler:
Image
com_weap_inf_force_cloak.odf
Hidden/Spoiler:
[code][WeaponClass]
ClassLabel = "invisibility"

[Properties]

GeometryName = ""
HighResGeometry = ""
HUDTag = "hud_force_cloak"


//ChargeUpEffect = "com_sfx_chargeup"
//MuzzleFlash = "med_muzzle_flash"
FlashColor = "80 80 255 255"
FlashLength = 0.025
FlashLightColor = "220 220 255 175"
Discharge = "med_smoke_effect"

//RoundsPerClip = "32"
ReloadTime = "0.0"

HeatPerShot = "5.0" // only allow player to fire every 5 seconds
HeatRecoverRate = "1.0"
HeatThreshold = "0.01"

EnergyDrain = "0.0"
//EnergyDrainRate = "20.0"
InitialSalvoDelay = "0.6"

InvisibilityTrigger = "Toggle"
InvisibilityPersistTime = "1.0"
InvisibilityMax = "1.0"
InvisibilityMin = "0.0"
SpeedForInvisibilityMax = "3.75" // normal crouch
SpeedForInvisibilityMin = "6.0" // normal run
InvisibilityIncRate = "0.6"
InvisibilityDecRate = "0.9"
FlickerAmplitude = "0.0" // decrease invisibility by 0.5
FlickerTimeMin = "0.0" // randomly every 5 to 10 seconds
FlickerTimeMax = "0.0"

//ThrustFactor = "0.5" // when firing, move at half speed
TargetLock = "1" // when firing, activate target lock

//ZoomMin = "2.0"
//ZoomMax = "2.0"
//ZoomRate = "0.0"

//FirePointName = "hp_fire"

ModeTexture = "HUD_weap_semiauto"
//ModeTextureColor = "42 235 42 100"
ReticuleTexture = "reticule_rifle"
ScopeTexture = "weapon_scope2"

OffhandWeapon = 1
InstantPlayFireAnim = 1
TriggerSingle = "1"

LockOnRange = "64.0"
LockTime = "0.0"
AutoAimSize = "2.0"

TargetEnemy = "1"
TargetNeutral = "0"
TargetFriendly = "0"

TargetPerson = "1"
TargetAnimal = "1"
TargetDroid = "1"
TargetVehicle = "0"
TargetBuilding = "0"

ChargeRateLight = "1.0"
MaxChargeStrengthLight = "1.0"
ChargeDelayLight = "0.0"
ChargeRateHeavy = "1.0"
MaxChargeStrengthHeavy = "0.5"
ChargeDelayHeavy = "2.2"

RecoilLengthHeavy = "0.25"
RecoilStrengthHeavy = "2"
RecoilDecayHeavy = "0.0"

FireSound = "all_weap_invisibility_fire"
//ReloadSound = ""
WeaponChangeSound = ""
ChangeModeSound = ""
FireEmptySound = ""
ChargeSound = ""
ChargeSoundPitch = "0.05"
OverheatSound = ""
OverheatSoundPitch = "0.5"
OverheatStopSound = ""
JumpSound = ""
LandSound = ""
RollSound = ""
ProneSound = ""
SquatSound = ""
StandSound = ""

//NextCharge = 0.25
//HeatPerShot = "0.6"
//AmmoPerShot = 1

//NextCharge = 0.5
//HeatPerShot = "0.65"
//AmmoPerShot = 2

//NextCharge = 0.75
//HeatPerShot = "0.8"
//AmmoPerShot = 3

//NextCharge = 0.99
//HeatPerShot = "1.0"
//AmmoPerShot = 4
[/code]
extraweapons.hud
Hidden/Spoiler:
[code]Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("rep_weap_inf_dc15a", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17", "com_inv_mesh")
NameMesh("rep_weap_inf_z6", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15s", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15x", "com_inv_mesh")
NameMesh("com_weap_inf_binoculars", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_rifle", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_sniper", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_aa", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15s_commando", "com_inv_mesh")
NameMesh("cis_weap_inf_e5", "com_inv_mesh")
NameMesh("cis_weap_inf_westar34", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("rep_weap_inf_dc15a")
{
Position(-0.25, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_z6")
{
Position(-0.27, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc15s")
{
Position(-0.27, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.9, 0.9, 0.9)
}
MeshInfo("rep_weap_inf_dc15x")
{
Position(-0.25, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("com_weap_inf_binoculars")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_rifle")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_sniper")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_aa")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc15s_commando")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("cis_weap_inf_e5")
{
Position(-0.25, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.9, 0.9, 0.9)
}
MeshInfo("cis_weap_inf_westar34")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("rep_weap_inf_n20detonator", "com_inv_mesh")
NameMesh("vibroblade", "com_inv_mesh")
NameMesh("rep_weap_inf_ecd", "com_inv_mesh")
NameMesh("rep_weap_inf_sonic", "com_inv_mesh")
NameMesh("cis_weap_dart", "com_inv_mesh")
NameMesh("hud_force_cloak", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("rep_weap_inf_n20detonator")
{
Position(-0.26, 0.3, 0.0, "Viewport")
Rotation(0.0, 94.0, 0.0)
Scale(1.75, 1.75, 1.75)
}
MeshInfo("vibroblade")
{
Position(-0.26, 0.28, 0.0, "Viewport")
Rotation(90.0, 0.0, 0.0)
Scale(1.75, 1.75, 1.75)
}
MeshInfo("rep_weap_inf_ecd")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 320.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
MeshInfo("rep_weap_inf_sonic")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 320.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
MeshInfo("cis_weap_dart")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 0.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
MeshInfo("hud_force_cloak")
{
Position(-0.24, 0.27, 0.0, "Viewport")
Rotation(0.0, 0.0, 0.0)
Scale(1.120000, 1.120000, 1.120000)
}
}
}
}
[/code]

Re: HUD mesh doesn't show up

Posted: Fri Jan 05, 2018 6:03 pm
by Marth8880
Are you sure the mesh's polygons are facing the right direction? I believe they should be facing in the positive Z-axis in XSI. Regardless, try inverting the polygons - select all polygons, then Modify > Poly Mesh > Invert Polygons (or something). Simply rotating the mesh 180 degrees around the Y-axis would also work - as long as you remember to freeze the transforms after doing so! ;)

Re: HUD mesh doesn't show up

Posted: Fri Jan 05, 2018 10:19 pm
by Raigiku
Marth8880 wrote:Are you sure the mesh's polygons are facing the right direction? I believe they should be facing in the positive Z-axis in XSI. Regardless, try inverting the polygons - select all polygons, then Modify > Poly Mesh > Invert Polygons (or something). Simply rotating the mesh 180 degrees around the Y-axis would also work - as long as you remember to freeze the transforms after doing so! ;)
It didn't work either :( I've tried to changing to 90 degrees in every rotation value in the extraweapons.hud file and it still wouldn't show up. I'v also tried to use the same values that the default force_choke HUD icon had.
rep_weap_inf_dc15a.odf
Hidden/Spoiler:
[code][WeaponClass]
ClassParent = "com_weap_inf_rifle"
GeometryName = "rep_weap_inf_dc15a.msh"

[Properties]
GeometryName = "rep_weap_inf_dc15a"
HighResGeometry = "rep_weap_inf_dc15a"
OrdnanceName = "rep_weap_inf_dc15a_ord"
FirePointName = "hp_fire"
HUDTag = "hud_force_cloak"
ShotDelay = "0.133"

//***********************************************
//******************* DEFAULT *******************
//***********************************************

FlashColor = "80 80 255 255"
FlashLightColor = "220 220 255 175"

FireSound = "rep_weap_inf_dc15a_fire"
ReloadSound = "com_weap_inf_reload_med"
ChangeModeSound = "com_weap_inf_equip_med"
FireEmptySound = "com_weap_inf_ammo_empty"
WeaponChangeSound = "com_weap_inf_equip_med"
JumpSound = "com_weap_inf_rifle_mvt_jump"
LandSound = "com_weap_inf_rifle_mvt_land"
RollSound = "com_weap_inf_rifle_mvt_roll"
//ProneSound = "com_weap_inf_rifle_mvt_lie"
SquatSound = "com_weap_inf_rifle_mvt_squat"
//StandSound = "com_weap_inf_rifle_mvt_getup"
[/code]
extraweapons.hud
Hidden/Spoiler:
[code]Code:

ViewPort("Transforms")
{
EventNameFilter("player%")

// First Weapons Section

TransformNameMesh("player1weapon1")
// add msh names of first weapons here and remove unused lines
{
NameMesh("rep_weap_inf_dc15a", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17", "com_inv_mesh")
NameMesh("rep_weap_inf_z6", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15s", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15x", "com_inv_mesh")
NameMesh("com_weap_inf_binoculars", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_rifle", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_sniper", "com_inv_mesh")
NameMesh("rep_weap_inf_dc17m_aa", "com_inv_mesh")
NameMesh("rep_weap_inf_dc15s_commando", "com_inv_mesh")
NameMesh("cis_weap_inf_e5", "com_inv_mesh")
NameMesh("cis_weap_inf_westar34", "com_inv_mesh")
NameMesh("hud_force_cloak", "com_inv_mesh")

EventInput("player1.weapon1.change")
EventOutput("player1.weapon1.mesh")
}
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon1mesh")
{
EventMesh("player1.weapon1.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon1.mesh")
EventDisable("player1.weapon1.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

//change position, rotation and scale of first weapon here, remove unused lines

MeshInfo("rep_weap_inf_dc15a")
{
Position(-0.25, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_z6")
{
Position(-0.27, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc15s")
{
Position(-0.27, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.9, 0.9, 0.9)
}
MeshInfo("rep_weap_inf_dc15x")
{
Position(-0.25, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("com_weap_inf_binoculars")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_rifle")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_sniper")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc17m_aa")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("rep_weap_inf_dc15s_commando")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
MeshInfo("cis_weap_inf_e5")
{
Position(-0.25, 0.36, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.9, 0.9, 0.9)
}
MeshInfo("hud_force_cloak")
{
Position(-0.25, 0.35, 0.0, "Viewport")
Rotation(0.0, 0.0, 0.0)
Scale(1.5, 1.5, 1.5)
}
MeshInfo("cis_weap_inf_westar34")
{
Position(-0.27, 0.35, 0.0, "Viewport")
Rotation(0.0, 90.0, 360.0)
Scale(0.7, 0.7, 0.7)
}
}
}
}

// Second Weapons Section

TransformNameMesh("player1weapon2")
// add names of second weapons here
{
NameMesh("rep_weap_inf_n20detonator", "com_inv_mesh")
NameMesh("vibroblade", "com_inv_mesh")
NameMesh("rep_weap_inf_ecd", "com_inv_mesh")
NameMesh("rep_weap_inf_sonic", "com_inv_mesh")
NameMesh("cis_weap_dart", "com_inv_mesh")

EventInput("player1.weapon2.change")
EventOutput("player1.weapon2.mesh")
}

Group("extraWeaponDisplay")
{
PropagateAlpha(1)
Viewport(1)
Position(0.0000000, 1.000000, 0.000000, "Viewport")
ZOrder(255)
EventEnable("player1.weaponsEnable")
EventDisable("player1.weaponsDisable")

Group("extraWeaponIcon")
{
Viewport(1)
Position(0.346161, -0.450412, 0.000000, "Viewport")
EventEnable("initialize")

Model3D("player1.weapon2mesh")
{
EventMesh("player1.weapon2.change")
Viewport(1)
ZOrder(5)
EventEnable("player1.weapon2.mesh")
EventDisable("player1.weapon2.disable")
Position(500.000000, 500.000000, 500.000000, "Viewport")
Rotation(0.804269, 359.994110, 359.999695)
Scale(0.000000, 0.000000, 0.000000)

// adjust position, rotation and scale of second weapon here

MeshInfo("rep_weap_inf_n20detonator")
{
Position(-0.26, 0.3, 0.0, "Viewport")
Rotation(0.0, 94.0, 0.0)
Scale(1.75, 1.75, 1.75)
}
MeshInfo("vibroblade")
{
Position(-0.26, 0.28, 0.0, "Viewport")
Rotation(90.0, 0.0, 0.0)
Scale(1.75, 1.75, 1.75)
}
MeshInfo("rep_weap_inf_ecd")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 320.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
MeshInfo("rep_weap_inf_sonic")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 320.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
MeshInfo("cis_weap_dart")
{
Position(-0.24, 0.27, 50.0, "Viewport")
Rotation(0.0, 0.0, 0.0)
Scale(1.0, 1.0, 1.0)
}
}
}
}
[/code]
The most weird thing is that it shows up in the SWB Viewer
Hidden/Spoiler:
Image
Hidden/Spoiler:
Image
Here's my mesh -> https://mega.nz/#!weRDybyT!UFdPPTrRhLni ... P0tIFrbkpA