Is VBO applicable to animated object?

For my project, the performace is always a big problem.

Of course, it's because of my lack of knowledge about 3D / jme engine.

When I first applied VBO and Display List (locking meshes) to static objects,

it gaves me a lot of performance boost.

After suppressing skin update of culled objects, I went one step further.

Now I doubt the animated objects as the bottleneck.

I am guessing if VBO is applicable to animated object, performance will be better.

Is it possible?

Then please show me the way to performance-free world.  XD :lol:



thanks in advance




VBO only works for static, unanimated models. You'll have to come up with something different…

What kind of animation controller do you use for your animated objects?

Well to be fair, in jME it only works for static unanimated models.



In OpenGL you can actually update VBOs if they are of a certain type, but it's a manual process. Also if you change something every frame, it would make little sense to do this.

It would be very easy for JME to update it to use multiple types of VBOs, I don't know why they don't… I would do it myself, but I still can't get JME 2 compiled(or haven't had the time…)!

hevee said:

VBO only works for static, unanimated models. You'll have to come up with something different...
What kind of animation controller do you use for your animated objects?

I'm just using AnimationController and BoneAnimation without frame interpolation.

llama said:

Well to be fair, in jME it only works for static unanimated models.

In OpenGL you can actually update VBOs if they are of a certain type, but it's a manual process. Also if you change something every frame, it would make little sense to do this.

According to the OpenGL specification, (http://www.songho.ca/opengl/gl_vbo.html)
there is glMapBufferARB() and it allows updating vertex buffer.
Can it give me some performance improvement?
Or should I use GPU skinning to get performance improvement?

Using OgreLoader I was able to get about 1000 characters on screen at 30 fps. The techniques used were adaptive frameskip, hardware skinning, and indexed level of detail. VBO was applied on vertex, normal, and texture coordinate buffers to improve performance.

See this thread: http://www.jmonkeyengine.com/jmeforum/index.php?topic=9097.0

Thank you very much.  :slight_smile:

I read it yesterday. But I can't get OgreLoader 1.0.

It cannot be decompressed.



I checked out your radakan  project. But I can't make it run.

I think I should have a close look at radakan and OgreLoader.

It should open with 7-zip, try that.

You mean http://www.7-zip.org/ ?

I have tried v 4.57 and v 4.60 beta but nothing works for me.

My "OgreLoader1.0.zip" file has 272,774 bytes.

I updated OgreLoader, check the thread, this time I used the default compression settings. I am using 7-zip version 4.57. Hopefully it'll work now  :expressionless:

I appreciate your fast reply.

Now it works well.  :-o

mulova said:

hevee said:

VBO only works for static, unanimated models. You'll have to come up with something different...
What kind of animation controller do you use for your animated objects?

I'm just using AnimationController and BoneAnimation without frame interpolation.

llama said:

Well to be fair, in jME it only works for static unanimated models.

In OpenGL you can actually update VBOs if they are of a certain type, but it's a manual process. Also if you change something every frame, it would make little sense to do this.

According to the OpenGL specification, (http://www.songho.ca/opengl/gl_vbo.html)
there is glMapBufferARB() and it allows updating vertex buffer.
Can it give me some performance improvement?
Or should I use GPU skinning to get performance improvement?



Yes, like I say, it's possible. There's just no support to jME right now to update VBOs using glMapBufferARB(). (or to update textures for that matter). Several people have been throwing around ideas about it so let's hope they put them into code.

I also have an implementation of software skinning using mapped VBO buffers, see:



http://code.google.com/p/vlengine/source/browse/trunk/vle_cleanup/src/com/vlengine/scene/animation/x/XSoftSkinner.java



and



http://code.google.com/p/vlengine/source/browse/trunk/vle_cleanup/src/com/vlengine/renderer/lwjgl/LWJGLRenderer.java#1133

Thanks llama!  XD

Thanks vear!  :-o

I'm always very thankful for the sharing of great knowledge of you guys.

So impressive.



Last time, I downloaded your mod version of jme and ran some test.

I was very happy to hear that your modded jme has good performance

I wanted to use it, but my project has gone too far.

Now I'll reopen your project and investigate codes.



I hope jme pay more attention to the animation system 'cause it affects performance.

Momoko_Fan said:

The techniques used were adaptive frameskip, hardware skinning, and indexed level of detail. VBO was applied on vertex, normal, and texture coordinate buffers to improve performance.


Nowadays, I am working on hardware skinning. But currently got no performance boost. so bad  :'(
So I applied VBO to skinned geometry by geometry.setVBOInfo().
But failed to set VBO.
What's wrong with this?


org.lwjgl.opengl.OpenGLException: Cannot use Buffers when Array Buffer Object is enabled
   at org.lwjgl.opengl.GLChecks.ensureArrayVBOdisabled(GLChecks.java:90)
   at org.lwjgl.opengl.ARBVertexProgram.glVertexAttribPointerARB(ARBVertexProgram.java:193)
   at com.jme.scene.state.lwjgl.shader.LWJGLShaderUtil.updateShaderAttribute(LWJGLShaderUtil.java:267)
   at com.jme.scene.state.lwjgl.shader.LWJGLShaderUtil.updateShaderAttribute(LWJGLShaderUtil.java:236)
   at com.jme.scene.state.lwjgl.LWJGLShaderObjectsState.apply(LWJGLShaderObjectsState.java:341)
   at com.jme.renderer.lwjgl.LWJGLRenderer.applyStates(LWJGLRenderer.java:1725)
   at com.jme.renderer.lwjgl.LWJGLRenderer.draw(LWJGLRenderer.java:961)
   at com.jme.scene.TriMesh.draw(TriMesh.java:240)
   at com.jme.scene.Spatial.onDraw(Spatial.java:411)

I think above error is caused by index/weight buffer attributes for skinning.

To use vbo for index/weight attributes, should I modify LWJGLRenderer?

Dont know why the above error appeared, it shouldnt, but you cant use VBO for shader attributes in current jME. A workaround is to pass your attributes in some of the texture coordinates, and not as shader attributes, you can use VBO for the texture coordinates.



VBO for shader vertex attributes is working in my branched version.

Thanks. I'll try that.  :smiley: