Loading tons of models

If I want to load an island with TONS of 3ds shrubbery, would I want to use ImposterNode?

Perhaps you should check this thread:


ImposterNode creates a TextureRenderer for every instance, assuming a size of 64x64 and RGBA8 format, 16K for each imposter. 1000 shrubs = 16MB, 10000 shrubs, 160MB, etc. Since ImposterNode makes no effort of cleaning up the TextureRenderer, GPU memory will be leaked continuously as you create more and more imposters.

Should answer your question, as for the solution, use batching. I know your game has a streamed world based on tiles. Group all similar shrubs together for each tile into a single mesh, the geometryinstancing package in jME can help you with that.

This game is for a semester project in my class, so it's actually a single 2048 tile, but I'll check out that test. Thanks for the lead!

did a test to see if I was doing it right… loaded 10,000 cubes and got like 18-21 fps on my computer (without batch)

then I batched it and got like 81-83 fps. definite improvement.

Hmm there's a problem.

I am loading my 3ds models, and they always come in as Node objects, but the GeometryBatchInstance only accepts TriMesh objects as a source, any ideas?

EDIT: The node that is imported has a trimesh eventually…