How to create a Motion Vector map

yeah , first thing i did was check the colorspace since both you and Akella got screwed by it :laughing:

new test
16 images camera rotates from -12 to 12 deg , animation has linear interpolation , vector png image is normalised + has raw view transform


1 Like

the watch’s CompressedArrayTexture is able to hold 200 textures with1024x1024 res in 2.18mb ?!

will experiment with it next :mag:

1 Like

@vis_prime Yeah, + mip levels it looks like :flushed: it’s a staggering difference! Also keen to dive into how these would be packed, if you find any good pointers let us know :blush:

tested ktx compressed texture array test

settings used

ktx_command = [
        "ktx", "create",
        "--format", "R8G8B8_UNORM",
        "--layers", str(len(files)), # total num of images
        "--encode", "basis-lz",  # Encoding method
        "--clevel", 1, # compression quality
        "--qlevel", 128, #quality
        "--assign-oetf", 'linear',
    ] 
(then append all the input image paths and the output ktx path)

Input : 180 color pngs and 180 motion vec pngs ;1024x1024res totaling 333MB

after ktx compression , output was
4.7mb color & 2.6MB vec ktx2 textures

observations:

  • if basis is not used the ktx texture is around 200mb
  • blocky shapes work best (that’s why i chose the phone model)
  • textures are upside down , so had to account for that in the vertex shader and displacement calc
  • compression artifacts are easily visible.
  • renderer.info.memory.textures says there’s just two textures in use even though one texture contains 180 images !

3 Likes

advanced solution to fix distortion on hard edges

might be useful for some one
https://x.com/ValigurskyM/status/1938613357625376809

It’s possible just Disocclusion with color clamping would work here: https://elopezr.com/temporal-aa-and-the-quest-for-the-holy-trail/… That’s what’s used here: https://playcanvas.vercel.app/#/graphics/taa A TAA without motion vectors. Color clamping solves the moving cube well enough.

2 Likes