i used this code to render an object created in Blender 2.8. But my object is not rendering. I also tried to use the libgdx-fbxconv-gui to convert my fbx file to an g3db file. In the libgdx-fbxconv-gui software my model is rendering like it should be. Do you have any suggestions? I also tried some other models which i found in the g3db format. They are showing properly with the same code.
1 Answers
3
votes
So I found out that blender sets the opacity in the materials to 0. You can change it back with this code:
Model model = modelLoader.loadModel(Gdx.files.getFileHandle(path, Files.FileType.Internal));
for (Material m : model.materials) {
m.set(new BlendingAttribute(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA));
}