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.

Newcomers DBPro Corner / Terrain resolution setting?

Author
Message
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 6th Jan 2010 17:55
I'm using a 256x256 greyscale image with 256 shades in it, but the terrain from it is to low res.

Can you set the resolution for a terrain or do you have to use larger greyscale images or something?

Thanks!
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 6th Jan 2010 22:46
What does it mean too low res?

Are you using advanced terrain?

In that case the greyscale heightmap depth has to be 24 bit / true color.
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 7th Jan 2010 05:48
To low res as in the mesh don't have many faces, so the resulting terrain has many spikes instead of gradual changes in elevations.

I am not famuliar with advanced terrain, I'm still learning the basic terrain functions.
Rain Man
16
Years of Service
User Offline
Joined: 19th Nov 2007
Location:
Posted: 8th Jan 2010 06:53
Let's say that the difference between the highest point in your terrain and the lowest point in your terrain is 768 yards. With a 256 color grayscale height map, the smallest height increment between vertices is going to be three yards. A vertex height can be at a certain point or it can be three yards higher or lower; it can't be any point in between. That's what's causing the blocky look of the terrain (if I understand the problem correctly).

What I would suggest is to smooth the terrain by averaging the heights of all adjacent vertices for each vertex in the terrain. I find that doing this twice works well.

When I got this method figured out, I stripped out the smoothing code and made it a separate program. The separate program loads the height map, does the smoothing, and outputs the modified height data. When the program loads, I load the height data instead of the height map so it doesn't have to do all the number-crunching every time.

Good luck.

Ten minutes to Wapner.
Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 8th Jan 2010 14:02
Tony, yes, making a bigger heightmap will give you more faces, 512 pixels by 512 pixels giving you a 512 x 512 grid, etc. When you get to advanced terrain, there is a SET TERRAIN SCALE command that will let you decide how many faces per pixel you want for your terrain. The advanced terrain commands also include smoothing.

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 8th Jan 2010 19:00
Here's what you can get with advanced terrain and a 256x256 heightmap
cheers

Attachments

Login to view attachments
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 11th Jan 2010 04:56
Thank you for the replies and information.
I didn't realize that "Advanced Terrain" was a add on package for the DB language. I thought it was, well, Advanced Terrain generation techneques using the built in commands of DB LOL!!!
I downloaded & installed the package and there is the control I was looking for. WhooHooo!!

Thanks everybody for your help!
Outscape
16
Years of Service
User Offline
Joined: 23rd May 2008
Location:
Posted: 11th Jan 2010 10:40
the built in dbpro terrain is matrices i think.

Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 11th Jan 2010 16:17
Rich,
Quote: "there is a SET TERRAIN SCALE command that will let you decide how many faces per pixel you want for your terrain"


Nah, the scale factor only sets the actual terrain scale, if you multiply the scale factor by the heightmap size you get the overall size of the terrain - those scales are for each time.

So, SET TERRAIN SCALE Ter,Xs,Ys,Zs
I like to have 100 unit tiles, so I would scale it all by 100, maybe scale on Ys by 40% or something though.

Outscape,
There are actually 3 types of native terrain - matrices which are more like a leftover from DBC, but also advanced terrain plugin, which is pretty much standard now - and also the 3D world terrain, which is horrible and not even worth looking at. That was the first proper terrain system in DBPro, but we all found better ways.

I tend to use objects and a shader to give me lots of blended textures, vertex modification, stuff like that. One thing I'm looking at is seed generated terrain - rather than trying to make a terrain from scratch (tedious) or from a drawn heightmap (fiddly) I'm generating perlin noise style terrains, but butchered and simplified - generated from a text string. I plan to generate a terrain, then adjust it - but then only save the adjustments rather than the whole thing. A float variable heightmap, at 1024x1024 (the size I use), would mean a data file of 4mb. 4mb of data that is tough to compress, just for 1 single terrain - and I'm not even talking about texturing yet. Instead I can generate the terrain from seed, apply the changes, and be done in time for kippers. My idea is that people can name a terrain after themselves, and that becomes their sandbox, it's an extreme sports game.

If I didn't smooth my terrain after generating it, it would look terrible, jaggies all over the place. After smoothing the data 2 or 3 times, it looks perfect - I think that's just the way of things. For instance, my system uses a morons version of perlin noise, only the height array to go on, no extras - and all the raw control points are set right onto that. But as I said, it only looks mountain-like after I smooth it out. It's a vital step that advanced terrain doesn't seem to care too much about - you can't smooth out advanced terrain, and making 32-bit gray scale heightmaps is a nightmare.

I'm sure AT supports more than the standard gray scale, like RGB(128,128,129) is just slighly more than RGB(128,128,128) - it would give you 24-bit gray scale instead, or 0-8.5mil instead of 0-255. Generating this image is not easy though, I would suggest making your own heightmap smoothing and export program.


Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2024-09-28 14:29:31
Your offset time is: 2024-09-28 14:29:31