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 / Making terrains with REAL USGS data, part 2

Author
Message
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 07:22 Edited at: 31st Aug 2007 12:15
Edited:
From now on, I will place the latest demo here.
I took a little break, and have been messing with .dlls, and also Render Monkey. Got some ideas.
Anyway, I have a new demo that has some new functionality:

1. Three levels of detail. High, which is full resolution data, Medium, which is 1/2 the resolution, and Low, which is 1/4 the resolution. Use the H,M,L keys to toggle between them.

2. Added the ability to load different terrains. The demo includes three terrains now..
Grand Canyon, Lake Isabella, and Mohawk River Valley.
Three very different types of terrains.

3. Color shading function improved. But still not perfect, but getting alot better. Right now its locked at 32 levels of shading.
Still messing up on mohawkvly terrain.

The .exe is still an installer type .exe, so when you click on it, it will make a folder called Geomapping, and inside that folder will contain the real .exe

The source is a DBPro project. Just unzip it into a folder of your choice, and run the DBPro project file.

This is an Open Source project now. So, if you want to contribute in any way, let me know. I am going to add a design doc soon, with how I want to go about this, but you may use this source freely as long as you follow the license agreement included in the source.

Source:
http://www.st-rider.net/downloads/source/geomappingsource.zip
Latest Demo
http://www.st-rider.net/downloads/demo/geomapping.zip
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 07:40
So, lets talk about the data that we can get. The gov't has sampled height data all the way down to 10 meter spacing, or about 30 feet apart, so the detail of the terrains with this data is awesome. Now, I just needed a way to use it. So, I wrote a very fast matrix function that creates 100 square by 100 square grids. That is 20,000 polygons, or 10,210 vertices, which is right at the limit of a single object in DBPro. Next, I wrote a function to parse the data file from the USGS, and break the one big data file down into individual tile data files. For one matrix, the data file is 40,804 bytes. (4 bytes for each vertice). After that, another function to write the smaller data files into the vertexdata for the matrixs I create. After that, its just a matter of positioning the newly created objects in a grid like pattern. In my testing so far, I have a 10 column by 8 row grid of matrixs. Each matrix is 20k polys. That's 80 tiles x 20k polys, for a total of 1,600,000 polys. Of course we can't really use this, because it takes up alot of memory, but it was a test of the upper limit, and it works. Here's another screenie.

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 07:56
To give you an idea of the scale of all this, here is a screen shot of a box object, positioned at the first vertexdata position, or 0,0 in the first matrix tile. The scale is 1 to 1. 1 unit = 1 meter. So, assuming a 2 meter tall person, this is what they would look like with the camera not too far away.

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 07:56
And this is what they would look like from far away.

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 08:05 Edited at: 24th Jul 2007 08:16
now, the real beauty of all this. It is totally scalable. There is no reason matrixs far off in the distance need to have 20k polys. So, for far away ones, just make a lower poly matrix, and only read in the bytes of height data you need. So, say you have a player on a middle matrix, and 8 matrix surrounding him, all those could be 20k ones, so the detail would be there. But for the far off ones, just use 10 x 10 matrix or 20 x 20, or whatever. Also, since these matrixs can be created in real time, as you move closer to another low poly one, you can make a new one in higher poly, and then switch it out with the low poly. I have alot of ideas about using this. Some other things I've discovered is that since the matrixs are all individual objects, when you aren't looking at one, it doesn't get drawn. If I made it all one and limbed it, it would all still be drawn, and really drag things down. But I still have more to do, but I am going to post the code a little later tonight, so you all can play around with it, if you are interested.
But I think I want to see what Pearl Harbor looks like next
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 11:40 Edited at: 26th Jul 2007 12:22
EDIT:
new demo available further on down that does way more than this one did.

allright, I got the lighting to work right, so I don't need to texture the matrixs anymore, I can just use the vertexdata diffuse to do some colors, based on height. It looks a heck of alot better. Also, I have a demo you can try. It is an installer type exe, because it has to make three folders for storing the .bin files, the source data, and a header file to tell it how many columns and rows. I also know about the seam in the terrain in the one spot, I already know what is wrong, but I'm too fried right now to fix it. Anyway, try it out.
Also, it takes about 45 seconds on my machine to load this, so give it a little while if you have a slower machine. And warning, it is going to create 1.6 million polygons, so if you have a slow machine, it probably won't move real fast.
Oh, and use the arrow keys to fly over the terrain
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 11:41
and here is one more screenshot, with the new colors instead of the pasted on textures

