What is the meaning of this exception and how to prevent it?

what is the meaning of this exception and how to prevent it?

java.lang.UnsupportedOperationException: The geometry Flame (ParticleEmitter) buffer TexCoord has different number of components than the rest of the meshes (this: 4, expected: 2)
	at jme3tools.optimize.GeometryBatchFactory.mergeGeometries(GeometryBatchFactory.java:141)
	at logic.translation.navmesh.NavMeshState.createNavMesh(NavMeshState.java:141)
	at logic.translation.navmesh.NavMeshState.<init>(NavMeshState.java:50)

Something is wrong with your Particle Emitter:

  1. You don’t want your Particle Emitter to be part of the Nav Mesh
  2. For batching you need geometries which are comparable (have the same texcoord dimension)
  3. Usually you have UV Maps consisting of x/y cooridnates, but your particle emitter uses 4, which to me seems uncommon, but could be a fancy shader thing. Either way doesn’t matter because of 1.
1 Like

I have never tried to batch an emitter, but it doesn’t sound like it would work well, perhaps this is your issue?

1 Like

I try to generate navmesh from rootNode and it throws this exception…

Problem 1: you are generating a navmesh from root node.

Basically, you are saying “I want to make a nav mesh of every particle, every blade of grass, every dangling piece of hair, every piece of paper on the table, every torch on the wall, etc…”

Hopefully you can see how ridiculous that sounds.

You need to make a nav mesh from only the navigable parts of your scene.


There is your problem right there.

you will need to generate your nav mesh from your actual level geometry, not the entire scene.

1 Like

is it possible to make navigtion mesh without batching?

or adding geometry for bounding boxes and batching them to terrain and make navmesh?

there is buildings and landscape in the scene.
some of building are on fire and may explode.
some of the buildings fall down after explosion and I make its animation by bones an I think it have problem in batching too…

What is your opinion about making geometry from buildings bounding box and batching them with the terrain and generate nav mesh?

I haven’t used jME nav mesh before, but if I were in your shoes, I would be thinking about making a new mesh, that is not displayed, only for navigation. I would make this mesh based on the level information (buildings, explosions, trees …)

1 Like