1
Support / Unexpected Texture rendering.
« on: October 05, 2013, 01:12:16 pm »
Hello,
I am trying to add a texture to a sphere (PlanetTexture1.png attached) but I find that it is rendered a plain green as in the screenshot (Screenshot.png also attached). Here is the code I am using:
Texture Manager:
planet1Texture = new Texture(assetManager.open("PlanetTexture1.png"));
TextureManager.getInstance().addTexture("PlanetTexture1.png", planet1Texture);
The model object:
planet1 = Primitives.getSphere(5.0f);
SimpleVector planetPos = new SimpleVector();
planetPos.set(25, 0, 30);
planet1.setOrigin(planetPos);
planet1.setTexture(ti1);
planet1.build();
planet1.strip();
world.addObject(planet1);
Add texture to model:
TextureInfo ti1 = new TextureInfo(TextureManager.getInstance().getTextureID("PlanetTexture1.png"));
What do I need to add to get that texture rendered as I would see it in the png file?
[attachment deleted by admin]
I am trying to add a texture to a sphere (PlanetTexture1.png attached) but I find that it is rendered a plain green as in the screenshot (Screenshot.png also attached). Here is the code I am using:
Texture Manager:
planet1Texture = new Texture(assetManager.open("PlanetTexture1.png"));
TextureManager.getInstance().addTexture("PlanetTexture1.png", planet1Texture);
The model object:
planet1 = Primitives.getSphere(5.0f);
SimpleVector planetPos = new SimpleVector();
planetPos.set(25, 0, 30);
planet1.setOrigin(planetPos);
planet1.setTexture(ti1);
planet1.build();
planet1.strip();
world.addObject(planet1);
Add texture to model:
TextureInfo ti1 = new TextureInfo(TextureManager.getInstance().getTextureID("PlanetTexture1.png"));
What do I need to add to get that texture rendered as I would see it in the png file?
[attachment deleted by admin]