Attachments

Login to view attachments
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 24th Jul 2007 13:03 Edited at: 24th Jul 2007 13:04
@ Visigoth: What you created looks really fantastic! I have no other words to say! (It really could be the holy grail reguarding the creation of real terrain!)

All these cool stuff I see in the threads here makes me feels sooo small!


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th Jul 2007 14:20
Looks very good.

Know way too many languages - Master of none
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 24th Jul 2007 20:58
thanks for your comments Hoozer and Jason. Has anyone actually been able to download the demo? I am trying to download it at work, it is supposed to be a little over 9 mb, but it is only downloading 5 mb, and therefore not working. Please, let me know if you have run the demo, or if you are having problems.
The Smoking Pen
17
Years of Service
User Offline
Joined: 21st Sep 2006
Location:
Posted: 24th Jul 2007 21:29
Downloads at just over 9MB, but refuses to run for me.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 25th Jul 2007 00:06
allright, is it giving you a file missing error?, or does it just not do anything. It is an installer exe, so it should make another folder with three more folders and the actual exe you have to run. Thanks for your help, I just got home from work and will fix this pronto.
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 25th Jul 2007 01:00
@ Visigoth: I tried your demo and it worked fine so far!

Have you ever tried to do something similar with city-maps? (Streets (white), Buildings (red), Parks (green), Water (blue)) What I mean is that a part (mostly the street-layout) of a city gets drawn (let the buildings be free space or just white blocks or what ever), together with park (green fields/plains) and water (blue fields/plains)?

This would be ultimate thing/plan to start/begin modeling your own city (and by that a game that takes place in your home-city)!


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 25th Jul 2007 04:19
Hoozer, thanks for trying this out! it means alot, really. I have been thinking about streets, buildings, etc. The cool thing about this data source, usgs.seamless.gov, is not only can I get height data, I can also get data on every road and street in the area I download. I can also get data on what kind of vegetation covers the area, and the density. All this can and will be used. What alot of folks may not know or care about, this is where the mapmakers get their info. So, Google Earth, MapPoint, whatever, they get their data here. And let me just say again, in case you missed it before, Germans ROCK!

Visigoth

ps...anyway you can tell me your system specs and what kind of frame rates you are getting?
Particularly interested in your video card, and if you have anti-aliasing set to maximum setting. Thanks alot.
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 25th Jul 2007 11:28 Edited at: 25th Jul 2007 11:28
@ Visigoth: It took about 2 Mins. and 46 Sec. to load.

My system is mentioned in my sig.:
OS: Windows-XP-Pro SP-2
CPU: Athlon64X2 4800+ (Socket 939; 2,4 GHz)
RAM: 2 GB DDR
GPU: GeForce 6800 LE (overclocked to: Core: 380MHz; RAM: 434MHz; unlocked to: 12 Pixel-Shader-Units, 6 Vertex-Shader-Units)
GPU-Driver 162.18
Driver-Settings (High-Performance, all Optimizations on, no Antialising, no Anisotrophic-Filtering, forced Mipmaps: Trilinear)

About 40 FPS when I position the cam at the edge of the map! (See also the screenie!)

