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
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th May 2009 20:47 Edited at: 6th May 2009 21:28
2 new commands

error=UT CheckForError()
message$=UT GetErrorMessage$()

Example:



I might also add a new feature. Rebuilding terrains when the device has been lost. No new functions are needed, ill just make build terrain clear old data for that terrain and allow you to regenerate it like normal.

BMacZero
17
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 6th May 2009 22:53
Cool, looking forward to the finished product.

Unrelated note: are there any of the real-time terrain manipulation commands in the current beta/demo version?



kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th May 2009 23:25 Edited at: 6th May 2009 23:30
Thanks for the comment

Quote: "Unrelated note: are there any of the real-time terrain manipulation commands in the current beta/demo version?"


No, sorry. The RTMS is not included in the free version. Maybe I could work out a way on allowing you to use it but still leaving something for the full version.

BMacZero
17
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 6th May 2009 23:40
Oh, I'm going to buy the full version anyways. I was just wondering if I get could started on the terrain-altering system in Fields before you finish it. Oh well .



kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 6th May 2009 23:45 Edited at: 7th May 2009 00:53
Alright, thanks

Im going to have a new beta out in the next few minutes which will include the exclusion mapping and Environment mapping features as i have previously announced that these features will be released in the free version.

EDIT: Compiled, Just need to test and make 2 demos work on the dll version. I have renamed the dll file to BlitzTerrain.dll which means that you must delete the old dll if you downloaded an old beta.

EDIT: Just redone the first page of this thread while programming

EDIT: All done, there is a bug with exclusion it doesnt fully get rid of some tiles and there are a few random triangles floating around. However this bug only seems to appear when large areas have been excluded, so small buildings should be uneffected. Ill get to work on this first thing tomorrow.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 01:11 Edited at: 7th May 2009 01:12
NEW BETA RELEASE!
BlitzTerrain Free now includes the Environment Mapping and Exclusion Mapping features!


DOWNLOAD:

RAR

ZIP

BMacZero
17
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 7th May 2009 01:25 Edited at: 7th May 2009 01:27
Hmm, the exclusion mapping demo seems to have a few glitches. Environment works great!





Attachments

Login to view attachments
Not_Maindric
15
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 7th May 2009 01:33
That demo looks top notch quality! [/sarcasm]

Hm.. Weird, every time I run it, it run almost flawlessly...

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 09:55 Edited at: 7th May 2009 17:51
Yeah, like I said earlier, it doesnt seem to fully get rid of all the tiles. Ill fix that later. The small patches seem to work perfectly.

EDIT: Found out exactly whats going wrong. Ill fix this later.

EDIT Again: Ok, back from school now, ill post back when the fix is complete.

I also forgot to say about a few hidden commands:


Heres a few which are only needed when the Phyobject is being used with the RTMS (realtime terrain modification system). Because you dont acctually know when the collision should be updated, the following functions will allow you to find the sectors which have recently been changed (as the RTMS also changes the Phyobjects).



kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 17:58 Edited at: 7th May 2009 18:01
An example of those commands would be:



Just insert that after the build loop and it should randomise the colours of each sector.

Using that also shows exactly whats wrong with the exclusion mapping. If there are no tiles to be generated in that sector, the sector will create some random triangles. This is obviously because as it isnt generating any indices, it thinks its using normal non indexbuffered objects, so it creates triangles between the vertices.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 18:16 Edited at: 7th May 2009 18:18
Alright, the bug is now fixed. Uploading a new dll...

Ill also add the hidden commands into the ini file while doing it.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 18:28 Edited at: 7th May 2009 18:58
BETA 1.3a RELEASE

Fixed bug causing random polys to apear when large areas have been excluded.

Added the following commands to BlitzTerrain.ini


DOWNLOAD:

RAR

ZIP



I will be keeping the following thread updated with new betas and features:
http://forum.blitzwerks.co.uk/viewtopic.php?f=5&t=10&p=14#p14

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 19:40
Back to work on the help files. Ill post back in a few hours.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 20:49
Another thing that I used in a much older version, is Colour heightmaps.

Currently, heightmaps are in greyscale format. So basically, there is 256 height possibilities when your using 32 bit. What a waste.

