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

Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Sat May 21, 2022 5:29 am
All times are UTC + 0
 Forum index » Miscellaneous Forums » Offtopic Discussion Area » Miscellaneous Tutorials
Resizing RA2 shp files to TS
Moderators: Global Moderators, Offtopic Moderators
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Wed Jan 05, 2022 1:56 am    Post subject:  Resizing RA2 shp files to TS
Subject description: 3 tools used to keep the quality
Reply with quote  Mark this post and the followings unread

I want to share how i've resized some ra2 shp files smaller, keeping the quality pretty good as opposed to SHP builder's resizer makes things a bit pixely. Tools i used are easy and free. For the tutorial i'll be using the Nod conyard's buildup animation from the RA2 Mod 'Reign Of Steel' this method takes just a few extra steps but its worth it, so here's how to do it:

Exporting frames: there are multiple ways to export frames. I prefer shp builder (1) and XCC Mixer (2). XCC mixer can export frames for multiple shp files at the same time

(1)First, load the SHP you want to convert in SHP Builder. Make sure you have set the right palette (ctrl+p), then export the frames:

Click on File > Export >  SHP -> Images



Choose an empty folder to save the frames in. Type the filename, and make sure to save as PNG



(2) Using XCC Mixer to export frames.
Open xcc mixer, browse to your shp file(s) in the left column and set the right palette (ctrl+p). In the middle column, browse to an empty folder. Select the shp files you want in the left column. (You can select multiple files holding ctrl or shift or shift+ctrl).
Make sure only SHP files are selected and right click > export to PNG.
All frames will now be exported in the empty folder

Replacing  background to transparency:
Use a batch image tool to replace the background to transparency. The easiest one i enountered is Imbatch: Download ImBatch (click here )
Load all frames (drag & drop or load)



Add task: 'Replace colors' then  click on it:
You can leave Original Color to 'color'
Click the little icon next to 'Fill color' and pick the background color, Make sure the background color (blue, black or pink) is selected and press OK



Now under New Color, we select Transparency. Start of transparency has to be 0, and the end of transparency 255



Press Run batch, and it will quickly remove the background from all the frames.

Resizing all frames
Go to http://redketchup.io/bulk-image-resizer
and drag all the frames from your directory into redketchup.io:


Under Resize, pick Percentage and pick 80% (ra2 to ts size)



Click Process Batch. (it will process them superquick, even if you have 10.000 frames) Then Download all. A zip file will be downloaded with all your resized frames



