View Full Version : Menu Button Colours
peppi_le_piou
5th March 2011, 12:02
I'm trying to make a new Title menu with 3 buttons. I want the buttons to match the existing sub menu (Root Menu) buttons (size, colour, shape).
All the navigation works in the new Title Menu but I can't seem to match the colours. In PgcEdit button editor, edit colour schemes, the root menu buttons for Select have these values, 11, 8, 3, 11, (ie Pink, Yellow, Red, Pink) with opacity 0, 0, 15, 15, and the Activate values are 7, 3, 0, 11, and opacity 0, 0, 15, 15, (Dark Pink, Red, Black, Pink); being for Background, Pattern, Emphasis1, Emphasis2.
The background picture I am using has the button picture as an oval shape (coloured black) with a white shape in its centre. This is the same button graphic that is used in all the root menus. When navigating in the root menu the "non-selected" buttons are Black/Wite, the "Selected" button goes Red for its inside shape and Pink for the oval shape and when "Activated" it goes Black for its inside shape and stays Pink for the oval.
Reference this to the above figures equates to "Selection" Emphasis1 = 3 (red) and Emphasis2 = 11 (pink); "Activation" Emphasis1 = 0 (black) and Emphasis2 = 11 (pink). Staight forward I think.
In DVDSubEdit the existing Root Menu buttons have B, P, E1, E2 (IFO Clut vaues) of Pink, Yellow, Red, Pink and (Automatic Clut values) Red, Red, Black, Grey. I tried to add these values to my Title Menu buttons but it doesn't match.
Firstly, I need to understand what is the definition of Background and Pattern with reference to my button graphic and the above values.
Secondly, I need to know what objects I need to paint which colour with Photoshop to save as a bmp for the subpic.
I can't find any guide that explains this.
r0lZ
5th March 2011, 18:25
Subpics are made of 4 colors only (with usually at least one of them being full transparent). The subpic bitmap does NOT contain the color, but instead an index to the color scheme, itself converted to the real color in the CLUT of the current PGC.
So, if you want for example a red button, you must define at least one red color in the CLUI of the menu (in PgcEdit, double-click the menu PGC in the left pane and modify the CLUT to suit your needs). Let's say the red color is the fourth color in the CLUT. (It is in the upper right corner of the CLUT widget in PgcEdit). Its index is 3 as you can see with the tooltip (because the color indexes in the CLUT are zero based). So, in the PGC Editor, you have to modify the Colour Scheme of the button to include at least that color, plus another one that will be used for the transparent background.
Here is the answer to your 1st question: The names of the colors slots are purely conventional. They are just names. So, Background (B) can be used for the foreground, and vice-versa. I think that using the right slots is better, but unfortunately, many authoring programs assign the colors to arbitrary slots. Anyway, I will assume that you assign the Red color (index 3) to the Pattern slot, and another color to the Background slot. (You may want to include two additional red colors if you want to use some antialising in your highlight, in the Emphasis 1 and 2 slots.)
Now, you have to define correctly the subpic bitmap. As explained above, it doesn't contain the real colors of the highlight. In the VOB, the bitmap is made of 4 color indexes (0, 1, 2 and 3), corresponding respectively to the B, P, E1 and E2 slots. When the player must display a pixel of the bitmap, it reads its value (0 to 3), then looks in the colour scheme to find the index of that pixel type in the CLUT (and its opacity), and finally extracts its color from the CLUT.
Now, when you edit or create a BMP to use as the highlight, there is a problem: you cannot usually draw pixel numbers! You have to draw some colors. (Note that it is possible to draw the pixel numbers if your BMP is in 256 colors and if your paint program shows you the map of the colors: in that case, you should use only the 4 first colors in the map.) DVDSubEdit saves the BMP with the real colors taken from the CLUT (except if you select its option "Use Automatic CLUT"). And when you import the edited BMP back in DVDSubEdit, it converts the colors it finds in your image to the index numbers, again according to its current "Use CLUT" option. (It searches the nearest pixel color, so if you have edited a bitmap with more than 4 colors, they will be converted to 4 color indexes anyway.)
So, IMO, to be sure that it will correctly recognize the 4 colors, it is better to define 4 very different colors in the CLUT, and assign them to the 4 color schemes slots. Then, load the menu VOB in DVDSubEdit, and export the BMP. Paint it using ONLY the 4 colors defined in the CLUT, import the modified BMP and save. Finally, if you have used some antialisaing, go to the CLUT again and set the E1 and E2 colors to the same color than the Pattern color, and modify their transparency in the colour scheme.
In your case, you should probably export a BMP from the Title menu, then modify it and import it in the Root menu. It's the easiest way to be sure that the colors will match (if the colour schemes and CLUTs are also identical, of course).
But if there are several identical colors in the CLUTS (and therefore also in the 4 colors shown by DVDSubEdit), you might have to modify temporarily the CLUT of both menus to distinguish the colors in your paint program and permit to DVDSubEdit to assign the right pixel numbers when it imports the BMP.
I'm not sure this explanation is clear, as it is difficult to understand how the BMP is finally converted to the highlight you see when you watch the DVD.
peppi_le_piou
8th March 2011, 12:09
Thanks for your detailed explanation but I need more, sorry.
As well as trying to solve my problem this is a learning exercise of menu buttons so I'd like to understand how it works.
After some experimentation I have found that the final button colours of "Selected" and "Activated" depends on the colours that I paint them with in the .bmp using a combination of red, blue, green, white, but none of these appear in the final menu but are affected by the choice of B P E1 E2.
For simplicity let's say that I want a button rectangle that is coloured in black at Normal in the menu, inside is the word PLAY which is white at normal. When "Selected" the rectangle goes pink and PLAY shows as red. When "Activated" the rectangle remains pink and PLAY changes to black.
Is the background the 720 x 480 pallette, and the pattern is the rectangle (or is the background the rectangle and pattern is the word)? And then I need to choose the correct combination of indexed pixels for rectangle + play in VobSubEdit? Would the Emphasis index only affect the word PLAY as this is what changes?
VobSubEdit doesn't show the button in Activated state (not that I can see anyway) only Selected state.
What is the purpose of Subpic color/Transparency slider in VobSubEdit?
What is the purpose of Ignore Transparency checkbox in VobSubEdit?
Why are the selections of B P E1 E2 different in PgcEdit than they are in VobSubEdit (checked another dvd's menu)?. Does one override the other? (which one do I need to do first).
r0lZ
8th March 2011, 13:41
After some experimentation I have found that the final button colours of "Selected" and "Activated" depends on the colours that I paint them with in the .bmp using a combination of red, blue, green, white, but none of these appear in the final menu but are affected by the choice of B P E1 E2.Right. It's what I've tried to explain in my post above. (Note that the red, blue, green and white colours depend of the program you use to convert the BMP to the subpic bitmap.)
For simplicity let's say that I want a button rectangle that is coloured in black at Normal in the menu, inside is the word PLAY which is white at normal. When "Selected" the rectangle goes pink and PLAY shows as red. When "Activated" the rectangle remains pink and PLAY changes to black.You need to define the 4 colors you want (black, white, pink and black again) in the CLUT of the menu PGC. Black is used twice, but it is not necessary to define it twice, as you can reuse the same colour several times in the color scheme of your button. (More on this below.)
Is the background the 720 x 480 pallette, and the pattern is the rectangle (or is the background the rectangle and pattern is the word)? And then I need to choose the correct combination of indexed pixels for rectangle + play in VobSubEdit? Would the Emphasis index only affect the word PLAY as this is what changes?The way the program imports the colors is program specific. You have to experiment to find the right colors. IIRC, DVDSubEdit assigns automatically the background color (the one that covers the edges of the bitmap) to B, but I'm not sure.
The easiest way to do it is to draw a simple test BMP, and import it in DVDSubEdit. Then click (and hold the mouse button) on the little B, P, E1 or E2 labels (not on the coloured square), and you will see the part of the BMP that has been assigned to that specific colour type, highlighted with the current colour assigned to that slot. (Of course, if your BMP contains only 2 colours, you will see nothing when clicking on 2 of those buttons.) So, now, you know which BMP colour is assigned to which colour type. Remember them, but if they are not what you have expected, don't panic: you can change the assignments in the colour scheme later. Let's say that the transparent background is correctly assigned to the B pixel type, the text color to P, and the background colour of the button to E1.
After having saved the subpic bitmap in the VOB, go to PgcEdit, and modify the colour scheme used by your button. You know now what colour from the CLUT must go to what pixel type, so that should be easy. Don't forget to change the opacity.
For example, you should set the B to full transparent (and of course its color doesn't matter), the P to opaque white for the selected button and black for the Activated button, and P1 to semi-opaque black (selected) and pink (activated).
BTW, verify also in the menu editor that your button uses the right colour scheme number, and that the enclosing rectangle is large enough to enclose the whole highlight.
VobSubEdit doesn't show the button in Activated state (not that I can see anyway) only Selected state.I'm not sure it is possible to show the Activated state. DVDSubEdit is made essentially to show regular subpics. Menu button highlights are more complex. Anyway, if the highlight is correct for the selected state, it is also correct for the activated state. It's in the colour scheme that you define different colours and/or transparency values for the two states.
What is the purpose of Subpic color/Transparency slider in VobSubEdit?It is made to modify the transparency of regular subtitles, and the global transparency of the non-selected and non-activated buttons, as well as the background not enclosed in any button highlight area.
Regular subtitles use only one colour scheme, defined in the subpic stream of the VOB.
Button highlights use at least two colour schemes.
The default colour scheme (#0, not editable with PgcEdit, but editable with DVDSubEdit) is used to display the parts of the subpic bitmap that are not in the currently selected button. That colour scheme is usually full transparent (unless you want to do special effects such as hiding the currently not selected buttons).
The currently selected button uses the color scheme that has been assigned to that button. (It's usually #1, but you can define 3 different color schemes that you can assign to different buttons of your menu, to have them highlighted in different colours.)
Colour schemes #1 to #3 are not saved in the subpic stream, but are in the Nav Packs of the VOB file. You can edit them with PgcEdit's menu editor, but not with DVDSubEdit.
What is the purpose of Ignore Transparency checkbox in VobSubEdit?It's just a tool to let you see the highlights of all buttons at the same time. (Normally, only one button is selected, and therefore only one highlight is visible, including in DVDSubEdit by default.) That's only a GUI trick for your convenience. That setting doesn't affect what is saved in the subpic stream.
Why are the selections of B P E1 E2 different in PgcEdit than they are in VobSubEdit (checked another dvd's menu)?. Does one override the other? (which one do I need to do first).I'm not sure I understand. What do you mean with "the selections of B P E1 E2"? Do you mean the colours associated with them? If it's the case, maybe it's because you have selected the option "Use Default CLUT". Also, DVDSubEdit uses a default CLUT if, for any reason, it cannot load the IFO associated with the current VOB. (The CLUT is defined in the IFO file.)
It is also possible that it displays the default colour scheme (#0), and you cannot edit or inspect it in PgcEdit.
Of course, you must Save the DVD if you modify the CLUT before launching DVDSubEdit.
Anyway, if you can see all colours you have defined via the BMP in DVDSubEdit, and if the different colours appear differently in DVDSubEdit, and even if that colors are not what you expect, then it's OK. Save the subpic, and modify the colour scheme (and, if necessary, the CLUT) with PgcEdit to assign the right colours and opacity values. Use a good software player to verify the final effect.
r0lZ
8th March 2011, 14:03
To summarize, here is the procedure you should use:
1. Edit the BMP using the 4 colors needed by DVDSubEdit. Import it in your menu.
2. Locate the parts of the BMP that are shown for each pixel type (by clicking the B, P, E1 and E2 labels) and note them. If you can see each colour you need separately, save and close DVDSubEdit. Otherwise, go back to step 1, but you may need to use different colours to paint the bitmap.
3. Define the colours you need in the CLUT of the menu PGC with PgcEdit.
4. In the menu editor, assign a colour scheme (greater than 0) to the button, and use the Colour Scheme Editor to edit that colour scheme and assign the right colours and opacities to the right pixel types, for the two modes (selected and activated).
5. If you have several buttons, assign the same colour scheme to all buttons, or, if you want different highlight colours and/or transparencies, repeat step 4 tor each button. (You cannot define more than 3 schemes, so if you have more than 3 buttons, some of them will have to share the same scheme.)
6. Save and test. If you are not happy with the result, go back to step 3 or 4.
(Note that it is perhaps easier to assign proper colours to the CLUT (step 3) before using DVDSubEdit, but that's not mandatory.)
Oh, BTW, verify also if all buttons can be reached with the remote. (Use the cursor keys of the keyboard when the menu viewer or editor is active, to test if you can jump to all buttons.) A common mistake is to test if the buttons work, only by clicking on them. A standalone player has no mouse!
peppi_le_piou
10th March 2011, 12:20
Thankyou for your valuable knowledge. Unfortunately I couldn't match the button colours no matter what I did.
There is something very strange with this dvd. I got around the problem another way, there was a advertisement menu that I sacrificed and replaced the background Still and pasted the required button Text against the existing buttons then fixed the navigation. All good now.
Thanks again.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.