PagedGeometry v1.05 - High speed forest rendering

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

PagedGeometry v1.05 - High speed forest rendering

Post by JohnJ » Wed Oct 24, 2007 7:58 pm

What is PagedGeometry?

The PagedGeometry engine is an add-on to the OGRE Graphics Engine, which provides highly optimized methods for rendering massive amounts of small meshes covering a possibly infinite area. This is especially well suited for dense forests and outdoor scenes, with millions of trees, bushes, grass, rocks, etc., etc.

Paged geometry gives you many advantages over plain entities, the main one being speed: With proper usage of detail levels, outdoor scenes managed by PagedGeometry can be >100x faster than plain entities. Another advantage is that the geometry is paged; in other words, only entities which are immediately needed (to be displayed) are loaded. This allows you to expand the boundaries of your virtual world almost infinitely (only limited by floating point precision), providing the player with a more realistically scaled game area.


Features
â—
Last edited by JohnJ on Fri May 02, 2008 4:53 am, edited 9 times in total.
0 x

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Wed Oct 24, 2007 8:03 pm

Nice. I downloaded the source, but is there a compiled demo for the lazy? I'm not currently set up to compile this (Ogre is out of date, etc.).
0 x

User avatar
Kencho
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4011
Joined: Fri Sep 19, 2003 6:28 pm
Location: Burgos, Spain
x 1
Contact:

Post by Kencho » Wed Oct 24, 2007 8:04 pm

Very nice looking :) I'm glad to see it finally reached v1.0 :D
0 x
Image

User avatar
Mr_Ridd
Goblin
Posts: 297
Joined: Fri Jun 04, 2004 10:01 pm
Location: South Africa
Contact:

Post by Mr_Ridd » Wed Oct 24, 2007 8:15 pm

This is excellent. Although I was a bit disappointed when the leaves didn't rustle and break off when you walked past them :P

Well done.
0 x
The ability to succeed is the ability to adapt

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Post by JohnJ » Wed Oct 24, 2007 8:19 pm

Falagard wrote:Nice. I downloaded the source, but is there a compiled demo for the lazy? I'm not currently set up to compile this (Ogre is out of date, etc.).
PagedGeometry v1.03 precompiled examples - 3.99 MB
Includes precompiled examples only

Keep in mind that the art in the examples is not very good, since their main purpose is to demonstrate PagedGeometry's use.

Examples 4 and 7 are probably the only two examples worth looking at, BTW. The rest are mainly demonstrating non-visual features, like PageLoader's, etc.
Mr_Ridd wrote:This is excellent. Although I was a bit disappointed when the leaves didn't rustle and break off when you walked past them :P
I may have to save that feature 'till v2.0, but I'm sure it will be included eventually :)
Last edited by JohnJ on Sat Jan 19, 2008 6:30 pm, edited 2 times in total.
0 x

User avatar
Evak
Orc Shaman
Posts: 707
Joined: Sun Apr 02, 2006 7:51 pm
Location: Sacramento, CA
Contact:

Post by Evak » Wed Oct 24, 2007 8:53 pm

heh, wow thats really cool :). I had a lot of fun painting the trees on the terrain and the grass was really nice indeed. Well done, I hope we can figure out how to make use of some of this tech in Flow.
0 x

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Post by KungFooMasta » Wed Oct 24, 2007 9:11 pm

I just ran the demos, I really liked the grass in demo 4, and the flying around in demo 7. Cool!
painting the trees on the terrain
You got to paint trees?
0 x
Creator of QuickGUI!

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Post by JohnJ » Wed Oct 24, 2007 9:14 pm

You got to paint trees?
Try using the left/right mouse buttons in Example 5 :)
0 x

User avatar
bibiteinfo
Gremlin
Posts: 197
Joined: Wed Apr 12, 2006 2:48 pm
Location: Montreal, Canada

Post by bibiteinfo » Wed Oct 24, 2007 9:16 pm

Nice work and demos :D
0 x
Image

WolfSpinach
Gnoblar
Posts: 7
Joined: Mon Oct 01, 2007 5:52 pm

Post by WolfSpinach » Wed Oct 24, 2007 9:23 pm

I assume you could use a system like this for doing fur? I'm thinking sort of like Conker or Viva Pinata.
0 x

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
Contact:

Post by Falagard » Wed Oct 24, 2007 9:31 pm

WolfSpinach wrote:I assume you could use a system like this for doing fur? I'm thinking sort of like Conker or Viva Pinata.
You'd be better off with your artists creating polygon fins with alpha blended textures for fur on a model ;-) Conker used a traditional fur shader, Viva Pinata used geometry for the paper effect.

Either of which are pretty off topic for a tree/grass loading and rendering system ;-)
0 x

User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
Contact:

Post by KungFooMasta » Wed Oct 24, 2007 9:51 pm

Adding and removing trees in real time, this library rocks!! I was wondering how this could be easily incorporated into an editor type application. No need to wonder anymore. :)
0 x
Creator of QuickGUI!

WolfSpinach
Gnoblar
Posts: 7
Joined: Mon Oct 01, 2007 5:52 pm

Post by WolfSpinach » Wed Oct 24, 2007 10:22 pm

Falagard wrote:
WolfSpinach wrote:I assume you could use a system like this for doing fur? I'm thinking sort of like Conker or Viva Pinata.
You'd be better off with your artists creating polygon fins with alpha blended textures for fur on a model ;-) Conker used a traditional fur shader, Viva Pinata used geometry for the paper effect.

Either of which are pretty off topic for a tree/grass loading and rendering system ;-)
I was just wondering, since grass is normally generated in 3D programs by using a hair simulator, why not reverse the process.

Of course there are significant differences and hair-sims are normally a separate render pass, but I know very little about real time rendering pipelines, hence the question.

