Moving menu buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • VRYK
    Super Member
    Super Member
    • Jan 2009
    • 226

    #16
    Thanks for the info. I am also now using PgcEdit to blank Cells. To blank a PGC does one use the Remove Cells button in the PGC Editor ?

    I’m afraid I’m pretty lost with button subpic editing. A menu in an old 4:3 video has 4 buttons, two of which are large, covering white text which when selected turns grey. The other two buttons are small squares to the left of the accompanying text and scarcely visible against the menu background. I enlarged these buttons to cover the text which ideally I would like to highlight. I used the Replace current subpic with .bmp file command in DVDSubEdit’s File menu to open the menu in PS Elements. The highlights– the text of the two large buttons and the two small squares - appear in white. I increased the area of the two squares but this didn’t enlarge the highlight surface. I would be grateful for your help on where I am going wrong and how I could highlight the text

    Comment

    • r0lZ
      Lord of Digital Video
      Lord of Digital Video
      • Mar 2004
      • 1508

      #17
      Originally Posted by VRYK
      Thanks for the info. I am also now using PgcEdit to blank Cells. To blank a PGC does one use the Remove Cells button in the PGC Editor ?
      No, Remove Cells is designed to remove some (but not all) cells in a specific PGC.

      To remove all cells of a specific PGC, use Kill PGC Playback. In menu domains, PgcEdit will offer to convert the PGC to dummy. Accept. In Title domains, it is usually impossible to remove all cells (as a title MUST have at least one cell), and therefore, PgcEdit will offer to replace all cells with a single tiny black cell. Again, accept. In both cases, you will have to process the domain with FixVTS (or VobBlanker) to remove the old cells, now unreferenced, from the VOB files.
      In addition to removing the cells, Kill PGC Playback also copies the post commands in the pre-commands area (when it's possible), so that, even when there is still a blank cell in the PGC, it will not be played at all.

      If the domain contains ONLY PGCs that you want to kill (for example if the VTST domain contains only a single PGC), you can also right-click on any PGC of the domain, and select Blank Out All PGCs of Domain. It's similar to Kill PGC Playback, but the function is applied to all non-dummy PGCs of the current domain in one shot, and since PgcEdit knows that there are no original cells left in the domain after the operation, it backs up the original VOB file(s) and replace it (when necessary) with a single black frame. So, you don't have to run FixVTS, and the operation is instantaneous.

      Originally Posted by VRYK
      I’m afraid I’m pretty lost with button subpic editing. A menu in an old 4:3 video has 4 buttons, two of which are large, covering white text which when selected turns grey. The other two buttons are small squares to the left of the accompanying text and scarcely visible against the menu background. I enlarged these buttons to cover the text which ideally I would like to highlight. I used the Replace current subpic with .bmp file command in DVDSubEdit’s File menu to open the menu in PS Elements. The highlights– the text of the two large buttons and the two small squares - appear in white. I increased the area of the two squares but this didn’t enlarge the highlight surface. I would be grateful for your help on where I am going wrong and how I could highlight the text
      The highlight that you see depends, of course, of the bitmap, but also of the "window" defined in the nav pack(s) containing the button. You can edit the window position and size with the menu editor of PgcEdit. Use the X, Y, width and height sliders to position the "window" where you want it. The part of the highlight bitmap that is included in that window will be shown when the button is selected. Note that the window defines also the area where you can click with the mouse to activate the button when playing the DVD on a PC.
      r0lZ
      PgcEdit homepage (hosted by VideoHelp)
      Unofficial mirror (in Poland)

      Comment

      • VRYK
        Super Member
        Super Member
        • Jan 2009
        • 226

        #18
        Many thanks for the information.

        > The highlight that you see depends, of course, of the bitmap, but also of the "window" defined in the nav pack(s) containing the button.<
        I take the “window” defined in the nav pack(s) to be the button outline – which is green when selected in PgcEdit’s Menu buttons widonw. Is there one nav pack per perspective (4:3, etc) ?
        I extended the white highlight area in the window to cover the text. When selected the highlight area turns greyish as expected.

        However, I wanted ideally to highlight the text itself. I first deleted this text by editing the bitmap file via VobBlanker. Then I exported the menu from DVDSubEdit to PS Elements where I replaced the highlight rectangles by text (by first deleting the white highlight rectangles, then creating text in white and then flattening the layers). Imported back into DVDSubEdi, the text is visible. However, when I play the video, the text is no longer visible (confirmed by opening the Menu buttons window in PgcEdit) .
        I used the "Use automatic CLUT" option in DVDSubEdit since 3 of the four colours in the IFO CLUT were white.
        I would be grateful for your help on how one can go about creating a highlight text.

        Incidentally, how does one move between buttons in DVDSubEdit ?

        Comment

        • r0lZ
          Lord of Digital Video
          Lord of Digital Video
          • Mar 2004
          • 1508

          #19
          Originally Posted by VRYK
          Many thanks for the information.

          > The highlight that you see depends, of course, of the bitmap, but also of the "window" defined in the nav pack(s) containing the button.<
          I take the “window” defined in the nav pack(s) to be the button outline – which is green when selected in PgcEdit’s Menu buttons widonw.
          Right.

          Originally Posted by VRYK
          Is there one nav pack per perspective (4:3, etc) ?
          No, the information for all display modes is stored in the same nav pack. (But if the menu is animated or is a still with audio, there are many nav packs, repeated at regular intervals. The menu definition must be repeated as well, as long as the buttons are visible and selectable. They may even change, and in that case, the menu has several button "sets".)

          In PgcEdit's menu editor, you can change the display mode by selecting another button "group" in the upper-left corner. Each group is assigned to a specific display mode. The pseudo-group "All" is normally selected by default, and allows you to edit all groups at the same time. Be aware that if you select, say, group 2, all your edits will be applied to that group ONLY! But you can select group 2 and immediately return to "All" to simply change the current display mode, but continue to edit all groups at the same time.

          Group 3 is extremely rarely used.

          Originally Posted by VRYK
          I extended the white highlight area in the window to cover the text. When selected the highlight area turns greyish as expected.

          However, I wanted ideally to highlight the text itself. I first deleted this text by editing the bitmap file via VobBlanker. Then I exported the menu from DVDSubEdit to PS Elements where I replaced the highlight rectangles by text (by first deleting the white highlight rectangles, then creating text in white and then flattening the layers). Imported back into DVDSubEdi, the text is visible. However, when I play the video, the text is no longer visible (confirmed by opening the Menu buttons window in PgcEdit) .
          PgcEdit cannot display the highlights. It displays only the border of the "window". Use a good software player to display the highlights. (Note that MANY software players have trouble with the display of the button highlights, so if you see nothing with a player, try another one. I don't like it, but I must say that the Windows Media Player works fine for that purpose.)

          Originally Posted by VRYK
          I used the "Use automatic CLUT" option in DVDSubEdit since 3 of the four colours in the IFO CLUT were white.
          I would be grateful for your help on how one can go about creating a highlight text.
          Maybe the problem is that your highlight has been drawn with a pen that has a transparent colour in the colour scheme. To see easily what part of the highlight is assigned to what colour, I suggest to assing an unused colour scheme to the button, and modify that colour scheme to use 4 very different colours without transparency. When you will know for sure what pen is used by the text, you can restore the original colour scheme number and modify it to suit your needs.

          Originally Posted by VRYK
          Incidentally, how does one move between buttons in DVDSubEdit ?
          IIRC, Alt-N, Alt-P for next and previous (or Control-N/P, I don't remember right now).
          r0lZ
          PgcEdit homepage (hosted by VideoHelp)
          Unofficial mirror (in Poland)

          Comment

          • VRYK
            Super Member
            Super Member
            • Jan 2009
            • 226

            #20
            Many thanks for the clarifications.

            >modify that colour scheme to use 4 very different colours without transparency<
            In PgcEdit’s Colour schemes Editor the colour scheme for the button when selected shows the e2 pixel as dark blue and the other pixels white. When activated, there are four separate colours, but all transparent (Opacity = 0). I don’t grasp how the whole colour scheme can change when the button passes from Selected to Activated.

            The PgcEdit manual states that Colour Scheme 0 (the default scheme) is special….”. What is the relation between this scheme and the IFO CLUT? If they coincide then DVDSubEdit must be used to change the colour scheme. The latter’s help file states: “Shift-Click any of the 16 tiles in the “Pick color” dialog, and a color selection dialog will pop-up, allowing you to change the color stored in the color-lookup table in the IFO file for that specific tile.”

            Shift-Clicking on a tile brings up the Custom colour table; but when I select a colour there, this doesn’t change the tile colour. In any case, one of the 16 existing CLUT colours would be OK.

            I’m obviously missing something here.

            Incidentally, a line from a code example you sent me previously reads:
            [00 91 00 0F 00 40 00 04] 2 if ( gprm(15) & 0x0040 ) then { Goto line 4 }
            I haven’t been able to find what gprm(15) & 0x0040 means – in particular what the & signifies.

            Comment

            • r0lZ
              Lord of Digital Video
              Lord of Digital Video
              • Mar 2004
              • 1508

              #21
              There are 7 colour schemes for the menu buttons (in fact, colour scheme 0, the "special" one, plus 3 double schemes, schemes 1, 2 and 3.)

              Colour scheme 0 is stored with the subpic in the VOB and cannot be edited with PgcEdit. It is used to render the standard subtitles, and the menu buttons that are not "current" (selected or activated) as well as the background area between the buttons. (You can assign it to a button, but usually that doesn't make sense, except in some special cases.)

              You should assign one of the 3 other double schemes to any button of the menu. (That means that you can have different colours for the different buttons of a specific menu.)

              In the colour scheme that you select for a particular button, there are two sections: one for the button in selected state, and one for the button in activated state (hence the "double scheme"). Just play with the 4 colour and the 4 opacity sliders in the two sections to assign the correct colours and transparency values to the 4 pens used by your button. (One of them is usually totally transparent, but it's not mandatory.)

              If you cannot find a suitable colour when playing with the colour slider, you will have to modify the CLUT of the menu PGC. Quit the menu editor, and double-click on the PGC to open the PGC editor. Modify the colours of the CLUT to suit your needs. Return to the menu editor to assign the colours to the button highlights.
              r0lZ
              PgcEdit homepage (hosted by VideoHelp)
              Unofficial mirror (in Poland)

              Comment

              • r0lZ
                Lord of Digital Video
                Lord of Digital Video
                • Mar 2004
                • 1508

                #22
                Originally Posted by VRYK
                Incidentally, a line from a code example you sent me previously reads:
                [00 91 00 0F 00 40 00 04] 2 if ( gprm(15) & 0x0040 ) then { Goto line 4 }
                I haven’t been able to find what gprm(15) & 0x0040 means – in particular what the & signifies.
                The "&" is the "bitwise AND" (or "boolean AND") symbol. When a value is ANDed with another value, only the bits that are set in both values are returned.

                0x0040 is the binary value 0000000001000000: bit 6 is set and all other bits are clear. That bit 6 is at 1 if the subpic is enabled, and 0 if it is not enabled. For example, subpic #1 is represented by 0x0001 (= decimal 1) when it is OFF, and by 0x0041 (= 65) when it is ON.

                The comparison if ( gprm(15) & 0x0040 ) isolates the bit 6 of the value contained in GPRM 15 by ANDing its content with 0x40. The result is non-zero (true) if that bit is set, and zero (false) if it is clear. So, that line checks if the current subtitle is ON (regardless of the current subpic number), and goes to line 4 if it's the case.
                Last edited by r0lZ; 11 Aug 2011, 02:37 AM.
                r0lZ
                PgcEdit homepage (hosted by VideoHelp)
                Unofficial mirror (in Poland)

                Comment

                • VRYK
                  Super Member
                  Super Member
                  • Jan 2009
                  • 226

                  #23
                  Thanks very much for the explanations. After playing around with the three colour schemes, I have come up with one which gives a good contrast against the menu background. Am I correct in assuming that these schemes are from the IFO CLUT ?
                  I’ll settle for this, though I didn’t manage to create buttons for which only the text highlights. I thought that replacing the existing highlights by text in PS Elements when exported from DVDSubEdit would do the trick – but this didn’t work.

                  I’ having a problem after hiding a button. Pre-commands in the PGC containing the menu set the focus to this button (#1) which seems to be posing a problem for the player..
                  [61 00 00 00 00 04 00 00] 2 Set gprm(0) =(mov) gprm(4)
                  [79 00 00 00 00 3F 00 00] 3 Set gprm(0) &=(and) 63
                  [00 B1 00 00 00 00 00 06] 4 if ( gprm(0) != 0 ) then { Goto line 6 }
                  [71 00 00 00 00 01 00 00] 5 Set gprm(0) =(mov) 1
                  [79 00 00 00 00 3F 00 00] 6 Set gprm(0) &=(and) 63
                  [75 00 00 00 04 00 00 00] 7 Set gprm(0) *=(mul) 1024

                  Line 6 evaluates to 1 and so button 1 is highlighted. I would like to get it to evaluate to 2, but my experiments with editing the command have not succeeded. Also, I’m puzzled as to why gprm(0)’s value is set in line 2 and then immediately re-set in line 3, and then line 3 is repeated in line 6.

                  Comment

                  • r0lZ
                    Lord of Digital Video
                    Lord of Digital Video
                    • Mar 2004
                    • 1508

                    #24
                    Originally Posted by VRYK
                    Thanks very much for the explanations. After playing around with the three colour schemes, I have come up with one which gives a good contrast against the menu background. Am I correct in assuming that these schemes are from the IFO CLUT ?
                    No. Colour scheme 0 is stored with the subpic in the subpic stream, multiplexed in the VOB file. The other schemes are stored with the button definitions, in the nav packs, again in the VOBs. Only the CLUT is stored in the IFO. (That means that if you clone a menu PGC, you can change the colours of the highlights by editing the CLUT, but not the transparency values, or you will change them for the two PGCs at the same time.)

                    Originally Posted by VRYK
                    I’ll settle for this, though I didn’t manage to create buttons for which only the text highlights. I thought that replacing the existing highlights by text in PS Elements when exported from DVDSubEdit would do the trick – but this didn’t work.
                    That should work. But it is not always easy to use the right colours in the paint program. Also, don't forget that there are 2 subpic images to modify for a 16:9 menu.

                    Originally Posted by VRYK
                    I’ having a problem after hiding a button. Pre-commands in the PGC containing the menu set the focus to this button (#1) which seems to be posing a problem for the player..
                    [61 00 00 00 00 04 00 00] 2 Set gprm(0) =(mov) gprm(4)
                    [79 00 00 00 00 3F 00 00] 3 Set gprm(0) &=(and) 63
                    [00 B1 00 00 00 00 00 06] 4 if ( gprm(0) != 0 ) then { Goto line 6 }
                    [71 00 00 00 00 01 00 00] 5 Set gprm(0) =(mov) 1
                    [79 00 00 00 00 3F 00 00] 6 Set gprm(0) &=(and) 63
                    [75 00 00 00 04 00 00 00] 7 Set gprm(0) *=(mul) 1024

                    Line 6 evaluates to 1 and so button 1 is highlighted. I would like to get it to evaluate to 2, but my experiments with editing the command have not succeeded.
                    Just change line 5 to:
                    Set gprm(0) =(mov) 2

                    Originally Posted by VRYK
                    Also, I’m puzzled as to why gprm(0)’s value is set in line 2 and then immediately re-set in line 3, and then line 3 is repeated in line 6.
                    This apparent complexity is due to the limited capabilities of the VM commands in term of computations. In a more elaborated language, the code could be something like this:

                    gprm(0) = gprm(4)
                    if (gprm(0) & 63 == 0) then gprm(0) = 1
                    gprm(0) = (gprm(0) & 63) * 1024

                    gprm(4) contains certainly the number of the button to select by default, but it can also be uninitialized, and in that case it contains 0.

                    2: copies gprm(4) to gprm(0)

                    3: keeps only the bits 1 to 5 in the gprm 0. That truncates the value to a maximum of 63. (I'm not sure that line is very useful, but perhaps they use the bits 6 to 15 to store other values.)

                    4: Compares the resulting value with 0. If the value is > 0, then the next line is skipped.

                    5: If the value is 0, the gprm doesn't contain a valid button number, and is therefore changed to 1.

                    6. This line is useless. It keeps again bits 1 to 5, but that operation has already been made at line 3, and if the value is modified by line 5, it doesn't have bits 6 or higher set anyway. (That redundancy is typical of programs generated by programs.)

                    7. Finally, line 7 converts the button number to the value needed by sprm(8). (Valid buttons values are always multiples of 1024.)

                    8. I suppose that line 8 copies the button number in sprm(8), to be used by the menu:
                    (SetHL_BTN) Set Highlighted Button =(mov) gprm(0)
                    Last edited by r0lZ; 16 Aug 2011, 02:34 AM.
                    r0lZ
                    PgcEdit homepage (hosted by VideoHelp)
                    Unofficial mirror (in Poland)

                    Comment

                    Working...