New Life of Paged Geometry Engine

m2codeGEN

16-05-2011 18:14:56

Hi, Ogre developers!!!

Let me introduce some modification of PagedGeometry. You can find it at http://code.google.com/r/m2codegen-ogre-paged/
2 weeks of hard work and some results can be published.

Main improvement is performance. I try speed up and get some positive result.
Play on standard examples with my and tdev modification and fill difference :D

But there were some more difficulties which it is necessary to solve:
1. Still slow build of BatchedGeometry::SubBatch::build (vertex processing on CPU in main render thread). May be I try Intel TBB library or try to move this processing in background thread.
2. Add detail level and loaders for Instancing Strategy for rendering close entities.

P.S. I will be grateful for your feedback

Regards,
Vadim

tdev

16-05-2011 19:02:27

awesome, thanks for your work :)

looks great upon a first look :)

m2codeGEN

19-05-2011 19:29:21

Main improvements for speed and simplicity of code:

1) Replacement of passing parameters to functions by value to pass by reference if needed. For example, hard types as Ogre::String, Ogre::Vector3, etc.
2) Replacement of Ogre::Material setting from material name to MaterialPtr (no need to search by name in std::map`s of MaterialManager)
3) Rename data members of classes by m_ prefix for better code reading.
4) optimization of many cycles of testing conditions when using iterators (for example, we chahed end())
5) major effort is made to modify BatchedGeometry::SubBatch::build and WildBatchedGeometry::WildSubBatch::build. Very slow vertex processing on CPU
* replace quaternion vector3 rotation to inline Matrix3 commands
* more careful working whith pointers (no need some increments)
* remap table vertex type to vertex size instead call getVertexSize on each vertex interation
* all of the envelope calculations have been removed from the vertex loop

Within a few days I will commit changes to main repository.

tdev

22-05-2011 11:56:37

Main improvements for speed and simplicity of code:

1) Replacement of passing parameters to functions by value to pass by reference if needed. For example, hard types as Ogre::String, Ogre::Vector3, etc.
2) Replacement of Ogre::Material setting from material name to MaterialPtr (no need to search by name in std::map`s of MaterialManager)
3) Rename data members of classes by m_ prefix for better code reading.
4) optimization of many cycles of testing conditions when using iterators (for example, we chahed end())
5) major effort is made to modify BatchedGeometry::SubBatch::build and WildBatchedGeometry::WildSubBatch::build. Very slow vertex processing on CPU
* replace quaternion vector3 rotation to inline Matrix3 commands
* more careful working whith pointers (no need some increments)
* remap table vertex type to vertex size instead call getVertexSize on each vertex interation
* all of the envelope calculations have been removed from the vertex loop

Within a few days I will commit changes to main repository.

thanks for the detailed explanation, feel free to merge it to the main repo :)
thanks for your work!

m2codeGEN

25-05-2011 09:55:33

Ogre Paged Geometry 1.1.1 RC1 available at https://code.google.com/r/m2codegen-ogre-paged/
and at main repository https://code.google.com/p/ogre-paged/

tdev

25-05-2011 12:24:07

Ogre Paged Geometry 1.1.1 RC1 available at https://code.google.com/r/m2codegen-ogre-paged/
and at main repository https://code.google.com/p/ogre-paged/

thanks for that :)

i improved the cmake things a bit and uploaded a compiled version with the examples, so people can test it out :)
http://code.google.com/p/ogre-paged/downloads/list

m2codeGEN

26-05-2011 09:26:23

Holy shit. It`s work. But it`s require Visual Studio 2010 re-distributive.
On WinXp sp3: This application has failed to start because MSVCP100.dll was not found.
You can get it from http://www.microsoft.com/downloads/en/d ... laylang=en

On my Computers (Intel I7 + nVidia GeForce GTX480 + Win7sp1 x64 - 64 bits / Amd Athlon X2 + nVidia GeForce 9800GT + WinXP sp3 x86 - 32bits) it work.
a little later i test it on Amd Athlon e2650 + ATI Radeon X1250 (Integrated video) + Win Vista Sp2 x86.

