View Full Version : Terrain Question
JoshK
08-20-2007, 05:17 AM
From watching John Carmack's presentation of id's Megagen tool, it appears that the terrain workflow is like this:
1. Model the terrain in 3ds max or another program.
2. Load the terrain mesh in Megagen, unwrap the tex coords, and apply textures.
3. Export a final compressed megatexture.
So there is a strict division between geometry and texture editing. Once the terrain is unwrapped in Megagen, you can not go back and alter the geometry.
Does this describe the workflow correctly? Is it important to make sure you are finished with the terrain mesh before you begin texturing it?
marmil
08-20-2007, 05:42 AM
Yeah, I was under the impression that you don't really want to go crazy with the megatexture painting until things are pretty final.
I think If all you were doing to the terrain mesh was raising or lowering the height of a hillside or roadway a little bit it would probably be fine. But if you were doing something like moving the road a bit to one side or another, or you moved a building that had a driveway in front of it that was painted into the megatexture, or you repositioned a crater or creek bed, then yes I think you would need to repaint stuff.
I saw one of the console commands was "r_showMegaTextureSTGrid" and was wondering what that was for? Maybe something to do with applying small fixes to stretching in the megatexture?
Hakuryu
08-20-2007, 06:49 AM
Moving a road would be easy, as roads have their own tool. You would just edit, remove, or add a new road where you wanted it. However, I do get your point. If you flatten a mountain, you now have mountain textures where you might want grass.
Generating a finished megatexture probably takes quite a while, but I read you could make lower resolution ones. Until your mesh is finished, just generate a low res one.
I know I've got about 20 meshes in various states, but I'm wary making small details until I can actually run around on it.
Hakuryu is most accurate here, I think.
It's certainly not a workflow that's set in stone - it's very easy to go back and change the terrain mesh once you've set up all of your MegaTexture media - however as Hakuryu says, if you change huge features like mountains, you're going to have to re-texture that area.
Fortunately this is quite easy since you can just paint out a mask for rocks in that area.
The biggest consideration when changing a terrain mesh is whether you'll have to re-render the MegaTexture or not. If it's just a simple thing like changing the height or angle of a small slope, or adding/removing polys from an area, then you should be ok.
Anything which considerably changes the UVW-maps (which you should create in your modelling package, this isn't done inside MegaGen), is the thing you should worry about most, since that will mean your masks for surface types may no longer line up.
This is why it's probably best to just use a placeholder MegaTexture (lower res for faster re-generating, only a few surface types so you can make large changes easily), until you're happy with how the terrain mesh is working in the game. Then you can go to town on MegaTexturing the thing, and make any minor adjustments to the model as you go along.
Hope that helps.
SmileTheory
08-30-2007, 10:16 AM
I just noticed that JoshK is using this response as an indictment towards megatexture as a whole over on the beyond3d forums:
http://forum.beyond3d.com/showpost.php?p=1051873&postcount=33
Now I'm not trying to start an interforum flame war here, but is he right?
Given the file size of a megatexture and the resources necessary to do a rerender of one, I was thinking that level designers could simply reuse the megatextures for the various ETQW levels and release quick, small maps that way. Perhaps cutting out inappropriate parts of the mesh and inserting new meshes with normal layered texturing.
Is that not possible or does this have too many drawbacks?
Kamikazee
08-30-2007, 01:59 PM
I just noticed that JoshK is using this response as an indictment towards megatexture as a whole over on the beyond3d forums:
http://forum.beyond3d.com/showpost.php?p=1051873&postcount=33
Now I'm not trying to start an interforum flame war here, but is he right?Not completely, read this thread some more.
You will need to retexture certain areas if you modify the terrain model too much, but that doesn't mean the whole MegaTexture needs to be repainted from scratch. It's never a really good idea to start painting the terrain when you know the terrain model might change.
But he has one point: the workflow is not real-time.
Given the file size of a megatexture and the resources necessary to do a rerender of one, I was thinking that level designers could simply reuse the megatextures for the various ETQW levels and release quick, small maps that way. Perhaps cutting out inappropriate parts of the mesh and inserting new meshes with normal layered texturing.
Is that not possible or does this have too many drawbacks?I guess you could, but it has some drawbacks if I'm not mistaken. For one thing, the MT zone loading algorithms might not account for the fact that you make a discontinuous UV map. I believe most UV maps of the original terrain models are created from a top-down view.
However, let's look at the positive side for a change... You can blend textures without constructs like Q3Map2 alpha blending or vertex painting like in Doom 3, decals can be stamped on, ...
channie
08-30-2007, 01:59 PM
i don't think this is much of a issue since you don't want to generate your full res megatexture until you're happy with your terrain mesh.
i don't know how much time it would take to render a low res megatexture for testing purposes though.
Hakuryu
08-30-2007, 07:41 PM
Probably is determined by how many 'layers' of stuff you are drawing. If you just put grass and rock for mountains down, I'd imagine that wouldn't take long... but if you have mud, dirt, dirt + rocks, grass, light grass, mountain rock, snow... and so on... that would probably take quite a while.