realXtend / tundra

realXtend Tundra SDK, a 3D virtual world application platform.
www.realxtend.org
Apache License 2.0
84 stars 70 forks source link

Adminotech - Implement Ogre Instancing #680

Closed jonnenauha closed 11 years ago

jonnenauha commented 11 years ago

Implements Ogre instancing support for Tundra in EC_Mesh and OgreWorld.

Instancing1

Implemented now

Needs work!?


I've sent this pull request in good time so people have time to review it before merging talk becomes relevant. Any feedback on the code in general and API in OgreWorld would be appreciated!

jonnenauha commented 11 years ago

https://github.com/Adminotech/tundra/commit/b3f72500e7f828f4e2f495bc5d1aaacab823bc04 Makes a bit of overhaul to my OgreWorld internals. Fixes things with multiple submeshes and should speed up DestroyInstance() a bit, less things to loop around.

Hopefully this will get cleanly merged to lasses work that is making all (most at least) our super shaders available for instancing, which is a super exiting feature for artists! My thing was kind of restricted demo phase in terms of shaders :)

cadaver commented 11 years ago

Multi-submesh support looks solid now. Draw distance & draw shadows settings are not being used in instanced entities though.

jonnenauha commented 11 years ago

https://github.com/realXtend/naali/pull/680/files#L13R966 Hmm, I did implement and even test it by selecting a bunch of ents in the instancing test scene, setting their draw distance to 10 and they dissapeared. Came back when a high enough distance was used, or set to 0. It should sync that in both creation and any time the attribute changes.

cadaver commented 11 years ago

Sorry, when retesting, draw distance worked correctly. Shadow casting is only changeable per instance batch, so it is now locked on.

jonnenauha commented 11 years ago

Thanks @cadaver for the quick work and great job on cloning the super shaders with instancing support! This is huge plus for maintainability of the super shader.