Is it possible? Saving landscape in md2 format
Moderator: Moderators
Is it possible? Saving landscape in md2 format
Hi,
i hope someone of the dedicated programmers here can help me about this. We are trying to program a game and wonder if it is possible to store the landscape in md2 format .. or if that is even reasonable.
Thanks for answer.
i hope someone of the dedicated programmers here can help me about this. We are trying to program a game and wonder if it is possible to store the landscape in md2 format .. or if that is even reasonable.
Thanks for answer.
Re: Is it possible? Saving landscape in md2 format
RAYDEN! HOLY CRAP! LONG TIME NO SEE~!
Re: Is it possible? Saving landscape in md2 format
I spy with my little eye something beginning with R
Now lets not let this derail raydens thread.
I dont see why this couldnt be done but the details and the results Im unsure of.
Sure you could UV Map a model in MD2 and give ti a ridiculously huge UV Map, or apply extra details over the top like decals or springs 'detail texture' or you could use multiple MD2 models pieced together to generate a map, or perhaps the MD2 doesn't have a UV Mapped textured and its dynamically textured, perhaps the main ground has textures splattered on it populous style based on the height and gradient but with prettier textures and some other effects so it doesnt look like its a 1997 game, then with strategically placed features and objects such as buildings placed on top.
Really all a model is is 3d data, its up to you the programmer to put the data into a conceptual framework to use. If terrain is your framework then thats fine.
Now lets not let this derail raydens thread.
I dont see why this couldnt be done but the details and the results Im unsure of.
Sure you could UV Map a model in MD2 and give ti a ridiculously huge UV Map, or apply extra details over the top like decals or springs 'detail texture' or you could use multiple MD2 models pieced together to generate a map, or perhaps the MD2 doesn't have a UV Mapped textured and its dynamically textured, perhaps the main ground has textures splattered on it populous style based on the height and gradient but with prettier textures and some other effects so it doesnt look like its a 1997 game, then with strategically placed features and objects such as buildings placed on top.
Really all a model is is 3d data, its up to you the programmer to put the data into a conceptual framework to use. If terrain is your framework then thats fine.
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: Is it possible? Saving landscape in md2 format
Isn't the MD2 format specific to UV mapping? It's also a workup format, isn't it? In other words it doesn't have any of the final draft optimizations made to it that make real time models in games playable.
That being said, feel free to ignore me, my statement is based on zero research
That being said, feel free to ignore me, my statement is based on zero research

Re: Is it possible? Saving landscape in md2 format
I think ur right swiftspear ... hmm indeed the UV map would be really huge. I guess we need another approach for landscape.
Re: Is it possible? Saving landscape in md2 format
you can do something very similar to splatting using shaders. You do not have to have a giant texture
Re: Is it possible? Saving landscape in md2 format
Quke 3 Did something similar I believe. You might be able to have a textures pixels represent shaders... I don't know how they did it.
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: Is it possible? Saving landscape in md2 format
Quake3 used the BSP mapping format. The same one halflife now uses. It's not really even a normal mesh based model... It consists of hundreds of individually textured simple "brushes" which can be any geometric shape. Basically, if you textured that geometric shape it would either stretch the whole length of the brush, or you could make it tile, and manually set the orientation (so you can make it match up with other brushes if you want). Every lighting or action element is known as an "entity" and they can either be applied to existing brushes, or arbitrarily applied in space.SinbadEV wrote:Quke 3 Did something similar I believe. You might be able to have a textures pixels represent shaders... I don't know how they did it.
Fundamentally, with mapping, there are 3 problems you need to solve.
A. How do I make the character interact intelligently with the map (as opposed to just falling through to floor to infinity)
B. How do I make the map interesting (good looking is boring in a game, maps need to be animated and give the player things to do)
C. How do I optimize it all (Certain mapping formats will eat FPS...)
Re: Is it possible? Saving landscape in md2 format
quake3 also had terrain type brushes, which basically projected a HUEG texture onto the map.
see also et:qw.
see also et:qw.
Re: Is it possible? Saving landscape in md2 format
Crysis does mapping in an interesting manner...afaik the basic map is similar to spring's, a height map with a top-down texture (though they seem to be painted/splatted on from what I've seen in the editor). For vertical details and negative slope walls and such, voxels are used.
Re: Is it possible? Saving landscape in md2 format
just like Far cry iirc
Re: Is it possible? Saving landscape in md2 format
Ok, thanks for your help .. we made some "very" basic terrain datastructure, it's enough for the moment. Unfortunally, i don't understand some things here cause i'm complete openGL noob.
But an interesting question popped up in my mind about decals. If u have some terrain and want to paint a texture somewhere on this map (to make terrain look more interesting) how do u do this? Textures are bound to vertices so do i have to do a calculation of texture coordinates for every affected vertex thats covered by that custom placed texture?
If u dont know what i mean .. it's like if an artillery shell hits ground and u want to paint a crater texture there.
EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
But an interesting question popped up in my mind about decals. If u have some terrain and want to paint a texture somewhere on this map (to make terrain look more interesting) how do u do this? Textures are bound to vertices so do i have to do a calculation of texture coordinates for every affected vertex thats covered by that custom placed texture?
If u dont know what i mean .. it's like if an artillery shell hits ground and u want to paint a crater texture there.
EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
Re: Is it possible? Saving landscape in md2 format
not for the terrain vertices, but for the vertices of the polygonRayden wrote: Textures are bound to vertices so do i have to do a calculation of texture coordinates for every affected vertex thats covered by that custom placed texture?
that your decal texture sits on (you only have to calculate the
texcoors once of course)
yes (Spring's decals are just textured quads for instance)EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
- SwiftSpear
- Classic Community Lead
- Posts: 7287
- Joined: 12 Aug 2005, 09:29
Re: Is it possible? Saving landscape in md2 format
They are? But they deform with the terrain, like in the case of explosion decals... I could have sworn they were just surface treatments applied with additional rendering passes...Kloot wrote:yes (Spring's decals are just textured quads for instance)Rayden wrote: EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
Re: Is it possible? Saving landscape in md2 format
They are just textured quads, but drawn using the quad vertex heights read from the heightmap