Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / BlitzTerrain Vs Advanced Terrain - Water Demo.

Author
Message
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Jan 2010 17:48 Edited at: 5th Jun 2011 14:31
Heres a new demo showing off the speed of BlitzTerrain over Advanced Terrain. There are 3 demos. One for Advanced Terrain, one for BlitzTerrain without LOD and one for BlitzTerrain with LOD.

The demo is the water terrain demo by evolved. It was modified to work with BlitzTerrain.

Advanced Terrain and both BlitzTerrain demos included with source code:


Here it is:
DOWNLOAD


Please post feedback and the speed you get!


Note: There are culling issues in the Advanced Terrain Demo. If anyone knows a workaround then please let me know!

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jan 2010 13:14
Impressive speed difference.

I get:

FPS 150 for AT
FPS 610 for BT.

But are you comparing like with like? I notice you have the following lines for BlitzTerrain:



Shouldn't the missing other half of the "if" have something comparable for AT, such as update terrain?

Are the limb and vertex structures the same?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 25th Jan 2010 16:55 Edited at: 25th Jan 2010 16:59
I didn't add the update terrain in because it causes culling issues. I have reuploaded the demos now. The demos are compiled from the exact same source code which is provided. I only change lines 33 - 35 to set which engine gets used.

The code was compiled with DBPro 7.4 using the version of Advanced Terrain which is provided with DBPro 7.4 and BlitzTerrain 2.0.

I have also included a 3rd demo which shows off BlitzTerrain with LOD.


Quote: "Are the limb and vertex structures the same? "


BlitzTerrain doesn't use DBPro limbs (which I guess is what AT uses). BlitzTerrain creates and renders its own vertex/index buffers.

For Vertex structure, not sure what AT uses but BlitzTerrain uses, Position, Normals and 2 sets of UVs.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 25th Jan 2010 17:16 Edited at: 25th Jan 2010 17:19
WOW. Very nice indeed.

FPS Results

389 -- AT
690 -- BT
970 -- BT w/LOD

Core 2 Duo 3.16GHz, 4GB DDR2, NVidia 9800 GT 512MB.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jan 2010 19:43
Quote: "I didn't add the update terrain in because it causes culling issues."


I've noticed the same thing - except in reverse. I get weird culling if I don't use update terrain in the right part of the render cycle.

Quote: "BlitzTerrain creates and renders its own vertex/index buffers."


I assumed it did - but don't they have to be organised into limbs to keep the poly count down?

Quote: "For Vertex structure, not sure what AT uses but BlitzTerrain uses, Position, Normals and 2 sets of UVs."


I believe AT uses position, diffuse and 2 sets of UVs.

Anyway, your results are impressive and I'm curious to know what the key ingredients are.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 25th Jan 2010 20:03 Edited at: 25th Jan 2010 20:04
Thanks KISTech!

Quote: "I assumed it did - but don't they have to be organised into limbs to keep the poly count down?"


Yep, they are split up the same way Advanced Terrains are split up.


Quote: "Anyway, your results are impressive and I'm curious to know what the key ingredients are."


There are 2 main ingredients.

The first one is what I call "QuadMaps". They are basically, lists of quads for each sector. They allow for fast GetGroundHeight checking, Fast Terrain Generation and fast terrain modification. This is also the part responsible for fixing the LOD seams and generating vertex/indexbuffers from heightmaps.

The second main ingredient is QSP (Quad Space Partitioning). Which is basically using QuadTrees for LOD, Frustum Culling and Front to back rendering. Its a lot faster than looping through every sector (or limb) and just rendering it.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jan 2010 01:05
Quote: "Which is basically using QuadTrees for LOD, Frustum Culling and Front to back rendering. Its a lot faster than looping through every sector (or limb) and just rendering it."


Ah. That must be the key performance feature. Thanks.

Food for thought.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jan 2010 01:13 Edited at: 26th Jan 2010 01:15
I get

44 AT
44 BT
59 BT LOD

Basic Computer build, onboard NVidea card. I suppose the average home user.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Jan 2010 10:03
Pincho Paxton, thanks for posting

N3wton
14
Years of Service
User Offline
Joined: 3rd Jun 2009
Location: Leeds, UK
Posted: 26th Jan 2010 10:58
Looks good, can't wait for this to come out so i can get it working with advanced lighting, it will be SWEET

anyways...

AT - 62 fps

BT - 118 fps

Bt-wLOD - 134 fps

so certainly better than advanced terrain

Yours
N3wton

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 26th Jan 2010 18:37
For the AT, anything between 200 - 250 fps
BT, 200-350 fps (moving about the map, it fluctuated a lot)
BT LOD 350-500 fps so definitely best =)

Although the AT did seem to cull bits too soon sometimes...

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jan 2010 18:53 Edited at: 26th Jan 2010 18:54
Update.

