SkyFactory flipping textures on X

Is it just me or do the nightly SkyFactory flip the textures on the X-axis?



Unless I pass -1 to the normal scale the textures looks mirrored :slight_smile:



[java]

Texture westTex = assetManager.loadTexture("Textures/sky/west.jpg");

Texture eastTex = assetManager.loadTexture("Textures/sky/east.jpg");

Texture northTex = assetManager.loadTexture("Textures/sky/north.jpg");

Texture southTex = assetManager.loadTexture("Textures/sky/south.jpg");

Texture upTex = assetManager.loadTexture("Textures/sky/top.jpg");

Texture downTex = assetManager.loadTexture("Textures/sky/bottom.jpg");

Vector3f normal = new Vector3f(-1, 1, 1) ;

Spatial sky = SkyFactory.createSky(assetManager, westTex, eastTex, northTex, southTex, upTex, downTex, normal);

[/java]

Yea they can end up flipped, but the SDK will allow you to flip them back when you use the skybox wizard.

TestSkyLoading runs just fine, so nothing changed?

your normal is not normalized, can that be it? Edit: err wait… its not a normal, its the scale ^^

Don’t know if something has changed or not but here are the assets and source for my testcase



It looks like the textures are applied on the outside of the skybox and I see them from inside, maybe this is per design although I didn’t expect it :slight_smile:

Did this ever work correctly? The normals we get from the sphere are what is used to read the cubemap, so we may need to flip them at that point or compute the normals initially flipped …

1 Like

Don’t know if the question was directed to me or in general but I’m rather new to jME and this is my first attempt at using the SkyFactory so I can’t answer :slight_smile: But using the sphere normals would explain “seeing the backside” of the textures.

When I flipped the normals of the sphere, it was correct on the X axis, but flipped on the Y and Z axes. So it seems it might be necessary to actually flip the normal’s X axis in the shader itself.