Of course, this is very impressive in its current form, especially the real time feedback.
0 x

User avatar
betajaen
OGRE Moderator
OGRE Moderator
Posts: 3447
Joined: Mon Jul 18, 2005 4:15 pm
Location: Wales, UK
Contact:

Post by betajaen » Wed Oct 24, 2007 10:33 pm

Wow.

Combine this puppy with a soft body physics system for close range trees (PhysX, hint hint) and my jaw will become dislocated.
0 x

User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA

Post by nullsquared » Wed Oct 24, 2007 10:56 pm

Wow! It looks really nice, and at the same time runs crazy fast (mainly demo 7)! (min: 98FPS max: over 400FPS - 1440x900, 8x AA)
0 x

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19261
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
Contact:

Post by sinbad » Wed Oct 24, 2007 11:40 pm

Woohoo, congrats on reaching version 1.0! Looking fantastic.
0 x

User avatar
shodan
Gnoblar
Posts: 13
Joined: Thu Apr 12, 2007 3:05 am

Post by shodan » Thu Oct 25, 2007 12:03 am

Looking forward to giving this a whirl, congrats on the release :)
0 x

User avatar
Yaniv
Halfling
Posts: 65
Joined: Thu Mar 02, 2006 1:28 am
Location: Israel
Contact:

Post by Yaniv » Thu Oct 25, 2007 1:15 am

The screenshots and videos are amazing!
This looks almost as good as the stuff they do in farcry. The only thing missing is some movement to the trees. I wonder, since the trees aren't entities do they support animation? What about event driven animation?
0 x
LowPolyCoop - Join the freedom!

REiNDEeR
Greenskin
Posts: 149
Joined: Sat Apr 14, 2007 1:27 pm

Post by REiNDEeR » Thu Oct 25, 2007 1:28 am

Wow it really improved alot since the last time I checked, I amost dont notice the switch to imposters anymore also the grass is looking great.

Maybe its a little too fast :) Sometimes when I move everything just dissapears, I think it has something to do with the time between 2 frames being zero.

I found this in Ogre.log, notice Worst FPS:

Code: Select all

Render Target 'PagedGeometry Example 7 - Lightmaps' Average FPS: 1050.18 Best FPS: 1309.69 Worst FPS: 2.32831e-007
0 x

capture
Goblin
Posts: 237
Joined: Sun Nov 20, 2005 2:44 pm

Cool

Post by capture » Thu Oct 25, 2007 1:45 am

Looks very cool. I added this to my blog. :)
0 x

User avatar
JohnJ
OGRE Expert User
OGRE Expert User
Posts: 975
Joined: Thu Aug 04, 2005 4:14 am
Location: Santa Clara, California

Post by JohnJ » Thu Oct 25, 2007 2:58 am

Thanks for the feedback :D
This looks almost as good as the stuff they do in farcry. The only thing missing is some movement to the trees. I wonder, since the trees aren't entities do they support animation? What about event driven animation?
Currently you can only animate batched trees (BatchPage) through a custom vertex shader. In the future I plan to take advantage of Ogre's instancing and implement a InstancePage, which should support animations.
Maybe its a little too fast :) Sometimes when I move everything just dissapears, I think it has something to do with the time between 2 frames being zero.
The PagedGeometry engine itself can handle 0 length time steps fine, but I forgot to account for that in the demos' delta-time based movement code. I guess it never occurred to me that the demos would be running over 1000 FPS :)

I'd enable vsync or turn up the screen resolution / anti-alias settings to avoid the high frame rates for now.
0 x

REiNDEeR
Greenskin
Posts: 149
Joined: Sat Apr 14, 2007 1:27 pm

Post by REiNDEeR » Thu Oct 25, 2007 5:29 am

JohnJ wrote:The PagedGeometry engine itself can handle 0 length time steps fine, but I forgot to account for that in the demos' delta-time based movement code. I guess it never occurred to me that the demos would be running over 1000 FPS :)

I'd enable vsync or turn up the screen resolution / anti-alias settings to avoid the high frame rates for now.
I just tested, it happens with vsync turned on too but not that frequently.

edit:
Something wrong with Ogre::Timer.reset() I guess, I replaced it like this and its working fine now.

Code: Select all

/*
static Ogre::Timer t;
Real timeScale = t.getMilliseconds() * 0.1f;
t.reset();
*/
static Ogre::Timer t;
static unsigned long oldTime = t.getMilliseconds();
unsigned long tt = t.getMilliseconds();
Real timeScale = (tt-oldTime) * 0.1f;
oldTime = tt;
0 x

User avatar
tau
Silver Sponsor
Silver Sponsor
Posts: 413
Joined: Wed Feb 11, 2004 11:44 am
Location: Austin (that's kept wierd :))

Post by tau » Thu Oct 25, 2007 6:45 am

Awesome job!

Runs very well and fast under DirectX.
However, I'm experiencing artifacts(slow rendering speed, red bark, black leaves, white grass) under OpenGL (ATI X800, WinXP, latest OpenGL drivers) and I think it's related to Ogre, not PagingGeometry
0 x
Twitter: Tau Powered

User avatar
Chris Jones
Lich
Posts: 1742
Joined: Tue Apr 05, 2005 1:11 pm
Location: Gosport, South England

Post by Chris Jones » Thu Oct 25, 2007 8:31 am

Congratulations on the release, it looks great. i think i will be using this in the future :)
0 x

mr.Zog
Halfling
Posts: 46
Joined: Mon Apr 23, 2007 8:38 pm
Location: Austria
Contact:

Post by mr.Zog » Thu Oct 25, 2007 9:31 am

Great work!


I've tested the samples, the lightmap demo looks a bit weird in openGL (all tree-leaves are black )
0 x

Post Reply