olli991 / mib-std2-pq-zr-toolbox

Toolbox for MIB STD2 PQ/ZR Technisat/Preh units.
https://discord.gg/YU3rjatWjT
MIT License
484 stars 78 forks source link

startup_x.boot colors missing #2

Closed mattcabb closed 2 years ago

mattcabb commented 3 years ago

Not sure if the extract-startup_x.boot.py script works correctly. Here's an example of an extracted file img_31.png from startup_4.boot container (took the file from MST2_EU_VW_ZR_P0252T software package). I believe that this should have some blue elements over here.

Zrzut ekranu 2021-03-15 o 10 58 20

At the same time script extract-mcf.py worked as expected and image files look correct.

olli991 commented 3 years ago

You're right we're missing some colors. We'll look into it. If you could upload / send me your bootscreens we can test it against different images. That would help.

ivica21 commented 3 years ago

Hello How to copy modified startup_x.boot ?I have MST2_EU_VW_ZR_P0252T and want to test.

jorrecob commented 3 years ago

@olli991 ,

With extract-startup_x.boot.py from the 0.6.4 release, i can confirm that all the boot containers png’s (0 to 8) have no color, but are extracted in grayscale (Windows 10 pc) if i open any png in photoshop it states ‘gray’ instead of ‘RGB’.

is this fixed in release 0.7 or is there a workaround? Thanks.

olli991 commented 3 years ago

No fix so far

jorrecob commented 3 years ago

Thank you for quick reply!

lapuff commented 3 years ago

Hello, Still no solution ?

jilleb commented 3 years ago

The images inside the boot-file all have 2 bytes per pixel. That means: 1 byte for transparency level, 1 byte for color. So there's max 256 transparency levels, and max 256 shades of gray. Working with a palette didn't suffice.

So I made the images half the size, so we have more bytes per pixel. This is the result when interpreting the RGBA data as a PNG: image

However, if I use the Blue channel as the Green channel, (so the Blue is duplicated), it looks like this: img_47

I'm no yet happy with this outcome, but it's something. At least there's some color!

Hello, Still no solution ?

I don't mean to be rude, but be patient (or feel free to fix it yourself ;-) ) It's done when it's done.

jorrecob commented 3 years ago

Thank you Jille for working on this! Much appreciated!

lapuff commented 3 years ago

Thank you for his explanations! But not knowing too much the field, I can not find a solution.

I have another problem, comment the injector on the file? I did import skin and sound but not for startup. Thank you

jtomtos commented 3 years ago

There somethig to think about. It's looks like this picture is combilation of two channels. Alpha channel is picture itself in grayscale, and GrayScale channel is a color mask. By default it has 128,128,128 color - gray (from white to black), and here at least two other colors - blue (blue-motion) and red (beatsaudio) difined as interlacing dark and light pixels. For Example blue color grayscale channel looks like this:

blue-motion

how it works i can't understand. Sugget, that even -dark, odd -light is red, odd -light, even -dark is blue but i have not found some kind of logic in this.. only reproducing known colors frame-16

mattcabb commented 3 years ago

Not sure if this is going to be any help to anyone involved, but here's a bunch of texture finders that help easily switch between different data interpretation modes: https://forum.xentax.com/viewtopic.php?t=15540

jilleb commented 3 years ago

Yes, that's what I've been using too.

jtomtos commented 2 years ago

Hi! I got a little time, I got the following result

diag

Here is plugin for GIMP to export colored image for MIB2STD boot animation. mib2image.zip (outdated version. see the last one in the next posts)

