Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Sun Jul 27, 2025 6:28 pm
All times are UTC + 0
SHP unit's Frames settings [support request]
Moderators: Global Moderators, Media Hut Moderators, Red Alert 2 Moderators, Tiberian Sun Moderators
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Sun Apr 19, 2015 8:48 pm    Post subject:  SHP unit's Frames settings [support request]
Subject description: Orac's RA2 Heavy Mech
Reply with quote  Mark this post and the followings unread

Okay, so I downloaded the following very cool looking mech (kudos to Orac):
http://www.ppmforums.com/viewtopic.php?highlight=mech&t=35816

I'm very inexperienced with coding SHP units. First I tried using the Titan's code and just increased WalkFrames to match the number of frames this mech has per facing... then I thought maybe it has to be more complex so I changed it to this:

Code:

[MMCH]
Remapable=yes
Cameo=MECHICON
AltCameo=MECHUICO
PrimaryFireFLH=250,-50,100

PBarrelLength=250
SBarrelLength=250
TurretOffset=-16

Facings=8 ; duh
StandingFrames=1 ; has one standing frame per facing
StartStandFrame=1 ; first frame of file is first stand frame
WalkFrames=41 ; 41 walking frames per direction
StartWalkFrame=9 ; walking frames start on frame #9


It still results in a garbled mess in-game though. Can anyone help point out what I did wrong? I did give it an honest try, but I'm out of ideas.

I know PBarrel/SBarrel/TurretOffset are unneeded, but they're not cause of the issue, right? It's something about the *Frames.

Back to top
View user's profile Send private message
GenesisAria
Cyborg Firebomber


Joined: 10 Mar 2015
Location: Canaderp

PostPosted: Mon Apr 20, 2015 4:48 am    Post subject: Reply with quote  Mark this post and the followings unread

I've avoided using shp units because setting up the frames looks like a pain.  Show me the ini stuff when you figure it out Very Happy
(it's a shame, i haven't found a release of the jetpacky one anywhere, i like it better actually lol)

_________________
????????           MyAnimeList            my Last.fm

Back to top
View user's profile Send private message
gameaddict11707
Grenadier


Joined: 15 Jul 2011

PostPosted: Mon Apr 20, 2015 5:51 am    Post subject: Reply with quote  Mark this post and the followings unread

Subtract 1 from your xxxFrame numbers. They all start at 0 rather than 1 like SHP Builder shows. ex: StartWalkFrame=8

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 20, 2015 6:59 am    Post subject: Reply with quote  Mark this post and the followings unread

That mech in particular is bugged. If you read the topic it
-has wrong frame order in the SHP. Orac's rotates counterclockwise, while it has to rotate clockwise
-standing frames can not start on frame 0 for turreted units. Turreted units need first the walkframes, followed by the turret frames and then followed by any additional frames like standing or firing frames

Even Ambersia's fixed version in a post near the end still has some bugs. e.g. he removed the standing frames and added a shadow bug.

If that mech would be fixed, then the ini setting would be as follows
Facings=8
StandingFrames=1
StartStandFrame=0 ; doesn't work. Game is hardcoded to first read the walk frames in the SHP for turreted units
WalkFrames=42 ; it has 42 frames for walk anim, not 41
StartWalkFrame=8


Beside the frame order bug in the SHP, it also has a bad walk anim with inconsistent speeds for the legs, the legs don't lift up from the ground when moving forward (it looks like skating), and it has way too many frames.
For such a small unit, 42 frames for walk make the anim extremely slow ingame. It needs about 12 to max 24 frames, best would be 16.

So it's quite useless to get this unit ingame in its current bugged and unfinished state.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Mon Apr 20, 2015 11:11 am    Post subject: Reply with quote  Mark this post and the followings unread

Oh... I did not know StartFrame setting does not work ><

Hmmm... reordering the frames and removing some of the WalkFrames shouldn't be too hard. I will try that. Isn't there a way to speed up the rate at which WalkFrames are played, tho? WalkRate in the rules setting? That way I could compensate for the huge amount of walkframes.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 20, 2015 11:19 am    Post subject: Reply with quote  Mark this post and the followings unread

The key StartStandFrame does work, but turreted units have to follow a hardcoded order in the SHP. So this key is not fixing the wrong order.
With 16 walk frames and the correct frame order in the SHP, the code would look like this
Code:
Facings=8
StandingFrames=1
StartStandFrame=160 ; 16 walkframes*8 facings + 32 turret frames = frame 160 for the additional standing frames
WalkFrames=16
StartWalkFrame=0 ;hardcoded to start on frame 0 for turreted units and then followed by the 32 turret frames