I hope that helps you a bit! (I'm happy that you like Germans! )


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0

Attachments

Login to view attachments
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 25th Jul 2007 12:05 Edited at: 25th Jul 2007 12:08
Works fine and looks so real, even without textures. Only in sharp upright edges there are strange squares 'diamonds'.

It took only 22 secs to load, but fps is only 31 (when 1.5 mpolys in screen).
(Win98, 3.2 GHz, Radeon 9800).
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 26th Jul 2007 07:04 Edited at: 26th Jul 2007 11:51
EDITED:
Demo has been updated to showcase different functionality. You can now do the following:
1. Adjust camera position to either fly-by or ground level.
2. Adjust ambient lighting to 3 different levels
3. Turn on and off half the terrain
4. Turn fog effect on and off
5. Change the color of the first tile in the grid, located at xpos 0, z position 0. To see this effect, you must be in hi altitude mode.
6. Restore the original color to the first grid tile.
7. Demo now starts in 800x600 windowed full screen mode. You can select and change video modes while running to either 640x480, 800x600, or 1024x768, all 32 bit depth.
8. Polygon count no longer reported every loop. This was slowing things down a little, so, if you want to know how many polys, just push P.
9. You can toggle the text on and off.

I don't have any collision or terrain following for this yet, so in ground mode, you can go right through the terrain. Have fun.

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 26th Jul 2007 11:56
Hoozer-
With your system specs, this should load even faster than mine. If you have real time virus scanning, that might be why it takes longer to load, since it writes out a bunch of data files, and your virus software might be checking them.

Everyone-
here is a screenshot of the latest demo, with Fog on

Attachments

Login to view attachments
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 26th Jul 2007 13:02 Edited at: 26th Jul 2007 13:02
@ Visigoth: Well, sometimes when I use (/used) Internet and then start DB-Pro-Programs they take a while longer for some reason! (I will run your program the next time I do a reboot, it might be this what was causing the delay! Also my system (OS) is installed for a while and trashed with a lot of things. I may need to do a fresh install to enjoy all the cool stuff from this forum! )
I was surprised that it run faster at other machines so obviously there is something wrong with my system actually!

Do you use "Cloggy's D3DFunc.DLL" for displaying text within your program? (I'm sure you do so! But if not, you should do, cause it speeds up the program a lot when you use many texts wihtin your program! It speeded my game up to 50%! Before this I used the standard "DB-Pro-2D-Text-Commands".)


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 26th Jul 2007 17:26
Hoozer-
I just handle the text myself, no other dll. I'll look into it though, anyhere I save on speed is a good thing . Did you try the new demo? What do ya think?
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 26th Jul 2007 22:36 Edited at: 27th Jul 2007 12:53
@ Visigoth: I tried your new version and the (good old) fog does bring about 3 additional FPS (and it looks a bit more realistic)! All in all what I have tested I got about 55 FPS (+ about 3 to 5 FPS when fog is on)!
I also saw again some "continental-shifting" (see my last picture) where you can see through the terrain at one side of the map! There is a little space between the sectors and it looks like they are a bit shifted to one side or something like that!

I tried it this time after a reboot (without Internetconnection and without FireWall/VirusScanner), but it still took me (my machine) 2Mins. and 37 Secs. to load! Obviously there is something strange happening within my system! (But I have no time or fun doing a fresh install in the near future, although it's time to do so!)

I must say it's still very impressive (and I hope it gets even more by time)!


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 28th Jul 2007 12:18 Edited at: 28th Jul 2007 12:37
UPDATE:
Here is a new demo. I have added some more stuff:
1. You can now walk on the terrain. I set camera height at 2 units (meters) above the terrain. This should simulate about a 6' tall person. If you get within 300 units or so of the edges of the terrain, it is going to shove you back. That is so you don't walkoff.
2. I added some text at the loading process so you can see what is going on. There are two things happening, the extracting of the individual matrix height data files(there are 80 of them), and then the actual creation of each matrix. On my pc, the file process is a blur, the matrix creation is about a half second per matrix. At least you can now see something happening.
3. There is no more flight mode in this version, you're just going to have to walk.(see #5 below)
4. Alot of internal stuff to get ready for implementing the ability to select different terrains at load time and run time(that's next, I'm getting tired of the Grand Canyon)
5. Now, what demo is anyfun without some kind of challenge? To demonstrate the scale and massiveness of this demo, I placed 10 DBPro primitives around the terrain. I challenge you to find all 10. If you really want to impress me, write down the coordinates you find them at (not to the last decimal, whole number approx is ok!)Boy, you are really going to wish you could fly now!

Judging on how much response I get from this is going to determine if I will post any more about this. No reason to waste time on it in the forums, when I could be working on it some more.

And about the walking code, I don't have any freemovement for the camera yet, so there will be times when you can look through the terrain. Especially on steep cliffs or if you get right on up to a cliff. This will obviously be fixed, I just haven't got to that yet. And actually, for what I really plan on using this for, it may not even get done, we'll see.

And I already know about the split in some of the tiles at the first column of matrixes, and I will fix this, just too lazy to at the moment, so if it bothers you to look at it, go to a different part. I mean, its not like there isn't room.

Again, I do appreciate any comments, good or bad, and hope you have fun trying to find the primitives.

Visigoth

EDITED:
I almost forgot, scale walking speed depends on your actual frame rate. I was nice, and set it to 1 unit per Do Loop. So, if you get 60 fps, you are moving 60 meters per second. Just imagine how long it is going to take you to move at real speed.

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 28th Jul 2007 12:33
new screenshots

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 28th Jul 2007 12:33
another

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 28th Jul 2007 12:34
another one

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 28th Jul 2007 12:34
last one

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 09:13 Edited at: 29th Jul 2007 09:13
wow, I thought this was pretty good. I guess I was wrong. Not a single comment in 24 hours. I guess Wii terrain is the "IN" thing now.
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 29th Jul 2007 09:19
From the screenshots, this looks very nice. I'd like to see how this project turns out.

z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 09:27 Edited at: 31st Jul 2007 12:19
z_man--
The Germans are on board...(Hoozer)
So are the Finnish..(Juso)
I could use an Aussie
The demo won't bite its only 9 mb. Screenshots are ok, but, try to find the 10 objects....not so easy...I'm still looking for 4 of them.
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 29th Jul 2007 09:53
You don't suppose you could create a virtual world almost identical to earth out of this? I mean, it would be a HUGE amount of polys, etc but with runtime loading and dividing up the map, it is theoretically possible. You could make the terrains lower poly if you wanted to put less load on the computer.

I'm probably dreaming here, but it would be amazing if it were done.

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 10:04
I'm dreaming the same dream, my friend, glad someone finally asked. The USGS reports that to get ALL the data, it would take up about 60 gigabytes. Of course, we can't expect any user to install this on their machine. But, if they had an internet connection....
each tile, at its highest resolution only takes up 40k, which could download pretty fast. So, if I had a server, with all 60 gigs of data, formatted for reading into the app, and we just numbered and gridded the USA, it could be done. Like I said, we would only need 60 gigs on a server. As for the entire world, I don't know yet what data there is. There is alot, I know there is alot of foreign(to me, anyway) countries. I can even get Mars and the Moon data. So, good question, thought about it alot, and I have actually programmed things so far to take all this into account.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 10:09
also, I have the LOD problem with this type of terrain SOLVED. I can go almost unlimited levels of detail. So, I can texture the tiles the player is currently on with higher res textures, and the tiles off in the distance are lower res. this saves speed for loading the higher res images to texture, and also for details like trees, road signs, roads, buildings, etc.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 10:12
basically, I think I can duplicate Google Earth, but make it a game.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 29th Jul 2007 10:20
and, to show you just HOW far ahead I've been thinking...
The world uses the world for differnt things (themes)
They, being the player...
They can have wars
They can go hunting
They can race vehicles
They can build and run citys

Anything you can think of, that you do in the world, could be a theme for the game. The world would be the engine to make this happen.
I have ONE particular goal in mind, which I will keep to myself, but, this is all doable.
Cellbloc Studios
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Atlanta, GA
Posted: 29th Jul 2007 10:22
That's quite impressive.

I haven't downloaded it yet, but do you provide just the source? I would want to convert it to DGSK if that is ok with you, to see what kind of speed difference that would come out of it.

Thanks!

Your mod has been erased by a signature
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 29th Jul 2007 10:57 Edited at: 29th Jul 2007 11:07
You could have the game download the map in the background while the user plays and then delete the data when the game ends, and you could essentially have just a 50MB or so download to start the game. While this is all possible, you need to ensure that even dial-up users can play with minimal lag.

To put this into perspective:
If 1 square = 5KB...

PLAN - Data Per Second - Squares Per Second ~(All values Approx.)
Dialup / 52K - 5KB - 1
512K - 50KB - 10
3000K - 300KB - 60
8000K - 1MB - 200
24000K - 3MB - 600
...
Anything beyond here is nothing to worry about, and ultimate as a GB can be downloaded in less than 10 mins which is 1/60 of the whole world. I heard someone reached a speed of 40 Gigabits per second, OR around 5GB per second! The whole map would be downloaded in 12 seconds with that speed! (Ok, now I am getting carried away - back on topic more)

As you can see, dialup users WILL suffer, but there are not many around anymore, let alone enough to actually bother downloading the game from the start (it would take literally hours).

I will download the demo later. Got stuff to do.

z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
Juso
21
Years of Service
User Offline
Joined: 23rd Sep 2002
Location: Finland
Posted: 29th Jul 2007 12:02
Walking is nice but what about free flight, then you could see the scene better.

And could you make some other area than Grand Canyon? Maybe Monument Valley? Or a city area, there probably are no buildings in the data, but are there roads?

And I'm not Spanish
Roxas
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 29th Jul 2007 13:01
Et niin...

[center]
DarkBIBLE Wikipedia for TGC Users!
Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 29th Jul 2007 22:57 Edited at: 29th Jul 2007 23:06
@ Visigoth: I found all your objects in about 30-45 Mins. (hadn't looked at my watch, sorry)!

SPOILER: Here they are:


It was (a bit) fun/challenge to search/find them and this way you realize how big the area really is!

What is the prize to have find all 10 objects first?
(I suppose your source-code will not be "open source" at any time, right? I'm sure it would be a really big help to me to understand how to utilize real world data in a game/map!
(Any changes/improvements (if I ever would be able to do so) would be send to you for reference)!
Also if I ever would use it somewhere you would get a real BIG credit! )

An example map with (only) streets (little village, big city, or something) would be cool to see how it would look like, when it's used as a "city-builder"!


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 30th Jul 2007 01:23 Edited at: 30th Jul 2007 01:25
heheh, way to go Hoozer!
Actually, I totally plan to put up the source. Just say the word, and it is yours. It can only get better if others work on it too. I'm at work now, but when I get home, about 4 hours, I'll post the source. I have to warn you though, it's a little spaghetti, a little organized, and alot of comments, and alot of debugging files and variables. I think I'll have to put it all in a .zip file and send it as a project. I think you may be surprised at how small and simple it really is.

Oh, and sorry Juso, I have no idea why I thought you were from Spain.
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 30th Jul 2007 01:23
a new car

Hoozer
17
Years of Service
User Offline
Joined: 8th Sep 2006
Location: Bremerhaven (Germany)
Posted: 30th Jul 2007 01:59 Edited at: 30th Jul 2007 14:59
@ Visigoth: Once I have a bit more time again (I don't know when this will be, but not in the near future), maybe I will ask you about the source, but untill then you can improve it and show me every now and then what you improved!
This project is really interesting! (I never put an eye into terrain-making, but this could be really something worth to learn!)
So keep on and impress me! *lol*

EDIT: I just want to mention, that a changeable camera-angle would be helpfull within your demo (sometimes it's hard to navigate, if a high wall/hill/mountain is in front of you, then you only see one color and lose orientation)!


Hoozer

AMD64X24800+(939);2GB;GF6800LE (@12PS, 6VS; 380 MHz, RAM: 434 MHz)
DP-Sw-Mode-Comp-Entry (updated to V. 1.4):
http://forum.thegamecreators.com/?m=forum_view&t=109846&b=5&p=0
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 30th Jul 2007 06:39
@VisiGoth - I'm interested to - I'm making a tank game - and to get view with some real "miles" in it - using Advanced Terrain - well - it seems maybe there is a faster way - from a framerate point of view.

So I'm curious about this project myself - if only to render one tile maybe 10-20 miles would be pretty good I think....

Jason P Sage

Know way too many languages - Master of none
z_man
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: Australia
Posted: 30th Jul 2007 13:50 Edited at: 30th Jul 2007 13:54
I just checked out the demo - nice work! Could you maybe make the cam height higher? It sinks into the terrain and be confusing.

But otherwise, good stuff you've made there. I don't have enough time to find all the objects but I may some other time. It is a real challenge.

Good luck

z_man

Intel Core 2 Duo 6600 2GB DDR2 RAM Radeon X1600 Series Realtek Sound System

Persist and you will succeed.
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 31st Jul 2007 11:59 Edited at: 4th Aug 2007 16:52
deleted due to broken code
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 31st Jul 2007 12:11
@Jason
Quote: "
@VisiGoth - I'm interested to - I'm making a tank game - and to get view with some real "miles" in it - using Advanced Terrain - well - it seems maybe there is a faster way - from a framerate point of view.

So I'm curious about this project myself - if only to render one tile maybe 10-20 miles would be pretty good I think....
"


Doing one tile for 10 miles would require getting the data at greater spacing. Currently, the app is set up for 1/3 arc second data, which is 10 meter spacing, so, one grid tile, at 20k polys, would be 3000 meters x 3000 meters. Going bigger is no problem, all we need to do is use 1 arc second data. This would make one grid 9000 x 9000 meters. And we could go even bigger, they have 2 arc second, etc. Another way to do it, would be change the byte read position in the original data file to only read every nth byte, so we could set up whatever interval of spacing we wanted. But the farther the spacing, the lower the detail. I still think the best method for doing this is going to be building two or three tile grids, placing them in the same place in the scene, hiding all the hi res ones except for the one you are currently on, and turning on and off the hi res and low res ones as you move around. Since you will always only be moving on high res ones, we could load and unload and apply detail images to that particular tile. If you look at the source, you should see what I am getting at.

Visigoth
Airslide
19
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 1st Aug 2007 02:42
This looks cool. I'm having a little trouble following everything though, is is possible to scale the actual terrain data? As in, lower the 'resolution', or detail, of the data? Because this could be very, very useful for a realistic flight simulation if it could be compressed and the data less precise (since you shouldn't be getting that close to the ground anyways )


Vote today and play the games!
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 1st Aug 2007 03:12
@Airslide
Yes, this can and will be done, it is on my list of things to do, in fact, it is at the top of the list. This is part of the Level Of Detail system that I am working on. Stay tuned...
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 1st Aug 2007 12:33 Edited at: 1st Aug 2007 12:37
UPDATE:
Well, my idea worked. I can now have multiple levels of detail, and without creating any more files than what I already have. Needless to say, I'm pretty happy right now, because this baby is coming along better than I could have imagined. Anyway, here is a new demo, some things have changed a bit;

1.Implemented a level of detail system; to see this in operation, just hit the "L" key for lo-res, and the "H" key for hi-res. For demonstration and comparison purposes, the lo-res terrain is half the terrain, or 40 tiles. Of course, I can do all or just one if I want to. I left the very first tile on in wire mode in lo-res laid over the hi-res, so, when you first start, look real close, and you'll see the wireframe.

2.I adjusted the camera movement so it is faster, and higher above the terrain, just for this demo.

Some notes about all this:
I was wondering if I would be able to move on a hidden object, and much to my surprise, it works, so I only have to keep track of the hi-res tile locations.
Also, as I predicted, there IS a noticable "tear" in the terrain where the lo-res meet the hi-res. I have some ideas on how to hide this, but for now, I'm not real concerned about it.
The lo-res terrain uses 50x50 grids, so it is half the resolution of the hi-res. I'll try one fourths tommorrow, but I don't have real hi expectations for it.
Also, the source I posted was broken sorry, but I fixed it, and I'll be updating it soon.(The "continental shift" problem)
Again, the demo is an installer type .exe, so it will make a folder, and the real .exe will be in there.
Thanks all, I'm tired, have to work tomorrow (today?), but again, stay tuned for more coming soon...

Attachments

Login to view attachments
Visigoth
19
Years of Service
User Offline
Joined: 8th Jan 2005
Location: Bakersfield, California
Posted: 4th Aug 2007 09:54 Edited at: 4th Aug 2007 10:12
UPDATE:
Well, I reworked the color_scale() function, so now it applys a color gradient based on a base color(lower elevation) to a top color(higher elevation), and can gradually dither the color from the base color to the top color depending on how many gradients I want. The screenshots show the terrain with a green base color and a brown top color, and 128 levels of dithering. Before, I had just hardcoded in the colors, and there were only 14 levels. This looks so much nicer, but, I get a few white vertices here and there, so I have to find out why that is, but other than that, its starting to really look alot better. Also, I found a more realistic way to do the water in the river, I just put a big matrix with only 4 polys underneath the whole terrain, then position it slightly above the lowest y value, and it floods the riverbed perfectly. Please, let me know what you all think, I need some comments, good or bad.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-05-08 17:17:34
Your offset time is: 2024-05-08 17:17:34