SkyBox does not work in Android

Hello!



This line works fine in Desktop, but not in Android.



Any ideas?



[java]this.rootNode.attachChild(SkyFactory.createSky(this.assetManager, "Textures/Sky/Bright/BrightSky.dds", false));[/java]



Thank you!

Seems that if I use SkyFactory with PNG file, I must set true for sphereMap, or I receive the error that cubeMapping must have 6 images…



If I use sphereMap, works in Android, but I need a sheremapped image, obviously…



Any workaround? Why dds file support cube mapping?

Because your DDS-file contains 6 images in a cube map. So you must have 6 PNG-images if you are to make a cube map for the sky, or else use a sky sphere if you have only one image. In both cases the actual images must be created for that purpose.



Check the javadoc for SkyFactory: http://hub.jmonkeyengine.org/javadoc/com/jme3/util/SkyFactory.html for the method to use when you have 6 images.

1 Like

The issue is that the DDS file in question uses DXT compression, which is a hardware-based compression. That means it will work on some devices but not in others (even on desktop). The recommendation is to use the SkyFactory method that takes 6 images, that way you can use e.g. JPEG images for the skybox. Another option is to create an uncompressed DDS file that has the cubemap, but that will take much more space than the former method.