Laptop results:

AT FPS 4
BT FPS 10
BT-LOD FPS 11.

I'll definitely have to try this plug-in.

I did notice an odd lighting problem with the BT demo. There seemed to be a black outline on the distant hills:

Attachments

Login to view attachments
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 26th Jan 2010 19:33
That's on the texture, I had a look myself.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jan 2010 01:37 Edited at: 27th Jan 2010 01:37
I don't think it is. Here's another screenshot from a different angle. Something has gone wrong with the texturing along the edge of the terrain.

Attachments

Login to view attachments
Super Nova
18
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 27th Jan 2010 03:19
Amazing results!

105 FPS - AT
375 FPS - BT
410 FPS - BT w/LOD

My system specs:

Pentium 4 3.2GHz w/Hyper Threading
2GB Ram
NVidia 7900GS AGP
WinXP Home

"What I have shown you is reality. What you remember, that is the illusion."
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Jan 2010 14:50
Thats to do with normals. I will get to work with solving that when i get home. basically, the edge of the terrains height is 0(because its registered as off the edge). But the bit near the edge is quite high. Which makes the normals flip round the wrong way.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 27th Jan 2010 15:35
Thought it might be.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 28th Jan 2010 09:02
@ Kaedroho,

Thanks for including with BTLod as well.

AT - 52 fps
BT - 76 fps
BTLod - 82-86 fps (tends to vary up and down)

Core2Duo 3Ghz, Nvidia 8800 ultra.

Something I noticed with AT, like you, is that the culling with AT has now gone wrong... especially near the water.

BlitzTerrain (free,standard or pro) offers a major gain for DBPro - cant wait.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jan 2010 15:16
Quote: "Something I noticed with AT, like you, is that the culling with AT has now gone wrong"


I think you need to include update terrain after moving the cameras and before the sync. I can't test this myself with the demo because I haven't got BT so it won't compile. But I had exactly the same problem with a water and terrain demo I'm working on and that was the solution.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 28th Jan 2010 16:09
I get about:
215 with AT
240 with BT
300 wtih BTLOD

The only thing I dislike with BTLOD is you can see the Lod pop in and out. Personally I hate that. But whatever. GREAT JOB.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 28th Jan 2010 17:20
Quote: "I think you need to include update terrain after moving the cameras and before the sync. I can't test this myself with the demo because I haven't got BT so it won't compile. But I had exactly the same problem with a water and terrain demo I'm working on and that was the solution. "


Thats what happens when you do include update terrain between update camera and sync. Even if you stay still, the camera isn't moving and the culling issues are still there!!!

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 28th Jan 2010 23:46 Edited at: 28th Jan 2010 23:47
I get culling issues with your demo.

As I said before, the problems in my own demo (which is also loosely based on Evolved's demo) disappear when update terrain is put in the right place.

I can only assume you haven't put it in the right place.

Actually, I suspect there's a problem with update terrain and cameras - i.e. which camera does the culling refer to? My guess is camera 0 and following through that assumption removed the obvious culling issues (I suspect there were other minor ones with the other two cameras which I hadn't noticed). Perhaps set current camera needs to be used as well?

I guess your BT method must recalculate the culling for each camera. Does it?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 29th Jan 2010 11:12 Edited at: 29th Jan 2010 11:14
If you look at the code with the demo which gets culling issues, you will see where i put update terrain. I tried it in front of each fastsync too and all 3 but the results are the exact same.

Quote: "Perhaps set current camera needs to be used as well?"


It probably does. But I'm guessing that Advanced terrain can only update culling to 1 camera at a time. I'm guessing its updating to the reflection camera as when you look up, the terrain disappears. The water demo acctually came without the update terrain command built in. Maybe the problem has been around even when evolved made this demo.

Quote: "I guess your BT method must recalculate the culling for each camera. Does it?"


It depends what the user wants. If you look at the demo there are only 2 cull updates. One before the refraction and main camera gets rendered (as they are in the same position and point the same way) and another before the reflection camera renders. The user is able to update LOD and Culling for each cameras or make cameras share cull/LOD updates if theyre in the same position.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jan 2010 12:42
Quote: "But I'm guessing that Advanced terrain can only update culling to 1 camera at a time."


