Converting SkyBox to Sky Sphere Cubemap Texture
Attention! 👉Starting November 2024, BlitzCoder.org will now be BlitzBasic.org.
Tweet blitz3d maps tutorials
A quick guide in converting your 6 texture skybox to a single cubic map for sky sphere.
Setup:
East (Back) South (Right) West (Front) North (Left) — Flip Vertical each.
Down and Up — Flip Horizontal each
then create your sky mesh, in the setup above it is configured to texture a Sphere primitive preferably low poly for optimization.
sky = CreateSphere(5) ; low poly sphere
ScaleEntity sky, -1000, -1000, -1000 ; scale and flip
EntityTexture sky, LoadTexture("sky.png", 128 + 256) ; cubic environment map and load in vram
EntityFX sky, 1 + 8 ; full bright and disable fog
Hi Ron,
Thanks for this. I didn't realize you have to flip the poles horizontal.
Hey Mark, yes this is actually for a quick setup or lesser code using negative scaled or flipped Sphere primitive without the usual and manually building the quads.
I recently found this out while testing out some optimization techniques and trying to find a simpler way to setup skybox with cubemaps code wise.
I can't find any quick way or reference except for the SetCubeMode example which does the common 6 quad cube setup.
Reply To Topic (minimum 10 characters)
Please log in to reply