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
Aldur
16
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 13th Feb 2010 10:33
Exciting news Kaedroho, I can't wait to see what it's like!
Good job on the amazing progress with BT!

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 14th Feb 2010 01:06 Edited at: 14th Feb 2010 01:21
BlitzTerrain Beta 2.00 is out!!!!

Includes DLL, ini and 6 Examples!!!

ZIP
RAR


EDIT: I have just realised that it has been 1 year to the day since I've released the first beta of BlitzTerrain

Dark onyx
17
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 14th Feb 2010 08:41
Man, I was so pumped to test the new version of BlitzTerrain, but when I compile and run it, it gets to the loading part and crashes. I was running the GenerateTerrain example when this occured.
Could some one help me out with this? This seems like a really useful plugin.

"I reject the reality and substitue my own"
- Adam Savage
AMD Phenom 2 X4 3 GHZ, 4 GB RAM, Geforce 8800 GT Pre Alpha Dog Edition 512 MB, Win 7 Ultimate
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 14th Feb 2010 13:41 Edited at: 14th Feb 2010 13:46
Upgrade to 7.4. This happens on 7.3 and below because a command in DBPro which is needed by BlitzTerrain isn't there. Its a command that adds BlitzTerrain to the DBPro rendering engine.

Under core of the DBPro update:
"* New implementation of a render order list for more third party flexibility"

Dark onyx
17
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 14th Feb 2010 14:10 Edited at: 14th Feb 2010 14:29
I am already running DBP 7.4. Any other thoughts?

EDIT: I've isolated it to the following command: BT BuildTerrain g_TerrainID,g_TerrainObjectID
That's when the game crashes on run. If I remove it from the code, it doesn't crash, nor does it finish to load(quite obvious I guess xD). Maybe that info will help you?

"I reject the reality and substitue my own"
- Adam Savage
AMD Phenom 2 X4 3 GHZ, 4 GB RAM, Geforce 8800 GT Pre Alpha Dog Edition 512 MB, Win 7 Ultimate
Super Nova
19
Years of Service
User Offline
Joined: 14th Jun 2005
Location: Earth
Posted: 14th Feb 2010 23:33
I just ran all the examples and they compiled just fine under 7.4.

All the examples are incredibly fast and look great, although there seems to be that black edge on the terrain problem that was pointed out before. This is truly amazing work, terrain with LOD in Dark Basic Pro... good times await.

"What I have shown you is reality. What you remember, that is the illusion."
Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 14th Feb 2010 23:45 Edited at: 14th Feb 2010 23:54
I love your plugin I have three questions personally,

I will want to use this in GDK for my games!

-Can you have multiple textures on a single terrain?
-When will a DarkGDK version be available?


Making dreams possible, one line at a time...
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 14th Feb 2010 23:50
Quote: "-Can you have multiple textures on a single terrain?"


This hasn't been added yet. But I am planning to in the future. I have been researching into how to do this without shaders mainly.

The idea of having multiple textures on a single terrain is what started off BlitzTerrain. So it will definitely be a feature which will be added!

Quote: "-When will a DarkGDK version be available?"


Hopefully, next sunday!

Oneka
20
Years of Service
User Offline
Joined: 24th Apr 2004
Location: Hampton,VA
Posted: 14th Feb 2010 23:54
Cool, also I was just playing with it again

-Can you position and rotate terrains? (This is so that I can have multiple terrains loaded for a map)


Making dreams possible, one line at a time...
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 00:00 Edited at: 15th Feb 2010 00:02
Quote: "-Can you position and rotate terrains? (This is so that I can have multiple terrains loaded for a map)"


Yes and no.


You can postion and scale terrains using the DBPro position/scale object commands with the terrain object. (you set the terrain object in the build terrain command).

If you try and rotate a terrain it wont do anything. I programmed the rendering engine to ignore rotation, I found that it was very difficult to do box frustum culling on rotated terrains.

Also note when scaling terrains you must check the x and z scales before. I can guarantee that your terrain has already automatically been scaled on these 2 axis. This is because that BlitzTerrain has an internal scale fixed at 100 to avoid floating point errors if you pass a real number(float) in scale.

