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.

Work in Progress / BlitzTerrain

Author
Message
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Aug 2009 18:19 Edited at: 21st Aug 2009 18:48
Thanks,

I get 110 ms with a 256x256 terrain.

The following code is what its acctually testing.




You can edit the heightmap in the test.terr file.


Working on GDK version now.

Todd Riggins
19
Years of Service
User Offline
Joined: 29th Oct 2004
Location: Texas, USA
Posted: 21st Aug 2009 21:58
Nice! For me, it took 249ms and stayed at 135 fps

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Aug 2009 22:28 Edited at: 21st Aug 2009 23:50
The FPS is very low because there's no LOD or Frustum culling. It will speed up soon.

GDK .lib compiles but doesn't run. I'm going to have to get help with this. In the mean time, I shall test out Quadmap modifiers. (Alot like Geometry shaders, sends in a list of quads, returns a new list of quads, Only done at the beginning though.)

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 22nd Aug 2009 00:12
Exclusion Modifier seems to work well. I will make it get exclusion from a map later on.

Image attached.

Attachments

Login to view attachments
SpiderPig
14
Years of Service
User Offline
Joined: 11th Jul 2009
Location: Australia
Posted: 22nd Aug 2009 10:26
Sweet job!
I got 328ms and a steady 600fps!

"I ask you,....what could possibly be in my eye that would explain this!?" - Jack O'Neill : Stargate SG-1
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 22nd Aug 2009 20:43
You must have a decent pc to get DBPro to run 500000 polys at 600FPS. I'll add QuadTree Frustum culling soon, should give you even more speed.

I'm going to use a custom Frustum culling system inside BlitzTerrain. This should get rid of the frustum culling bugs. I will also be able to change bull objects to boxes instead of spheres, so objects will cull better increasing speed.

Azunaki
15
Years of Service
User Offline
Joined: 11th Feb 2009
Location:
Posted: 22nd Aug 2009 21:40
i got the exact same newton...

[url]http://myportfolio.x10hosting.com/[url]
visit my site.(still in progress)
Koesak
15
Years of Service
User Offline
Joined: 20th Jan 2009
Location:
Posted: 24th Aug 2009 01:32
185ms and 805FPS @ 1920x1200x32

A
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Aug 2009 01:33
Do you have a supercomputer in your loft?

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Aug 2009 02:16 Edited at: 24th Aug 2009 02:23
I just have been looking at a load of old threads. I now have found the official birthdate of blitzterrain, with alot of other stuff.

I bet quite a few of you will be surprised by this but the actual date when blitzterrain was started was 7th May 2008.

My LOD terrain programming dates back to 13th Mar 2008.


PS: Get ground height function completed, its a bit faster than the old one (no actual numbers yet).

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Aug 2009 04:33 Edited at: 24th Aug 2009 04:34
Just added a new feature to the blitzwerks website.

This Olark thing that TGC started using. I have added it to my website and connected it to my PC.


If you have any questions or problems with blitzterrain, there is a little live chat box on the bottom right of this page:

http://www.blitzwerks.co.uk/

That will connect you straight to me. Just remember that I'm not always at my pc but when I am, I'm always happy to help.

Monk
15
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 24th Aug 2009 09:45
330ms for generation and 300 fps when sat in a corner looking at the whole landscape. Is it supposed to look grey?

Nice work, those fancy sounding algorithms obviously work very well!

Monk

I like work. It fascinates me. I sit and look at it for hours.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Aug 2009 19:01
Yes, its supposed to be grey, all the normals are facing the same way and there is no texture yet. I shall add these in soon.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th Aug 2009 19:30
That live chat thing is pretty spiffy .



Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Aug 2009 14:00
@kaedroho
I'm going to be adding terrains to mine and dark coder's game engine in the near future (pure C++), and I really like all the new features you have thought of, such as quad rotation.

When you are working out which way to place the diagonal, how exactly do you do it?
From the four vertices alone it's not possible. (Consider the case when two opposite vertices are high, and the other two are low. It could be a peak running one way, or a valley running the other way)

I also thought of a new idea. Instead of dividing the terrain up into a few large sectors, dividing it up into many very small sectors would be very useful. (Each one would be the size of a quad at the lowest LOD level)

- For each sector at creation time, you could generate an importance value, based on how angular the sector is. This importance value would weight the LOD range, so more angular sectors would need to be much further away to go down LOD levels, whereas very flat sectors would be go down LOD levels very easily.

- Exclusion mapping would be in terms of sectors instead of individual quads, making it much easier to match up seams.

- Each sector's LOD levels would be precomputed in memory, so that changing the terrain just requires a few raw memory blits to the vertex and index buffers, and then an alteration of the vertex and index count.

