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
Wyldhunt
14
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 11th Mar 2011 04:16 Edited at: 11th Mar 2011 05:04
Quote: "Now the only problem I'm having is getting the seams lined up properly."

A couple of things to keep in mind with that:
1: If you're scripting a map maker, it helps to make a leveling brush that you can run along the edge and set both sides to the same height with it.
2: It can save time if you use tiling heightmaps.
3: If BlitzTerrain is capable of creating seamless maps with LOD, Kaedroho needs to be rich. That's something even the million dollar engines fail at.
4: It may be best to get it close and then hide the seam by keeping it slightly lower than the surrounding terrain and hiding it with foliage and such.
5: Keep the edge as flat as possible. LOD seams show up much easier when the seam is mid-way up a slope.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 11th Mar 2011 04:48 Edited at: 18th Mar 2011 00:34
He's left a nice little overlap it looks like, where you can place the next terrain by doing,

x# = BT GetTerrainSize(TerrainID1) * xTile
z# = BT GetTerrainSize(TerrainID1) * zTile
position object TerrainID2, x#, 0.0, z#

There's actually very little that shows, except a little Z fighting on the overlap. Even with LOD. (Yes, I agree, he should be rich just from what he's done so far..)

I'm using a 4096 x 4096 heightmap out of L3DT Pro and separating that into 16 1024 x 1024 images to make the terrains. The edges around the large one are also matched up to allow for seamless endless looped terrain.

@Kaedroho, the dark strip along the edge of all of the terrains, if you could figure out what's causing that, and get it to be it's normal color, the seam would be practically invisible.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 17th Mar 2011 20:18
I have fixed a crash which made the program crash when BT DeleteTerrain is called.

I will get the colour painting commands done over the weekend and hopefully have a release out next week.

I will then get to work on getting the GDK version working and bug free so that can be released.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Mar 2011 14:21 Edited at: 20th Mar 2011 14:32
3 new functions have been added:

BT PaintTerrain TerrainID,X,Z,Radius,Colour

This sets the colour of all the points in the circle to the colour.


BT PaintTerrain TerrainID,X,Z,Radius,MinColour,MaxColour

This does the same as the above but sets the colour to a random colour in the range. For example, set MinColour to a light shade of green and MaxColour to a dark shade of green and this function will set the colours of all the points to different colours within this range to add some realism.


BT SetPointColour TerrainID,X,Z,Colour

This sets the colour of a point.



I have also fixed the bug which caused some extra quads to appear on the far edges of the terrain.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Mar 2011 13:32 Edited at: 24th Mar 2011 13:39
All the painting functions are complete! I will just document all the new additions to the plugin then release.


Heres a list of the changes:

Added function BT MakeTerrainObject TerrainID,LODLevel,ObjectID.
Added function BT EnableAutoRender Enabled.
Added function BT UpdateObjects.
Added Ability to set the amount of Smoothing or Reduction to be done on a terrain.
Added Painting functions to Realtime Terrain modification. (4 new functions)
Collision objects now update when terrain is modified.
Added round flag to GetGroundHeight which makes it get the height of the nearest vertex.
Fixed GetGroundHeight when using Reduction.
Fixed normals facing the wrong way.
Fixed huge terrains to not be able to modify the entire terrain.
Fixed crash when terrain with lots of exclusion is modified.
Fixed BT FlattenTerrain making holes instead of flattening.
Fixed crash when deleting terrains.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 24th Mar 2011 23:00
Blitzwerks Terrain 2.02 has been sent off to TGC. Expect it to be on the website shortly.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
bruceatk
20
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 25th Mar 2011 01:10
Anxious to try it out, I have an immediate use for the Paint Terrain functions. Did "BT SetAreaHeight TerrainID,X1,Y1,X2,Y2,Height - This sets the height of all the points in an area." not make the cut?
bruceatk
20
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 26th Mar 2011 16:25
How long does it normally take to show up for download?
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Mar 2011 16:55
BT SetAreaHeight has been moved to 2.03. For now, this can be done with BT SetPointHeight.

Its usually a 2 - 3 working days. Lee has to add protection then give it to mike who makes the installer and uploads it to the website.

It should be out next week.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 28th Mar 2011 18:37
The update is now available to download from TGC!

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
bruceatk
20
Years of Service
User Offline
Joined: 25th Aug 2003
Location: Loudon, NH
Posted: 29th Mar 2011 01:43 Edited at: 29th Mar 2011 05:14
I've downloaded and installed the updated dll. At first I couldn't get the keywords to be recognized. I finally touched the ini file and I could see the keyword list get rebuilt when I started DBPro. While the program compiles and runs, I can't the the BT PaintTerrain to do anything. I display the version and it shows 2.02 R1 FULL. I am trying to use the BT PaintTerrain with the min, max color options and the BT UpdateTerrainTexture. My texture doesn't change.

Update:

I figured out that it is the BT SetATMode 1 command that is stopping the painting from working. I commented it out and the BT PaintTerrain started working. Is that the way it's supposed to work? I need to have the terrain look the same way as the displacement map. Without SetATMode 1 the terrain is flipped. The bottom of the dispmap is at the top and vice versa or in other words the Y of the image is reversed.

Bruce
Digao the big
16
Years of Service
User Offline
Joined: 20th Sep 2007
Location:
Posted: 4th Apr 2011 18:42
Hi,
I bought the full version and installed it, but to compile any example it returns an error about "d3dx9_43.dll" and "Failed to load dll (5: BlitzTerrain.dll)". How to fix this?
Sorry my bad english

thanks
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 4th Apr 2011 19:21
You will need to install the latest DirectX 9.0c, which can be found here. Change for your particular language of course.

The installer should have placed BlitzTerrain.dll in the DBPro directory under Compiler\plugins-licensed.

Duffer
21
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 6th Apr 2011 10:02
@ Kaedroho,

All working v well, pleased to report. Any chance of a demo showing off latest commands inc paint terrain and RTTMS?

Also, notwithstanding huge amount you have already done in short space of time, could you outline what you're going to do next with this plugin?

- terrain streaming?
- spherical terrains?
- other?
- complimentary plugins eg. plant/tree?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 6th Apr 2011 18:09
I'm guessing the Endless Terrain demo I wrote is but a whimsical attempt compared to what Kaedroho has planned for Streaming and Spherical terrains.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 10th Apr 2011 17:40
bruceatk. BT SetATMode flips the terrains texture around. I forgot to add support for this. Sorry about that, I will make a patch for it. It is painting, just on a different part of the terrain to where you asked it to paint.

Theres an example for the painting commands. I might update the explosion demo I made earlier to use this to create scorches on the ground.


Right now I am working on making it work with GDK. This should be done very soon.

Terrain Streaming and Spherical Terrains will also be added eventually, version 2.02 R2 will include features to make these possible. I will add one of these features into 2.03 and the other into 2.04. I don't want to rush these as they're quite complicated features.

Plants and trees are always stuck on to a terrain so the idea is that they could become part of the terrain and be rendered with the same system that BlitzTerrains are rendered with. This is only just an idea at the moment though.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 10th Apr 2011 21:46
Just released the latest GDK version.

Download:
ZIP
RAR

Note: This is the free version for GDK, the full version for GDK is currently not for sale.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 10th Apr 2011 23:18
Awesome man. Glad to see this thing released! Great job

Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 20th Apr 2011 02:17
I just bought BT and went to run the first exaple GenerateATerrain and I got an error "Could not understand command at line 54" at the line "BT EnableAutoRender 1".

I rebuilt the keywords and at least now the command is highlighted blue, but the compiler still gives me "Could not understand command at line 54" .

The version I installed in My Products says, "File Updated: 28th Mar 2011".

File is 280311_BlitzwerksTerrain.exe
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Apr 2011 02:22 Edited at: 20th Apr 2011 02:23
Scab, do you have the free version installed? If you do then uninstall it.

Also, make sure that your DBPro version is 7.6 or above.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
Scab
20
Years of Service
User Offline
Joined: 11th Feb 2004
Location:
Posted: 20th Apr 2011 22:31
That worked. I uninstalled Blitzwerks and re-installed it. It was because I had the free version installed first.

Thanks kaedroho.
cgman
12
Years of Service
User Offline
Joined: 18th May 2011
Location: Germany
Posted: 18th May 2011 20:42
I bought it, and I REALLY love it incredibly fast render speed and compatibility with shaders, thanks for that.
But is there a way to update the normals? "set object normals" doesn't change anything. Could you may write another command like "BT UpdateTerrainNormals"? Or is there such a thing already?

My shader is calculating the lighting and the textures depending on the normals (to read out the direction of the faces and the slope to texture the terrain correctly) but it doesn't update when I add some hills to it please add this command !
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 4th Jun 2011 05:20
a tiny oddity other than having to manually move all files to
the correct location's

I run one of the examples but I had not registered
it with TGC site

it worked and the icon and mouse over told me it was not active
but I did not get told that it needed to be registered it

other than that a brilliant addiction to DBP addition's

If a thought is Just a thought ~ so whats the main thought ?
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 29th Jul 2011 17:34 Edited at: 29th Jul 2011 17:35
@kaedroho

Purchased this yesterday, very nice piece of kit, this is a fantastic plugin. I have just noticed today though that the terrain heightmap/colour maps etc are loaded flipped.

Take the painting example for instance, both the colour and heightmap images show the muddy lake area to be at the bottom right of the image, however when they are loaded the lake area is in the far right corner or the terrain. Is there a way to fix this? Other than manually flipping the images before building the terrain.

