Skip to main content
History: SoC2006 Instancing
View published page
Source of version: 4
(current)
!Summer of Code 2006: Instancing, Crowd Rendering __Student:__ Jean-Baptiste Griffo (Crashy) __Mentor:__ Paul Cheyrou-lagreze (tuan kuranes) __ Status:__ Incorporated into Eihort (OGRE 1.4) !Objective Provide techniques to render numerous objects at the lower performace hit, in cases where Static Geometry is not as powerfull as geometry Instancing. The project is divided in three main parts: # Implementation of Instancing for static renderables using shaders. # Implementation of Instancing for animated renderables using shaders. # Provide documentation and samples to help final user to choose the best technique. !Steps ''Until the 25 june.'' __99%done__ 1. __make a stable code for the shader instancing of static objects, compatible with every .mesh file.(99% done)__ 2. __provide some access methods to place objects, rotate them, scale them, etc.(100% done)__ Globally, those methods are doing the same things as the sceneNodes methods. As there will be only one node for many instancied objects, the scene node methods will be useless in our case. That's why it is necessary to provide such methods at a renderable level. Those access methods will modify only the transformation matrix, sent to te vertex shader as custom parameter, of the choosen instance. 3. __Release of a little demo of fully implemented Shader Instancing for static objects. 99%done__ ''From ~1 july to ~1 August:'' ''Implementation of crowds:'' 100% done 4. __Hardware skinning (So a shader for instancing AND hardware skinning)__ 100% done. 5. __Independant Animation control for each instance__ 100% done The idea is to pick one animated instancied object in the batch, and to handle it as if it was a single entity, using animation states to manage animations. 6. __Add more independant information for each instance of the object(name, ID, animation data)__ ''From ~1 August to the end:'' 7. __Addition of shadow caster and receiver vertex program__ 50% done(shadow caster are done) 8. __Debug__ 9. __Redaction of the docs__ !Implementation details {img src="img/wiki_up/ClassDiagram3.png" alt="ClassDiagram3.png"} The whole idea is to first create a Render Operation containing __n__ copy of the object, and use this render operation multiple times with different custom shader parameter Here is how it works: -add __n__ times an entity to your Instanced Geometry. -Call a build() method that will batch the __n__ into one vertex/index buffer, adding an index to the vertex data, to identity each instance of the object that is in the batch. The build() method will create a Region(aka Batch Instance). The region will have multiple LOD Buckets, each lod Bucket multiple Material Bucket, and in each material bucket, multiple geometryBucket(or a BatchedGeometry) will be created. Usually, there is only one geometry bucket in the material bucket, but if the total vertex count is > 65535, another geometry bucket will be created. -Create new __BatchInstance__ with the addBatchInstance() method, that will clone all the LOD, material, geometry bucket of the first __BatchInstance__. The new geometry buckets are using the same render operation as the one of the firste __BatchInstance__. The __batchInstance__ has __n__ __InstanciedObject__, and an array of __n__ transformations, used as a custom parameter for the instancing Vertex Program. Modifying the __istanciedObject'__s transformation will alter the array of the __batchInstance__, and update the custom parameter for the VP. --- Alias: (alias(SoC2006_Instancing))
Search by Tags
Search Wiki by Freetags
Latest Changes
Projects using OGRE
Building Your Projects With CMake
Compiled API Reference
Overlay Editor
Introduction - JaJDoo Shader Guide - Basics
RT Shader System
RapidXML Dotscene Loader
One Function Ogre
One Function Ogre
...more
Search
Find
Online Users
177 online users
OGRE Wiki
Support and community documentation for Ogre3D
Ogre Forums
ogre3d.org
Log in
Username
Password
CapsLock is on.
Remember me (for 1 year)
Log in