[WIP] SkyBerron Env Mapping

Lastest Pico 8 releases added built in texture mapping capabilities! :smile:

tline x0 y0 x1 y1 mx my [mdx mdy]

  Draw a textured line from (x0,y0) to (x1,y1), sampling colour values from the map.

  mx, my are map coordinates to sample from, given in tiles.
  Colour values are sampled from the 8x8 sprite present at each map tile.

This function allows very interesting effects running @30fps: 3d Environment/Material Mapping

I just wanted to know how fast is SBDL texture mapping on Cortex M0+ against Pico 8 :thinking:

SkyBerron Bunny.bin.4

SkyBerron Bunny.bin.3

SkyBerron Bunny.bin (114.8 KB)

Only 20fps? It seems SBDL texture mapping needs some serious boosting :face_with_raised_eyebrow:

6 Likes

Looks gorgeous!
Isn’t Pico-8 128x128? Pokitto has more pixels to render.

2 Likes

Really eyecatcher!

What texture are you using? I’m clearly see a person head and some kind of church environment…
Where could live a shiny silver rabbit?

Spherical environment mapping cannot use directly pictures taken with a camera. I know (or at least I knew) how to generate spherical maps using POV Ray, which may be useful for some synthetic reflections. But I don’t know how to craft spherical maps from standard pictures.

As this was going to be a simple speed test, I just googled around and found several different textures suitable for testing. It seems that the lower the detail, the better, and also having areas with strong light also help. I packed some 128x128 8bpp textures in the binary, just use up/down to switch texture.

FinalResult_128x128
SkyBerron Bunny.bin.2
Unknown_7_128x128
SkyBerron Bunny.bin.3
liquid_chrome_purple_128x128
SkyBerron Bunny.bin.4
90404-stpeters_probe_128x128
SkyBerron Bunny.bin.5
env_map_128x128
SkyBerron Bunny.bin.6

5 Likes