01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111
RedFlames
16
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 29th Jul 2011 18:30
Quote: "Take the painting example for instance, both the colour and heightmap images show the muddy lake area to be at the bottom right of the image, however when they are loaded the lake area is in the far right corner or the terrain. Is there a way to fix this? Other than manually flipping the images before building the terrain."


IIRC there should be, or used to be, some kind of "Advanced Terrain mode" for loading the terrain which would flip/mirror the heightmap in the same way AT did that.
monotonic
18
Years of Service
User Offline
Joined: 24th Mar 2006
Location: Nottinghamshire, England
Posted: 29th Jul 2011 18:50
@RedFlames - Excellent, that's cracked it, thank you.

01100001 01101110 01101111 01110100 01101000 01100101 01110010
01110000 01101111 01101001 01101110 01110100 01101100 01100101 01110011
01110011 01110011 01101001 01100111
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 29th Jul 2011 19:09
BT SetATMode 1 should do it.

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 30th Jul 2011 16:11
to Mike Johnson

your start post to this thread

a picture is posted showing what
Blitzwerks Terrain can do

but there has never been that example
for people to play with

can you please post the code and related media
for people to play with ? ;o)


thanks

there are now 2 addtion to DBP that bring
it up to what c++ can do

Blitzwerks Terrain
Dark Imposters

and I hope soon

Real-time Occlusion Culling

now if only the either Dark Physics liquid was upgraded
or some one would build a new version so colors could be added
then that would cover every thing

I know some one was building a dll that let you put hols
in objects but he was a bit over whelmed and left things
hanging but he did post what source code he had started

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: 31st Jul 2011 13:11
Resourceful,

You can find the demo here:
http://www.thegamecreators.com/?m=view_product&id=2286

Its called "Blitzwerks Terrain Code". Its the same demo used to take the screenshots. Just download and compile it.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 31st Jul 2011 15:09
kaedroho

thanks

I got one problem running the source code

this command is not known by dbp

KD RegisterLODCamera

and KD UpdateLOD

I have the "Kaedroho Anisotropic Texture Filtering Plugin for Dark Basic Professional Version 1.01"

but those commands are not in there

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: 31st Jul 2011 15:29
umm I found

Kaedroho Object Level of Detail Plugin for Dark Basic Professional Version 1.01

that fixed that problem

but ... at line 240

Could not determine parameter type of
'object scale x(ObjectID)' at line 240.

with all the looking around the forum
it seems I do not have ever plugin
and I thought I had every thing....

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: 31st Jul 2011 15:48 Edited at: 31st Jul 2011 15:49
ignore this

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: 31st Jul 2011 21:18
ok it seem that
Matrix1 Utility Plug-ins 18 is used

but I got anther error when I try to compile

Variable 'perffreq' does not exist in program.
PROGRAM TRACE
-------------

so my only guess is one more of the
Matrix1 Utility Plug-ins
is needed .. I just need to know which one

If a thought is Just a thought ~ so whats the main thought ?
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 1st Aug 2011 23:04
Hello everybody, I've ran into a bit of problem with Blitz Terrain.

Whenever I run the supplied "01GenerateATerrain"-example, there is no problem but whenever I add a camera with the "make camera #" then it will render the terrain double. One normal 3D terrain and one static fixed in the corner of my screen.

Any help is much appreciated!

Regards Sph!nx
http://www.mental-image.net
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 2nd Aug 2011 00:37
Sph!nx

can please post the code your adding in ?

I'm still in the learning process like you
but I am slowly pulling the peaces together ;o)

If a thought is Just a thought ~ so whats the main thought ?
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 2nd Aug 2011 17:54 Edited at: 2nd Aug 2011 17:58
Hey, of course, here it is. It is a modified code of the example provided by BT.

The line marked with a big arrow (<-----------------) is the line that gives the error. commented out, and it works fine, but other wise it renders it twice, in different ways.



The image shows the bad render.

I think the problem is that the rendering is now assigned to camera 1, so I tried 'bt setcurrentcamera' but it did not work.

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

Attachments

Login to view attachments
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 2nd Aug 2011 20:17 Edited at: 2nd Aug 2011 20:20
Try rendering everything manually, you can do this by commenting out this line:

BT EnableAutoRender 1

And add this in the loop, just before sync:



Another tip is that if both cameras are in the same position, you can remove BT UpdateTerrainLOD from the second camera update. And if they are in the same position and rotation, you can remove both BT UpdateTerrainCull and BT UpdateTerrainLOD from the second camera update. This greatly improves efficiency when using HDR and/or Reflection shaders.