I will acctually get to work on sorting this out. Maybe make it scale the terrain twice, with BT and DBPro scaling so people can set the scale to what they want. Thanks for making me think about that .

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2010 04:59
*Me gets!*

Thank you, kaedroho! One year of work...quite impressive.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2010 05:22
First question . How does this version work with making phyics objects? The last version let you put an object number into BT ContinueBuild. The help files claim you can do this, but the compiler insists there are no parameters. What's the trick?

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 12:46 Edited at: 15th Feb 2010 12:59
Look at example 6. That shows how you can create a whole terrain out of DBPro objects. And Thanks!

From now on. Please check the front page of the help files before using them. The front page has the version number of blitzterrain which they are made for, and thats still 1.5 (need to update).

I might add another parameter to build terrain, and load terrain.

Generateterrain (bool). If this is set to 1 then the terrain will be generated inside the build function without need of a build loop.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 12:53 Edited at: 15th Feb 2010 12:55
Dark Onyx, I'm looking into the code now. The things that could cause it to crash are:

Low memory - at least 30MB free memory is needed
D3D device loss - make sure its not in hidden mode, and you are not letting it execute while alt tabbed out
DBPro functions missing - this function calls a few dbpro functions to create and setup the terrain object, some functions which are needed are only in DBPro 7.4
Programming error - if youve changed anything in the demo, then it could be my fault that its crashing, if this is true then let me know what you've changed


Theyre the first few reasons that come to my head. If you are using windows vista then that might also be causing it to crash (vista has done this in the past)

Dark onyx
17
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 15th Feb 2010 15:45 Edited at: 15th Feb 2010 16:12
Low memory - nah, I have well over 500 MB of RAM left over when I start to run it.
D3D device loss - nope, I'm just compiling the first example that came with the plugin. I haven't removed or added anything to it.
DBPro functions missing - I was running DBp 7.4 all the time and I even tried compiling it with 7.5 without any success. I use the Synergy editor.
Programming error - same as above, I haven't edited the example code in any way.

However, I did another test and ran the loading demo, which turned out to work just fine. I'll do some more testing and tell you how it turned out.
But from what I saw in the loading example, BlitzTerrain looks awesome! Thanks a lot for sharing this

"I reject the reality and substitue my own"
- Adam Savage
AMD Phenom 2 X4 3 GHZ, 4 GB RAM, Geforce 8800 GT Pre Alpha Dog Edition 512 MB, Win 7 Ultimate
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 15:47
Quick update:

Fixed bug causing BT SetTerrainDetailBlendMode to crash if used before BT BuildTerrain and to do nothing if used after (The code was switched round the wrong way)

Added a new parameter to BT BuildTerrain and BT LoadTerrain called "Build Fully". Its a boolean value, and when set to true it will build the whole terrain in one go without the need for a build loop.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2010 15:48
Quote: "From now on. Please check the front page of the help files before using them. The front page has the version number of blitzterrain which they are made for, and thats still 1.5 (need to update)."

Ah, okay.

The code from that example is working great, but it isn' textured and doesn't have the dynamic LOD. That's what I liked about the functionality of the last version. Is there a way to get the objects textured?

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 15:58 Edited at: 15th Feb 2010 16:03
Just do set object texture.

But here's the equivalent DBPro code BT uses to texture terrains

set blend mapping on ObjectID,0,Texture,10,4
set blend mapping on ObjectID,1,DetailMap,11,8

Quote: "doesn't have the dynamic LOD."


This is because BlitzTerrain doesn't use those objects. They are separately generated so users can add physics to their scenes. BlitzTerrain renders directly from its own vertex buffers. If you want to have LOD and frustum culling, then you should let BlitzTerrain render your terrains.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2010 16:14
Quote: "If you want to have LOD and frustum culling, then you should let BlitzTerrain render your terrains."

Okay, I figured that. But if I leave it to BT, I can't set up the terrain with Sparky's, can I?

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 15th Feb 2010 16:22 Edited at: 15th Feb 2010 16:23
Yes you can.

