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
NightX
15
Years of Service
User Offline
Joined: 3rd Apr 2009
Location: Australia, QueensLand
Posted: 21st Feb 2010 12:25
sweet, thanks it works

Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 21st Feb 2010 15:32 Edited at: 21st Feb 2010 15:36
@ kaedroho:
i have VC++ 2008 express

EDIT: it works, seems the download got media file in the wrong place, moved it from \bin to solution directory, now it works, and yeah, this is amazing, words can't describe how awesome it is =)

Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 21st Feb 2010 15:37
This DLL is awesome, thanks kaedroho!

Everything runs fine for me, except for setting up a terrain with sparky's.
I tried both, setting up as a normal object with polygon collision and as a complex object, but both didn't work.
So is sparky's not supported at the moment or am I doing something wrong?
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 21st Feb 2010 15:56 Edited at: 21st Feb 2010 21:32
I've got Sparky's working fine. I just put this after the Build Loop:



EDIT: Removed OpenFPS-specific code

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Feb 2010 16:57 Edited at: 21st Feb 2010 17:47
Quote: "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."


You can click on any of the projects in the solution explorer, go to Project->Set as StartUp Project and it will run which ever one you like.

I have a problem with GDK-7.4, Blitz Terrain works great but now my other projects dont show any objects, just a blue screen?
This is not an issue with BT but if anyone knows whats going on I would appreciate it if you let me know. I don't want to use one version of GDK for one thing and then another for everything else lol.
EDIT: O.K, I may need to re-build my old projects before they work with update, I'll try later when I'm at my computer, other people may get same issues if they update to gdk 7.4 for the BT plug-in.

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 21st Feb 2010 21:27
Hi!

I tried a bit and it seems that LOD or something is messing up to make those, was it called "artifacts" ? Screenshot attached.. This was a known problem but should it be fixed by now or still under construction? Just asking

Also, i've noticed that the LOD doesn't always switch when it should. ie. Really spiky/edgy "hills" do that get groundheight isn't working with lod, and when you ascend the hill you may end up higher than it should be, coz the lod is still affecting the position you're in. also as i have those trees there they appear "on air" sometimes(even closer when the lod should not affect anymore). Mainly on those high spiky hills :F

hmmmh.. that didn't compile

Attachments

Login to view attachments
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 21st Feb 2010 23:08
The 7.4 version of GDK needs an update which is half way down the GDK7.4 thread in the DarkGDK forum, don't ask me why they have not updated the download in the top post, weird.

It seems like there are lots of issues with this version/beta of DarkGDK. I got it working but my textures are missing from my model, I could spend lots of time finding work arounds for the 7.4 issues but dont find that very appealing.

Is there any possibility of a BT GDK 7.3 or below version?
I'm sorry for asking this, hopefully 7.4 will be fixed one day but I wouldn't hold my breath.

If not, no problem, this is still an excellent piece of work.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 22nd Feb 2010 00:16 Edited at: 22nd Feb 2010 00:18
Quote: "Is there any possibility of a BT GDK 7.3 or below version?"


I could do that. But you wont be able to see terrains through things like water or particle as the terrain has to render before transparent objects.

Quote: "I tried a bit and it seems that LOD or something is messing up to make those, was it called "artifacts" ? Screenshot attached.. This was a known problem but should it be fixed by now or still under construction?"


Must be a bug. Could you send me the code which caused this to happen?


Quote: "get groundheight isn't working with lod"


Thats just a general thing with LOD. You will have to play around a bit. Make sure that you update the LOD distances when you zoom in. This would make it less easy to see objects sinking into or floating above the terrain.

If you really want, I can code you a function which gets the ground height of a certain LOD level. Or maybe a get ground height function which changes its LOD depending on the current LOD state of where it was checked. But this isn't very practical to reposition all of your objects when the LOD changes.


I have also noticed the problems with 7.4. This is why there is no demo 6 as I couldn't get any objects to render! When it gets fixed, I will add this in.

