Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

The changes have been made! See:

https://wunkolo.itch.io/pixmap/devlog/844001/bmap-compatibility

Fantastic! Works very great. Thank you ☺

(1 edit)

Great work, anyway there's one last thing wrong with PixMap compared to B.Map, it's the coordinate mapping. The B.Map correctly maps UV coordinates to pixel position, while PixMap does not take account for the half-pixel offset in the UV space, as the center of first pixel is 0.5/Dimensions.

The correct formula for mapping pixel index coordinates XY starting from [0, 0] to UV is [U, V] = [(X+0.5)/Width, (Y+0.5)/Height]
And for mapping of UV to XY is [X, Y] = [U*Width-0.5, V*Height-0.5]. Width and Height are the dimensions of sampled texture as 1920x1080.

Basically the UV coordinates start from edge to edge, that's why first pixel center has a value of 0.5/dimensions and pixel coordinates start from the center of first pixel.

(2 edits) (+1)

Yep! I get ya. I haven't gotten to it just yet due to some other priorities right now for this time of the year but I'll get to it! In this case, After Effect's built in sampler function considers the origin of the pixel at the top-left of the Texel. And it just needs a (0.5, 0.5) texel-offset (0.5/width,  0.5/height).

https://ae-plugins.docsforadobe.dev/effect-details/tips-tricks.html?where-s-the-center-of-a-pixel#where-s-the-center-of-a-pixel

https://ae-plugins.docsforadobe.dev/effect-details/graphics-utility-suites.html#...