To install just extract to plug-ins folder of GIMP (in my case it's c:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins) and restart GIMP

How to use: create image with resolution 800x480

In menu - select File\Export As... (Shift+Ctrl+E) Set name\folder to export In "Select File Type (By Extension)" (bottom left) choose "MIB2STD BOOT Image"

And press Export system will prompt you to set color limit. it was found that a file larger than 1 MB is not installed in my system, so I have to limit the color Default - 128, I used 64

Result: 2 files 1 - Main picture (800x480) with an empty window for animated label (for size reduce) - "selected file name".png 2 - Label picture (480x100) - "selected file name"_lbl.png

mattcabb commented 2 years ago

@jtomtos, I'm not sure if I get it right. Your plugin will create two files that I can later on use with @jilleb compress script, is that right?

jtomtos commented 2 years ago

Yes that's right. Just pay attention that the compression script also needs to be corrected - there is a hardcode for the length of the header and the number of files. my version is compress-startup_x.boot.zip

jorrecob commented 2 years ago

@jtomtos Thx for helping on this issue. If i get it correctly, we have to create a completely new startup image with the gimp plug -in and compress it with the corrected script. So extracting the original dump files with the tool from Jille, editing them with gimp and your plug-in will still result in grayscale png’s? Is there a way to extract original the png’s in RGB? Or am i missing something (Just for the less talented programmers among us)?

jtomtos commented 2 years ago

Yes, original pictures will be opened as gray. It was difficult for me to match the label with the axial background, so I redrawn it entirely. I think it's not a problem to make a plugin for opening original pictures in color. If you look at the code, the conversion is quite simple. I might try it next week (just getting started with python and GIMP). I can suggest my template from Photoshop. MAIN_TPL.zip

mirin22 commented 2 years ago

great that if you try to do it, I would also like to have a logo that I like.

jtomtos commented 2 years ago

Added inverse transformation. Just update the plugin and reload gimp. There is one change. In order not to conflict with classic "png" files, the file extension must be changed to ".mib". This applies to both opening and export. To open the original file in color - copy it with the .mib extension and just open it in gimp File \ open menu mib2image.zip (outdated version. see the last one in the next posts)

Updated: Fixed version

yox2019 commented 2 years ago

... great job and great progress but: ... if I open the ori logo (after changing the extension to .mib) the colors are visible and I can edit the image, but after pressing "export as ... MIBSTD2 ..." I only get 1 small file with the text "Welome to Volkswagen", is it normal? Zrzut ekranu (889) Zrzut ekranu (890) Zrzut ekranu (891) Zrzut ekranu (892) Zrzut ekranu (893)

yox2019 commented 2 years ago

img_10.mib "input file" img_10x.mib "output file" after "export as...

... last 2 images are .png but output is only 1 .mib file the blue one

jtomtos commented 2 years ago

I'm ashamed. Didn't check the changes properly. the result is bug. Fiexed&Improved (added option to extract label) mib2image.zip (outdated version. see the last one in the next posts)

yox2019 commented 2 years ago

... good man :))))

yox2019 commented 2 years ago

... and here the sample, (I like it 55%) I will find time, it will adjust... anyway it is possible, thanks to man, now we are counting on creative invention :))) startup_6.zip

https://www.youtube.com/watch?v=kZWAs5eZuc4

mirin22 commented 2 years ago

yox2019 - Does it look great how to upload it to Discovery?

yox2019 commented 2 years ago

... use "toolbox" there is an option for it :)

mirin22 commented 2 years ago

do I just unpack and add to the Toolbox?

yox2019 commented 2 years ago

exactly... ...custom/startanim/startup_.... and code unit for r-line "06" byte 17 or 18 can't remember

stupots commented 2 years ago

Thanks for your work on this. I'd love to do a 4Motion logo animation for my car.

Can anyone write clear step by step instructions when they've got the hang of it please?

mattcabb commented 2 years ago

Step-by-step tutorial (might have some bugs). TechniSat custom boot screen - VAG MIB2.pdf

lapuff commented 2 years ago

Thanks a lot for everything that works !

For the colors are not the same as the original file ?

Original file image

Converted file image

jtomtos commented 2 years ago