Tomorrow I will release a version of BlitzTerrain which will work on 7.3 and under. But please note that you cannot have any transparent objects unless you don't mind them stopping your terrain from rendering behind them, it is only temporary anyway.

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 22nd Feb 2010 07:43 Edited at: 22nd Feb 2010 07:44
Ok I'll rip off unessecary code as it's about 1k lines the whole thing atm

But basically I just copied the BlitzTerrain example "smooth and quad rotation" code and applied that to my own project & made my own heightmap and basetexture.. I can post a zip of it.. Later today

Quote: "Make sure that you update the LOD distances when you zoom in."


If it matters, it wasn't a zooming in but actually moving a camera near to the point that should be "really close"(the LOD should update at that point already, I feel that sometimes it doesn't update on time.. I'll try to get somekind of example about this also..)

hmmmh.. that didn't compile
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 22nd Feb 2010 20:44
Attached is a patch to make it work with GDK 7.3 and below.

DO NOT DOWNLOAD THIS IF YOU HAVE 7.4 OR ABOVE!!

Simply download and install this. Before each sync, make sure you call this function void BT_Intern_Render(void) (it is not in the header so you will have to define it at the top of your code first).

It should work as normal, but just remember there will be bugs with getting the terrain to render behind transparent objects like water.

Attachments

Login to view attachments
Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 23rd Feb 2010 08:33
Hi!

Btw can I use fog with Blitzterrain -object as it's rendered with separate graphics engine ? Or other effects like alpha blending etc.. Is there limitations/available effects atm ?

ps. didn't get to separate the code yet about the artefact-bug..

hmmmh.. that didn't compile
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Feb 2010 16:20
Is there anywhere I can find what all the error codes mean?

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 23rd Feb 2010 20:17
I wouldn't recommend that you use the Sector Objects for displaying terrains as it would be very slow. The reason why BlitzTerrain rendering engine is fast is because it doesn't constantly recalculate matrices or swap textures all the time. It just applies what it needs once and renders the whole terrain.

Quote: "Is there anywhere I can find what all the error codes mean?"


Yep, right here:

