Material based rendering
Community Forums/Showcase/Material based rendering
| ||
This small demo shows you how you can improve fps results in busy scenes by grouping sub/meshes by material.. You may have to increase the object count by quite a lot to see the diff..depending on your system specs.. Run the demo + use the enter key to swap between render methods...its a source code based demo..so feel free to tinker ;) www.redflame.net/hosted/RenderTest.zip special thanks to Bloodlocust for hosting this ;) cheers m8 |
| ||
Interesting. I added a SeedRnd line to each function so they produce exactly the same positions for the objects = more equal test. With 600 objects (about 5500 tris on screen) I get approx 32 and 50 FPS for each mode. Function CreateCustomRenderGroup() root=CreatePivot() mat00root=CreatePivot(root) mat01root=CreatePivot(root) mat02root=CreatePivot(root) SeedRnd 0 For n=0 To OBJECTCOUNT-1 inst=CopyEntity(refmesh) PositionEntity(inst,Rnd(-1000,1000),Rnd(-200,200),Rnd(-1000,1000),True) ch1=FindChild(inst,"b00"):EntityParent(ch1,mat00root) ch2=FindChild(inst,"b01"):EntityParent(ch2,mat01root) ch3=FindChild(inst,"b02"):EntityParent(ch3,mat02root) Next HideEntity(root) Return root End Function Function CreateStandardRenderGroup() root=CreatePivot() SeedRnd 0 For n=0 To OBJECTCOUNT-1 inst=CopyEntity(refmesh,root) PositionEntity(inst,Rnd(-1000,1000),Rnd(-200,200),Rnd(-1000,1000),True) Next Return root End Function |
| ||
thanks beaker ;) |
| ||
I modified this test withing my own game code..but its not much good for moving objects. Im guessing this is becuase objects have to be repositioned +orientated every frame - destroying the benefit of stack based transformations... Anyway..it might still be handy for people working with a lot of static scenery objects ;) |
| ||
It should really be compared to single surface systems as well. |