Is it possible? Saving landscape in md2 format

Is it possible? Saving landscape in md2 format

Post just about everything that isn't directly related to Spring here!

Moderator: Moderators

Post Reply
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Is it possible? Saving landscape in md2 format

Post by Rayden »

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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Is it possible? Saving landscape in md2 format

Post by smoth »

RAYDEN! HOLY CRAP! LONG TIME NO SEE~!
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Is it possible? Saving landscape in md2 format

Post by AF »

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.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Is it possible? Saving landscape in md2 format

Post by SwiftSpear »

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 :P
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Re: Is it possible? Saving landscape in md2 format

Post by Rayden »

I think ur right swiftspear ... hmm indeed the UV map would be really huge. I guess we need another approach for landscape.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Is it possible? Saving landscape in md2 format

Post by smoth »

you can do something very similar to splatting using shaders. You do not have to have a giant texture
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: Is it possible? Saving landscape in md2 format

Post by SinbadEV »

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.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Is it possible? Saving landscape in md2 format

Post by SwiftSpear »

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.
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.

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...)
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Re: Is it possible? Saving landscape in md2 format

Post by imbaczek »

quake3 also had terrain type brushes, which basically projected a HUEG texture onto the map.

see also et:qw.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Re: Is it possible? Saving landscape in md2 format

Post by Peet »

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.
User avatar
Comp1337
Posts: 2434
Joined: 12 Oct 2005, 17:32

Re: Is it possible? Saving landscape in md2 format

Post by Comp1337 »

just like Far cry iirc
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Re: Is it possible? Saving landscape in md2 format

Post by Rayden »

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?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Is it possible? Saving landscape in md2 format

Post by Kloot »

Rayden 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?
not for the terrain vertices, but for the vertices of the polygon
that your decal texture sits on (you only have to calculate the
texcoors once of course)
EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
yes (Spring's decals are just textured quads for instance)
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Is it possible? Saving landscape in md2 format

Post by SwiftSpear »

Kloot wrote:
Rayden wrote: EDIT: Just had an idea .. or is it just a textured polygon sticked on the ground?
yes (Spring's decals are just textured quads for instance)
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...
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Re: Is it possible? Saving landscape in md2 format

Post by jcnossen »

They are just textured quads, but drawn using the quad vertex heights read from the heightmap
Post Reply

Return to “Off Topic Discussion”