Your signature has been erased by a mod please reduce it to no larger than 600 x 120.
Sph!nx
15
Years of Service
User Offline
Joined: 3rd Dec 2008
Location: The Netherlands
Posted: 2nd Aug 2011 20:57 Edited at: 2nd Aug 2011 21:16
Thanks for your help but I'm afraid it did not work. This time it did not render a terrain at all.



Edit:
Well, I've changed my camera setup. Not the terrain, I love it so far, but it wasn't working out in other areas. Anyway, I got things working fine now!

Thanks guys!

Regards Sph!nx
http://www.mental-image.net
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 3rd Aug 2011 09:09
try as I might

I have installed all

Matrix1 Utility Plug-ins
I had to tweak 2 of them because of duplicate names

I still get the same error

Variable 'perffreq' does not exist in program.
PROGRAM TRACE

could some one please post
a compiled version of "BTDemo"
of which should have come with the demo download and did not ;oP

If a thought is Just a thought ~ so whats the main thought ?
Kezzla
15
Years of Service
User Offline
Joined: 21st Aug 2008
Location: Where beer does flow and men chunder
Posted: 6th Aug 2011 10:07 Edited at: 6th Aug 2011 10:10
Hi kaedroho,

I have been using blitzwerk terrain for a while now and absolutely love it. I use it in all my 3d projects.

I think however there may possibly still be a bug with deleting and loading terrains. my programs seem to crash a lot when deleting terrains.
sometimes they will delete and load again and work for a short while before crashing.
I'm not sure if its a bug or user error so i've modified your example project...
BLITZWERKS TERRAIN 2.02 EXAMPLE - TERRAIN LOADING
to try and highlight the problem.

here's the ammended code illustrating the problem


edit/
im using
windows xp sp 3
dbpro 7.6
\edit
thankyou

kezzla

Sometimes I like to use words out of contents
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 6th Aug 2011 19:45
I believe this is the same issue that is causing the Endless Terrain Demo to crash now and then.

quilarcm
13
Years of Service
User Offline
Joined: 17th May 2010
Location: Min. USA
Posted: 16th Oct 2011 18:21
I have the full version of Blitzwerks Terrain, in the documentation Ver 2.01.1 it states the limits are
Up to 2048x2048 heightmaps
Unlimited terrains
Unlimited LOD Levels
My question is how do I load Multiple terrains and switch between them?
this is unclear in the doc.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 16th Oct 2011 18:32 Edited at: 16th Oct 2011 18:34
Each time you use BT MakeTerrain() it returns a new ID for a terrain. You can call this function as many times as you like, each call will create a new terrain id.

You can call the other creating functions (BT SetTerrainHeightmap, BT BuildTerrain, etc) for each of these ids and create lots of terrains.

Example:



This code will create 2 terrains. The first one will use Heightmap1 as the heightmap and will be created into object 1. The second one will use Heightmap2 as the heightmap and will be created into object 2.
quilarcm
13
Years of Service
User Offline
Joined: 17th May 2010
Location: Min. USA
Posted: 16th Oct 2011 19:01
Now I have created Multiple terains, how do i position them or switxh between them?

And Thank you for your timely responce.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 16th Oct 2011 19:05
I'm not sure what you mean by "switching between them". But you can position the terrains using the dbpro position object command on the object numbers you set in the Build Terrain command.

So to position the terrains in the previous example, just use this:

gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 19:13
what is the max # of Terrain's can be loaded and used ?

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: 16th Oct 2011 19:15
What I mean is, I am building an area with 16 terrains a 4 by 4 grid, I don’t want to them all loaded at once. Just the one I am in and the adjacent one I am moving in to. I think you covered it for me.
Thank you, again
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 16th Oct 2011 19:19
What you need to do is only load 9 of the terrains. When you move from one terrain to another, delete all the terrains which are far away and create new ones into the area you are going to. I am currently working on Terrain Streaming which does this.

Resourceful, you can have up to 255 terrains loaded into memory at one time.
gwheycs62egydws
14
Years of Service
User Offline
Joined: 17th Aug 2009
Location: The World
Posted: 16th Oct 2011 19:29
kaedroho thanks

as for having so many terrains loaded that a lot of memory and cpu time needed

I've got 2 thoughts on this

1. the size of each terrains affects things as we all know
a bigger one means less to load

2. if you go with smaller one's then there is more to load and the
time it takes to shall we say turn on the one's need and turn off
all unneeded

having a huge one and using ghosting for farther away should balance things out

but again having objects parochially showing is not good either

I've played grand theft auto 3 and seen # 4 so if they had dun
that I just said it would have spoiled the look of the game

they broken the country they had down into sections just big enough
to get what they were looking for .. no pun intended

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: 16th Oct 2011 19:52 Edited at: 16th Oct 2011 19:55
never mind

it seams a file was move out and now it works fine

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

Login to post a reply

Server time is: 2024-05-08 06:27:58
Your offset time is: 2024-05-08 06:27:58