Jump to content


Photo

Rendering fake colored avatars


  • Please log in to reply
5 replies to this topic

#1 MasterScrat

MasterScrat
  • Member
  • 13 posts

Posted 29 March 2015 - 10:42 AM

Hello everyone, long time no see!

 

I have resumed work on my toy Infinity Engine renderer.

 

So far I have implemented support for the simpler characters from BG2, like DOGWAR01. But now that I want to handle humanoids things are getting trickier!

 

Here's a sprite from a dwarf (DOPTHI01), it looks nice but I am not such a fan of the purple shirt/green hair color scheme.

 

I don't understand how the color customisation work. I tried using a palette from the Extended Palette Entries mod (attached as palette.bmp) instead of the palette from the BAM file but the result isn't any better.

 

Can anyone provide some hints?

Attached Images

  • 0-high.png

Attached Files



#2 Mike1072

Mike1072
  • Modder
  • 539 posts

Posted 29 March 2015 - 02:06 PM

Basically, each separate hue (red, green, blue, yellow, teal, pink, grey) you see can be assigned a separate palette to colour each part of the image separately.

The dark green, medium green, and light green in the image above get replaced with the appropriate shades from whatever palette you assign to hair (be it blonde, brown, black, white, blue, etc.).

I recommend checking out Erephine's Developer Files download.  Here is an excerpt from her Color Guide.
 
**** PALETTE ENTRIES ****

The following depicts the BG standard colour scheme. Each entry represents one gradient in the palette.

Pure colours:

grey
teal
pink
yellow
red
blue
green

==--

Colour gradients, mixed between pure colours:

grey, teal
grey, pink
grey, yellow
grey, red
grey, blue
grey, green

teal, pink
teal, yellow
teal, red
teal, blue
teal, green

pink, yellow
pink, red
pink, blue
pink, green

yellow, red
yellow, blue
yellow, green

red, blue
red, green

blue, green

==21


To calculate mixed colours, add the two pure RGB values and divide by two. Always round down. Here are the eight mix shades and their correspondence to pure colour shades:

I
3rd

II
4th

III
5th

IV
6th

V
7th

VI
8th

VII
9th

VIII
10th

If you need a mixed shade darker than the 10th, or brighter than the 3rd, you're out of luck.


**** STANDARD COLOUR USAGE ****

For character/monster animations:

GREY - Belt buckles, small metal things
TEAL - Minor clothing colour
PINK - Major clothing colour
YELLOW - Skin colour
RED - Leather colour
BLUE - Armour colour
GREEN - Hair colour (nice!)


**** COLOUR LOCATIONS ****

---WEAPONS---


16 -- GREY
17 -- TEAL
18 -- PINK
19 -- YELLOW
20 -- RED
21 -- BLUE
22 -- GREEN


---HELMETS---


48 -- GREY
49 -- TEAL
50 -- PINK
51 -- YELLOW
52 -- RED
53 -- BLUE
54 -- GREEN


---SHIELDS---


32 -- GREY
33 -- TEAL
34 -- PINK
35 -- YELLOW
36 -- RED
37 -- BLUE
38 -- GREEN

Edited by Mike1072, 29 March 2015 - 02:12 PM.


#3 MasterScrat

MasterScrat
  • Member
  • 13 posts

Posted 30 March 2015 - 08:19 AM

Thanks, the guide will definitely be useful.

 

But I still don't fully get how colouring works... I get a full palette of 255 colours, consistent with the "STANDARD COLOUR USAGE" (see attached image):

 

GREY - Belt buckles, small metal things
TEAL - Minor clothing colour
PINK - Major clothing colour
YELLOW - Skin colour
RED - Leather colour
BLUE - Armour colour
GREEN - Hair colour (nice!)

 

And I guess this lets me go from fake colours to the real ones (I still need to try this):

 

To calculate mixed colours, add the two pure RGB values and divide by two. Always round down. 

 

BUT what I don't get is how do I know which range from the palette I need to modify to change, for example, the hair colour?

Attached Images

  • Screen Shot 2015-03-30 at 00.46.08.png


#4 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 30 March 2015 - 08:42 AM

You take that pallet, and you replace the color in the chosen squires with the one you wish...

2j1sx7r.jpg

So the hair is the green in that, so you replace the green pallets(numbers 77-88 ) with a say various decrees of red, and now you have red hair colored elf.

Same with the armor, just create a pallet which squares 65-76 are the colors of the armor you wish them to be.


Edited by The Imp, 30 March 2015 - 09:19 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#5 MasterScrat

MasterScrat
  • Member
  • 13 posts

Posted 30 March 2015 - 09:05 AM

Thanks a lot! But... I still see green highlights in her hair. Should I change the other ranges that are green in the original palette as well? Or is it an accessory in her hair?

 

And if it an accessory, then what is the use of the extra colours beyond the 7 * 11 = 77 ones that are used for various body parts?


Edited by MasterScrat, 30 March 2015 - 10:06 AM.


#6 MasterScrat

MasterScrat
  • Member
  • 13 posts

Posted 30 March 2015 - 02:36 PM

After further research, it seems the other colours are used for various small elements of the characters. Here are 2 characters generated with only grey for the main colours, and blue for the additional 21 ranges.

 

I can't find any documentation saying which of these range goes to which part of the character. Any pointer?

Attached Images

  • Screen Shot 2015-03-31 at 00.32.35.png
  • Screen Shot 2015-03-31 at 00.31.10.png