:: 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 Fri Dec 14, 2018 7:13 pm
All times are UTC + 0
 Forum index » Featured Tools » OS SHP Builder » Suggestions
Batch Palette Conversion
Moderators: stucuk
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
Author Message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Oct 09, 2013 10:14 am    Post subject:  Batch Palette Conversion Reply with quote

I'd like to request a feature that allows you to convert the palette of multiple SHPs at once, with the option to either simply select your old palette and new palette or to use a cscheme.
_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Wed Oct 09, 2013 5:23 pm    Post subject: Reply with quote

Or you could just use xcc mixer and don't get me started on how out of place cscheme suggestion is between shps deal knowing you want quick & fast or should I say most lazy modder tool and I aint envisioning you write cscheme to tell what colors to copy indexies between every shp (not designed for that!) lol . Rolling Eyes

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Wed Oct 09, 2013 5:54 pm    Post subject: Reply with quote

Apollo, did your little brother hijacked your account? That writing style doesn't fit to you. I can't even follow half of that word chain.
_________________
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
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Wed Oct 09, 2013 7:18 pm    Post subject: Reply with quote

Asking Banshee to write 'conveniency' features when his rather busy with studies is pointless, trust me I know since my request is all not done still years back Very Happy

Edit: Cscheme suggestion apparently has merit since cached while workload is far more.

Last edited by ApolloTD on Thu Oct 10, 2013 10:45 am; edited 2 times in total

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Wed Oct 09, 2013 7:56 pm    Post subject: Reply with quote

The cscheme suggestion is perfectly practical for cases where direct color conversion causes errors (like remap becoming red or black becoming the background color) and when you need change the palette for around 100 SHPs, making a cscheme is little effort in comparison to of converting the palettes one by one.

As for using XCC Mixer; although that does work when you convert SHPs to PNG and then back again, the same palette errors can occur there as well.
_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Oct 10, 2013 6:03 am    Post subject: Reply with quote

Remap would hardly be problem if you did slightly customized conversion palette that has no similar shades to use except remap. Typical shp convert guys used purple remap and no problem Wink

Alternatively you do edited pal for source art with remap range for custom colors assuming fairly same colored source (chances of that?).

