Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsShowcase → Perty Heightmaps
Perty Heightmaps
2004-09-06, 12:59 AM #1
Lately I've been putting together a relatively short technology demo written in C++. (It's using OpenGL right now, but I might switch it to DirectX) So far the demo pretty much just loads a heightmap, loads a texture for that heightmap, and allows you to move around the area in full 3D.

The heightmap itself is just a regular 2D bitmap that I generated with "Solid Noise" using GIMP 2.

The texture you are seeing on the terrain was created by a program that I wrote today which was based on an article I found over at flipcode. Basically, it takes a series of textures, what height you want each texture to start at, what height you want each texture to end at, the heightmap itself, and then blends all of the textures together based on the said heightmap. The entire program takes several seconds to create the texture, so instead of saving and loading the texture, I might just have the demo itself generate it, and load it into memory.

[http://fin.mine.nu/sg/screenieB1.jpg]
[http://fin.mine.nu/sg/screenieB2.jpg]

As this is a WIP, there are other things I plan to add:a more detailed texturing approach, a dynamic cloud system, better collision detection, and possibly a Quad Tree for space partitioning.

Credit for the textures I used in my generator goes to: MaDaVentor (rock and sand), PedHead (grass), and SAJN_Master (snow).
2004-09-06, 1:51 AM #2
Looks "GrOOOOOOOooooooooooovy".....get it?
2004-09-06, 3:09 AM #3
Very nice :)
Magrucko Daines and the Crypt of Crola (2007)
Magrucko Daines and the Dark Youth (2010)
Magrucko Daines and the Vertical City (2016)
2004-09-06, 8:16 AM #4
VOXELS!!!!!!!

HORRAY!!!!

Now you need to integrate a polygon geometry engine along side the Voxel terrain engine and allow for multiple heighmaped surfaces. Then you can make really cool stuff, like from Outcast!

Sorry, I’m a bit of a Voxel nut..

Seriously though, take a look at this Voxel Engine . I also have some links to some source code for other voxel engines.

BTW, how are you handling overdraw, reverse ray tracing?
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2004-09-06, 8:24 AM #5
Quote:
Originally posted by West Wind
VOXELS!!!!!!!

HORRAY!!!!

Now you need to integrate a polygon geometry engine along side the Voxel terrain engine and allow for multiple heighmaped surfaces. Then you can make really cool stuff, like from Outcast!

Sorry, I’m a bit of a Voxel nut..

Seriously though, take a look at this Voxel Engine . I also have some links to some source code for other voxel engines.

BTW, how are you handling overdraw, reverse ray tracing?


Actually, that's not done with voxels; it's a grid of triangle strips rendered in OpenGL. Because I am using OpenGL's depth testing, I need not worry about overdraw.
2004-09-06, 8:58 AM #6
Doesn't even look like voxels. Which might or might not be good thing.

(The recently released RTS game Perimeter uses voxels)

Looks cool!
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2004-09-06, 9:21 AM #7
I guess your right... No voxels...

Any time i see large scale landscapes and the word "Height-map" in the same area, I think voxels... but no, no voxels here...

I asked about the overdraw/ occlusion cutting because I have been wondering about an alternative way to determine overdraw without the overhead of ray tracing.

*goes off to sulk in his Voxel-less land*
"Well, if I am not drunk, I am mad, but I trust I can behave like a gentleman in either
condition."... G. K. Chesterton

“questions are a burden to others; answers a prison for oneself”
2004-09-06, 9:47 AM #8
On a related note, I really should get my hands on outcast some day.
APT 1, 2, 3/4, 5/6
TDT
DMDMD

http://veddertheshredder.com
2004-09-06, 10:42 AM #9
That looks cool, even if I don't know what you people are talking about. Especially because I know (and use) each and every one of those textures :-P

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-09-06, 10:45 AM #10
Quote:
Originally posted by West Wind
I guess your right... No voxels...

Any time i see large scale landscapes and the word "Height-map" in the same area, I think voxels... but no, no voxels here...

I asked about the overdraw/ occlusion cutting because I have been wondering about an alternative way to determine overdraw without the overhead of ray tracing.

*goes off to sulk in his Voxel-less land*


You could use raycasting, but I'm guessing you know that, and don't want to use that due to limited movement.
2004-09-06, 10:48 AM #11
SG1, think you could PM me on aim: xone009 or msn jEDIkIRBY007@hotmail.com I want to ask for your help with heightmapping.

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-09-06, 1:37 PM #12
The blending on the terrain looks real nice... if only i could make stuff like that :(
Sneaky sneaks. I'm actually a werewolf. Woof.
2004-09-06, 5:11 PM #13
awesome, voted 5
2004-09-06, 6:38 PM #14
Code:
Oh my God, is that Jedi Knight: Dark Forces 2.
"Well ain't that a merry jelly." - FastGamerr

"You can actually see the waves of me not caring in the air." - fishstickz
2004-09-06, 10:38 PM #15
I sure hope it is
I am _ Ace_1 _ , and I approve this message.
2004-09-07, 7:45 AM #16
There's this great new field of science out, and I've used it to determine if this is JK.

The science is called 'Reading.'

JediKirby
ᵗʰᵉᵇˢᵍ๒ᵍᵐᵃᶥᶫ∙ᶜᵒᵐ
ᴸᶥᵛᵉ ᴼᵑ ᴬᵈᵃᵐ
2004-09-07, 7:52 AM #17
I like it...
I like it...
I like it...
2004-09-08, 8:56 PM #18
Whooo! Terragen meets UT2K4!
Stuff
2004-09-09, 2:51 AM #19
SG1_129...
Try this link...

[url]www.blackwatergames.com[/url]

The site is still under some construction (forums mainly), but they're fully operational. And you can join us on the Holonet! Look for our main IRC topic in "Main Discussion" if you want to talk to me in person, or just meet me in #massassi.

Continue with the work!
:D
HistoryGuy's Sites:
+-+ http://history-guy.com +-+
+-+ www.blackwatergames.com+-+
2004-09-09, 3:33 PM #20
Quote:
Originally posted by HistoryGuy
SG1_129...
Try this link...

[url]www.blackwatergames.com[/url]

The site is still under some construction (forums mainly), but they're fully operational. And you can join us on the Holonet! Look for our main IRC topic in "Main Discussion" if you want to talk to me in person, or just meet me in #massassi.

Continue with the work!
:D


I'm SithGhost.
2004-09-09, 3:35 PM #21
Quote:
Originally posted by kyle90
Whooo! Terragen meets UT2K4!


Except, of course, that this involves neither Terragen or UT2K4. ;)
2004-09-09, 3:52 PM #22
Meh. Sorry. :P

REJOIN US ANYWAY! :P ;) You were our lead programmer before you quit.
HistoryGuy's Sites:
+-+ http://history-guy.com +-+
+-+ www.blackwatergames.com+-+
2004-09-09, 4:14 PM #23
Quote:
Originally posted by HistoryGuy
Meh. Sorry. :P

