#New 0.11 Skybox Component

31 messages · Page 1 of 1 (latest)

indigo breach
#

What is the right way to add a Skybox? I try to load .PNG cubemap image but it doesn't work.

#

Also I try .ktx2 but result is same

left heron
#

did you copy the asset_loaded system from the skybox example?

indigo breach
#

No

#

By the way bevy_mod_environment_map_tool also wont work 😦

left heron
#

sorry, I don't know what that is

#

but for the original issue. Copying the asset_loaded system is a bit overkill I guess since you probably don't need multiple cubemaps but you can probably adapt it to suit your need

storm ibex
indigo breach
#

I converted my skybox PNG image to cubemap skybox PNG image then convert it to ktx2 and it still wont work

#

I think i need to compress ktx2 file somehow but dont know how

storm ibex
#

It says you supplied a D2 texture, which is a typical 2d texture. So assuming you converted it right, bevy isint recognizing that it's a cube map or something.

indigo breach
#

Hm, Ok. So what parameters should I use? I tried --zcmp and bcmp but they didn't work

left heron
#

that's why I talked about the asset_loaded system it converts the texture to a cube because pngs don't know they are a cubemap. Although, it shouldn't be an issue with ktx2 I think

indigo breach
#

I already converted PNG to KTX2

feral prairie
indigo breach
#

Ohh, for a ktx2 image, you also need to specify TextureViewDimension::Cube?

feral prairie
#

I'm not sure about that, the comments in the example imply that you might not have to?

#

I've never used ktx2 before though

indigo breach
#

It is very strange that no one uses ktx 2 skyboxes. This seems to be a good feature, but in practice it does not work

#

Sad 😦

feral prairie
#

You could try implementing the section from that example that reinterprets the image as an array and changes it to a Cube TextureViewDimension and see if that fixes it.

#

I had the same error message as you until I did that.

indigo breach
#

PNG skyboxes are pretty slow, ktx2 are much faster but i never see anyone implement them in their game

storm ibex
#

I used some ktx2 skyboxes while developing this feature. It worked fine. Same with the example code.

#

Iirc you can find the commands we used to generate the skybox in the repo somewhere, under assets.

#

Although wait nvm, that might only be for environment map light.

indigo breach
#

Can you please me write full pipeline form png to ktx2?

indigo breach
storm ibex
storm ibex
indigo breach
#

It's too complicated, I recently asked for binaries for this program, but no one had them