I decided to make the terrain engine use something called a colour heightmap. They look like a load of random colourful dots placed randomly on a screen. But they use the same amount on hard drive space and also increace the number of height possibilities to over 4 billion. That means that it will record even the tiniest bump when your using maps with huge mountains. This feature will be added to BlitzTerrain.

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 7th May 2009 21:04 Edited at: 7th May 2009 21:24
@ kaedroho,

I've tried all the demo programs on the latest version of the BlitzTerrain build Beta 1.3a and unfortunately I get the same wierd blue seethru patchwork on the terrain - but just on the terrain exclusion demo... see attached screen capture - I double checked I had the ini and dll latest from today...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...

Attachments

Login to view attachments
KISTech
14
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 7th May 2009 22:41
Since the DLL has been renamed this release, have you deleted the older DLL? (just a thought)

Looks awesome!! How big of a terrain can you make with this?

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 22:51 Edited at: 7th May 2009 22:56
That Seethrough patchwork is the background colour. This is because those tiles have been excluded (hence exclusion mapping). In your games you will beable to cull polys which are under buildings or make holes in the ground like I did. Look at the exclusion map (exclusion.bmp) to see how to exclude. This is also useful for culling tiles which are underwater.

Terrains can be up to 4096x4096 in tiles. And pretty much infinite in size as you can change the scale to anything you want.


Ive just finnished the commands section of the help files im uploading now.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 22:59 Edited at: 7th May 2009 23:09
Help Files:

http://uberterrain.turbodog.co.uk/Help/index.html

Im now going to start work on a larger terrain because then ill beable to show off LOD Terrain at its best!

I think that i should make a full release of BlitzTerrain Free soon. I have my exams starting next week D: What do you guys think?

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 7th May 2009 23:34
@ kaedroho,

[Showing my age ] but don't jeopardise your exams - no matter how much potential this plugin has...

Also.... DOH! have now looked at the exclusion texture, see what you mean and realise I am still living up to my sign off :- "a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm..."

Is the finished full product going to have the full 32bit colour heightmap images as mentioned above?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 7th May 2009 23:40 Edited at: 7th May 2009 23:40
Yep, Both free and paid versions.

I will make a new command expecially for them like 'SetTerrainColourHeightmap Terrain,Imagenumber'

I have also made a mod a while ago to make Terrsculpt generate them.

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th May 2009 01:26
@ kaedroho,

As promised, looking at the online help - all seems to be making sense - perhaps some diagrams on help pages showing how levels and sectors work?

Looking through it, cant find the ut set terrain height command to set terrain height at given point? probably right in front of me...

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 8th May 2009 02:23
What do you mean by "Advanced Physics" (one of the things you are working on)?

Thanks
Jeff



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th May 2009 09:59 Edited at: 8th May 2009 10:05
The RTMS commands are not included in the free version. Ill post them up when the full version gets released.

Advanced Physics is only activating parts of the terrain that need to be activated (ie parts where there is an awake dynamic object). This gives a massive increase in FPS when you are using lots of dynamic rigid bodies with large terrains. Again, this was a feature in the original terrain engine, and I found the FPS increase to be massive on only 10 rigid bodies.

When I do add Advanced Physics, you will have to register every dynamic object and its radius with the engine. This will use a very fast Zone system which was especially designed for this feature (search for UberZones in code snippets).

Currently, I have only seen that Dark Physics will support this feature. (its the only system that I can see which has a "set object collision" command)

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th May 2009 10:09 Edited at: 8th May 2009 10:15
@ kaedroho - what about height#=UT SetGroundHeight(terrain,x#,z#)?

As mentioned, can't see it in the Help section on the weblink and not in the .ini??

[edit]

Also, can you explain how height is ascertained from the 32 bit colour image heightmap - is it an integer based on three byte figure based on red byte, then green then blue??

Is the heightmap at 90degrees to the plain of the actual terrain?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th May 2009 17:26 Edited at: 8th May 2009 17:29
Quote: "kaedroho - what about height#=UT SetGroundHeight(terrain,x#,z#)?

As mentioned, can't see it in the Help section on the weblink and not in the .ini??"