Some color loss is possible. But here everything looks as if some layer has not been picked up. Can you give me an original picture for experiments.

lapuff commented 2 years ago

Archive.zip

thank

jtomtos commented 2 years ago

problem in color reducing. Try this version with color limit = 0. mib2image.zip (outdated version. see the last one in the next posts) while I'm looking for better solution

lapuff commented 2 years ago

The new version gives the same result. I am waiting for you to find a solution thank you very much

jtomtos commented 2 years ago

have you set color limit = 0? I'got this result with your file img_19.zip

I'm afraid there's no good solution. Gimp loose colors on your image when image type changed to indexed colors with any combination of parameters... Color limit = 0 turns off color ruducion, and image saves as is.

lapuff commented 2 years ago

ok

image

mirin22 commented 2 years ago

yox2019 - your version works for me without any problems, thank you very much

mattcabb commented 2 years ago

@jtomtos thank you for your work. I would love if you would submit your version of the compress script to the repository. Current one is not able to correctly compress unmodified files.

You clearly know what you are doing and I hope this is not too much to ask, but would it be possible for you to modify the original extract script as well, so it creates proper .png files (combine the current extract and mib2image functionality into one script)?

jorrecob commented 2 years ago

@jtomtos I’ve got a resolution problem. Your gimp/python script only allows to export in 800x480 and 480x100. I presume these are the resolutions for the start up png’s for the vw discovery unit. Now i have a seat navi system (6po) unit and have different resolutions for the start up png’s. I’m pretty sure we have to keep the same resolutions or the mib software wont accept them.

Any solutions for this? Perhaps include more resolutions in the script or loose the restriction of only 2 export resolutions?

thanks

yox2019 commented 2 years ago

... this is the size of the image files that come with the firmware, not the display resolution, just extract the files from your firmware (startanim) and compare the size

jorrecob commented 2 years ago

@yox2019, i know, i'm not talking about the display resolution, but indeed about the resolutions of the startanim/startup_x png files of the firmware. The gimp plug-in only allows to export to the resolution 800x480 & 480x100. In my firmware i have other png's with other resolutions. Only the black backgound png (img_0.png) is 800x480. The 2 main files that we need to adapt to create a new bootscreen are 800x389 & 364x90 pixels (eg: img_46.png & img_47.png)

image

image

mirin22 commented 2 years ago

I can't open the boot using Phyton script, I have to have the exact path to the folder, I used the path from the tutorial but it doesn't work.

mattcabb commented 2 years ago

Paths in the tutorial are just examples. They highly depend on the locations of the toolbox and .boot files. You need to point to the locations which are correctly for your PC.

jtomtos commented 2 years ago

@mattcabb thanks, I'll submit the script to repository as soon as I figure out how (I'm new one here :)). combine extract and convet in more complexity task for me now. I will look for tools to do it

@jorrecob screen resolution is not a tenet. it is only important that the width is even. I'll turn off this check. Label extraction will work only on base resolution 800x480.

mirin22 commented 2 years ago

can i have like this? I have it so saved.

/C:/mib-std2-pq-zrtoolbox/tools/extract-startup_6.boot.py

/C:/mib-std2-pq-zrtoolbox/tools/extract-startup_x.boot.py

jtomtos commented 2 years ago

small update.

lapuff commented 2 years ago

Hello, Thank you for your work @jtomtos. The solution you gave me is working fine. It takes time to do, but the result is satisfactory.

https://youtu.be/l0hsIHynx88

startup_7.zip

Someone have videos of the MIB 3 boot screens ?

lapuff commented 2 years ago

Here are two very simple small .bat to rename all files in .mib (to be executed from the source folder

mib convert.zip )

mattcabb commented 2 years ago

Someone have videos of the MIB 3 boot screens ?

Golf MK8: https://youtu.be/Alf9mKFwrV8?t=50 Octavia MK4: https://youtu.be/Fu5l8j2_Kjg?t=58