REJOIN US ANYWAY! :P ;) You were our lead programmer before you quit.


I was only lead programmer because none of the other two "programmers" you currently had "working" either didn't want to do it, or didn't seem dependable. The decision to make me lead programmer had nothing to do with me being qualified. But this is to be expected, as the leader of the art department gave me the position in the first place. This is, however, not why I left.
2004-09-09, 8:10 PM #24
Quote:
Originally posted by SG1_129
Except, of course, that this involves neither Terragen or UT2K4. ;)


Yes, I realize that. But it does remind me somehow of UT2K4, and of course the terragen thing is obvious.
Stuff
2004-09-09, 9:03 PM #25
That is not JK.

...

OMGZ IS TAHT TEH JK????
Nouveau Vintage
2004-09-10, 2:18 AM #26
Quote:
Originally posted by Jovan
That is not JK.

...

OMGZ IS TAHT TEH JK????


Yes. It is. Honestly.
2004-09-10, 5:13 AM #27
cool, I like it, oh and you say this is a tech demo thing right, so the engine was built by scratch by you?
Flipsides crackers are the best crackers to have ever existed
2004-09-10, 1:05 PM #28
Actually, that looks and sounds very much like Morrowind (in a good way), though it uses a series of numbers for elevation data, instead of a fixed-precision heightmap (which is much more space efficient). Very nifty. What is the precision level of the heightmap? (Is it 24-bit, 32-bit, or something else?)

As I said, it looks like Morrowind, in a good way. The texture blending you've accomplished is even better (no failures when three textures meet at the same vertex). Just add trilinear filtering, and you've got amazing landscape rendering.

