Nikke-db / nikke-db-vue

nikke-db.pages.dev
Other
27 stars 5 forks source link

WebM export, transparent pixel issues #37

Open Nikke-db opened 2 months ago

Nikke-db commented 2 months ago

Tested on : A2's action animation & cinderella delight_02 animation.

Transparent pixels seems to not keep their alpha value when exported to webm. The transparent pixels looks 100% opaque and render some animations rough on the edges or pretty much ugly when exported.

@digisomni do you have ideas on how to fix this issue? would setting a background color to the webm fix these transparent pixels or just an option to add to your code? help would be appreciated 😃 .

Koshirei commented 2 months ago

first fix in 8c54deb where the webm now uses the page's background color for the canvas background color

digisomni commented 2 months ago

你好。 I didn't get to check it as of yet, but I'd be confused as to why some animations have the problem and others don't? Did what you pushed fix it in its entirety or what issues do you still see?

Koshirei commented 2 months ago

for now the fix is global and every webm will have a background color. it seems the transparent pixels act differently depending on the software, in VLC they are broken but in discord they aren't. I feel it is better to fix them this way, at the cost of no transparent background

ShakaCan commented 2 months ago

Is it possible to also include the transparent method?

Koshirei commented 2 months ago

Added a switch that enables background coloring for webm or not.

ShakaCan commented 2 months ago

Added a switch that enables background coloring for webm or not.

Ty I see it now, you guys are doing gods work! Keep it up!

That-Ruben commented 1 month ago

Any webm I exported has been a blank video so far. Not sure if I'm missing something, or if something goes wrong. I'm not familiar with the code here, so I don't really know what could cause this behavior. As far as I'm aware I shouldn't have anything running in the background that would interfere with this process.

I also tried in an Incognito window to see if it was any browser extension.

The same behavior occurs whether I select color or transparent

animation_frames_1717139933217.webm animation_frames_1717140052917.webm

animation_frames_1717146760796.webm

Koshirei commented 1 month ago

After testing out the feature myself, it might be due to the High Quality option. can you retry a record using the Low Quality assets? ( click on the HQ Assets button and retry an export ) on my end the export was pretty laggy, I guess exporting requires too much processing power for High Quality assets since the canvas have quite a massive size.

if in low quality it still doesn't work, could you send me details about the web browser you are using?

That-Ruben commented 1 month ago

Hey thanks for your reply My technical knowledge about this is poor, so I didn't want to open a separate issue for it.

The LQ Export works! LQ__animation_frames_1717228012819.webm HQ__animation_frames_1717228061172.webm

Regarding processing, the HQ export does take slightly longer, but I don't know if this is using CPU or GPU. It happens a bit too quickly for me to check. (My system: i9 14400, rtx 4080 super)

And as far as I can tell with my eyes, the difference in quality isn't too great image

Koshirei commented 1 month ago

glad the LQ works. I'll try to make the LQ be the default mode during an export one day.