Comments (9)
@waverider404 maybe you didn't configure num bones properly, see #6
BTW, it would be nice to create another issue next time. Since it may be not related to unsigned short indices.
from gdx-gltf.
indeed, model cache is not compatible with more than 32k vertices for now. I'm working on a libgdx PR : libgdx/libgdx#5925 which will fix it once merged.
For now, you should either keep max 32k vertices or don't use model cache.
I could add a compatible mesh cache in this repository if my PR get rejected or delayed, so we can let this issue opened until then.
from gdx-gltf.
Unsigned short indices are supported but still experimental
This message is just a warning.
I'm able to load your file with the demo/viewer :
@waverider404 Could you please give more information: What's your issue precisely? any stacktrace or relevent error message? which platform? which gdx-gltf version?
from gdx-gltf.
Sorry I just received the message, I am using the gltf-master-SNAPSHOT
from gdx-gltf.
Exception in thread "LWJGL Application" java.lang.ArrayIndexOutOfBoundsException
at com.badlogic.gdx.utils.FloatArray.addAll(FloatArray.java:126)
at com.badlogic.gdx.graphics.g3d.utils.MeshBuilder.addVertex(MeshBuilder.java:503)
at com.badlogic.gdx.graphics.g3d.utils.MeshBuilder.addMesh(MeshBuilder.java:775)
at com.badlogic.gdx.graphics.g3d.utils.MeshBuilder.addMesh(MeshBuilder.java:755)
at com.badlogic.gdx.graphics.g3d.ModelCache.end(ModelCache.java:299)
at com.mygdx.game.MyGdxGame.create(MyGdxGame.java:113)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:151)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:128)
from gdx-gltf.
Here is my code
`
@Override
public void create() {
Bullet.init();
btCollisionObject groundObject = new btCollisionObject();
CharSequence str = groundObject.toString();
System.out.println(str);
environment = new Environment();
environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.4f, 0.4f, 0.4f, 1f));
environment.add(new DirectionalLight().set(0.8f, 0.8f, 0.8f, -1f, -0.8f, -0.2f));
modelBatch = new ModelBatch();
cam = new PerspectiveCamera(67, Gdx.graphics.getWidth(), Gdx.graphics.getHeight());
cam.position.set(10f, 10f, 10f);
cam.lookAt(0,0,0);
cam.near = 1f;
cam.far = 300f;
cam.update();
SceneAsset model_asset = new GLBLoader().load(Gdx.files.internal("grass.glb"));
double range = 80;
int count = 300*10;
for (int index = 0; index < count; index++) {
double x = (range / 2) - (Math.random() * range);
double z = (range / 2) - (Math.random() * range);
this.instance = new ModelInstance(model_asset.scene);
this.instance.transform.setTranslation((float) x, 1.0f, (float) z);
this.instance.transform.scale(8.5f, 8.5f, 8.5f);
this.trees.add(this.instance);
}
Texture texture = new Texture(Gdx.files.internal("badlogic.jpg"));
SceneAsset room_asset = new GLBLoader().load(Gdx.files.internal("room.glb"));
ModelBuilder modelBuilder = new ModelBuilder();
model = modelBuilder.createBox(5f, 5f, 5f,
new Material(TextureAttribute.createDiffuse(texture)),
Usage.Position | Usage.Normal | Usage.TextureCoordinates);
ModelInstance boxInstance = new ModelInstance(room_asset.scene);
this.trees.add(boxInstance);
treeCache = new ModelCache();
treeCache.begin();
treeCache.add(trees);
treeCache.end();
camController = new CameraInputController(cam);
Gdx.input.setInputProcessor(camController);
}
`
from gdx-gltf.
that will be awesome!!
from gdx-gltf.
Skinned model looks distorted when I animate them :(
model file : https://cdn.glitch.com/ca440387-5ef4-4401-a707-6a988d4e8bc5%2Fcynthia.glb?v=1585537867699
from gdx-gltf.
libgdx/libgdx#5925 has been merged, it's now possible to use ModelCache with libgdx 1.9.11-SNAPSHOT.
from gdx-gltf.
Related Issues (20)
- Model loading error: "Cannot read field "size" because "group" is null"
- Cascade Shadow Map shows shadow "clamping" when enabled HOT 1
- The GlbExporter is missing. HOT 5
- Ability to use custom DirectionalShadowLight into CascadeShadowMap
- Systematic OpenGL error when using unlit material in combination with CSM
- Cannot use pattern matching in instanceof due to "sourceCompatibility = 1.8" in gradle build HOT 1
- Native memory leak: pixmaps are never released HOT 4
- IBL: ability to create different sized maps for Skybox and radiance HOT 1
- Specular color texture is never passed to the PBR shader HOT 2
- Android error on reading gltf files when minify is enabled HOT 5
- the android module is disabled and app can not run success
- Model transparent sorting HOT 1
- RFE: Implement support for C_UINT, unsigned integer indices
- GLTF extensions: KHR_mesh_quantization
- Fix Cascaded Shadow Maps on WebGL HOT 2
- SkyBox exception HOT 1
- MeshLoader. Add model file name to message [suggestion] HOT 1
- Add support for hiding mesh parts HOT 1
- Ability to pass a custom RenderableSorter to TransmissionSource batch
- Pixmaps: novel about unpredictable disposing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gdx-gltf.