java.nio.BufferOverflowException in the MikktspaceTangentGenerator

I have an exception when I try to apply MikktspaceTangentGenerator on the model from test-data asset:

Exception in thread "JavaFX Application Thread" java.nio.BufferOverflowException
	at java.nio.DirectFloatBufferU.put(DirectFloatBufferU.java:363)
	at java.nio.FloatBuffer.put(FloatBuffer.java:859)
	at com.jme3.util.mikktspace.MikkTSpaceImpl.setTSpaceBasic(MikkTSpaceImpl.java:82)
	at com.jme3.util.mikktspace.MikktspaceTangentGenerator.genTangSpace(MikktspaceTangentGenerator.java:222)
	at com.jme3.util.mikktspace.MikktspaceTangentGenerator.genTangSpaceDefault(MikktspaceTangentGenerator.java:92)
	at com.jme3.util.mikktspace.MikktspaceTangentGenerator.generate(MikktspaceTangentGenerator.java:84)
	at com.ss.editor.model.tool.TangentGenerator.useMikktspaceGenerator(Unknown Source)

I also have the same exception with the model:

and:

and:

mhh ok… I will test that

fixed

Thanks for reporting

Great! :slight_smile: