so… i’ve been using LWJGL for a while now… and before that JOGL… xD… im trying to “upgrade” to jmonkey now, but it’s proving to be harder than the transition from JOGL to LWJGL…
for the life of me, i cant figure out how to use VBOs in jmonkey, i’ve looked at thousands of tutorials/codes/examples… and all i find is old references to VBOInfo()… i kinda gave up on jmonkey since it’s really slow compared to VBO rendering and went back to LWJGL…
then i found this other engine, called “Ardor3d” and it had AWESOME demos, like, seriously, AWESOME… it explained a lot… and i saw one that was VBO, then i figure if an engine that seems more incomplete than jmonkey can do this so simply, then why the hell cant i find how to do it in jmonkey? is it SO simple that it’s nowhere explained? (and i really cant figure out java docs -.-)
anywayz, an insight on this would be very helpful… cheers…
PD:
and i dont want to compare engines but look at this demos:
ardor3d.com - This website is for sale! - ardor3d ardor Java engine jmonkeyengine jmonkey lwjgl jogl Resources and Information.
why jmonkey doesnt have something like this? it’s so simple yet so easy to learn from…
edit:
JME3 uses VBOs by default, no need to enable them.
About the demos, it can be found here for web start http://jmonkeyengine.com/demo/webstart/ and here for applet http://jmonkeyengine.com/demo/applet/. They come with the SDK too, just create a jMETests project or checkout it from the SVN. About the VBO and javadocs, just look at this http://hub.jmonkeyengine.org/javadoc/com/jme3/renderer/android/OGLESShaderRenderer.html ;).
i just said i cant understand javadocs but thx for the reply anywayz i guess…
i could try finding some reference to that renderer, but it’s for android (?)
and i knew thouse demos existed, and i saw them already a millon times, none of them are helpful problem is most of them are criptic implementations of things i dont even need… instead of simple, consise and “to the point” demos… when u add too much content to a demo, the actual code that you need to understand is burried under layers of “cool stuff” that you dont really care for xD
(some of them are nice though)
ardor3d does VBOs with ONE line of code:
sphereBase.getSceneHints().setDataMode(DataMode.VBO);
sphereBase is a node that contains many sphere meshes.
cant jmonkey do a similar thing?
OH. Yes, that’s for android xD. I’m not a mesh expert, but maybe is it what are you looking for? http://hub.jmonkeyengine.org/javadoc/com/jme3/scene/Mesh.html#setBuffer(com.jme3.scene.VertexBuffer.Type, int, byte[]). Also, take a look at this https://wiki.jmonkeyengine.org/legacy/doku.php/compare-jme2-jme3#geometry_handling for vertex buffers.
EDIT: The first link is about the setBuffer() method.
Hey, take a look at this class and look for vbo http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/lwjgl/com/jme3/renderer/lwjgl/LwjglRenderer.java. This option is disabled, Do not ask me why :)!
Ops, the link is this http://www.google.com/codesearch#Z8vJL-JqpQ0/trunk/engine/src/jogl/com/jme3/renderer/jogl/JoglRenderer.java&q=vbo%20package:http://jmonkeyengine\.googlecode\.com
i was looking at VertexBuffer.Type a sec ago… but i cant figure it out… setBuffer might be what im looking for…
the geometry handling link i already had seen, it’s a comparison between jme2 and 3 and supposely jme3 supports vbo with shaders… but how the hell do i use VBOs in JME3? xD
and the LWJGLRenderer is too long for me to understand right now… doesnt seems to have anything usefull though,…
that last link seems to be a guy using a mix between JOGL and JME3… all the VBO references correspond to JOGL calls… i can do that easily, but it’s using JOGL, not JME3…
well… its actually using the JOGL renderer inside JME3, still, it’s not JME per se… there also seems to be a LWJGL renderer…
Ok. I don’t know if jme does such thing, but jme does have a method for optimizing geometries. It’s called GeometryBatchFactory.optimize();
jme2 did it… with VBOInfo… i find it very hard to believe JME3 no longer does this in a simple and clear manner…
thx for your help though mate… and hope someone else can answer my question…
cheers…
Maybe the jME3 creator ( @Momoko_Fan ) answer your ask ;).
Its not supported. You are not supposed to mess with such low level things in jME3 anyway, when theres a pipeline using VBO’s you will be able to enable it using one line of code. If you come from jME2 maybe you want to try Ardor, its basically jME 2.5, a branch of the jME2 engine.
i see… so what type of pipelines in JME3 support VBOs? can you direct me to a simple example too? it would be greatly appresiated…
i think im falling in love with jmonkey… why didnt u just tell me i can make a mesh and make it dynamic? aint that throwing it into a VBO?
am i wrong here? can i make a mesh and have it render thru VBOs?
(setting a mesh as dynamic or static doesnt seem to do the trick, neither changing the “mode”, though im overloading the rootnode with individual meshes, around 10k…)
Whats the issue? How about you code your game and care about these things later when you actually have performance issues? I told you theres no VBO.
i figured out, quite by mistake, that a mesh has a setdynamic and a setstatic and that they are supposed to “optimize” and make it faster if they are set to static… though i cant see the difference… it might be becuz i have 10k objects xD anywayz…
i already have performance issues in case you cant read… and i dont appresiate condescending actitude…
my issue is that im making a game engine from scratch in LWJGL and im trying to figure out if jmonkey didnt already did all this things for me and i should switch to it instead of doing all the work that it’s actually already been done
if there is such a pipeline in JME3 that can use VBOs, i would appresiate someone to enlighten me as to which it is, since i’ve spent DAYS trying to figure out if jmonkey is the right choise for me… i didnt just drop into the forums and tried to squeeze fast info, i’ve been searching the forums, the wiki, the demos, the tutorials, google and even other ppls code… (A LOT OF CODE)… this is a last resort for me… i rarely post in forums since the answers i seek have usually already been asked and are available… that’s why im so perplexed as to why this has never been asked or explained anywhere, how to use VBOs in JME3…
thanks again in advance…
10k objects is a lot of objects no matter what you do. Can I ask why you have so many objects?
Reducing those would be step one in optimization before anything else, I think. 10k VBOs is still going to suck pretty badly.