(I use Redketchup.io for resizing because it keeps excellent quality, but you can also batch resize with gimp and photoshop, they process them a bit slower. Irfanview does an excellent job on resampling too, here is a tutorial: https://www.ofzenandcomputing.com/batch-resize-images-irfanview/ If you can find out how to replace background color to transparency with irfanview at the same batch process, please let me know )


Import frames to SHP

Extract your frames in a new folder.
In SHP Builder, press File > Import>  Image -> SHP
hit Browse and pick the first frame (it should still have 0000 in its name)
Hit OK.
Click on View > Preview, and pick a color to make sure the remap looks fine.


Fix remap if needed

If the remap is not ok, some reds have turned into non-remap red. You can apply this color scheme to turn all the reds into remap reds:  redtoremappa.cscheme. (see attached file)

To Install a color scheme: drop the redtoremappa.cscheme in the SHPBuilder directory: \cscheme\Custom (For example:  C:\Program Files (x86)\CnCTools\OS SHP Builder\cscheme).
Then click Colour schemes > Update colour scheme list, and now you can go to Custom Schemes > Red > Red to remap harder 2x

Fix shadows if needed: press alt+i   (turn on shadows first in Options)

Save, and that should be it!


A Question i get many times with my finalsun tutorials, is how i get the black theme for the windows? Its just a windows 10 theme, its called Dark eve, here is the download: https://github.com/nitschis/GreyEveTheme



comparison.png
 Description:
comparison. shp builder resize (left) redketchup resize (right)
 Filesize:  15.53 KB
 Viewed:  5367 Time(s)

comparison.png



redtoremappa.cscheme
 Description:

Download
 Filename:  redtoremappa.cscheme
 Filesize:  2.16 KB
 Downloaded:  3 Time(s)



Key Words: #Tutorials #SHPs #TiberianSun #Firestorm #RedAlert2 #YurisRevenge #Graphics #Media #OSSHPBuilder #IMBatch #BulkImageResizer #XCCMixer 

Last edited by Holland on Wed Jan 05, 2022 2:13 pm; edited 1 time in total

Back to top
View user's profile Send private message
Mig Eater
Defense Minister


Joined: 13 Nov 2003
Location: Eindhoven

PostPosted: Wed Jan 05, 2022 12:57 pm    Post subject: Reply with quote  Mark this post and the followings unread

My recommended method is to use XCC Mixer to convert the SHP into PCX files, resize them in Photoshop (you can make an action script to batch edit them) & then again use XCC Mixer to convert the PCX files back to SHP.
_________________



Back to top
View user's profile Send private message Visit poster's website ModDB Profile ID YouTube User URL Facebook Profile URL Twitter Channel URL
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Wed Jan 05, 2022 2:19 pm    Post subject: Reply with quote  Mark this post and the followings unread

Thanks Mig Eater. I forgot to mention XCC mixer. I updated tutorial. Xcc mixer also allows to export multiple shps at the same time.
Photoshop does a good job indeed, but i see no difference between photoshop and redketchup resize quality. Photoshop took 20 minuts for me for 900 frames, redketchup 10 seconds lol. Also you gotta remove the background first before resizing or the background color will blend with the edges of the image. I havnt found a way in photoshop's actions to do that for bulk process.

Back to top
View user's profile Send private message
McPwny
Stealth Laser Trooper


Joined: 29 Jan 2018

PostPosted: Wed Jan 05, 2022 5:41 pm    Post subject: Reply with quote  Mark this post and the followings unread

wow i have always wondered how you get such nice conversions from ra2 to ts

now for sicko mode, convert TS to RA2
_________________
visit my moddb profile for .shp downloads and stuff

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


Joined: 31 May 2017

PostPosted: Sat Jan 15, 2022 4:50 pm    Post subject: Reply with quote  Mark this post and the followings unread

McPwny wrote:

now for sicko mode, convert TS to RA2


Its ofcourse very possible to use an upscaler. Tho batch xbr upscaling isn't free. i have a software that can do it tho!

Just send me frames or shp you want to be upscaled with xBR.
whoever needs an upscaling just hit me up


example infantry xbr upscaling. Its times 2 just to show the xbr resampling, but im sure x1.25 (ra2 size) will look way better.

(original: )

Edit: Actually, Cupscale is better. if u have a good video card you can use cupscale, its free and you can use different algorithms


xbrexample.png
 Description:
example building upscaling.
 Filesize:  280.17 KB
 Viewed:  4821 Time(s)

xbrexample.png



xbrinf.gif
 Description:
 Filesize:  435.49 KB
 Viewed:  4821 Time(s)

xbrinf.gif



Last edited by Holland on Sat Apr 30, 2022 9:18 pm; edited 1 time in total

Back to top
View user's profile Send private message
McPwny
Stealth Laser Trooper


Joined: 29 Jan 2018

PostPosted: Sun Feb 06, 2022 4:22 am    Post subject: Reply with quote  Mark this post and the followings unread

dude that is crazy
_________________
visit my moddb profile for .shp downloads and stuff

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] Mark the topic unread ::  View previous topic :: View next topic
 Forum index » Miscellaneous Forums » Offtopic Discussion Area » Miscellaneous Tutorials
Jump to:  
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.1640s ][ Queries: 16 (0.0098s) ][ Debug on ]