But On laptop Intel Atom CPU 230@1600 Mhz + Windows XP sp3 x86-32bits + SiS Mirage 3 Graphics (Chip 672 Series) prebuild crashed with OpenGL render subsystem. DirectX9 render work well. I can`t debug program on this platform, but I can assume, that it is connected with the integrated graphics from SiS.

tdev

27-05-2011 10:39:00

Holy shit. It`s work. But it`s require Visual Studio 2010 re-distributive.
On WinXp sp3: This application has failed to start because MSVCP100.dll was not found.
You can get it from http://www.microsoft.com/downloads/en/d ... laylang=en

On my Computers (Intel I7 + nVidia GeForce GTX480 + Win7sp1 x64 - 64 bits / Amd Athlon X2 + nVidia GeForce 9800GT + WinXP sp3 x86 - 32bits) it work.
a little later i test it on Amd Athlon e2650 + ATI Radeon X1250 (Integrated video) + Win Vista Sp2 x86.

But On laptop Intel Atom CPU 230@1600 Mhz + Windows XP sp3 x86-32bits + SiS Mirage 3 Graphics (Chip 672 Series) prebuild crashed with OpenGL render subsystem. DirectX9 render work well. I can`t debug program on this platform, but I can assume, that it is connected with the integrated graphics from SiS.

thanks, added this to the download description, i forgot about that x|

and thanks for testing! :)

tdev

29-05-2011 12:32:26

i have packed together your changes into a source code 1.1.1 release:
http://code.google.com/p/ogre-paged/downloads/list

also, added your changes to the release notes:
http://code.google.com/p/ogre-paged/wiki/ReleaseNotes

if you update it again, please add your changes to that page :)

m2codeGEN

30-05-2011 09:52:31

Cool :)
I don`t build it yet with GCC, but I forgot that `or` is GCC keyworld :oops:
I will fix warnings undo gcc, but the exact dates yet I can not name.

SniperBinaire

21-06-2011 09:35:35

I'm glad to see that this library is alive !
but as for me, the main problem of this system is the lighting lack.

I'm working on a game that will support a real time night/day cycle, so ambient light is condemned to be versatile.

Maybe you might consider that on the top of your roadplan ?

m2codeGEN

24-11-2011 11:07:00

Ogre 1.8 RC1 now available. Let`s think about what you want in Paged Geometry 1.2 :D

Liss

28-01-2012 22:18:14

You implemented so many great features that its hard to think what else to add. Out-of-the-box support for Ogre 1.8 would be great for now.

I'm not sure if this is fixed but long time ago (do not remember exactly) when I used Paged Geometry last time texture shadows did not work properly "out of the box". If this is still the case, it would be nice to fix in new release. If full support for texture shadows was already implemented since then, then see my first sentence :) .

I'm starting to work on new project soon and plan to use Paged Geometry with Ogre 1.8, but it looks like it's not possible to use latest Paged Geometry with Ogre 1.8.0rc1. Before trying to figure out how to make it work with Ogre 1.8 myself, I would like to know if you plan new release of Paged Geometry with Ogre 1.8 support in near future (like in next few weeks or in month or two)?

m2codeGEN

30-01-2012 15:48:35

Make support for Ogre 1.8 is`t a problem. (There are some small changes in Ogre API).
At the present time we are working on vegetation renderer for our internal project (It`s used Ogre 1.8 rc1 and new feature: Instancing manger: http://www.ogre3d.org/forums/viewtopic. ... &start=200). After we have finished working on it I think about the way to upgrade PG.

Main features:
Instancing rendering
Fast update
the ability to specify vector paths and vegetation density
New LOD system

SniperBinaire

14-02-2012 14:07:35

Well, if you plan a new version, think about the compatibility with dynamic lighting.
Because blades of grass have the same color during night and day, thus I cannot make a day/night cycle.

Sounds to me the most urgent thing to implement.

Oggo87

15-02-2012 07:47:09

[...] blades of grass have the same color during night and day [...]

I don't know how your lighting is done, but have you actually enabled lighting on the grass layer?
Because I have full day/night cycle in my scene with PagedGeometry grass and it works like charm. :)