Of course, Morrowind had no overdraw (overdraw=hidden face culling?), so adding that would make it one of the most efficient and quality engines there. From what you say, I presume the engine is something you've written from scratch (more or less). I'd definitely like to see more work done with this.
Wake up, George Lucas... The Matrix has you...
2004-09-10, 9:30 PM #29
Quote:
Originally posted by nottheking
Actually, that looks and sounds very much like Morrowind (in a good way), though it uses a series of numbers for elevation data, instead of a fixed-precision heightmap (which is much more space efficient). Very nifty. What is the precision level of the heightmap? (Is it 24-bit, 32-bit, or something else?)

As I said, it looks like Morrowind, in a good way. The texture blending you've accomplished is even better (no failures when three textures meet at the same vertex). Just add trilinear filtering, and you've got amazing landscape rendering.

Of course, Morrowind had no overdraw (overdraw=hidden face culling?), so adding that would make it one of the most efficient and quality engines there. From what you say, I presume the engine is something you've written from scratch (more or less). I'd definitely like to see more work done with this.


Right now, it is only 8 bit. One byte per number, so you really only have 256 possible heights per point. It is quite likely to stay that way unless I use it in another project. The meat of the demo will be the cloud system that I plan to incorporate; the landscape is not as important.

The landscape texture is not created at run time; it is created by a separate program that I wrote. It calculates each pixel individually and outputs the image data to a file. So really what you are seeing in the demo is one texture being stretched out over a landscape. This is why you do not see any texture blending problems.

Yes, I did write both programs. However, this demo is not an engine. It is a tech demo, yes, but not an engine. To the less informed (not necessarily you) an engine is more than rendering code. In the future, I suppose I could take some of the code from this project and put it into an engine (which I'll more likely do for the type of cloud generation technique I'm looking at using), but this in itself, is not an engine.

Also: as of now, this has no space partitioning implemented.

To everyone who likes skipping the text in my first post: THIS IS NOT FOR JK ;)
2004-09-11, 3:23 PM #30
Hrm.

Some thoughts...

If you layer two [Ed: heightmaps] lightmaps; a main map and a detail map; you can attain much greater variation in the terrain. The 'detail' map is scaled much smaller than the main map, and is added to the main map once it's in memory. It's a bunch of little offsets that make the terrain rougher and more natural.

If you blend the textures at runtime (Just draw each triangle again for each texture that meets on it, with appropriate alpha-values at the corners) you can get much higher detail texturing. Clearly, stretching a texture over just a single triangle instead of the entire terrain means more texels per triangle.
Alternativly, you can use a detail texture that it blended over the terrain and is scaled much smaller then the main terrain texture.

Fog is good. Theres always a small amount of fog in real-life, making things farther away grey out.

You see mountainous, bumpy terrain in all the games. If you can do a gently rolling plain with an actual horizon, it will be much more impressive.
2004-09-11, 6:15 PM #31
Quote:
Originally posted by JM
Hrm.

Some thoughts...

If you layer two [Ed: heightmaps] lightmaps; a main map and a detail map; you can attain much greater variation in the terrain. The 'detail' map is scaled much smaller than the main map, and is added to the main map once it's in memory. It's a bunch of little offsets that make the terrain rougher and more natural.

If you blend the textures at runtime (Just draw each triangle again for each texture that meets on it, with appropriate alpha-values at the corners) you can get much higher detail texturing. Clearly, stretching a texture over just a single triangle instead of the entire terrain means more texels per triangle.
Alternativly, you can use a detail texture that it blended over the terrain and is scaled much smaller then the main terrain texture.

Fog is good. Theres always a small amount of fog in real-life, making things farther away grey out.

You see mountainous, bumpy terrain in all the games. If you can do a gently rolling plain with an actual horizon, it will be much more impressive.


I do know about detail texturing and was planning to add a more detailed texturing approach (see first post), and I have added fog since I showcased this, however, it might be removed, and if not, modified, in the future. As for the bumpy terrain, I do plan on using much smoother data later on simply because it will be better to walk along when I add gravity and much better collision detection. Also note, this isn't for a game, this is a tech demo that will be shown to various adults at my highschool in order to give them a taste of what I know and what I can do. Thanks for the feedback. :)

↑ Up to the top!