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
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 2nd Dec 2010 21:14 Edited at: 2nd Dec 2010 21:18
Using GDK, I get these warnings:



Seems to run fine though until I tried:

I get linker error:


Thats the only command I have added to your "02AddSomeLOD" example, any idea why this command is not linking?

EDIT: While I'm here, do I use this command to make a Dark Basic object which I can then make my physics mesh with?

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 5th Dec 2010 17:42 Edited at: 5th Dec 2010 17:44
MakePhyObject has been removed. Use MakeSectorObject instead.

The top warning is because I used the rand function. This has now been removed. Not sure why you are getting the others.


GDK users can access the internal meshdata with the same functions used by DBPro TPPs to access the internal data. I'll write more about this shortly.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 5th Dec 2010 21:22 Edited at: 5th Dec 2010 21:23
How is this for a list of features for the full version?

Up to 4096x4096 terrains. (limited to 1024x1024 in free version)
Up to 255 terrains. (limited to 4 in free version)
Up to 255 LODLevels. (limited to 3 in free version)
Exclusion
Realtime Terrain modification
Colour Heightmaps (much more accurate than grey scale)

Quad reduction will be released sometime after the release as I don't want to delay the release any longer just for 1 feature. (Sorry for my Microsoft like way on releasing this feature).


The full version will cost £25. Which is about $40 or 30 euros. Let me know what you think about the price and list of features.

Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 6th Dec 2010 01:19
MakeSectorObject() worked great, this is really awesome stuff.
I can create my physics meshes with different LOD levels, improving performance. For a flight sim or any game high above ground you could use a really low LOD level for the physics and you would never know, cool.

One question, I was losing my pointer to the d3d device which I use to draw lines for debugging, this has never happened before, is it something Blitz Terrain is doing to cause this?
Is is a bad idea for me to keep this pointer and think its always going to be valid?
Anyway, I put a call to get the device every loop and it works fine now, just wondered if you knew why this happened.

Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 6th Dec 2010 02:08
Quote: "Look up the command BT_GetSectorSize(TerrainID,LODLevelID)"


Is it open-source? If so, link please?

Thanks for the help, I will go searching through your thread now!

Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 6th Dec 2010 14:34
Ok, I knew about BlitzTerrain for a while, but now I'm actually going to use it for a future DarkGDK project. Looks like an awesome plugin.
But this thread is very long and I don't really want to read through all of it. So here a few short questions:

1) Is it possible to use shaders (.fx) with the terrain?
2) Do I have access to the vertex/index data of the terrain? (needed for ODE physics integration)
3) So terrains can be modified in real time, is it possible to save and load such edited terrains? Is there a native BT file format?
4) Buying BT (about 30€ I think) allows me to create commercial products with it, right?

Thanks in advance.

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Dec 2010 14:52 Edited at: 6th Dec 2010 14:53
Quote: "is it something Blitz Terrain is doing to cause this?"


Blitzterrain only uses d3d to create and draw objects. It shouldn't change the pointer.

Quote: "Is it open-source? If so, link please?"


Nope its a command locked away in the blitzterrain lib/dll. The syntax of it is:



Quote: "1) Is it possible to use shaders (.fx) with the terrain?"


Yes it is. I wouldn't guarantee that all the shaders that work with Advanced Terrain will work with BlitzTerrain. They both work completely differently when it comes to rendering. Most shaders should work though.


Quote: "2) Do I have access to the vertex/index data of the terrain? (needed for ODE physics integration)"


Yes, there are commands to access, read, change and update vertexdata/indexdata. I will write about these in the help files of the next release.


Quote: "3) So terrains can be modified in real time, is it possible to save and load such edited terrains? Is there a native BT file format?"


Yes and yes.


Quote: "4) Buying BT (about 30€ I think) allows me to create commercial products with it, right?"


Yes. If you buy BlitzTerrain, you will be allowed to use it in commercial products of any size. No royalties or credit is required.

_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 6th Dec 2010 15:11
Oh cool, those were the answers I was hoping to get - 4 times Yes means I'm gonna use it!
And such great work needs to be credited of course! Keep up the good work!

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Dec 2010 19:08 Edited at: 6th Dec 2010 19:08
_Pauli_,

Awesome, thanks!



16 bit heightmapping is now done!

Heres how it works.

In greyscale mode, BlitzTerrain gets the value of the red channel of each part of the terrain and multiplies it by the terrains Y scale to find the height of that point.

Now blitzterrain does the same thing but also looks at the green channel. And adds the value of it divided by 255 to the red channel just before it is multiplied by the Y scale.

So the equation for BlitzTerrain height is:

Height = (Red + Green/255.0)*YScale


This is added into the full version of BlitzTerrain. I will create a simple program to turn RAW files (very accurate terrain files generated by most terrain generators) into 16 bit heightmaps. These 16 bit heightmaps will still be able to be loaded into most old terrain engines and all previous versions of BlitzTerrain because it still puts the height into the Red channel. They just wont be as accurate.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Dec 2010 19:56
All the features on the full version list are now completed! I just need to do documentation then its ready for release!

Here's the feature list again:
Up to 4096x4096 terrains. (limited to 1024x1024 in free version)
Up to 255 terrains. (limited to 4 in free version)
Up to 255 LODLevels. (limited to 3 in free version)
Exclusion
Realtime Terrain modification
Colour Heightmaps (much more accurate than grey scale)


The price will be £25. Which is about $40 and 30euros. Let me know what you think.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Dec 2010 21:06
Question, what's the point in having 255 terrains if their seams won't join correctly due to LOD? :/

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Dec 2010 21:47 Edited at: 6th Dec 2010 21:48
There will be a function to put terrains together when I add streaming and spherical terrains.

Terrains should stick together without LOD.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Dec 2010 21:52
Ah I see, sweet.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 6th Dec 2010 22:07
Quote: "Realtime Terrain modification"



[href]www.brianmacintosh.com[/href]
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th Dec 2010 11:04
Fixed a bug Mobiius reported a while ago. You can now delete and remake terrains without crash. (crash only happened on some computers).

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 7th Dec 2010 11:33
yay! Much thanks, i'll be sure to give this another try when it's available. keep up the good work!

My signature is NOT a moderator plaything! Stop changing it!
Clonkex
Forum Vice President
14
Years of Service
User Offline
Joined: 20th May 2010
Location: Northern Tablelands, NSW, Australia
Posted: 7th Dec 2010 21:18
Quote: "Nope its a command locked away in the blitzterrain lib/dll."


So now I'm confused. What's that got to do with how to use the getObjectSize command??? I want to know how to access a DBPro object's size from within a DLL I'm writing. Note that this has nothing to do with accessing a BT terrain object's size, I'm asking here because you obviously know how to use it (you would have to use it, surely?). Anyway could you help?

Thanks,
Clonkex

Making games is easy.....finishing them is a different matter.

Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th Dec 2010 21:31 Edited at: 7th Dec 2010 21:32
Yes thats easy. Open the basic3d dll in your plugins directory with notepad and search it for getobjectsize If that doesnt return anything, then look for getsize (they sometimes done have the word "object" in them). It should find a string which looks like this (I done getobjectsize for you): ?GetSize@@YAKH@Z

You use the windows functions GetModuleHandle and GetProcAddress to get the pointer to the function. You can then call that function from its pointer.

Heres some code taken from the BlitzTerrain DLL for an example. (imports some functions from memblocks).




You can then call any of those functions like normal.

Travis Gatlin
15
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 8th Dec 2010 23:55
Im having a problem with this, it's not working, whenever i instal it to everywhere it's supposed to be it just gives me a syntax error, i was going to implement this into my game engine but i cant for that syntax error

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Dec 2010 02:34
..and the error is..

Travis Gatlin
15
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 9th Dec 2010 04:05
the error is "Could not understand command at line 1" or whatever line the command's on.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 9th Dec 2010 08:45
..and the command is?

Come on, you need to give us a little to go on.

Show some code.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th Dec 2010 12:34
travis gatlin,

This seems like a DBPro problem. You need DBPro 7.4 or above to run BlitzTerrain.

Also, make sure that BlitzTerrain is in plugins-user and none of the other plugins directories.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th Dec 2010 20:51
The release of the full version will definitely be in early January I will release the new free version at the same time.

Travis Gatlin
15
Years of Service
User Offline
Joined: 14th May 2009
Location: Oxford, Alabama
Posted: 9th Dec 2010 23:35
All of the files are in the correct place, my dbpro is all the way updated, yet no matter what command i put in, follow exactly what the keywords file tells me yet i still get a syntax error.
could i have some example code just to see if it's my code or the program.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Dec 2010 00:22
There are examples included in the file you download from the first post in this thread. They work fine.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Dec 2010 11:13
@ Kaedroho,

Quote: "Here's the feature list again:
Up to 4096x4096 terrains. (limited to 1024x1024 in free version)
Up to 255 terrains. (limited to 4 in free version)
Up to 255 LODLevels. (limited to 3 in free version)
Exclusion
Realtime Terrain modification
Colour Heightmaps (much more accurate than grey scale)


The price will be £25. Which is about $40 and 30euros. Let me know what you think."


I am definitely up for the pay-for release of this plugin.

If I purchase the pay-for release (standard version?) in @ January, if you then release a professional? version (inc. streaming and spherical terrains) presumably can I pay for an upgrade (ie. standard to pro version) or would I have to pay all over again ( )?

In addition to the features mentioned above, what additional features would be in the pro(?) version?

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: 11th Dec 2010 14:48
You can now add quad reduction to the list of Standard features. I just got it working! I made it so it cant reduce quads on the edge of sectors so the sectors still match up nicely. Its not far off working properly. I'd rather get a release out before I go and break everything though.

If a professional version gets released. I will make sure there's an upgrade. Otherwise, I will just put the new features into the standard version.


There will be many new additions to the pro version. Mostly undecided. The 2 most wanted features are Streaming and Spherical terrains. I designed the new system from the start with these 2 features in mind so they shouldn't be too hard to add.


The source code to the RTTMS plugin will be released to pro version users. This will allow you to add your own brushes to BlitzTerrain.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 11th Dec 2010 17:18
@ kaedroho,

That all sounds great - any speed comparisons yet with / without quad reduction?

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: 13th Dec 2010 20:29
New function on the way. This function enables manual drawing for terrains. And manual drawing will be disabled by default. Currently, you have to update and render terrains by yourself. Soon that it will be managed within BlitzTerrain. It will be a lot slower with multiple cameras but simpler to use.

The function is:
BT SetTerrainManualDrawing TerrainID,enabled

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 13th Dec 2010 23:52
@ Kaedroho,

With just one camera will the BlitzTerrain controlled update/render be quicker then?

Also, with RTTMS commands, will we have some commands to allow you to 'paint' a colour to a particular x/z coordinate on a terrain or sector?

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: 13th Dec 2010 23:54 Edited at: 13th Dec 2010 23:55
Quote: "With just one camera will the BlitzTerrain controlled update/render be quicker then?"


Not much quicker. Maybe a few instructions per loop which is extremely small. This is to make it more user friendly but also keeping in the advanced features that makes BlitzTerrain faster.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 19th Dec 2010 15:26 Edited at: 19th Dec 2010 15:26
Ok, got all the commands for the documentation done. Let me know if its clear enough. I'm hoping that this could also be used a datasheet sort of thing so people can look at this and see if BlitzTerrain is right for their project.

Download attached.

Attachments

Login to view attachments
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 19th Dec 2010 19:16
Looks good so far.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Dec 2010 17:29
All downloads will be unavailable for a few hours as I am just about to start uploading the new download system. The new download system will completely replace the old ones and be part of the new Blitzwerks website. I'll release more info about this later.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 26th Dec 2010 17:55
@ Kaedroho,

Looked through pdf - seems pretty comprehensive.

With the RTTMS are we going to get commands to get/set the colour at a particular vertex of a sector or a particular x/z point on the terrain?

Also, will you show the code/add as a command to allow for you to get the sector vertex or x/z point on the terrain by the 2d position of the cursor on the screen? That would be enormously helpful...

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: 26th Dec 2010 22:27 Edited at: 26th Dec 2010 22:28
Download system back up! Both download systems 1 and 2 have been deleted and replaced with a brand new one! The new one merges the 2 old ones together and is part of the new Blitzwerks website. The new Blitzwerks website is up but very far from finnished. You can view it through http://www.blitzwerks.co.uk/main.bw.


Quote: "With the RTTMS are we going to get commands to get/set the colour at a particular vertex of a sector or a particular x/z point on the terrain?"

This isn't added yet but will be added soon.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Dec 2010 14:15 Edited at: 27th Dec 2010 14:29
New download system is fully running now. There are a few errors in download counts for downloads which were from the seccond download system. I'll get this solved soon.

BTDEMOWaves has so far got 96 downloads but the download page says 3.

EDIT: Found the problem, when I moved the database over, all the data in the DayID and DownloadID fields got swapped.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 28th Dec 2010 19:33
Just fixed the last bug in BlitzTerrain full. Now working on extra examples and docs. After that, I can release.

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 4th Jan 2011 23:44 Edited at: 4th Jan 2011 23:47
BlitzTerrain 2.01 release!

Heres the long awaited release of BlitzTerrain 2.01. It features many bug fixes and a new filetype. Along with faster loading speeds due to changing the way normals are calculated.

ZIP
RAR


The GDK release will be along shortly. Just need to complete the examples.

The full version release for DBPro has been sent off to TGC. I will send off the GDK version when I have fixed 1 more bug and finished the examples. The DBPro version will be available next week.

BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 5th Jan 2011 02:38
revenant chaos
Valued Member
17
Years of Service
User Offline
Joined: 21st Mar 2007
Location: Robbinsdale, MN
Posted: 5th Jan 2011 13:27 Edited at: 5th Jan 2011 13:31
Hi Kaedroho, It is awesome to see another release!!

I seem to be having another problem with using shaders with Blitzterrain, except this isn't one that I can explain in detail. It seems that shaders cause the terrain's sectors to be placed into the wrong spots (the same position as the first sector). To see that I mean, you can use the demo I posted earlier at:
http://forum.thegamecreators.com/?m=forum_view&b=8&t=145404&p=34#m2103645.

Is the free version limited to only one terrain? My quick go at creating a second returned an error that the terrain did not exist (though I might have done something wrong).

In the examples folder there are some folders which contain "(Fullversion)" in the name. Are they supposed to do nothing with the free version (Their features seem to do nothing, yet the examples still compile)?
Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Jan 2011 13:33
Nice, (not that I can see a difference from the old version) but all you need to add now is a 'BT SetTerrainPosition' command.

My signature is NOT a moderator plaything! Stop changing it!
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 5th Jan 2011 18:33
Quote: "I seem to be having another problem with using shaders with Blitzterrain"


I will look into this. I think I might switch back to the old system. The new one doesn't seem to be working properly.

Quote: "Is the free version limited to only one terrain?"


Yes it is.


Quote: "In the examples folder there are some folders which contain "(Fullversion)" in the name. Are they supposed to do nothing with the free version (Their features seem to do nothing, yet the examples still compile)?"


I put them there to give people an example of how the full version features are used. As soon as the full version gets protected, I'll include an executable with them so you can try them out.


Quote: "Nice, (not that I can see a difference from the old version) but all you need to add now is a 'BT SetTerrainPosition' command."


This already exists. You the DBPro command 'set object position' on the objectid you set in the build terrain function.

Most commands on DBPro objects will also work with BlitzTerrain objects.

Mobiius
Valued Member
21
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 5th Jan 2011 18:40
Quote: "This already exists."

So it does!

Quote: "You the DBPro command 'set object position' on the objectid you set in the build terrain function."

I never thought of doing that! Thanks!

My signature is NOT a moderator plaything! Stop changing it!
kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Jan 2011 17:38
BlitzTerrain will be renamed to 'Blitzwerks Terrain' to prevent confusion with some other products that are around. You can still call it BlitzTerrain for short though.

Indicium
16
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Jan 2011 18:24
What other products? Blitzwerks Terrain doesn't really have the same flow to it :/

kaedroho
17
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Jan 2011 19:26
BlitzBasic, Blitz3D, etc. Theres a whole range of indie game development products around with Blitz at the beginning.

We will still call it BlitzTerrain on the forum for short. Only on the TGC website will it appear as Blitzwerks Terrain.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Jan 2011 19:55
@ Kaedroho,

Will the standard version have some commands to colour/get colour on points on the terrain?

If no, can you provide some code to show how it an be done?

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: 6th Jan 2011 21:09
Quote: "Will the standard version have some commands to colour/get colour on points on the terrain?"


Not yet. I'm hoping to add this in very soon though.

Login to post a reply

Server time is: 2024-11-23 16:18:55
Your offset time is: 2024-11-23 16:18:55