Menu

#273 Optimization on Collsion/Shadow

Stable SDK
open
nobody
None
7
2013-11-28
2013-10-30
Eternity
No
  1. Optimize CSceneCollisionManager::getCollisionPoint(), faster than before a lot. Almost every triangle that returned by ITriangleSelector will be culled by the bounding box test. But in the old version, only 1 or less can be culled by the bounding box test.

// Followings are for CShadowVolumeSceneNode
2. Fix the bug for point light shadow, bug report:http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=49243 #7
3. Support directional light shadow.
4. Faster Adjacency calculating. Now calculating algorithm complexity is O(n), not O(n^2). In my test case, I created 40 ninja.b3d nodes with shadow. It costed about 10 seconds to calculate adjacency, after optimization the time have decreased to several milliseconds.
5. Faster shadow volume updating. In my test case, FPS increased from 75 to 90.
6. Less memory cost.

3 Attachments

Discussion

  • Eternity

    Eternity - 2013-10-31

    A shadow bug again.
    You can find a method redirectIndices() in above CShadowVolumeScene patch files, because I just refactor the original source code. But it is a BUG. You can find it in the Demo. The shadow of sydney.md2 was broken. Ignore the patch above please.
    Unfortunately, after fix this bug, FPS in my test case decreased from 90 to 75 again, while the original version decreased from 75 to 60.

     

    Last edit: Eternity 2013-11-01
  • Christian Stehno

    Please reorganize your patch such that the changes are minimized. Right now, you simply moved around methods, which means that a huge number of changes are simply unnecessary code moves.
    Also, in case you don't simply fix the current method, but replace it, maybe better use a new private method to do the vcalculations, such that we can have both methods to compare.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.