Skip to content

feat: KTX textures & conversion support #3875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 13, 2025

Conversation

mihakrajnc
Copy link
Contributor

@mihakrajnc mihakrajnc commented Apr 7, 2025

Pull Request Description

We now convert all remote textures to a GPU friendly format (KTX2), with our new dapps converter. Each texture that is requested directly from a remote URL is routed through the converter which will return a KTX texture instead of the original (png / jpg / gif / svg). If the requested image is an animation such as gif, the converter will produce an MP4 video (support for that will be in a separate PR). All conversions are cached on the server - first conversion might take a while but after that it's practically instantaneous.

What does this PR change?

GetTextureWebRequest, which handles all remote textures, will now route url's through our dapps converter.

closes #3273
clases #3200

Test Instructions

Ensure all NFT images (including on the popup) display correctly (minus gifs / videos), and that the server conversion doesn't lock up when there are many requests.
This is also a very good opportunity to use Charles and monitor requests to https://media-opticonverter.decentraland.org, you'll be able to quickly see if the requests are being processed properly.

Test Steps

  1. Open Explorer
  2. Verify that all remote images display correctly (e.g. displays in genesis plaza).
  3. Verify that SVG's are displayed correctly: These NFT tests all fail to show the basic CryptoKitties NFT #3273

Additional Testing Notes

  • When images are converted for the first time they can take a considerable amount of time. Try locations with many nft's that haven't been visited before, or ask dapps team (Nacho) to clear the cache.

Quality Checklist

  • Changes have been tested locally
  • Documentation has been updated (if required)
  • Performance impact has been considered
  • For SDK features: Test scene is included

Code Review Reference

Please review our Code Review Standards before submitting.

Copy link
Contributor

github-actions bot commented Apr 7, 2025

badge

New build in progress, come back later!

@mihakrajnc mihakrajnc added the force-build Used to trigger a build on draft PR label Apr 8, 2025
@mihakrajnc mihakrajnc changed the title feat: KTX textures and video conversion support feat: KTX textures & conversion support Apr 9, 2025
@mihakrajnc mihakrajnc removed the force-build Used to trigger a build on draft PR label Apr 9, 2025
@mihakrajnc mihakrajnc marked this pull request as ready for review April 9, 2025 20:07
@mihakrajnc mihakrajnc requested review from a team as code owners April 9, 2025 20:07
@mihakrajnc mihakrajnc force-pushed the feat/ktx_textures_and_video_support branch from e7b5b74 to 8309a22 Compare April 10, 2025 14:18
@mikhail-dcl mikhail-dcl self-requested a review April 11, 2025 10:00
Copy link
Contributor

@Ludmilafantaniella Ludmilafantaniella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Tested on both Windows and Mac.
The scene “Unity Café...” no contains any SVGs — it looks like they were already removed.
I was able to test the other scene located at 8,117, and everything looks good 👌

evidence

nonNFT.mp4

Also a smoke test was performed on other scenes with NFT to ensure that all images (including on the popup) display correctly.

  • Genesis Plaza (NFT HALLWAY)
  • Rapture Art Gallery
NFT.mp4

Regressions for this ticket had been performed in order to verify that the normal flow is working as expected:

  • ✔️ Backpack and wearables in world
  • ✔️ Emotes in world and in backpack
  • ✔️ Teleport with map/coordinates/Jump In
  • ✔️ Chat and multiplayer
  • ✔️ Profile card

@mihakrajnc mihakrajnc enabled auto-merge (squash) April 13, 2025 21:58
@mihakrajnc mihakrajnc merged commit f42c10b into dev Apr 13, 2025
6 checks passed
@mihakrajnc mihakrajnc deleted the feat/ktx_textures_and_video_support branch April 13, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

These NFT tests all fail to show the basic CryptoKitties NFT
3 participants