jokoon
06-10-2013 12:55:59
Just throwing an idea.
I'm thinking about implementing a feature which allows extra large levels, but to do so, I can't store geometry, so I'm planning to use ogre-procedural as some sort of compression method.
Compression is not a good term, but I guess the result would save a lot of disk memory and maybe allow to stream levels across an internet connection as the player walk through it.
Ogre-Procedural works like this: first you create a 2D shape with an inside and an outside, then you extrude it along a path, would it be a line, a catmullrom spline, or with a lathe, or any other thing the lib allows to do.
I guess the file format would look like this:
I'm thinking about implementing a feature which allows extra large levels, but to do so, I can't store geometry, so I'm planning to use ogre-procedural as some sort of compression method.
Compression is not a good term, but I guess the result would save a lot of disk memory and maybe allow to stream levels across an internet connection as the player walk through it.
Ogre-Procedural works like this: first you create a 2D shape with an inside and an outside, then you extrude it along a path, would it be a line, a catmullrom spline, or with a lathe, or any other thing the lib allows to do.
I guess the file format would look like this:
- Sub-object: a sub-object is just a multishape with a path, it also contains many enums and booleans to configure it.[/*:m]
- Object: an Object is just a finished mesh resulting of adding several subobject.[/*:m]
- Aggregate: an aggregate is a collection of objects stuck with each other. For example, I could create a town of 50 buildings with 5 different type of buildings, and still greatly reduce the amount of batches drawn. [/*:m][/list:u]
I guess An aggregate would be a single Trianglebuffer, if not instancing could be used to spawn single objects.
I guess all this is easy, what could be greatly useful but harder to make is an editor that would save those into small .procedural.bin files or something similar.
What is the best way to reduce the amount of batches ? Using a single addToTriangleBuffer will make the mesh bigger, and I don't really know how instancing really works...