Forests::GrassLayer *l = lGrassLoader->addLayer("MyGrassMaterial");
l->setLightingEnabled(true);

m2codeGEN

17-02-2012 11:14:08

An early result of work on a new version
http://youtu.be/UiWeXwSAdWU

pacoRG

29-04-2012 16:34:47

Hi,

I was not aware this advance. I have seen the full day/night cycle for the trees in adition to the grass. It is very interesting for me because I use PG in my application. When the new code will be released?

Thanks in advance,

SniperBinaire

13-05-2012 21:10:53


I don't know how your lighting is done, but have you actually enabled lighting on the grass layer?
Because I have full day/night cycle in my scene with PagedGeometry grass and it works like charm. :)


Got it for the grass ! Thanks. But Impostors stills brights. How do you manage that ?

m2codeGEN

06-06-2012 18:34:02

stable results
http://www.youtube.com/watch?feature=pl ... fqBr62YI_g

pacoRG

06-06-2012 20:24:34

The video is impressive.

I've just seen in the Deleloper talk section a thread related with the new InstanceManager.

I have observed that the forested region is limited according to the terrain texture, is it true?

Thanks,

m2codeGEN

08-06-2012 09:06:04


I've just seen in the Deleloper talk section a thread related with the new InstanceManager.

We don`t use InstanceManager for forest rendering. It`s too slowly (in updating GPU resources) and eat big peace of memory (1024 bytes per tree).


I have observed that the forested region is limited according to the terrain texture, is it true?

Yes. But terrain system, also our own implementation.
Trees grow in the wood :D but also can grow and as separately standing objects.
They always grow on the same place at removal of the camera and the subsequent approach.

For encoding information on one tree 8 bytes are spent. When filling the vertex buffer of transformations these 8 bytes are decoded in a matrix 3x4 (12 sizeof (float) = 48 bytes).

The percent of use a code from PagedGeometry aspires to 0. The idea of encoding information on trees was taken only. All other code is written completely anew.
http://www.youtube.com/watch?v=UiWeXwSA ... ure=relmfu this old implementation basis of InstanceManager

duststorm

09-07-2012 16:06:37

So the new version of pagedGeometry has a totally new implementation?
Great to see that impostors now support dynamic ambient light setting.

That godray/lens flare shader shown in that video, is it part of the new PG or in the demo? It looks pretty cool :)

Also, is the 2.0 version available somewhere? I'm a little confused about which repo is the one that's officially used
http://code.google.com/p/ogre-paged
or
http://code.google.com/r/m2codegen-ogre-paged

pacoRG

19-08-2012 09:40:51

Hi m2codeGEN,

Is there some news about the 2.0 version?
Will the code be available soon?

Thanks in advance,

Paco

m2codeGEN

23-08-2012 20:12:14

Hi m2codeGEN,

Is there some news about the 2.0 version?
Will the code be available soon?

Thanks in advance,

Paco

Hello!
I was on holiday. So work is paussed :)

current implementation very exacting to hardware. If GPU driver can`t provide glVertexAttribDivisor function (http://www.opengl.org/registry/specs/AR ... arrays.txt) PG 2.0 don`t work.

To lead up this implementation to support of older hardware at me there is neither time nor desires. Moreover implementation under DX I didn't check. Theoretically it shall work since I used a functionality only OgreMain.
One more problem that for multithreading used proprietary code which I can't publish. Boost threads can be used instead for raw threading. But what about TBB (it`s GPL 2.0 or proprietary)

Shtuka

22-09-2012 19:47:55

What's the current state? And how is the interplay of paged with OgreTerrain/OgrePaging?

drwbns

30-10-2012 20:25:52

Is there any update on this?

m2codeGEN

14-11-2012 18:36:51

Hi, guys!
As practice shows, higter skill - less free time.
Within two months I will publish the implementation of version 2.0. But only for OpenGL 3.3+ and without disclosure of our propietary libraries.
I hope among you there will be a sensible expert who can write DirextX implementation and replace our libraries with boost or something similar.

Tibec

30-06-2013 20:04:17

Any update ?