Even with WalkRate=1, which is fastest, the 42 walkframes would play too slow due to the many frames and very small steps of the mech.
Or you have to give the unit a super slow Speed=1 or 2 so it matches the speed of the legs in the anim.

When you want to fix it, you have to do the following things
-reorder the frames and make the mech rotate clockwise beginning with north facing
-reorder the frames with first the walk frames, followed by the 32 turret frames, then followed by the standing frames
-shorten the walk frames from 42 down to 16

Though i don't think this work is worth it.
-Doing all these corrections on the frames can take up to an hour or more and is error prone, since you have to take care of the shadow frames too and don't mix up their order.
-the walk anim looks bad (no leg lifting up when moving forward) and the speed of left and right leg is different (giving it a limping look)

To do this on the 3D-Model is like a 10minute job, to fix the walk anim, change the frame order and render again. Maybe Orac can release the 3D-Model if he doesn't want to finish this unit.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Mon Apr 20, 2015 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

Maybe, I will ask him. Not sure if he is still active. I've never done 3d modelling though, but I guess there's a first time for everything.

There would also be the more lazy solution of mounting the turretframes on a functioning body, but I really like the bodyframes too.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Apr 20, 2015 11:58 am    Post subject: Reply with quote  Mark this post and the followings unread

Lin Kuei Ominae wrote:
-Doing all these corrections on the frames can take up to an hour or more and is error prone, since you have to take care of the shadow frames too and don't mix up their order.


Converting TS shadows to RA2 shadows before exporting the frames for the reordering would evade this tbh. Now that we both know there's a way for that. :whistles:

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 20, 2015 12:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

ah right, this way you can indeed safe all the shadow frames hassle and half the amount of frames reorder work.

@Millennium:
in SHP Builder use Tools\Misc\Convert Shadows TS->RA2 to merge the separate shadow frames into the normal image frames.
Then export the SHP into png images
This way you don't have to take care of the shadow frames anymore.

Once you reimported the unit into SHP, use Tools\Misc\Convert Shadows RA2-> TS
to get separate shadow frames again.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Last edited by Lin Kuei Ominae on Mon Apr 20, 2015 12:55 pm; edited 2 times in total

Back to top
View user's profile Send private message
Graion Dilach
Defense Minister


Joined: 22 Nov 2010
Location: Iszkaszentgyorgy, Hungary

PostPosted: Mon Apr 20, 2015 12:49 pm    Post subject: Reply with quote  Mark this post and the followings unread

Use strictly PCX or Mixer, SHP Builder's PNG output is 32bpp, not indexed.

_________________
"If you didn't get angry and mad and frustrated, that means you don't care about the end result, and are doing something wrong." - Greg Kroah-Hartman
=======================
Past C&C projects: Attacque Supérior (2010-2019); Valiant Shades (2019-2021)
=======================
WeiDU mods: Random Graion Tweaks | Graion's Soundsets
Maintainance: Extra Expanded Enhanced Encounters! | BGEESpawn
Contributions: EE Fixpack | Enhanced Edition Trilogy | DSotSC (Trilogy) | UB_IWD | SotSC & a lot more...

Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Mon Apr 20, 2015 12:56 pm    Post subject: Reply with quote  Mark this post and the followings unread

ah, Convert Shadows doesn't work in this case
Orac rendered shadows also for areas which are covered by the unit itself (e.g. directly under the standing feet). Using the Convert Shadows function would remove these areas.
Those are however quite useful, due to the shadow bug on turreted SHP units, where the body moves up/down by 1 pixel according to the turret direction.
shown here on a early DTA shp tank, notice the gap between tank and shadow on some directions.
Though not sure if RA2 suffers under the same issue for turreted SHP units.

_________________
SHP Artist of Twisted Insurrection:  Nod buildings

Public SHPs
X-Mech Calendar (28 Mechs for GDI and Nod)
5 GDI, 5 Nod, 1 Mutant, 1 Scrin unit, 1 GDI building

Tools
Image Shaper______TMP Shop______C&C Executable Modifier

Back to top
View user's profile Send private message
Millennium
Commander


Joined: 09 Mar 2008
Location: Osaka (JP)/Hong Kong/Germany

PostPosted: Tue Apr 21, 2015 1:06 am    Post subject: Reply with quote  Mark this post and the followings unread

Well, fixing that part seems to be easy enough to do manually after converting.

And no, I don't know either if this occurs in RA2... I've not noticed it, but I've not worked with alot of SHP vehicles in that engine. Chances are it does though, unlikely the engine would get a fix for something that's not even used in RA2.

_________________
Mao Zedong wrote:

Our mission, unfinished, may take a thousand years.  

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [12 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
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


Powered by phpBB © phpBB Group

[ Time: 0.2169s ][ Queries: 11 (0.0082s) ][ Debug on ]