1 - Maximum Terrain Count Exceeded
2 - TErrain doesnt exist
3 - Invalid LOD levels (caused when you set a too high or too low number in BT SetTerrainLOD)
4 - Heightmap doesnt exist
5 - LODLevel doesnt exist
6 - Heightmap Size invalid
7 - Exclusion map size invalid
8 - Already Building (this is caused when you build more than 1 terrain without finnishing them)
9 - ObjectID Illegal
10 - Terrain not Generated
11 - Cannot create Vertex Buffer (caused when you have too many vertices per sector)
12 - Cannot create Index buffer
13 - Sector doesnt exist
14 - Terrain not built
15 - Invalid File
16 - Cannot read file (This shouldnt come along for some time, i'm planning on making all future filetypes backwards compatible)
17 - Terrain Already Built

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 24th Feb 2010 01:07
all the demos crash for me with modname "unknown", any idea why this happens?

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th Feb 2010 02:06
*copy-paste*

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 24th Feb 2010 07:41
Quote: "Hi!

I tried a bit and it seems that LOD or something is messing up to make those, was it called "artifacts" ? Screenshot attached.. This was a known problem but should it be fixed by now or still under construction? Just asking

Also, i've noticed that the LOD doesn't always switch when it should. ie. Really spiky/edgy "hills" do that get groundheight isn't working with lod, and when you ascend the hill you may end up higher than it should be, coz the lod is still affecting the position you're in. also as i have those trees there they appear "on air" sometimes(even closer when the lod should not affect anymore). Mainly on those high spiky hills :F"


Hi again!

I didn't make a source/package of the problem, As it seems it's inconsistent. But what I found out was that It really was a LOD that was causing the holes. I used pretty "nearby" value for the first LOD level so it updated pretty late. In the screenshot I sent earlier somehow it didn't update at all even as I thought it should've so near. Maybe it was just in the lmit..

Today I tested a little I saw the same thing but only for a short moment and then the LOD updated and artefact vanished.. Then again, I ran the exe again and gone to the spot it happened, the hole didn't appear again :S

hmmmh.. that didn't compile
RaverGames
14
Years of Service
User Offline
Joined: 13th Feb 2010
Location:
Posted: 24th Feb 2010 21:54
wow thats look realy great

Will it cost Money when it is finish =D

RaverGames
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 24th Feb 2010 22:11
Hi, I'm still going to try the GDK 7.3> version out when I get a chance, I will also try the GDK 7.4 again to see what other issues I get, if any.

Appreciate all the time you put into GDK versions, thanks dude.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 25th Feb 2010 08:30
@ Kaedroho,

This is excellent. Having plenty of fun with it.

Where to from here? What are you working on next with BlitzTerrain?


a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 25th Feb 2010 15:27 Edited at: 25th Feb 2010 15:28
Currently, my work PC is down because it had Windows 7 RC installed. Currently rebuilding it as I write this post and I should have all the software I need back on it by the weekend.

Quote: "Where to from here? What are you working on next with BlitzTerrain?"


I still have loads of ideas on what to add to BlitzTerrain. I'll start by adding some more basic ones like Environment Mapping and a simple RTTMS. Then I will get more advanced things in like Quad Reduction and Streaming.

I can tell you that Quad reduction will make the FPS shoot up by quite a lot. Probably more than Dynamic LOD does.

I also have plans on getting rid of the DBP/GDK dependency. Meaning that it would be easy to port into different engines and people will be able to use BlitzTerrain to power the terrains in their own engines!




Thanks everyone for all the great comments!!

Aldur
17
Years of Service
User Offline
Joined: 8th Oct 2007
Location: Melbourne, Australia
Posted: 25th Feb 2010 19:56
I am very excited for the the removal of the DBP/GDK dependency!
BlitzTerrain is the perfect solution for my engine

Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 25th Feb 2010 21:43
kaedroho: I downloaded the GDK version and the replacement lib for GDK 7.3. I put the include file and the lib into the appropriate directories on the GDK path. I opened the example project, tried to compile and run the first two demos and --- blue screen. Nothing at all appears on the screen, except the frame rate text. What's happening? I was so happy that you released the GDK version, I'd like to use this!
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 25th Feb 2010 22:46
Read this:
Quote: "Simply download and install this. Before each sync, make sure you call this function void BT_Intern_Render(void) (it is not in the header so you will have to define it at the top of your code first)."


Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 26th Feb 2010 07:12
Help! :F

I got a new comp, installed win XP, dark basic pro and everything. But now the blitzterrain doesn't work. It returns error when running a compiler .exe "error 5: Couldn't load DLL: Blitzterrain.dll"

I've tried to place the dll into the projects directory, user-plugins and heck everywhere Doesn't work

It's a same copy of winXP so I'm confused. I updated DBpro compiler and editor also..

hmmmh.. that didn't compile
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 26th Feb 2010 07:45 Edited at: 26th Feb 2010 07:57
It's working, thanks! Sorry for missing that sentence.

Thank you for all the work you put into this great library!
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 26th Feb 2010 17:25
@Masqutti,

It goes in Compiler\plugins-user

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Feb 2010 15:04 Edited at: 27th Feb 2010 15:05
Update:

Environment Mapping functions complete. Just need to export and test them.
Changed the error system to give the error text and function name instead of just a number.

BlitzTerrain 2.00 Beta 2 should be out tomorrow.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Feb 2010 15:32
Quote: "Update:

Environment Mapping functions complete. Just need to export and test them.
Changed the error system to give the error text and function name instead of just a number.

BlitzTerrain 2.00 Beta 2 should be out tomorrow."

Yay

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 27th Feb 2010 20:58
Quote: "@Masqutti,

It goes in Compiler\plugins-user"


Ye i know, It was there but as i got suspicious i tried it to different directories(mainly inside compiler -dir and then to the project's own directory)..


But the problem presists. I hope beta2(?) works for me

I might try reinstalling DBPro and check if the problem presists. At least I've sent demo's of my project to several ppl and none had the same problem, all worked. And as it's in XP, i'm thinking it may be something else than blitzterrain.. But any other thought about error "couldn't load dll" than just can't access it. Can it be there is an error during "loading the dll" ???

hmmmh.. that didn't compile
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Feb 2010 21:05
The error your having is a DBPro compiler problem. Possibly a bug. That error comes up when the dll hasnt been linked into the final exe. Try checking the setup .ini file to check if externalise dlls isnt set to yes, but thats the only thing I can think of right now.

DBPro obviously recognised the plugin is there but just didnt link it (otherwise it wouldnt have compiled). Make sure that the dll is in Plugins-user and is not duplicated in any of the other plugins folders.

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 27th Feb 2010 22:01
all the demos crash for me with modname "unknown"...

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Feb 2010 22:08
What version of Visual C++ / DarkGDK are you using??

Or, What Version of DBPro are you using??

thenerd
15
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 27th Feb 2010 23:37
7.4, I think.
compiler: version 1.07
editor: october 2nd 2008

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 28th Feb 2010 01:15 Edited at: 28th Feb 2010 01:16
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 28th Feb 2010 01:48
Some stats

Function Count:
External: 52
Internal: 74
Total: 126

Line Count:
6745

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Mar 2010 05:14
I just installed your new version, and now it's asking for d3dx9_42.dll. Do you know what DX version this is? Is this necessary?

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 1st Mar 2010 07:40
Just install the latest dx 9

http://www.microsoft.com/downloads/en/resultsForCategory.aspx?displaylang=en&categoryid=2

top 2 are released this year so i guess those are the latest ones!

hmmmh.. that didn't compile
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 1st Mar 2010 11:04
I compiled it with DirectX February 2010, so you would need to update.

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 1st Mar 2010 20:41
Quote: "The error your having is a DBPro compiler problem. Possibly a bug. That error comes up when the dll hasnt been linked into the final exe. Try checking the setup .ini file to check if externalise dlls isnt set to yes, but thats the only thing I can think of right now.

DBPro obviously recognised the plugin is there but just didnt link it (otherwise it wouldnt have compiled). Make sure that the dll is in Plugins-user and is not duplicated in any of the other plugins folders."


Hi! Thanks for the answer.. I checked the setup.ini and externalizedlls were No !! I changed to Yes, after that the same error didn't repeat. Instead, it compiled ok, but when ran, it just crashes returning the normal windows error "program crash".. Any ideas :S ? Anything else seems to run fine with DBpro(tho i haven't tried other external dll's yet)

hmmmh.. that didn't compile
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 1st Mar 2010 20:55
Externalisedlls should be set to No. I was asking you to check that it is set to no.

I'm not sure whats causing the problem. Try compiling it like normal (With externalisedlls set to no) and put the BlitzTerrain.dll in the same directory as the executable you have just compiled. If it works then its definitely a DBPro linker error.

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 2nd Mar 2010 06:30
Ok! Me and my great english I'll try it tonight! Ahead to work now ->

hmmmh.. that didn't compile
Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 2nd Mar 2010 21:12
I've just recognised that every terrain (no matter with or without LOD, loaded from a file, converted to a DBP object, etc.) has a black polygon in its lower left corner (see attached image).
But it just shows up if you're very close or far away.

Anyway, great plugin, keep up the great work.

Attachments

Login to view attachments
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 2nd Mar 2010 23:48 Edited at: 2nd Mar 2010 23:50
It's a tear in the fabric of space time.

CLOSE IT! CLOSE IT QUICK!!!

Seriously though, you're pretty high up above the terrain.

What's your camera range set to?

Is the Backdrop on?

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 3rd Mar 2010 11:47 Edited at: 3rd Mar 2010 11:50
I know what that polygon is but why you can see it is a bit weird.

I found that when making BlitzTerrain, I needed a DBPro object to make it easier for people to set the visual data of the terrain (like position, scale, textures, etc) so I had to make a DBPro object which would be used to copy this data from. When making a DBPro object I found that it is not possible to create a zero poly object so I created single triangle without any vertexdata (except for diffuse just so it has some data to work with). I think that is the triangle you are seeing and as there is no vertexdata, it is extremly rare to own a graphics card that could see it (what GPU do you have and what version of DirectX do you have installed).

This is a bug with DirectX and not with BlitzTerrain. However, I will look for a workaround.

This is probably the weirdest thing I've ever seen in any DirectX app. Where is that triangle getting its position data from?? A triangle with no vertex data can't be rendered! but it is being rendered!!

It might not even be the triangle I'm talking about...

Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 3rd Mar 2010 16:24 Edited at: 3rd Mar 2010 16:30
@KISTech:
Well this shot is taken from the "GenerateATerrain" example, that comes with v2.0 Beta 2, so backdrop is on and camera range is from 10 to 10000.

@Kaedroho:
I'm using DX 9.28(February) and a Radeon X1800 GTO graphics card.
Today I could see this polygon, no matter how far away I am, but sometimes, it disappears, if I rotate the camera (although it still should be in screen).
But I recognized, that the position of the polygon varies (it seems to be based on the camera angle).
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 3rd Mar 2010 18:24
Maybe it's showing it due to the "absence" of vertex data. It knows there's something there, but doesn't quite know what to do with it, so it shows nothing, which blocks out the blue backdrop in that space. (just a thought)

Like I said, it's a tear in the fabric of space time, or at least maybe a tear in virtual space.

Liopriwo
14
Years of Service
User Offline
Joined: 2nd Dec 2009
Location:
Posted: 3rd Mar 2010 18:35 Edited at: 3rd Mar 2010 18:36
I've just did a few tests and it also appears if there is a skydome, a object and if the terrain is very low in the lower left corner, than it's even on the terrain.

But if it is a tear in the fabric of space time, then we're lucky, because it isn't growing
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 3rd Mar 2010 18:56 Edited at: 3rd Mar 2010 18:56
Quote: "which blocks out the blue backdrop in that space. (just a thought)"


It would have to rasterise itself to the Z buffer in order to block out stuff. And if it only rasterises itself to that, the backdrop would still be there as it would have to draw a black triangle on top of the backdrop in order for you to see it. So this is definitely a normal triangle.

Its a problem with the vertex processing stage, not the pixel processing stage.

Quote: "it's even on the terrain."


That shows that its definitely drawing to the draw buffer as the terrain would draw before this and if it was only drawing to the Z buffer you wouldnt see anything.

From the evidence I see, it looks like its an ordinary triangle. Not a problem with your GPU, not a problem with DirectX and not a tear in the fabric of space time.

Although, it could be any of these so we better keep our eyes open!

Masqutti
14
Years of Service
User Offline
Joined: 8th Jan 2010
Location: insanity
Posted: 4th Mar 2010 07:18
Pretty interesting events we have here

I tested compiling & putting blitzterrain.dll to the project-directory and ran the exe.. Says the same, " 5: couldn't load dll: Blitzterrain.dll" :S So odd as it works on most of the computers including my 2 others did their job and so did many of my friends computers..

hmmmh.. that didn't compile
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 4th Mar 2010 10:18
Did you recompile it on each of your friends computers or are you using the exact same exe for all of them?

Login to post a reply

Server time is: 2024-11-23 19:08:11
Your offset time is: 2024-11-23 19:08:11