yeah i know, that’s why i was trying to do a different test now, but the freaking asset folder aint playing nicely with me it just wont let me load some textures, anywayz…
according to this post:
http://hub.jmonkeyengine.org/groups/effects/forum/topic/jme2-shaders-and-vbos-do-not-play-nicely/
unless i dont understand it properly, it implies that VBOs and shaders work well together in JME3… i’ve been bumping my head against the wall ever since xD
Are you using JMP or another IDE? Asset folder “just works” unless you miss something simple. For another IDE, you have to make sure it is in the classpath or register a locator manually.
ah cr@p… im missing the classpath… thx… lol xD… anywayz… back to VBOs is there anything resembling a VBO in jmonkey3?
else i dont think i will be able to use it, unless i can hack my way thru the lower renderers and force some sort of VBO rendering…
though i think that would defeat the purpose of using jmonkey as a game engine… though i would still have all the other shiny gadgets… most of them i could implement myself… (though it takes time…)
If you appreciate it or not, instead of looking for solutions for “VBO” you should look for solutions to improve your general game performance. 10k objects is just not the way and we give many hints on how to optimize the scene that are easy to find if you don’t search for “VBO” only. That said, I also think you don’t have a performance issue with getting the meshes displayed or rendering the textures, its probably more about shader switches due to the single objects in which case VBO doesn’t help you either.
I don’t know. I only render 2000 objects (400 of which are potentially dynamic) with a million vertices or so… so I’ve never really needed VBOs.
So I can’t answer, really. You can go super far without them.
ive made a lot of tests in LWJGL and JOGL, and in JOGL vertex arrays and objects seems like almost the same, and in some cases arrays are even faster… but in LWJGL, the transition from vertex arrays into VBOs was like jumping light years ahead… i jumped from 60 FPS to 400 FPS… in a REALLY slow computer… on a quad core, i reach over 1600 FPS, which is a LOT considering the ammount of vertices im actually rendering…
so im concerned about it, if JME3 doesnt support VBOs, i might stick with LWJGL…
(and yes, 10k objects is an abuse, obviously i was trying to stress the engine since i dont properly understand it yet)
so your saying your rendering over a millon vertices(x,y,z i assume ur in a 3d enviroment) distributed along 2000 objects? at what FPS?
Depends on the card and where you are. On my card, I can render that at over 100 FPS.
http://mythruna.com/ is the game.
i see… yes… that is quite the game, shame it crashes on my old computer, but on the quad core it runs at about 100 fps like you said…
i just went ahead and upped the bet… i set the LWJGL test to render 2.400.000 vertices… and it’s rendering at 50 fps constant on a 7 year old computer… it will probably fly on the quad core, but im too lazy to compile it xD…
the thing about vertex arrays is they are constantly sending the info to the GPU even if it’s static info… or so i’ve been lead to believe, if im wrong here, by all means correct me…
this is a huge waste…
if i try to render the 2.400.000 vertices on vertex arrays on LWJGL, it slugs around between 1 and 10 FPS… on the old computer… not sure on the quad core though…
Again, jME3’s scene graph works at a completely different level, how the data is stored in OpenGL is just a tiny bit of that. If you want to use this engine instead of a self-written one you might want to look at the code of the engine first…? The idea is that you write your game in jME3 and jME3 gets optimized, not you optimize on that level inside your game… We know about VBO but theres more to it when it comes to integrating it all to a workable package. In the end comparing the engines this way (how many objects can I render) is silly anyway, they all use OpenGL and work as fast as the cards allow it given the settings you apply but as each engine works differently they are all tuned differently and hence give different results for unrealistic test situations. Still all of them are optimizable for your game afterwards. So unless you write the VBO-based lwjgl renderer for jME3 I’m afraid we cannot help you as we haven’t done so yet.
right… so theoretically i could write the VBO-based lwjgl renderer and then use it with JME3?.. i might think about it…
(and yes, i know optimizing my game outside the engine is a waste, that’s why i was opting for LWJGL instead of hacking around JME3…)
but if i figure out how to make the renderer in JME3 while keeping the engine integrity, i might just do so…
Yeah. What I am saying is that what you say sounds to me like a guy going to the car dealer: “Nope, I won’t take your car as it doesn’t have a titanium differential which I need direly, I rather build my own car then.”… Instead of just using the car and putting in a titanium differential if the built-in one actually breaks, y’know
@dixel said:
the thing about vertex arrays is they are constantly sending the info to the GPU even if it's static info...
Pretty sure that's false. Otherwise, dynamic meshes and static meshes would have the same performance... which is definitely not true. At least in my experience.
Guys…we use VBOs…each mesh is rendered as a VBO…
The android renderer has a VertexArray option because VBO were failing on pre android 2.1 version (afaik)
@dixel if you want to optimize rendering you’d better use batching than bother with low level optimization.
-.- sighs hahahaha xD… this is why i hate forums anywayz…
yes, ive actually been doing that in my LWJGL game engine… batching on a 3d grid… it runs like a charm i must say too…
but im reluctanct to switch to jmonkey and find myself against a corner becuz the engine doesnt support something i need that’s why it was so important to me…
so ur positive meshes are rendered as VBOs? still i did a test with some code i found around here and i was rendering 1 mesh(1 object) with around 600k+ vertices(300k+ triangles) and it was still lower FPS than if i did the same in LWJGL…
looking carefully though, the FPSs do seem to jump a lot too… and it’s weird too cuz in the test im not updating anything…
in JME3 i get a jumpy 10-199 FPS and in LWJGL i get a solid 400+ FPS… im wondering though if the “1 mesh” being so big in JME3 might be the issue, though it’s treated like a scene or landscape and i even set it to static… in LWJGL im using dynamic VBOs…
i would really like to switch to JME3, but not at the expense of performance… i would like this game to keep running on my 2004 cpu so that im sure most people will be able to play it…
@pspeed said:
Pretty sure that's false. Otherwise, dynamic meshes and static meshes would have the same performance... which is definitely not true. At least in my experience.
if what nehon says is true, then now u know why theres a difference when ur switching ur meshes :P... (though i cant see it, im setting mine as static and gives me the same FPS as if it was dynamic....)
edit: i just changed the FPS rate on settings in JME3 to 1000 and the FPS seems to be less jumpy now, sticking between 100 and 190.... this is quite weird though....
edit2: changing it to 60 seems to do the trick, quite stable in the 60s or so, i though this was default behavior for the simpleAplication, so i didnt bother to change it......
edit3: i'll run some more tests on JME3 before fully commiting to it, but this is a far better performance than what it was innitially portrayed.... LWJGL still seems to be faster, but once i port this simple implementation, ill be either convinced JME3 is what i need, or discard it for good :|
Well did you used shaders to render your models in your own engine? JME3 is all shader based, every material is shader,w ich gives you incredible grafical possibilities, wihout having to hack around with shader states. But for a test try to use the lighting shader or even the unshaded in your own engine, and see if the performance decreases to about the same level.
Since you don’t do shaders probably, you are faster of course, since you can safe the time for synching uniforms and shaderstates. I strongly suggest to batch the objects into one larger. (Take a look at the GeometryBatch somewhat mentiond a few post earlier. Everything with the same Materialinstance can be converted into one object then. → You will probably end with onl ya few 100 objects and several times more performance.
Please use lwjgl.
Is your LWJGL engine open source? It sounds pretty sweet.
@dixel said:
if what nehon says is true
I'm like Chuck Noris, what I say is always true....and if it's not...then, once i said it, it's true.
@EmpirePhoenix said:
Well did you used shaders to render your models in your own engine? JME3 is all shader based, every material is shader,w ich gives you incredible grafical possibilities, wihout having to hack around with shader states. But for a test try to use the lighting shader or even the unshaded in your own engine, and see if the performance decreases to about the same level.
Since you don't do shaders probably, you are faster of course, since you can safe the time for synching uniforms and shaderstates. I strongly suggest to batch the objects into one larger. (Take a look at the GeometryBatch somewhat mentiond a few post earlier. Everything with the same Materialinstance can be converted into one object then. -> You will probably end with onl ya few 100 objects and several times more performance.
thx for the reply mate, i was begining to suspect the same thing, im not using shaders in LWJGL, so i suppose thats the diff i was seeing...
right now, the test i was doing in jmonkey was using only 1 material, and was only 1 big mesh, so i guess there's no much need for that, but i understand it would make a difference if i was using more than one material..... though i could batch em myself, thx for letting me know there's actually a function for that xD
@normen said:
Please use lwjgl.
why are u so bitter mate? did i ever do something to you? it's christmas... relax...
@sbook said:
Is your LWJGL engine open source? It sounds pretty sweet.
it's not, sorry mate, but the game im planning to do will be free though :P although im not doing anything you cant do, just using VBOs in a performance friendly way xD
if i add in shaders, it might go head to head with jmonkey like EmpirePhoenix said, so im not sure its such a good engine xD
@nehon said:
I'm like Chuck Noris, what I say is always true....and if it's not...then, once i said it, it's true.
then i will abide and comply :) thx a lot for everyones help.... once i get some results on jmonkey performance, i'll be sure to post them here ^.^