ROAM terrain rendering, help us make spring much faster! - Page 9

ROAM terrain rendering, help us make spring much faster!

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ROAM terrain rendering, help us make spring much faster!

Post by smoth » 21 Jul 2011, 20:14

smoth wrote:How does that handle rocky glacier and gunmetal harbor? I want to look at try to better optimize upcoming map geometry for this.
Can I get shot for this?
Y/n
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 21 Jul 2011, 20:35

Large png warning:

http://beherith.eat-peet.net/stuff/screen00082.png
http://beherith.eat-peet.net/stuff/screen00083.png
http://beherith.eat-peet.net/stuff/screen00084.png
http://beherith.eat-peet.net/stuff/screen00085.png
http://beherith.eat-peet.net/stuff/screen00086.png
http://beherith.eat-peet.net/stuff/screen00087.png
http://beherith.eat-peet.net/stuff/screen00088.png
http://beherith.eat-peet.net/stuff/screen00089.png
http://beherith.eat-peet.net/stuff/screen00090.png

You dont need to optimize, roam is quite good at it.
All frame rates were between 130 and 200+, depending on number of trees in view.

In the last two shots I cranked up the detail to ridiculous levels.

Note the 'triangles pushed' in the console.

No popping, tearing, stretching or any other artefact visible.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ROAM terrain rendering, help us make spring much faster!

Post by smoth » 21 Jul 2011, 20:41

How much of a difference does the make on large maps like epic or rivervalley?
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 21 Jul 2011, 20:47

None. Detail level is adjustable. It will generally try to aim to keep a constant triangle count on the visible terrain, but it wont add triangles when they dont increase detail (flat areas)
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ROAM terrain rendering, help us make spring much faster!

Post by smoth » 21 Jul 2011, 20:50

So they are still massive performance hogs :/?
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 21 Jul 2011, 21:16

I mean roam doesnt care wether is large or small. No massive penalty on large maps.
0 x

User avatar
smoth
Posts: 22300
Joined: 13 Jan 2005, 00:46

Re: ROAM terrain rendering, help us make spring much faster!

Post by smoth » 21 Jul 2011, 21:45

Let me rephrase that ...

I am hoping the increased performance will make large maps more feasible. Right now they hurt on fps I was hoping roam could save performance in such a way as to give large maps a more equal fps cost
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: ROAM terrain rendering, help us make spring much faster!

Post by PicassoCT » 21 Jul 2011, 22:01

Could you post a roam-screenshot of trenches or halowarez for me?
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 21 Jul 2011, 22:33

Trenches is 16*64, no? If thats the one, then it fails to load in my build atm (not my fault tho, and not roam's bug)
0 x

User avatar
hoijui
Former Engine Dev
Posts: 4342
Joined: 22 Sep 2007, 09:51

Re: ROAM terrain rendering, help us make spring much faster!

Post by hoijui » 22 Jul 2011, 00:48

i just tried Trenches with latest master, and it did not crash. maybe it is cause i am on 64bit Linux though (-> more ram). It looked like 16x64, yes.
0 x

User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10238
Joined: 24 Jan 2006, 21:12

Re: ROAM terrain rendering, help us make spring much faster!

Post by PicassoCT » 22 Jul 2011, 08:25

Where is it, a there is it. AlgoGrims- Tales of a travelling Salesmann :
and the Algo did approach the Master meditating in n┬│-space and time, and he asked:
"Master shall i venture out into the world, having only looked upon the average-Case?"
"This shall be sufficient, on average Case, but remember if things go bad, to have a inflateable boat made of predecessor-scapegoat-skin!"
And so he ventured out of the dojo, to travell, living on watershaders and bugz alone to survive, fighting unreasonable memory demands, getting blamed for villages flattened due to bad tatic, and having all in all a great time.
0 x

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14605
Joined: 17 Nov 2005, 02:43

Re: ROAM terrain rendering, help us make spring much faster!

Post by Forboding Angel » 23 Jul 2011, 01:19

Behe, try it on battle for edola prime. That is 32x32 and has plenty of features and junk. Should make for a good use case test on large maps.
0 x

Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

Re: ROAM terrain rendering, help us make spring much faster!

Post by Satirik » 09 Oct 2011, 18:21

Satirik wrote:we can wait 1 or 2month more to have it in 0.83
it's been 3months now, is the 0.83 roam coming ?
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 13 Oct 2011, 13:21

Ok, here is ROAM rebased to 0.83

https://github.com/Beherith/spring

TODO/known issues:
Support unsynced heightmap
Fix VBO support
Fix terraform support
ATI is slow cause of display list rebuilding
Remove some stunningly memory wasteful bits (kept to statically buffer vertex arrays)

Other info:
In Patch.h, uncomment which rendering mode you wish to use, vertexarray, displaylist or VBO

To enable ROAM, config needs a ROAM = 1 entry.

Some implementation info:
New Classes:

Landscape:
-Is a member of SMFGroundDrawer
-Contains the main initialization code
-Is the parent of the Patch classes.
Important member functions:
Explosion:
Is called by the basicmapdamage class, and tells the landscape to update specific patches

Patch:
-Each patch corresponds to a single bigtexture square (128*128 heightmap pixels)
-Each patch consists of a binary triangle tree, starts with 2 triangles
Important member functions:
ComputeVariance
Builds a variance tree for the triangle tree
Only called on init, and when the heightmap changes
Tessellate:
Splits the triangles based on variance information, distance from camera and view radius
Splits neighbouring triangles-those in neighbouring patches as well
Builds the display lists - updates the VBO's
Render:
Pushes the vertex array/calls display list/draws the VBO

Edit1:
@Forb:
Image
Note the FPS counter...
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: ROAM terrain rendering, help us make spring much faster!

Post by Anarchid » 13 Oct 2011, 13:33

Ok, here is ROAM rebased to 0.83
That meaning it won't get in the actual release? Oh well, can wait a bit more :P
0 x

User avatar
AF
AI Developer
Posts: 20669
Joined: 14 Sep 2004, 11:32

Re: ROAM terrain rendering, help us make spring much faster!

Post by AF » 13 Oct 2011, 13:50

Thanks Beherith =)

