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: 22309
Joined: 13 Jan 2005, 00:46

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

Post by smoth »

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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

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

Post by smoth »

How much of a difference does the make on large maps like epic or rivervalley?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

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)
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

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

Post by smoth »

So they are still massive performance hogs :/?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

I mean roam doesnt care wether is large or small. No massive penalty on large maps.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

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

Post by smoth »

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
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

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

Post by PicassoCT »

Could you post a roam-screenshot of trenches or halowarez for me?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

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)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

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

Post by hoijui »

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.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

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

Post by PicassoCT »

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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post by Forboding Angel »

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.
Satirik
Lobby Developer
Posts: 1688
Joined: 16 Mar 2007, 18:27

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

Post by Satirik »

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 ?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

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...
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

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

Post by Anarchid »

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
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

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

Post by AF »

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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

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

Post by Anarchid »

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)
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

Some more fixes were made, it now compiles fine on linux too, thanks BrainDamage!
xyz
Posts: 152
Joined: 29 Nov 2008, 16:06

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

Post by xyz »

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
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 »

My fault, also default builds fine (non GML).
Post Reply

Return to “Engine”