Is there a way we could speed up the billboards?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
fmx

Post by fmx »

devsh wrote:...stopped using SMeshBuffer (which is really slow and buggy)...
Please explain why you think SMeshBuffer is slow and buggy (no sarcasm intended).
AFAIK the fastest way to render a batch of vertices with irrlicht is to use SMeshBuffers with hardware hints
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

well apparently append.() doesnt produce good results, all my triangles were flickering. I used arrays of vertices and indices instead, hardware hints will be of no use as the mesh is modified many times a second for the billboards to face the camera

75 vs 175fps speaks for itself

although all the above will not be true for the HARDWARE billboards
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

But I'd guess that the indices will stay the same all the time. So having static indices and dynamic vertices would definitely help.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

not if I am culling using indices (removing them), yet again I will be offering something like 10 different culling modes so I better count on static indices. I will try to resolve the SMesh thing.

@Hybrid: The irrlicht devs should split up the vertex attributes into separate buffers, because instancing, vertex cache optimization and other things rely on it. By just having separate hardware arrays of attributes one guy managed to double his polycount at the same fps (with 2 million polygons though). I think it would be neater and make life a lot easier, for example my billboards could have all attributes static except the vertex position, cpu skinned meshes could benefit QUITE a lot.
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

Right I am done... off on holiday in a day and I will resume work after christmass and produce a version that can go in irrlicht's core

In the demo I create 16k billboards
just billboards give me 7 fps
batched and CPU rotated with no angle LoD give me 25fps without normals
batched with 25 degrees of LoD give 50fps
GPU hardware billboards give 50fps

obviously rotating every 25 degrees will be laggy as opposed to precise smooth GPU vertex shader

Certain features are incomplete...

moving,resizing and scaling individual billboards
SMesh and hardware hints
setting visibility of individual billboards

should be 2 day's work... but I know some of you will do RATHER a lot of devving during the holidays and would benefit greatly from this incomplete release

http://www.mediafire.com/?dfjitp5t4p7jv5c
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Thanks! Devsh!

I would this mainly for vegetation, it would help a lot to have a decent frame rate with all the stuff...

I don't have access to my PC right now, but will surely check this when I'll get back.

As for the hardware billboards what are the requirements? (hardware)
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

requirements are


-basic vertex shader (GLSL 1.0, sm 1.1)
Post Reply