Posted: Fri Jul 07, 2017 7:38 am Post subject:
Shp Vehichle Crash
Hello everyone. I started to convert free models to shp for public usage but I have a probleam when I try to add new vehicle like on this topic my game crash after the clicking for build.
Original Model Created By Renafox from sketcfab.
Code:
[HLT]
UIName=NOSTR:Car
Name=auto
Prerequisite=NAWEAP
Strength=100
Category=Transport
Armor=light
DeployTime=.022
TechLevel=1
Sight=8
PipScale=Passengers
Speed=8
CrateGoodie=no
Owner=Russians,Confederation,Africans,Arabs,YuriCountry
AllowedToStartInMultiplayer=no
Cost=0
Points=20
ROT=5
Crusher=no
Turret=no
Passengers=5
IsSelectableCombatant=yes
Explosion=TWLT070,S_BANG48,S_BRNL58,S_CLSN58,S_TUMU60
VoiceSelect=
VoiceMove=
VoiceAttack=
VoiceFeedback=
DieSound=GenVehicleDie
AmbientSound=PropagandaTruck
CrushSound=TankCrush
MaxDebris=3
DebrisTypes=TIRE
DebrisMaximums=6
Locomotor={4A582741-9839-11d1-B709-00A024DDAFD1}
MovementZone=Normal
ThreatPosed=0 ; This value MUST be 0 for all building addons
DamageParticleSystems=SparkSys,SmallGreySSys
SpecialThreatValue=1
ZFudgeColumn=10
ZFudgeTunnel=13
ImmuneToRadiation=no
ImmuneToPsionics=no
;Bombable=no
Size=3
SizeLimit=2
Trainable=no
Accelerates=yes
You noticed that you created a 19 MEGABYTE big SHP for a vehicle that needs only 63 kilobyte when done right?
-you haven't used any transparent color. thus the game has 64 640x480 big images with not a single pixel being transparent and thus compressed by the SHP compression.
All frames use the color 1 as background which is shadow and not 0 which is transparent.
-you still have a 640x480 big canvas in the SHP for a tiny 70x60 big vehicle
-shadow frames use color 12 and not color 1
The last 2 are surely not causing a crash, but trying to display a stupidly gigantic 19MB shp can be the cause. _________________ SHP Artist of Twisted Insurrection: Nod buildings
Plenty of things that can be adjusted here.
- for 32 facing, facings start at North
- in this truck, for north-east, 2 frames are same. Basically only 31 distinct frames
not 32.
- canvas is too large (640x480), it could be smaller. And could be repositioned.
- shp uses index 1 color for background, it should be index 0.
- compression 1 is used, compression 3 could be used. Files size is ~18mb.
- Orange color could have been converted to remap.
- custom palette could be used for the imports.
Attaching the conversion with 1 duplicate frame, no remap. In any case I liked
the truck, a link could be provided to the original asset/model.
-canvas still too big (can be much more optimized/smaller)
-the rendered frames are already bad and unsuitable for a SHP unit. The rotation increases and decreases in speed from frame 0 to 31. The creator didn't know/forgot how to set the key tangents in 3ds max. For such a rotation it is essential to set a linear tanget to make the rotation angle between each frame exactly the same (11.25° for a 32 facing unit)
-background color is ok. shadow color is wrong, as it's using pure black #12 and not transparent shadow #1 _________________ SHP Artist of Twisted Insurrection: Nod buildings
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum