Sorry your browser is not supported!

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

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

DarkBASIC Professional Discussion / Blitzwerks Terrain

Author
Message
quilarcm
13
Years of Service
User Offline
Joined: 17th May 2010
Location: Min. USA
Posted: 16th Oct 2011 19:58
One Last question, would it be better to build eack terrain and save then to load in as needed? and if so do I need to texture and scale as loaded.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 16th Oct 2011 20:00
Yeah, it would be much faster to use Blitzwerks Terrains format. Images have to go through all sorts of processing before they can be used as a terrain.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 22:53
umm

I might have asked this before

what program is used to make the graphics so that
Blitzwerks Terrain knows how to make the land ?

If a thought is Just a thought ~ so whats the main thought ?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 17th Oct 2011 11:00
You can use any terrain editor that outputs heightmaps to make the terrain. I would reccommend L3DT. Thats the one I used to create the terrains for the large terrain demos.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 17th Oct 2011 11:23
thanks kaedroho

this one is going to take me some time to understand

are there any other one's ?

for every one else the link is

Large 3D terrain generator

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Oct 2011 01:01
ummm I got and used L3DT

but the images it generated
seam not like what comes with Blitzwerks Terrain examples

take a look for you self and you tell me

If a thought is Just a thought ~ so whats the main thought ?

Attachments

Login to view attachments
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 18th Oct 2011 01:07 Edited at: 18th Oct 2011 01:09
That terrain looks fine to me.

The heightmap isn't exported though. You should export it in BMP or RAW format.

RAW is better quality but you need to use a program to make them work with Blitzwerks Terrain.


Heres the program to convert RAW files to colour heightmaps.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Oct 2011 02:09
converting image formats is not a problem

the example I created has water as part of it

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Oct 2011 02:10
thanks to some one posting about using to use

hitimer() instead of Perffreq() which is not in DBP 7.61
I was able to get the "BlitzwerksTerrainDemo" working

in order to get the demo working and I had to change

the up and down movement code to
" move camera (upkey()-downkey())*80.0 "

as the original line moved things way too fast

now I can use this example for my projects

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 18th Oct 2011 02:45
the two program I tried just garbled the images using raw
bmp is what I will stick with

I tried with Xnview and then Corel Paint show Pro Photo x2

the image file size was larger but big deal
it works

now it's just getting BlitzWorks Terrain to use the images

as for the trees I want to implement "Dark Imposters plugin DBPro/GDK"

I know the tree's are already set different kinds of tree's
in low and high detail

but they are the old way of creating tree's
I've got

Plant Life
PlantStudio 2.10 which is free

If a thought is Just a thought ~ so whats the main thought ?
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 21st Oct 2011 08:25
Hi,

I'm encountering a strange and unpredictale error using the full version. The attached code replicates it (occasionally!) and uses the default blitz media.

When attempting to rescale blitz terrain DBP is locking up with the default "this application has stopped working" error. It's happening for me fairly frequently.

Can anyone please check my code and see if they can replicate this error. I could just be making a stupid error, but can't see where.

Specs: Windows 7 64, i5 650, Radeon HD 6450, 4gb



http://jimjamsgames.yolasite.com
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 15:05
Scene Commander

the only error I encountered

was when I tried to load the media
it could not find it

so I had to add in "..\" to get it to load from the right place

other than that it worked fine

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 15:10
ok one more quirk

I saw in your code about using the mouse to raise and lower the retain
when I try that the program end's and I know it should not

I know there was example some ware that had the same option
so I will look for that and see how that one was built

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 15:19
your code



BT code




it looks like it should work
as to why the program ends when the mouse buttons are used

I do not know

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 15:38
so far the if statements

with the mouse and the flatten terrain and the program ends

the show or hide terrain work fine


there seams to be a bug with

BT Flattenterrain
BT updateterrain

if either of these commands are used the program quits

in BT updateterrain it quites when it gets to that code
when the program is first run

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 16:07
umm no bug not missing commands

BT SetCurrentCamera 0 //Set current camera to 0 (if the camera has moved/rotated since this command was last called, you must call it again!)
BT UpdateTerrainCull g_TerrainID //Update frustum culling
BT UpdateTerrainLOD g_TerrainID //Update LOD


the changed lines worked in the example "11RealtimeTerrainModification"

If a thought is Just a thought ~ so whats the main thought ?
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 21st Oct 2011 16:10
well ok not working

it's how BT is implemented

the names picked for the terrain are not the right one's

so the example still turns off when the mouse or scan code are used
related to modifying the terrain

If a thought is Just a thought ~ so whats the main thought ?
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 21st Oct 2011 17:15
@Resourceful

Thanks for looking. You seem to be having the same issues I'm having with the code.

Can anyone else shed any light on this and I can't see how it's the code, but could be wrong.

http://jimjamsgames.yolasite.com
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 22nd Oct 2011 02:14
Scene Commander

if you got the full program

check how the examples are put together

even in the demo version

they are basically the same

the code you had for height up and down worked
when I replaced it in one of the example

and the flatten land works fine in

"11RealtimeTerrainModification"

I can see why you picked the "f" key for that ;o)

that example and what you are doing are the same coding

If a thought is Just a thought ~ so whats the main thought ?
Scene Commander
Support Manager
16
Years of Service
User Offline
Joined: 3rd May 2008
Location:
Posted: 23rd Oct 2011 09:46
@Resourceful

I'll try that, thanks. However, I understand the coding, the issue seems to be a problem when the x,z cords are changed. As you are also getting a crash with my code, I'm trying to establish wether or not there is a problem with Blitz or just with the code itself. As there's no crash report, it's a little difficult to work out what could be causing it if it is the code.

http://jimjamsgames.yolasite.com
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 23rd Oct 2011 21:33
I put the lines in the example I had said
and there was no crash it worked like it was
suppose to

I could raise or lower the terrain and even flatten it
at the location I was at

from what I saw you were on the right track
your just missing commands for the most part
and the naming of things , just a couple of words
and you were ready to go

all I know is ever time I tried to used what you had in the
code you provided it would quit with no error of any type
showing up

If a thought is Just a thought ~ so whats the main thought ?
quilarcm
13
Years of Service
User Offline
Joined: 17th May 2010
Location: Min. USA
Posted: 4th Nov 2011 03:16
kaedroho, on the 16th of Oct you told me how to maneuver from terrain to terrain, I have sense come upon a situation that requires your assistance again.

I am trying to delete a terrain then reload it latter. when reloading I receive an error and the program locks up. What is the proper format for deleting and reloading terrains.

I have tried just the BT Deleteterrain g_TerrainID, with and without deleting all the images & g_TerrainObjectID

still receiving the error

If you can help I would really appreciate it.
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 27th Nov 2011 17:56 Edited at: 27th Nov 2011 17:58
Hey everyone,

I'm working on an editor that uses blitzwerks terrain. Everything works fine.

Every terrain created is basically an array/type and when modifying the terrain it completely reloads it to avoid any conflicts. The array/type entry is not removed, only the terrain gets removed and reloaded with the new settings.

No problem, however after hitting the apply button (reloading the terrain) a few times the program crashes. I've tracked the issue to the scaling command.

As an alternative I use the 'scale object' command. The terrain now turns dark when it's on a larger scale. I can fix that by adding a detail terrain with modulate 4X blend mode.

Besides the initial darker render of the terrain, are there possible other issues with scaling the terrain this way?

Thanks!

Regards Sph!nx
http://www.mental-image.net
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 27th Nov 2011 19:03
hi Sph!nx

considering how much data is needed
it's kinda expected there would be a quirk or two or three

if you got a preview pic
I for one would like to see it

to move side ways - is to move forward
Since a Strait line gets thin fast
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 27th Nov 2011 20:32 Edited at: 27th Nov 2011 20:49
Sure, here it is.

It uses the example terrain images provided by the Blitzwerks library but any graphic can be added. It also utilizes every possible feature... though LOD is still in the works.

As you can see, the terrain is slightly darker than it should be, because of the alternative scaling I use.

Some background on the project:
It's a large project, now running for years. The "Origin Development Kit", or ODK, will be a set of tools and a base engine to build my future game projects on. More info on my website.

Regards Sph!nx
http://www.mental-image.net

Attachments

Login to view attachments
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 27th Nov 2011 20:53
looks good Sph!nx

I've got several thoughts on brightening things up

up the light for the level

take the texture and up the level for that image

if you added a sky would that brighten things up ?

one thing you said is about reloading the terrain several times

my thought on that is memory get's filled up and it over loads things

if you clear out the old stuff before reloading
that should stop the crashes

as for it being dark it's a livable

to move side ways - is to move forward
Since a Strait line gets thin fast
Arod
14
Years of Service
User Offline
Joined: 8th Feb 2010
Location:
Posted: 28th Nov 2011 07:09 Edited at: 3rd Dec 2011 01:34
Is anyone using L3DT to make heightmaps and texture maps for Blitz Terrain?
I create a 1024x1024 height map and texture map in L3DT but get an error when running my project "heightmap size invalid". If your able to do this, a short tutorial showing the setting your using in L3DT would be greatly appreciated.

Thanks
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 28th Nov 2011 16:26
Quote: "Looks good Sph!nx"

Thanks!

Quote: "
take the texture and up the level for that image"

This is something I've thought about and prolly will try that as well.

Quote: "if you added a sky would that brighten things up ?"

Like you can see in the image, I currently have the 'terrain tools' and 'object tools'. I will implement a 'sky tools' when I've finished a few other things. I will use Dark Clouds system for that, so we will see when the time is there.

Quote: "one thing you said is about reloading the terrain several times.my thought on that is memory get's filled up and it over loads things. if you clear out the old stuff before reloading
that should stop the crashes"
Yeah, already working like that. It clears everything before reloading. Only thing that stays is the type/array entry, which is simple data being edited so no additional memory usage. I will add some statistics to the render screen to make sure, but it shouldn't.

I will try to lighten it up with some native db-pro object render commands. Not sure how and what, I need to experiment with that a bit.

Anyways, thanks for all the feedback, Resourceful! I will create a 'work in progress' thread when I'm a bit further in development.

Regards Sph!nx
http://www.mental-image.net
quilarcm
13
Years of Service
User Offline
Joined: 17th May 2010
Location: Min. USA
Posted: 4th Dec 2011 06:02
Arod

When you save the Height Field in L3DT, Save it in BitMap.BMP format. And ensure your split value is large enough in BT Terrain.
BT SetTerrainScale g_TerrainID,128
BT SetTerrainYScale g_TerrainID,64
BT SetTerrainSplit g_TerrainID,64
This is the only time I've ran into any problems.
Arod
14
Years of Service
User Offline
Joined: 8th Feb 2010
Location:
Posted: 10th Dec 2011 03:13
thanks for the help quilarcm, will give it a try.
Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 10th Dec 2011 10:31
@ Kaedroho,

Howzit going?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 1st Feb 2012 08:14
hey all

I guess that's it for updates to Blitzwerks Terrain

I've collected a few other example people have posted in the forum
one of them being a land creation program

the only problem with it the button's do not line up very good
the other aspect to it is that I have bought Tree Party

the example that comes with it is great but I do not think it uses
Blitzwerks Terrain so I want to have that as part of it

I've collected enough peaces now that I can do any thing including
clouds and fog but it's getting every thing working together
is ware I am at

to move side ways - is to move forward
Since a Strait line gets thin fast
Kezzla
15
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 25th Feb 2012 10:10 Edited at: 26th Feb 2012 03:56
I have a question, is there any simple way to save the new colormap information once you have painted the terrain? Im using the paint function for a level editor i'm making and would like the option of saving the new color data.

I just want to know if there is a simple way before i make a subroutine to replicated the painting on a seperate image.
thanks

Edit: nevermind, i just resaved the image after painting and the information is kept. problem solved. /edit

Sometimes I like to use words out of contents
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Feb 2012 11:07 Edited at: 27th Feb 2012 11:08
Just a quick update.

I am currently working on Blitzwerks Terrain 3. I've decided to make some changes to the way BT works in order to add new features and port it to other platforms. It will come in a free version and a full version. Those who brought the full version of Blitzwerks Terrain 2 (sold on TGC) will get the full BT3 for free.

The core of BT will be released open source to allow people to port it to other engines. The wrapper for DBPro will be closed source though. So it will basically be a bit like the Box2D wrapper.

As for BT2, I still intend to create a couple more updates. Hoping to solve the delete terrain bug and a couple of others.
Kezzla
15
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 27th Feb 2012 12:12
Quote: "I am currently working on Blitzwerks Terrain 3."

sounds exciting

is there a list of new features anywhere? or is it going to be a surprise?

I look forward to playing with it.

Sometimes I like to use words out of contents
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 27th Feb 2012 12:43 Edited at: 27th Feb 2012 12:43
I'd like to have at least all the features of BT2 + Terrain Streaming + Spherical Terrains. BT2 was coded as a massive flat file but BT3 will be properly modularised to it will be very easy to add new features to it.

Development is still in early stages but I hope to get demos and betas out as soon as I get something drawing in DBPro.
Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 27th Feb 2012 18:54
Quote: "I'd like to have at least all the features of BT2 + Terrain Streaming + Spherical Terrains. BT2 was coded as a massive flat file but BT3 will be properly modularised to it will be very easy to add new features to it."


Great news, I'm looking forward to it!

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 27th Feb 2012 21:27
I know a lot of work went to BT and a lot more into BT 3

I only found one land editor for BT but the buttons did not line up for it

with the things I got in mind especially with new option coming up
that would be nice to have a land creation including on a Spherical Terrain

for one of my projects I know I will have to make it so
I can link several computers together with all the computing power
it will need

luckily I found a net addition that permits 7,000 some connection
which will have to surface

to move side ways - is to move forward
Since a Strait line gets thin fast
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th Mar 2012 19:45
I've uploaded an update to the free version here:

http://forum.thegamecreators.com/?m=forum_view&t=145404&b=8&msg=2323373#m2323373

I'm hoping that this will solve the crashing. Let me know if it does and I'll get the full version sent off to TGC.

Login to post a reply

Server time is: 2024-05-08 22:13:34
Your offset time is: 2024-05-08 22:13:34