That's my guess too. I'd assume it updates for camera 0 (or the current camera - I'll try to find time to do some tests or, better, ask Mike Johnson who should know ). Of course that should also work for the refraction camera as you say - it's the reflection camera that should be wrong which might explain some of the problems I'm having.

Quote: "Maybe the problem has been around even when evolved made this demo."


Seems quite likely in view of our experiences.

Quote: "It depends what the user wants. If you look at the demo there are only 2 cull updates. One before the refraction and main camera gets rendered (as they are in the same position and point the same way) and another before the reflection camera renders. The user is able to update LOD and Culling for each cameras or make cameras share cull/LOD updates if theyre in the same position.
"


Thanks. That makes sense.

This has been a useful discussion and I now have a clear idea of what to check next in my demos. Thanks.

Anyway, I doubt the update terrrain command will help AT that much. Have you got any comparison results for FPS with and without update terrain for your demo (ignoring the culling difficulties for the moment)? I'd do it myself but don't have BT ... yet.
The Slayer
Forum Vice President
14
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 29th Jan 2010 12:55 Edited at: 29th Jan 2010 12:55
Quote: "As I said before, the problems in my own demo (which is also loosely based on Evolved's demo) disappear when update terrain is put in the right place."


Is this what you're talking about, Green Gandalf?

Cheers

Slayer rules!!! Yeaaah, man!

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 29th Jan 2010 13:24
Quote: "Is this what you're talking about, Green Gandalf?"


Probably. That looks very like the version of Evolved's demo that we started with. I was helping Weave to get one of Evolved's demos working with one of my terrain shaders. We discovered there was a problem with the set camera clip command and had to find a way around it. The current version of our demo doesn't have much in common with Evolved's original demo apart from the refraction/reflection idea. I'll be posting it as soon as we've finished working on it. With luck it'll have bloom as well.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 14th Feb 2010 01:15 Edited at: 14th Feb 2010 01:42
I've just released a beta of Blitzterrain 2.00. This will allow you to compile the code in this demo!

This file has the dll, ini and 6 examples to get you started!

ZIP
RAR

NOTE: You must have DBPro 7.4 installed for it to run. Otherwise it will crash on startup!

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Feb 2010 12:41
Quote: "NOTE: You must have DBPro 7.4 installed for it to run. Otherwise it will crash on startup!"


U7.4 or later I hope?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 14th Feb 2010 13:30
Yep, it should run on U7.5 too.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 14th Feb 2010 15:51
Looking forward to trying it. Thanks.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Feb 2010 04:00
Just noticed this thread. Wow! What a difference BT makes! Impressive stuff.

AT = 182 FPS, BT = 783 FPS, BT/LOD = 925 FPS.

Single core P4 @ 3.4 GHz, 9800GT

Nice work, thank you!

I must say that it seems odd to be using something with Blitz in the name using DBP.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Feb 2010 17:31
LBFN, gotta love that FPS from the 9800GTs. Have you had problems with yours locking up your computer and the display going all weird?

If so, what's your default memory clock speed? Mine was 950MHz. I dropped it to 800MHz and the problem went away.

(sorry for the Off Topic post..) Back to BT!!

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Feb 2010 18:04
Kistech:

My memory clock speed on the 9800GT is at 849 MHz. I have not had any issues at all with it. I just got it a couple of weeks ago, though.

Alfa x
17
Years of Service
User Offline
Joined: 1st Jul 2006
Location: Colombia
Posted: 15th Feb 2010 18:38
From what are you talking in this thead,
I can see blitz terrain makes good use of the GPU.
The better the GPU the better are the performance gains.

Very nice work indeed. I will test at home this night.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Feb 2010 22:14
LBFN,

Interesting. Well, if you ever run into a problem with that while running a game, you know to lower the memory clock speed now.
My card is made by EVGA, and apparently they set their default for that a little higher.

DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 16th Feb 2010 22:02
Very nice speed gains from advanced terrain. Is there a list of the commands available to peruse? I wouldn't mind playing with it. Couldn't seem to get anywhere off the site had errors and such trying to register to see the help stuff. I got about 600 fps with the BT demo 800 for the BTLod demo and 200 max for the adv terrain.

http://s6.bitefight.org/c.php?uid=103081
Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 18th Feb 2010 14:22 Edited at: 18th Feb 2010 14:31
awesome work!

---------------------------------------
results from the last comparison build:

AT=235 fps

BT=717 fps

BTwLOD=938 fps!

*all numbers above were obtained from the starting view when the program starts.
---------------------------------------

I was unable to get my fps to go below 1880 on the second demo in the beta 2.0 release! On average I was getting 2k fps and as high as 2500.

I can't wait to get this into my project.

Sys Specs:
AMD Athlon II x4 620 processor @ 2.6 Ghz
4GB DDR3-800 RAM
Windows 7 Home Premium 64 Bit
XFX Radeon HD5750 w/1GB DDR5 RAM

*edited to add sys spec

Xgame101
1024 Studios
Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 28th Feb 2010 15:23
This demo is amazing, but I have a problem, when I'm underwater and look at the water (see attached image).
Has anybody else this problem, or does anybody know how solve this?

And of course my results:

AT = 159
BT = 188
BT with LOD = 234

Core 2 Dou @ 2.40GHz
Radeon X1800 GTO
4GB RAM
Vista 64

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-25 16:29:14
Your offset time is: 2024-04-25 16:29:14