- Sectors determined to be facing away from the player can be omitted before sending the data to the graphics card, whereas normally all the faces have to be sent, and then the card itself removes backfaces.

- I can use a 32-bit index buffer, so that I don't need to separate the data over multiple draw calls. (The sectors will already be culled, so there is no point separating them)

- I can create an octree to encompass the terrain making culling of individual sectors very fast.

- Real-time terrain editing would only require altering the data in memory, because at the next update it would automatically be copied to the vertex and index buffers if it is needed.

- LOD is more effective when used on smaller sectors.

Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 25th Aug 2009 18:26
248ms
250 fps
1680x1050x32

236ms
430 fps
1024x768x32

Looking good I can't wait to see this when you finally release the new update!

Xgame101
1024 Studios
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Aug 2009 02:03 Edited at: 26th Aug 2009 02:05
Exclusion mapping and Quad rotation are in and working!

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Aug 2009 03:10
More updates:

Texturing and normals are now done, screen shot coming up.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Aug 2009 03:21 Edited at: 26th Aug 2009 03:22
Heres a screenshot: [attached]

keep in mind its still a beta. Hence the Beta symbol.

Attachments

Login to view attachments
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 26th Aug 2009 03:28
Awesome, we do kind of need that .



kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Aug 2009 03:49 Edited at: 26th Aug 2009 03:53
LOD and frustum culling next!

I'm going to use an algorithm called "edgeheights" Its a way of quickly welding together sectors. Lets say that you have 2 sectors, side by side. They both have quadmaps allocated for each LODlevel and they can dynamically change them depending on their LODLevel. Obviously, because of things like Quad reduction, indices may become messed up and you can get multiple sizes of quads accross 1 edge. Edgeheights are small arrays that store the data for the edges of quadmaps. Their size doesnt change no matter what LODLevel or quadreduction there is, and the neighbouring sector can take the data it wants to fix the seam, it also has its own edge heights to quickly find vertex indices.

The neighbour does the exact same, the process is very quick and much faster than looking up vertices manually.

Yet another algorithm I invented.


Frustum culling will use Quadtrees to reduce the amount of frustum cull checks.

SpiderPig
14
Years of Service
User Offline
Joined: 11th Jul 2009
Location: Australia
Posted: 26th Aug 2009 12:24
Look'n good! Keep it up!

"I ask you,....what could possibly be in my eye that would explain this!?" - Jack O'Neill : Stargate SG-1
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Aug 2009 03:02 Edited at: 27th Aug 2009 03:04
Thanks.

I have just added a pretty cool bit of code.

It digs through the DBPro internals and gets the DirectX vertex and index buffers. This will allow me to lock only pieces of the vertex/index buffers which are needed, increasing speeds of LOD switches.

This will also allow me to edit vertexdata in different threads. Even though I'm inexperienced in multithreading, I think it will be a useful feature to add in the future in case there is more than 1 vertexdata update to do.

I have made working code to lock the index and vertex buffers. The only problem is that these buffers get created in the first sync command after the object is created. This means that at least 1 sync is needed between the build loop and the BT update command. I'm hoping I can get this sorted with help from lee though.

SpiderPig
14
Years of Service
User Offline
Joined: 11th Jul 2009
Location: Australia
Posted: 1st Sep 2009 00:33
If it improves speed,....we like it!

How are things going??

"I ask you,....what could possibly be in my eye that would explain this!?" - Jack O'Neill : Stargate SG-1
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 1st Sep 2009 17:01 Edited at: 1st Sep 2009 17:04
Firstly, great plugin! I wish to buy it when it's finished!

Next, is there a position terrain command in the free version? If so, what is it?


*edit*
Never mind. I stopped being lazy and found the command in the help files located on your website.
It's UT SetTerrainPosition.

Thanks anyway! lol

Your signature has been erased by a mod because we're sadistic losers with nothing better to do. (joke)
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 1st Sep 2009 17:04 Edited at: 1st Sep 2009 17:18
Hey,

Sorry about lack of updates recently. I just got back from my holiday yesturday. I am currently trying to get it to work with Dark GDK. No luck yet, I shall keep trying though.


Mobiius,

Here you go,
http://technology.blitzwerks.co.uk/BlitzTerrain/Help/commands/UT_SETTERRAINPOSITION.html

Edit: Beat me to it!

Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 2nd Sep 2009 01:02
Has anyone gotten Evolved's Deferred shader working nicely with Blitzterrain? I've gotten them to run pretty well but I'm having issues with the water not showing up over the terrain. Seems to be a draw order issue possibly? I can get the water plane to show up occasionally at very oblique angles, very close to the water surface.