@Anarchid The engine devs want the next release out as soon as possible. Given Beheriths list of work to be done, ROAM will not make it in 0.83.
0 x

User avatar
Anarchid
Posts: 1380
Joined: 30 Nov 2008, 04:31

Re: ROAM terrain rendering, help us make spring much faster!

Post by Anarchid » 13 Oct 2011, 14:06

Hope it makes for 0.84 then, and that it won't take another year :P

(i mean, it would be so very cool to have this together with assimp at last. i'm even considering getting some plugin for the messenger again so i can track commits)
0 x

User avatar
Beherith
Moderator
Posts: 4934
Joined: 26 Oct 2007, 16:21

Re: ROAM terrain rendering, help us make spring much faster!

Post by Beherith » 13 Oct 2011, 18:03

Some more fixes were made, it now compiles fine on linux too, thanks BrainDamage!
0 x

xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

Re: ROAM terrain rendering, help us make spring much faster!

Post by xyz » 22 Oct 2011, 00:32

Beherith wrote:Some more fixes were made, it now compiles fine on linux too, thanks BrainDamage!
well sort of:

Code: Select all

home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp: In constructor ÔÇÿCLegacyMeshDrawer::CLegacyMeshDrawer(CSMFReadMap*, CSMFGroundDrawer*)ÔÇÖ:                               
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:58:2: error: ÔÇÿmultiThreadDrawGroundÔÇÖ was not declared in this scope
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:59:2: error: ÔÇÿmultiThreadDrawGroundShadowÔÇÖ was not declared in this scope
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp: In destructor ÔÇÿCLegacyMeshDrawer::~CLegacyMeshDrawer()ÔÇÖ:
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:66:46: error: ÔÇÿmultiThreadDrawGroundÔÇÖ was not declared in this scope
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:67:52: error: ÔÇÿmultiThreadDrawGroundShadowÔÇÖ was not declared in this scope
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp: In member function ÔÇÿvirtual void CLegacyMeshDrawer::DrawMesh(const DrawPass::e&)ÔÇÖ:
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:594:19: error: ÔÇÿmultiThreadDrawGroundÔÇÖ was not declared in this scope
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp: In member function ÔÇÿvoid CLegacyMeshDrawer::DrawShadowMesh()ÔÇÖ:
/home/xyz/programare/proiecte/springRoam/spring/rts/Map/SMF/Legacy/LegacyMeshDrawer.cpp:966:19: error: ÔÇÿmultiThreadDrawGroundShadowÔÇÖ was not declared in this scope
make[2]: *** [rts/builds/multithreaded/CMakeFiles/engine-multithreaded.dir/__/__/Map/SMF/Legacy/LegacyMeshDrawer.cpp.o] Error 1
make[1]: *** [rts/builds/multithreaded/CMakeFiles/engine-multithreaded.dir/all] Error 2
make: *** [all] Error 2
0 x

User avatar
jK
Spring Developer
Posts: 2299
Joined: 28 Jun 2007, 07:30

Re: ROAM terrain rendering, help us make spring much faster!

Post by jK » 22 Oct 2011, 00:49

My fault, also default builds fine (non GML).
0 x

Post Reply

Return to “Engine”