cscheme is nothing but a index copier/mover, you need RGB matching for the bulk of indexies anyhow (variations will be too high that apart from remap range I don't see you matching them all by cscheme alone) so I fail to see the point apart from minor remap range issues which are gone if use shades that can't mix and rather than provide cscheme.

Banshee could add just option to copy (and thus ignore from processing by rgb matcher) certain index range over field rather than cscheme (just like copy frames from X-X function for content) and have rest rgb matched, if this so needed(?)
cscheme use is limited as its really only good for working within single palette IMO and I have yet to see case where these color errors is enough big issue you couldn't else workaround.

Only issue to whine rather is banshee's/olaf rgb matcher at core not being that precise (understandable)

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Oct 10, 2013 7:33 am    Post subject: Reply with quote

ApolloTD wrote:
cscheme is nothing but a index copier/mover, you need RGB matching for the bulk of indexies anyhow (variations will be too high that apart from remap range I don't see you matching them all by cscheme alone) so I fail to see the point apart from minor remap range issues which are gone if use shades that can't mix and rather than provide cscheme.

It's also possible that many SHPs share a same palette problem which could be fixed with a cscheme and being able to process them all at once would save time.

That aside, it's really not that hard to use a cscheme for a complete palette conversion; I've done so before. You basically just take a screenshot of the old palette, paste it in OS SHP Builder after having selected the new palette and then use the 'Colour Selector' tool to tell which color changed into which and create the cscheme according to that. You'll then still have used the RGB matching method, but you're able to make any adjustments you like.

In any case "Batch Palette Conversion" would be far more useful than the Batch Tool's current function, which is only to convert SHPs to images (an exact same function as XCC Mixer has).
_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Oct 10, 2013 8:48 am    Post subject: Reply with quote

Your eye for comparing the changes using color selector is not 100% accurate, its far better to leave it for actual rgb matcher. I used to do this way long ago until I saw better way by math that is far more accurate conversion from which basis I did more accurate color cscheme scripts. Plus the amount of time you've spent doing it that way manually forming cscheme makes it pretty workful alternative initially. Main issue with doing complete color conversions using cscheme is assuming there are spare indexes to move around in to avoid overwrite instead of fully used palette, not always are you so fortunate given cscheme is line by line from lower number color index changer.

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


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Oct 10, 2013 9:30 am    Post subject: Reply with quote

oh, sounds like a good enhancement idea for my TMP Shop
an auto-scheme-creator
-select palette 1
-select palette 2
-click [Create Color Scheme]
voilà, the [Data] section ready to use

You have the advantage of the math, plus you can do further manual changes which the auto-conversion of SHP Builder doesn't allows.

ApolloTD wrote:
Main issue with doing complete color conversions using cscheme is assuming there are spare indexes to move around in to avoid overwrite instead of fully used palette, not always are you so fortunate given cscheme is line by line from lower number color index changer.

I had this issue too, hence my last bugfix where the conversion is done without the need for free indexes to move colors around.
It can handle fine things like
1=2
2=1

I never played around that much with SHP Builders cscheme and i actually expected it to work this way too.
Are you sure it's necessary in SHP Builder to use the following code to achieve the same,
1=3
2=1
3=2
so 1 and 2 don't end up having the same color?
_________________
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
ApolloTD
Commander


Joined: 19 Nov 2003

PostPosted: Thu Oct 10, 2013 10:36 am    Post subject: Reply with quote

Ah, actually it works correct(there is seemingly cache after all) so cschemes do have merit apart from manual labour. Either way such math approach would be far better as long as considered hue closeness.

Back to top
View user's profile Send private message
Bittah Commander
Defense Minister


Joined: 21 May 2003
Location: The Netherlands

PostPosted: Thu Oct 10, 2013 10:41 am    Post subject: Reply with quote

I actually always assumed that cschemes didn't have this issue in OS SHP Editor and VXLSE III...

Couldn't this be prevented by making it basically work like this:
1=A
2=B
3=C

A=3
B=1
C=2
So the cscheme would basically first replace all color indexes with unique invalid characters, after which all of these characters are replaced by the intended color indexes.

Or Banshee could possibly implement whatever fix LKO implemented into TMP shop for this.
Lin Kuei Ominae wrote:
oh, sounds like a good enhancement idea for my TMP Shop
an auto-scheme-creator
-select palette 1
-select palette 2
-click [Create Color Scheme]
voilà, the [Data] section ready to use

That would indeed be quite useful Smile
_________________

Back to top
View user's profile Send private message Send e-mail ModDB Profile ID YouTube User URL Facebook Profile URL
Lin Kuei Ominae
Seth


Joined: 16 Aug 2006
Location: Germany

PostPosted: Thu Oct 10, 2013 11:34 am    Post subject: Reply with quote

The color is a Byte value stored in the TMP. And since byte has a range of 0-256 just like the palette has colors, there is no room for other characters like A,B,C.
I'm pretty sure in the SHP every pixel has only a Byte value for the color too.

My change was rather simple
for every line in cscheme
If (Pixel.Color=cscheme.Oldcolor)
{
Pixel.Color=cscheme.Newcolor
break; //stop finding other colors that match and go to the next pixel
}

The old code was simply missing the break; command which made it keep going through the list of color conversions and thus tried to change the same pixel again.

But as i said, i don't even know if SHP Builder has the same issue. It might work correct in the first place.

\EDIT
did a quick test, and SHP Builder works correct!
If you set
1=2
2=1
(+ all the other colors 0=0, 3=3 etc)
then the colors are correctly switched.

Thus it is perfectly fine possible to do a full palette conversion with a cscheme file using SHP Builder.
_________________
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
Banshee
Supreme Banshee


Joined: 15 Aug 2002
Location: Brazil

PostPosted: Thu Oct 10, 2013 1:06 pm    Post subject: Reply with quote

OS SHP Builder and VXLSE III doesn't have any logical problem with custom schemes and it works in a very simple way:

for every pixel do
  pixel.color = custom_schemes[pixel.color];


And that's it. You don't need to create A, B, C, or fake colors of whatever kind.

Back to top
View user's profile Send private message Visit poster's website Skype Account
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [13 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » OS SHP Builder » Suggestions
Jump to:  
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
Quick Reply
Username:


If you are visually impaired or cannot otherwise answer the challenges below please contact the Administrator for help.


Write only one of the following words: Brotherhood, unity, peace! 

 
You can post new topics in this forum
You can 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

Wildcard SSL Certificates
[ Time: 0.1437s ][ Queries: 11 (0.0182s) ][ Debug on ]