I've not tried to apply any Deferred shader effects to my terrain yet, since I really haven't a clue how to go about it

Xgame101
1024 Studios
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 2nd Sep 2009 19:25
Are you using multiple cameras?

Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 2nd Sep 2009 19:57
I am using the 2 cameras for reflection and refraction, Kinda touchy at times to get things set up correctly. I'm definitely having trouble getting the clip planes set just right.

I'm sucessfully using another shader setup that Evolved made that involves the same 2 camera setup but it lacks the extra post processing effects in the deferred shader set. If you have it working with BT then I'll just have to take a long hard look at my code to see where I might have gotten offtrack.

I'm sure it's got to do with any number of things interacting in my code. I have a 5 layer rotating skysphere system with orbiting sun and moons that all have to play nicely together as well

It could be the sheer scale of the landscape I'm using and the skysphere system. As it stands my largest skysphere is 15 million units across

Xgame101
1024 Studios
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 2nd Sep 2009 21:55 Edited at: 2nd Sep 2009 21:58
I got your email. Looking through the demo you sent. The demo isnt fixed in blitzterrain 1.06 so it cant be the frustum culling with multiple cameras issue (in 1.05, blitzterrain doesn't look at other cameras frustums when culling).

Does it work with advanced terrain? (In your demo, not evolved's)

Have you looked at outputs from all the individual cameras? (this could show what is happening behind the scenes)


Everyone,

1 more command added. BT GetVersion(). Returns a string of the version.

Going to add a new command. 'BT SetBuildStep Terrain,step'. This controls the amount of sectors the Continue build function generates at a time. Increase for faster loading times, decrease for smoother loading screens. Set this to 0 and it will create the terrain in 1 go.

Just finnished BT GetTerrainSize. Thats 23 commands out of ~30.

Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 2nd Sep 2009 23:54
I went ahead and dropped Advanced terrain into what I had and it provides the same results. I guess I need to get more info on how this particular water shader is applied. My luck, I'm just missing something obvious

Xgame101
1024 Studios
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 3rd Sep 2009 08:39 Edited at: 3rd Sep 2009 08:40
Quote: "I've not tried to apply any Deferred shader effects to my terrain yet, since I really haven't a clue how to go about it"


That would be the problem. The system uses two terrain objects, which each have a different shader applied to them. One of the terrains is used for the diffuse textures, and the second is used for the terrain normals.

One reason your water is not working is that your terrain object has no object (camera) mask applied to it (with set object mask ObjID , CameraMaskBits ), and therefore is being drawn by every camera when it should not.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 4th Sep 2009 23:13
@ kaedroho,

Sorry - been off forum for a while - looks like it's all coming along v well - keep it comin'!

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Xgame101
14
Years of Service
User Offline
Joined: 22nd Jul 2009
Location: Michigan
Posted: 5th Sep 2009 02:39
Quote: "One reason your water is not working is that your terrain object has no object (camera) mask applied to it (with set object mask ObjID , CameraMaskBits ), and therefore is being drawn by every camera when it should not. "


OMG, can't believe I wasn't thinking about it that way. Should be simple enough to get it working then I totally ignored the possibility the terrain was overwriting the water. I Read all 39 pages of the 'DBPro/Learning to write shaders' topic in hopes I would glean a better understanding of how the terrain shaders were being handled and it still completely went over my head

Can't wait to see how the optimizations in BlitzTerrain will change the FPS in the program I'm making.

Xgame101
1024 Studios
Potassium
14
Years of Service
User Offline
Joined: 12th Jul 2009
Location:
Posted: 5th Sep 2009 03:31
Does anybody know any resources for learning LOD (Level of Detail)? Any online tutorials wouyld be good. I found some tutorials on frustum culling, but knowing LOD would be even more optimized for the terrains.

There are 2 ways to develop for the N64:
1. Develop C code with PsyQ SDK and illegal Nintendo libs
2. Develop C code with legal kits, such as the Ground Zero devkit (g0dev.zip)
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 5th Sep 2009 13:58 Edited at: 5th Sep 2009 13:59
If you cant find a LOD tutorial, you could always resort to making your own. Look where BlitzTerrain is now! Its built 100% on algorithms I just made up. Terrain LOD is similar to normal LOD, you just have to repair seams caused by different LOD levels meeting.

Sorry about lack of recent updates. Sixth form needs alot more work than I initially thought, I'm also rebuilding my laptop with Windows 7. I will probably be able to squeeze in a few hours later.

Potassium
14
Years of Service
User Offline
Joined: 12th Jul 2009
Location:
Posted: 5th Sep 2009 18:48
You implemented your own algorithms? How am i supposed to do that? I'm using DarkGDK, but I'm trying to figure out how to have LOD when you're on a terrain. For example if you're looking at terrain 300 units away it should have less detail, which means less poly's. I don't really know how to manipulate the terrain vertices.

Can you at least give me some kind of hint or something, I'm not asking for code, just some hint as to where to go.

There are 2 ways to develop for the N64:
1. Develop C code with PsyQ SDK and illegal Nintendo libs
2. Develop C code with legal kits, such as the Ground Zero devkit (g0dev.zip)
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Mista Wilson
15
Years of Service
User Offline
Joined: 27th Aug 2008
Location: Brisbane, Australia
Posted: 6th Sep 2009 08:56 Edited at: 6th Sep 2009 08:56
Hey Potassium, I posted a bunch of links to LOD terrain tutorials here for you - (didnt want to crowd this thread with too much offtopic lol)



http://forum.thegamecreators.com/?m=forum_view&t=154823&b=22

Everything to do with LOD you can find there among those links, ROAM, quadtrees, Brute Force using OpenGL and directX implementations plus general theory etc.

Hope it helps

If it ain't broke.... DONT FIX IT !!!
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Sep 2009 14:07 Edited at: 6th Sep 2009 14:09
Hey, Just a small update.

Continue Build no longer has any parameters. Its been replaced with these 4 functions.

BT SetObjectID objectid
BT SetObjectID step, objectid
BT SetPhyObjectID objectid
BT SetPhyObjectID step, objectid

The step parameter is only needed if you use the BT SetBuildStep command. This command sets the number of sectors of the terrain to generate at once. If this is set to 0, It would generate the whole terrain in 1 go.

On its own, it increases loading speeds by about 10% when you generate the whole terrain in 1 go. This command is aimed at people who have complicated loading screens, and don't want to keep rendering them after every sector, this can slow down loading screens a fair bit. I get 200% loading speed increase on my very simple loading screen.

Example code: (with build step)



Example code: (without build step)


kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Sep 2009 18:11
I am pleased to announce:

BlitzTerrain 1.06 beta is fully working on Dark GDK

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Sep 2009 20:29
@ Kaedroho,

Excellent - eta for release for DBPro plugin v 1.06?

Also, how goes it with the Save n Load commands?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Sep 2009 21:43
No release date yet.

I havnt started on the saving and loading functions, but this time, blitsterrain is structured so this will be easy to add.

For frustum culling, I'm going to make the system set the masks of the objects instead of hiding/showing them. This means that with multiple cameras, camera 2 wont draw what only camera 1 can see (this problem occurs in Advanced Terrain). Object Masks give us better control of what each camera draws.

draknir_
17
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th Sep 2009 23:50
Wooooooooo! What version of GDK are you working with?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th Sep 2009 00:39 Edited at: 7th Sep 2009 00:40
Not exactly sure... I downloaded it a month ago.

Also, the GDK version uses OOP. So its a little easier to code with.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 10th Sep 2009 21:27
Early beta release


includes:
DBPro Demo. With executable, media and source code.
DarkGDK Demo. With executable, media and source code.
Early DBPro DLL. Unfinished and buggy. Only use if you want to recompile the demo.
Early DarkGDK LIB and headers. Unfinished and buggy. Only use if you want to recompile the demo.
Links to help files and forums.

Attachments

Login to view attachments
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 10th Sep 2009 21:46
@ Kaedroho - so what's Terraview about then - presume it will be a seperately packaged utility?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 10th Sep 2009 21:54 Edited at: 10th Sep 2009 21:55
Terraview is a terrain viewing tool. It's being made by the Wilderbeast.

I'll quickly get him to explain exactly what it is.

The Wilderbeast
18
Years of Service
User Offline
Joined: 14th Nov 2005
Location: UK
Posted: 10th Sep 2009 22:01 Edited at: 10th Sep 2009 22:01
Quote: "so what's Terraview about then - presume it will be a seperately packaged utility?"


Terraview is basically a utility for viewing and exporting renders of your terrain. Feature list:
-Quickly import heightmaps
-Supports both Advanced Terrain and BlitzTerrain
-Add effects such as water, bloom and camera flare
-Export renders of your terrain
-Supports extra mapping such as water mask, exclusion mapping etc.
-Generates exclusion maps based on water level

I'm currently having issues with the water/bloom shaders and BlitzTerrain culling, although I have not tested with the latest version which should fix this issue It will be available as a free download in the next few months.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 10th Sep 2009 22:02 Edited at: 10th Sep 2009 22:04

Login to post a reply

Server time is: 2024-05-18 07:58:49
Your offset time is: 2024-05-18 07:58:49