The whole idea of the create a mesh system is so that you hide the collision objects and set them up with sparkys. And let BT deal with visuals. The demo is a little bit misleading. I'll probably change it.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Feb 2010 16:43
Ah ha!

Dark onyx
17
Years of Service
User Offline
Joined: 8th May 2007
Location: Um... I kinda forgot it
Posted: 15th Feb 2010 16:46
I've tried all the examples now and only the terrain loading works.
Also, I forgot to say that I'm using Windows XP with SP 3.
What about that update? I can't seam to find it anywhere.

"I reject the reality and substitue my own"
- Adam Savage
AMD Phenom 2 X4 3 GHZ, 4 GB RAM, Geforce 8800 GT Pre Alpha Dog Edition 512 MB, Win 7 Ultimate
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 15th Feb 2010 17:56
Dear GOD that's fast.

Leaving it at 800x600 windowed, as you had setup the project, all of the demos got well over 2,000 FPS. (except the DBPro Objects of course.)

Very nicely done.

darkvee
18
Years of Service
User Offline
Joined: 18th Nov 2005
Location:
Posted: 16th Feb 2010 06:21
Looks good from what I hear! However it crashs on my pc.

darkvee
Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 16th Feb 2010 08:59 Edited at: 16th Feb 2010 09:07
Loogs great and works great !!! Both in vista and Xp, DBpro version 7.4!

hmmmh.. that didn't compile
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 16th Feb 2010 20:37 Edited at: 16th Feb 2010 20:44
darkvee, what version of DBP are you using??

I've just added in a delete callback so if you delete the terrains object, BlitzTerrain will automatically delete the terrains internal data.

Also fixed a bug making the delete command only work for built terrains.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 16th Feb 2010 23:56 Edited at: 16th Feb 2010 23:57
@ Kaedroho,

Sorry for not posting since release of v2. Been on hols. Congrats on the release. A fantastic achievement.

Is there somewhere on your site we can look at version2 help on commands? Went through the previous link and got to a forbidden message...

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: 17th Feb 2010 03:30
Thanks

Nope, there currently isnt any help files for version 2. Sorry.

Which previous link was this that lead to a forbidden message?

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 17th Feb 2010 17:13 Edited at: 17th Feb 2010 17:28
@ Kaedroho,

Sorry, only getting to the pc sporadically at the mo.

The old link I had was:-

http://technology.blitzwerks.co.uk/BlitzTerrain/Help/

which now jumps to:-

http://bt.blitzwerks.co.uk/Help/

Hope that's of some use...?

Anyhows, what did you finally include within the save command bt terrain file? Does it include the main texture, detailmap, etc?

Also, any chance you could just post the commands available at beta2?

Finally, let me know if you'd like any help just checking through the help files etc...

[edit] - sorry, being lazy, here for everyone are the commands in version 2 beta, lifted from the ini:-



a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
Newbie And Furious
14
Years of Service
User Offline
Joined: 10th Nov 2009
Location:
Posted: 17th Feb 2010 20:56
Cool

Here's my test with example #5:






<VGM>
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 17th Feb 2010 21:58
Newbie And Furious, Thanks for posting

Ok, the GDK version is almost finnished. I'll need to add another function called BT_Init. This will allow BlitzTerrain to set a few things in the rendering engine (BT needs to update in the sync command).

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 18th Feb 2010 23:37
Looking forward to GDK version.

How do you get your plug-in to update in dbSync()?
If it is too complicated and long winded to explain in detail, could you just give me a couple of pointers(**)?

Thanks.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Feb 2010 18:14
GDK version is finnished and should go on as planned. Expect a release in 6 hours and 46 minutes

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Feb 2010 18:51
matty halewood,

I've emailed you how to do it.

Weave
AGK Bronze Backer
17
Years of Service
User Offline
Joined: 26th Sep 2006
Location:
Posted: 20th Feb 2010 19:37
In DBpro-was checking out your new plugin and just wondered how you can position these terrains?

Also how to affect the light properties, with shaders?