Dont you mean height#=UT GETGroundHeight(terrain,x#,z#)?

Theres no way that you can set a point height with those parameters.

The command is called UT SetPointHeight(terrain,x#,z#,height#) but it is not in the free version.

Quote: "Also, can you explain how height is ascertained from the 32 bit colour image heightmap - is it an integer based on three byte figure based on red byte, then green then blue??"


It uses dwords

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th May 2009 18:38 Edited at: 8th May 2009 18:40
@ kaedroho - no worries, definitely up for the full version of the plugin so glad to see the UT SetPointHeight(terrain,x#,z#,height#) is still in that.

With the colour 32 bit image I was just wondering about how it derives the scale of height at each point using the DWORD? What is the formula? Harking back to earlier messages on this thread I was thinking about how I use the diamond/square or other fractal to generate decent heightmap images for it....

you say DWORD - does that mean a DWORD derived from RGBA or ARGB?

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th May 2009 18:58 Edited at: 8th May 2009 19:33
The problem with Colour heightmaps is that when you look at them its impossible to see the hills and the landscape.

Heres how each heightmaps are generated so you can compare the 2.

B/W

Height is an integer between 0 and 255.
OutputColour is the data that gets written to the image.

OutputColour=rgb(height,height,height)



Colour

Height is an integer between 0 and 4 billion.

OutputColour=Height


I think that BlitzTerrain is very nearly ready for a release. It will only be the free version for now, my publisher has wondered off somewhere and I dont know when they will be back :S.

BlitzTerrain 1.02 had 166 downloads. But 1.03a currently has 26 (however, its only been out for 1 day). So if you have not yet got it or know someone who hasnt, get it now! I will add a page on my website which only has updates for BlitzTerrain so its easier to get to.

James H
15
Years of Service
Recently Online
Joined: 21st Apr 2007
Location: St Helens
Posted: 8th May 2009 19:39
Love the exclusion and environment demo`s, very useful and for free too! Would it be possible to get those normals done for the free release? Doesn`t matter too much I guess, after all its free. It won`t be any time soon but the second my money troubles are over, if this is still on sale I`ll be treating myself to the full version. Definately newsletter worthy, good luck with the exams.
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th May 2009 19:49 Edited at: 8th May 2009 21:04
James H, Thanks

Thats what im working on. Its easy to calculate them, but the system is already wired up to update the normals when the RTMS gets used. I might add this into the sector commands. I could update the normals on only 1 point when the RTMS gets used then on the update, it changes the normals on the model.

The thing I love about the RTMS is that I integrated it into the Edge updating system. Which means that it only has to lock the object a maxinum of 1 time per loop. Major speed increase.

Right, time for normals. Ill post back in a couple of hours.


Another idea, Dark Lights support. Ill add this in later too.

Duffer
19
Years of Service
User Offline
Joined: 9th Feb 2003
Location: chair
Posted: 8th May 2009 22:23
@ kaedroho,

Just to repeat JamesH and wish you luck with the exams.

Standing ready to splash the cash as soon as the full version comes out.

Thanks for clarifying the colour image heightmap thing - I can really get to grips with it later by way of experimentation as well.

Another idea for the future is, perhaps, Save BlitzTerrain and Load BlitzTerrain - ie. one file containing the object, all the textures and LOD/Sector detail - big time saver.

a long time dabbler with DBC and DBPro with no actual talent but lots of enthusiasm...
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 8th May 2009 22:37 Edited at: 8th May 2009 22:50
Thankyou

Yep im going to start working out its own filetype soon.

I just need to optimise the Exclusion mapping a little bit (make it exclude entire sectors properly) and solve the normals bug. Then BlitzTerrain will be bug free (from the currently reported bugs).

The pinholes bug should be fixed. However, I still need to convert my changes to C++.

Beta 1.4 will be released soon.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 02:22 Edited at: 9th May 2009 02:24
I just made a demo with a 1024x1024 heightmap and uncovered some bugs. Ive already fixed one of the bugs, the other isnt caused by BlitzTerrain, but caused by the inaccuracy of the heightmap (as its greyscale). Im going to add terrain smoothing in to solve this.

Also, flat areas still have the heighest detail level when your close, ill get this solved soon too.

Ill upload the demo tomorrow as im using my laptop at the moment.

The normals bug is still at large, im still working on a solution for it. Should be done by tomorrow.

CSGames94
15
Years of Service
User Offline
Joined: 27th Dec 2007
Location:
Posted: 9th May 2009 05:34 Edited at: 9th May 2009 05:35
You know this terrain plugin will be perfect for a Dragon Ball Z Fighting, because you will be able to do real-time destruction into the landscapes. Great Plugin!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 14:08 Edited at: 9th May 2009 14:19
Thanks

Back to work, im going to be working on a smoothing system today to get rid of the stepping caused by greyscale heightmaps.

Smoothing is finnished. Suprisingly, it only needed a few lines of coding. And luckily, it worked first time

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 14:30 Edited at: 9th May 2009 14:40

Attachments

Login to view attachments
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 14:31 Edited at: 9th May 2009 14:43
After Smoothing.




Looks alot better now

Attachments

Login to view attachments
jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 14:36
Nicely done! (and fast too )



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 14:44
Thanks

All I have to do now is fix a minor bug, then ill add sector detail.

Ill also make a normals generating code while im doing that.

jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 16:07
This code crashes for me @ "UT ContinueBuild"




Any idea?



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 17:03
try making the variable 'objects' a global.

jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 17:06 Edited at: 9th May 2009 17:07
Nope, did'nt work either.
Maybe it's because I use vista? Which would be strange since your own demo works fine. By crash I mean CRASH: (Dutch )



Jeff



You're the 'th to view this signature!

Attachments

Login to view attachments
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 17:26 Edited at: 9th May 2009 17:28
Thats probably because there is too many polys per sector then. This is caused by using large heightmaps with low splits. Try raising the split.

Just added a new command

'UT SetTerrainSmoothing(terrain,enabled)'

This enables the above feature.

draknir_
16
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 9th May 2009 17:26
I just wanted to pop in and say great progress I will definitely be purchasing this for the advanced features.
jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 17:31 Edited at: 9th May 2009 17:39
Quote: "Thats probably because there is too many polys per sector then. This is caused by using large heightmaps with low splits. Try raising the split."

I already lowered the heightmap to 64x64, and split now raised to 16, no effect
Even did a complete reinstall of DBPro.

EDIT!
Found the problem, when I commented out the "Set Texture" thing, it worked... Probably foulty texture or so... Maybe you can add in an error message saying this for future users

Edit 2:
64 x 64 maps do _not_ work. That did the trick.

Edit 3:
Ah, they have to be same size!
Thank you!



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 17:34 Edited at: 9th May 2009 17:39
Try setting your heightmap to 256x256 then set the split to 8. This is the same configuration as the demo and will tell us if this is to do with the media, or code.

Are you using a 32 bit display mode in your app? and make sure that your heightmap is a 32 bit image. This is because the terrain engine needs 8 bits for the red colour channel in order to work.


EDIT: good that you got it working. Currently Blitzterrain doesnt have a texture resizing feature (working on it) so your texture must be the same size as the heightmap.

EDIT2: Ill quickly make texture resizing work, I need this feature too.

kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 17:59 Edited at: 9th May 2009 18:21
Ok, thats fixed now. I added it into the environment mapping too.

That fix will be added into beta 1.4

I also need to get rid of the jerkyness. My solution is big though.

jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 18:23
Hmm.. Can't seem to get it working with Newton:




Balls just go straight through, meaning the object is not made...



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 18:33
I havnt found the actual problem yet, but heres 1:

phyobject=find Free Object()+1


find free object() returns a new object every time its called. You dont need to add 1.

jeffhuys
16
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 9th May 2009 18:34
No, find free object is called two times, meaning the object that was returned the first time, is still present, so object and phyobject are the same number



You're the 'th to view this signature!
kaedroho
15
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 9th May 2009 18:37
Oh yeah... I need another cup of tea lol.

Downloading Newton now, ill see if I can get this working.

Login to post a reply

Server time is: 2023-01-29 04:49:33
Your offset time is: 2023-01-29 04:49:33