Is collision only done using the bt getgroundheight command? Or am I supposed to identify the sector I`m in and set it physical ?

Thanks
Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 20th Feb 2010 22:59
Thanks alot Kaedroho, thats very useful, I know you must be very busy so thanks again for taking the time out to email me.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Feb 2010 00:30 Edited at: 21st Feb 2010 00:30
Quote: "In DBpro-was checking out your new plugin and just wondered how you can position these terrains?"


Use this command. Position Object ObjectID,x,y,z

The object id is the same as what you set in the build function.

Quote: "Also how to affect the light properties, with shaders?"


Shaders are not fully supported in this release. They will be shortly though. Currently you can display objects with shaders but there are only a few constant vectors/matrices that you can access at the moment.

Quote: "Is collision only done using the bt getgroundheight command? Or am I supposed to identify the sector I`m in and set it physical ?"


Check out demo 6. That shows how to make a terrain fully out of DBPro objects used for collision. Just remember that these objects are not optimised for doing visuals, Only collision.


Quote: "Thanks alot Kaedroho, thats very useful, I know you must be very busy so thanks again for taking the time out to email me."


No problem

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Feb 2010 01:08
BlitzTerrain GDK Release!!!

includes .lib and .h files
Supports OOP and Procedural Programming (all demos in OOP)
5 demos

Download:
ZIP
RAR

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: &lt;script&gt; alert(1); &lt;/script&gt;
Posted: 21st Feb 2010 05:50
debug mode warnings :


also, i get BT Error: 6 in both debug and release, all examples geberates the same error

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 08:34
I too get an error ->
in release and debug.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Feb 2010 11:19 Edited at: 21st Feb 2010 11:20
Hassan, What version of Visual Studio are you using??

NightX, Upgrade to version 7.4. That function it needs isnt in 7.3 and before.

BT Error 6 gets fired when the heightmap is not the correct size.

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Feb 2010 11:24 Edited at: 21st Feb 2010 11:26
I also get: BT Error 6.
I'm using VisualC++ 2008 express.

EDIT: Oh, I have not added the media, have no time now but wil try it again later(with media lol).

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 11:24
sorry I don't get you 7.4 ??

Matty H
15
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Feb 2010 11:27
I just updated to 7.4, go to GDK forum, its a sticky at the top.

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 11:34
Oooo, kk i thought you meant that, im downloading it now.

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 12:02 Edited at: 21st Feb 2010 12:02
ok, i just downloaded and updated Dark GDK and the demo's work. but i get 2800FPS looking at the sky and 560 looking at the ground. and in the lod example i look at the ground and i get exactly the same FPS. and this happens with all of the other examples... is lod disabled??

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Feb 2010 12:05
Quote: "EDIT: Oh, I have not added the media, have no time now but wil try it again later(with media lol)."


It should compile to the right folders anyway


Quote: "ok, i just downloaded and updated Dark GDK and the demo's work. but i get 2800FPS looking at the sky and 560 looking at the ground. and in the lod example i look at the ground and i get exactly the same FPS. and this happens with all of the other examples... is lod disabled??"


LOD is enabled in all of the examples except for the first one. Go into wireframe mode to see.

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 12:12 Edited at: 21st Feb 2010 12:12
I just turned on wireframe and i didnt see any change in the mesh. it stayed the same.

EDIT: I tested it in all of the examples.

NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 12:15
A pic attached.

Attachments

Login to view attachments
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 21st Feb 2010 12:18 Edited at: 21st Feb 2010 12:20
That pic is from the first demo.

Make sure that you are not running the same demo over again (this is a very annoying thing in Visual studio).

Right click the solution and click "build solution". Remember to set it to release mode first.

Then go into examples -> bin and there should be 6 folders in there. One for each demo and one for media. To run the demos, go into the demos folder and run the executable file inside.



The thing is with visual studio. If you click the play button at the top it will always compile and run the default project (the one which is bold in the solution explorer) no matter which project you have selected.

Login to post a reply

Server time is: 2024-07-01 07:20:34
Your offset time is: 2024-07-01 07:20:34