View Full Version : Textures and terrains in ET
Danyboy
23rd June 2003, 20:07
Am planning a map for ET and am wondering if ET uses any massive terain blocks like that in the mp_beach tester map.
Or was it just a case of making millions of triangles, modyfing vertices and applying the same texture to them.
Fiesling
23rd June 2003, 21:54
Walk around with r_showtris in the map and you can see the size of the triangles. :)
As far as Sock mentioned in the forum, the used standard Terrain Editing but with an additional gtk-plugin from their SDradiant.
But if you use Easygen you can help yourslf out until the Tools arrive. ;)
hummer
23rd June 2003, 23:38
Walk around with r_showtris in the map and you can see the size of the triangles. :)
As far as Sock mentioned in the forum, the used standard Terrain Editing but with an additional gtk-plugin from their SDradiant.
But if you use Easygen you can help yourslf out until the Tools arrive. ;)
Where was this thread? I was about to ask...
What is the betst way to edit terrain? Typically, I'll make a height map in Photoshop, bring it into Easgen, export the terrain, bring into Radiant.
But, if I need to make a change, I end up making the change to the heightmap, re-exporting, and re-importing to Radiant.
Now, from my expierence, vertex editing on terrain has been touchy... but the last time I did real terrain editing was under 1.2.1, a while ago.
So, is this the best way to edit terrain right now, or will better things come when the ET kit is released? Perhaps some terrain gurus can enlighten us :)
Danyboy
24th June 2003, 00:15
I already have walk with showtris on but its not a great guide to show whether its a terrain wizard or the trinagle duplication.
Even in mp_beach you cant tell by looking at showtris - you only know from seeing the terrain shader in GTKRadiant.
--
the way i make terrains is by making a brush - changing it to 3 sided (so that the problem with splitting faces doesnt bug your map) then move the vertices of the triangles so they meet each other - put enough together and you can make cliffs, hills and ditches - just takes time.
sock
24th June 2003, 08:24
The terrain triangles in Fueldump are 256x256 map units big. With extremely large open plan maps you don't have the luxury of having fine detail terrain to work with. The original terrain was taken from the RTCW SP map forest, which was created from a height map. I then cut the terrain up into 2 halves and trimmed all the excessive triangles from the edges. Finally pulled and tweaked the terrain manually in GTKRadiant.
The GTK editor has a cool paint selection tool and will move several vertex points together well. Just remember to select all the terrain first and snap all the points to the grid first. (CTRL-G) Trust me, it will save you loads of grief/time later on. Height map generated terrain can produce vertex points with very strange co-ordinates.
The worst problem with large terrain triangles is that by default they are arranged into a star configuration. (All the triangle pieces point into each other, cant think of better way of describing it) Luckly djbob (after much arm bending) wrote a cool terrain triangle flip plugin which takes two triangles and rotates them 90 degrees. Manually doing this was a complete waste of time and energy, because sometimes it looked/felt worse. (GTK does not have a very good undo feature with regards to terrains)
Something I discovered late on with the new terrain system is that you can mix different triangle sized in one terrain. The side road which goes up to the tank bay did not look right with big 256 sized triangles so I cut the hillside up into 128 triangles so that the road "looked" smoother and more natural. It certainly helped with the road decal, fitting better onto the terrain triangles. If I had known about this earlier on, the terrain would have been tweaked more. Ydnar also did alot of fixes to the way the terrain is mapped and blended in the sdmap2 compiler so that you can do more funky stuff and not be punished for it with dodgy looking alpha blends.
Overall a height map is a very good starting point for large terrains, but at the end of the day, manual tweaking will always add that extra touch in my book. The extra time and effort of smoothing out hillsides and twisting/flipping around certain triangles to get better blending helps.
Sock
:moo:
Milbo
24th June 2003, 10:18
I have 3 terrains in my map generated with Easygen,... then I opened a clean map and LOADed my terrain into the map,.. that is better than to start direct because on this way the textures are saved not in the worldspawn entity (remember the 2048 limit),.. there is only a "link" to your script (normally generated by Easygen automatically). So u can use more textures in your terrain,...Then I made some failure (wanted to take another textures),.. so I deleted it and generate the terrain new and loaded it into the map again,...
Later i found out that it seems to be enough to change only the shader and the pcx file,... nothing more,.. compiled my map mit q3map2 and that was it, the new terrain was in the map hehe.
Probably there are many failures in the map and i dont now it,... I hope that socks write a comment to this procedure.
How do i split extra triangles in the terrain?? I noticed that at the fueldump, I was wondering about the nice street and the rough Trisize around,...
I have my triangles how du u split them??
Danyboy
24th June 2003, 11:04
Cheers for input Sock - am also wondering
Is there a way to blend textures together - so lets say i've got dark cliffs meeting flat grass land - anyway to reduce the join of these two sections of terrain.
Or would it just be adding fern models like the millions used in Radar as a way to hide the join?
BTW - in radar some parts of the map - near the side entrance gimme ultra low FPSs - though i have got a temporary (i hope) Radeon 7500 :(
sock
24th June 2003, 15:55
Easygen is ok but it does not cope with the latest metashader changes and cannot work with variable sized terrain triangles. It does have triangle edge turning and the import/export of map files is extremely useful. :D
Danyboy: The blending of textures is generally done by the metashader. But if you have two extreme textures the metashader will not perform miracles. You will probably need another texture for in between the two original textures.
Sock
:moo:
Danyboy
24th June 2003, 16:23
ok cheers
Danyboy
24th June 2003, 17:31
http://www.ihateaol.co.uk/misc/pics/06.24.03-18:27:152003-06-24-182453-fueldump.jpg
just thought i'd add this as a demo of the 256 trinagles with smaller road trinagles
hummer
24th June 2003, 18:11
Wow... great response Sock. I'm working on terrain now, so this is very useful.
Is this triangle flipping plug going to be available with the ET mapping kit? I could use that about now :)
Also, great sreenshot. That illustrates the concept perfectly.
Let me ask you, did you include the road texture in the meta shader? I thought the road was decal to be honest, but it doesn't appear to be from that screen.
How did you get the road to curve like that... match up each texture on the triangle so well?
chavo_one
24th June 2003, 18:40
I thought the road was decal to be honest, but it doesn't appear to be from that screen.
It is a decal. If you look closely you can see the terrain triangles underneath the patch triangles of the road.
hummer
24th June 2003, 20:17
Ah... I see it now. The only cut up triangle terrain block is in the center & right, the rest are decals.
So the curve effect is done with a patch mesh then? I can't see how it would curve so nicely any other way.
sock
25th June 2003, 08:55
Got sample images to help with the terrain questions.
The first image is with the road decal in place and terrain triangles highlighted with triscolor. Used (r_showtris 1, r_lightmap 1, r_triscolor "0.0 0.0 0.1 1.0")
http://www.planetquake.com/simland/images/misc/fueldump_terrain1.jpg
The real trick with the road decal is the shader. It uses an unusual blend and the texture has been changed to work with the blend better. The blend helps to reduce zfighting on bullets and grenade explosions, plus its vertex lit. The decals are a combination of meshes and brushes, depending on if a curved image was needed or not.
The next image shows the decal removed with the (r_nocurves 1) command and shows the terrain triangles below easier. This image shows the triangle edge turning and how it helped with the blending.
http://www.planetquake.com/simland/images/misc/fueldump_terrain2.jpg
The terrain triangle turning plugin will be with the released ET tools. It only works on 2 triangles at a time and they must have all their vertex points on the grid. (ctrl-g)
Sock
:moo:
EDIT: r_triscolor was wrong.
Danyboy
25th June 2003, 09:01
sounds good - looks complicated - and you have a nicer gfx card than mine :(
also - are there many ppl who don't use grid lock on their maps? :???:
Just that trying to get anything to meet must be a nightmare and a half!
sock
25th June 2003, 09:12
also - are there many ppl who don't use grid lock on their maps? :???:
Yes some people do work off grid and even create whole maps with no grid lock on! (strange but true) If you create a terrain mesh with a height map, I would recommend that when you do bring the terrain back into GTK just select the terrain and press (CTRL-G). Better to be safe than sorry, it *could* cause problems later on.
Sock
:moo:
Prophesy
25th June 2003, 11:20
Sock >>
Did I get this right?
For ET terrian creation you recommend us not to use EasyGen since it does not cope with the latest metashader changes, but instead use the tools within GTKRadiant?
Suddenly feeling very confused again :???:
Will EasyGen work with ET all?
hummer
25th June 2003, 11:33
Cool! I'm learning all kinds of new editing commands too :)
Anyway, in http://www.hummerdesign.com/misc/1.jpg this picture, the highlighted triangle is one you've cut manually? I just want to make sure. Also, the reason for this, is so the decals will fit better on the terrain?
I'm actually going to be doing something similar here in a bit.
http://www.hummerdesign.com/et/
This top entry shows what I'm working on now... not as cool as your terrain, but it's coming along. I'll have a road that enters and exits the map. Right now, I just have a gravel shader applied, but I'd like to do tracks ala Fuel Dump.
sock
25th June 2003, 11:48
Sock >>
Did I get this right?
For ET terrian creation you recommend us not to use EasyGen since it does not cope with the latest metashader changes, but instead use the tools within GTKRadiant?
Suddenly feeling very confused again :???:
Will EasyGen work with ET all?
Terrain generated by Easygen will work in ET. You can use whatever tools you are comfortable with. But we do not support easygen so you will have to speak to others about possible problems.
ET supports a new structure for the metashader which makes editing of the shaders easier. It would advantageous to use this new format instead of the original metashader format.
Sock
:moo:
sock
25th June 2003, 11:57
Anyway, in http://www.hummerdesign.com/misc/1.jpg this picture, the highlighted triangle is one you've cut manually? I just want to make sure. Also, the reason for this, is so the decals will fit better on the terrain?
No that was done by the compiler. The sets of triangles above and to the right where manual created a different size to the other triangles. I simply took an existing set of 2 triangles and create 4 instead. I would only recommend sub-dividing triangles so the dimensions are multiples of 2. Like 256 as the main tile size and sub-divided sections are 128.
I'll have a road that enters and exits the map. Right now, I just have a gravel shader applied, but I'd like to do tracks ala Fuel Dump.
The road tracks in Fueldump are detail brushes laid flat against the terrain triangles. I used meshes so that the road tracks can curve. Was planning on foot prints and other stuff but run out of time. :(
Sock
:moo:
Prophesy
25th June 2003, 12:40
Thanks.
hummer
25th June 2003, 19:01
Thanks for the clarification :)
By new metashader format, do you mean like, using a base shader then having other shaders inherit properties from it, or something entirely different? At this point I've re-written the shader as such.
Also, you mentioned in an eariler post that inporting / exporting of .maps can be useful in EasyGen. However, if triangles are manually cut, say, to 128 x 128, does easygen export it back out as a 256 x 256?
If I'm asking too many questions, go ahead and tell me to feck off :)
sock
26th June 2003, 08:35
By new metashader format, do you mean like, using a base shader then having other shaders inherit properties from it, or something entirely different? At this point I've re-written the shader as such.
I mean exactly that, metashaders can have a base shader now which saves alot of time and allows the terrain to maintain some parameter standards. ALot easier if you want to modifiy the whole terrain. The last time I looked at Easygen 1.4 it did not cope with creating metashaders with lightmaps and still used the old system of vertex light. Often it is easier to just write the metashader by hand or use the existing metashaders in ET as a template.
Also, you mentioned in an earlier post that inporting / exporting of .maps can be useful in EasyGen. However, if triangles are manually cut, say, to 128 x 128, does easygen export it back out as a 256 x 256?
Indeed the import/export map feature of Easygen is very good, but it does not cope with multiple sized terrain triangles or cut sections. In various places of the Fueldump map I had to cut the terrain to fit brushwork. There were a couple of times I had to cut the terrain triangles because they were sharing the same space as some existing brushwork. For example the image below shows the tunnel entrance at the beginning of the map.
http://www.planetquake.com/simland/images/misc/fueldump_terrain3.jpg
The triangle section of the terrain is flush with the inside of the tunnel. The edge of the terrain was painted with a "caulk" texture but it still cut the inside of the tunnel and cause some nasty splits of the tunnel brushwork. The solution was to do some cutting of the terrain triangle to stop the inside edge of the terrain sharing the same space as the inside of the tunnel brushwork as follows:
http://www.planetquake.com/simland/images/misc/fueldump_terrain4.jpg
Because the inside edge of the terrain no longer shared the same space as the inside of the tunnel brushwork it did not cause nasty splits/cuts in the brushwork. These cuts also affected the floor and caused alot of unnecessary triangles.
The moral of this story is that sometime u need to cut the terrain in order to stop the compiler from creating more splits of other brushwork. Once the terrain is cut to fit it becomes difficult for Easygen to import/export the terrain again.
Sock
:moo:
Prophesy
26th June 2003, 15:28
Again, excuse a light n00b :???:
Could someone please explain the difference beetween metashaders with lightmaps and the old system of vertex light.
Danyboy
26th June 2003, 15:36
Can't really give definitions of lightmap and vertex lighting - but a metashader is the name given to the .shader file you find in the scripts folder of any Q3-based engine
sock
26th June 2003, 15:56
Again, excuse a light n00b :???:
Could someone please explain the difference beetween metashaders with lightmaps and the old system of vertex light.
Metashaders is the name given to the special set of shaders used to create terrain blends. Originally all terrains where designed with vertex light because of the time and the size of the lightmaps needed for the BSP. The original syntax for terrain metashaders used vertex light.
Here is a sample from the terrain.shader with TA (Q3 Team Arena) the pioneer of the technology.
textures/terrain/mpterra2_0
{
qer_editorimage textures/stone/pjrock9b_2.tga
surfaceparm nolightmap
q3map_novertexshadows
q3map_forcesunlight
{
map textures/stone/pjrock9b_2.tga
rgbGen vertex
tcmod scale 0.125 0.125
}
{
map textures/skies2/clouds.tga
blendfunc filter
detail
tcmod scale 0.01 0.01
tcMod scroll -0.05 0.05
tcmod transform 1 0 1 1 1 1
}
}
Notice on the first stage of the shader it forces the texture to be drawn with vertex light and the shader does not have a lightmap stage either. Here follows a section of the metashader for Fueldump, stored in the fueldump.script file.
textures/fueldump/terrain1_0
{
qer_editorimage textures/stone/mxsnow2.tga
q3map_baseshader textures/fueldump/terrain_base
{
map textures/stone/mxsnow2.tga
rgbgen identity
}
{
lightmap $lightmap
blendFunc GL_DST_COLOR GL_ZERO
rgbgen identity
}
{
map textures/detail_sd/snowdetail.tga
blendFunc GL_DST_COLOR GL_SRC_COLOR
rgbgen identity
tcMod scale 5 5
detail
}
}
Notice the lightmap stage of the shader and the main texture having a "rgbgen identity" parameter.
The documentation for metashaders is usually included with a default install of the GTK editor. Go to the directory where it is installed (usually \Program Files\GtkRadiant) and find the directory called "Terrain_Manual". This has some documentation on metashaders and the basics of terrain creation.
Adding a light stage to a shader is covered in the Shader manual which is linked to the F1 menu of the GTKEditor browser help as follows:
Quake III Arena Shader Manual
http://www.planetquake.com/polycount/resources/quake3/tutorials.shtml
http://www.quake3world.com/files/Q3Ashader_manual.doc
This is the official id documentation of Quake III Arena shaders. The second source is a download
Sock
:moo:
Prophesy
26th June 2003, 16:15
Thanks :drink:
I will dig into metashading now.
Although I have been mapping for a couple of years, I have almost learnt more in this forum than in all others.
hummer
26th June 2003, 19:27
Although I have been mapping for a couple of years, I have almost learnt more in this forum than in all others.
Heh... this thread especially :)
So, I'm building my terrain now. I have the alphamap more or less the way I like it, but I think I'll want to go back and make changes to it. I've found painting it in Easygen and exporting is a simple way of doing this, rather than hand editing the alphamap.
So now, I want to start smoothing the terrain manually, cutting triangles and such. I've already played with this a bit. However, if I need to make changes to the alphamap, putting the terrain back into Easygen is going to lose all my manual terrain cutting.
Is there an easy way, or at least some method to go back and fourth between the two? At the moment, all I can think of is "saving" the manually cut trianlges into another .map file, the bringing them back in after the terrain has been imported / exported into Easygen. This seems like a huge pain in the ass.
Maybe I should just get the texturing the way I like it, and stick with it :/
SCDS_reyalP
26th June 2003, 19:43
If you are just changing the alphamap, you don't need to re-export the .map. (assuming you actually mean *alphamap* and not *heightmap*)
I don't know how easygen deals with this, but if it requires you to export everything at once, at the worst you should just have to point it to a different directory, and manually copy the new alphamap to the correct location.
hummer
26th June 2003, 20:22
I guess my concern is, when I manually change the terrain in Radiant, it's possible that there will be some fundamental changes to the terrain that will affect the texturing.
For example, if I take down part fof a hill, but there's a rock texture on it. Or maybe I raise up some terrain with sand applied to it, but I'd rather have rock.
So, I make these changes, but then I have to change the texturing to refelct these changes. Using the original terrain as a base might work, but it'd take some fudging, and mutiple imports / exports / recompiles / to get it right. I'd have to manually change the alphamap and hope it accuratley reflects changes made to the terrain.
What I'd rather do, is make changes in Radiant, then import back into Easygen and repaint the terrain. But if I've cut small triangles, they'll be lost in the process.
What I guess I'll do for now, is make the changes to the terrain as necessary, and not cut up the trianlges. Then edit the alphamap / texturing as needed, export, then make the smaller cuts. I just hate feeling like I'm locked into that terrain / texturing once it's been built :/
Also, one a side note, I'm noticing that even on steep cliff walls, players can run up the "seams" of the terrain... where two trianlges meet and go up. This happens even if the terrain is really tall. Is there some way to prevent this besides putting, say, slip brushes over all the seams?
Mr_Tickles
10th June 2004, 01:30
Hey! Just thought I'd bring this thread back seen as though it was the only one that came up in my searches, and it is also extrememly helpful.
What I was searching for:
I was wondering if there was a command you could add to the shader that easygen exports so that you can project your alphamap from the sides rather than from above. The reason I want to do this is to create a large cavern with the easygen style blending and not just a single texture that gtkgensurf gives. Also, the easygen method would be a lot more helpful as I can then create properly curved cavern surfaces. I.e. if you use gtkgensurf you still end up with a box which may have bumpy sides.
Well, I suppose in general, seen as though you can't really support easygen, I was wondering if you can project alphamaps onto the terrain/terrain2 brushes from an angle other than the vertical, also including the negative vertical?
thegnat
10th June 2004, 11:29
For this I would use the "newly" introduced alphavolume blending method. I think it will also work well on the sides of brushes - not only on top of them.
Rattys tutorial: HERE (http://www.splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8244)
joop sloop
10th June 2004, 14:59
be sure to also check the rockwall tutorials (http://www.planetquake.com/simland/pages/articles.htm) by sock ;)
Mr_Tickles
10th June 2004, 15:29
Coolio, thanks guys.
Is there any way you know of, of making the cavern this way however? The reason I ask is because it is hopefully going to be about half the size of my map already. I can easily set up the shape that I want via Easygen. But it's just too damn big to do either by hand or gensurf. Gensurf only deals with flat surfaces, ok it does make the surface uneven, but doesn't have curvy edges which could be done with easygen. Thanks for the replies, and I guess I may have to do this by using the easygen heightmapping and some alpha blending, thanks. :)
joop sloop
10th June 2004, 16:16
By hand produces the best effect and you have the best control of your rockface. You could always rotate your easygen terrain in radiant, and write your own custom terrain shader?
Mr_Tickles
10th June 2004, 23:24
Yeah, I was trying to avoid doing it by hand, but I may have to. When you say, "create your own custom terrain shader" wouldn't you need to know how to project an alphamap from the horizontal rather than the vertical? This is my problem with altering the Easygen shader aswell. Thanks for the reply :)
Mr_Tickles
26th June 2004, 00:54
... and write your own custom terrain shader?
Hmmm, yeah, but how would I project the alphamap from a horizontal axis? The only thing that I can find in the shader easygen outputs is q3map_lightmapaxis z, and I don't think this would do that. Maybe there is something which is set as default and therefore wouldn't be put into this shader as z is the assumed axis for terrain.
Basically:
How do I project an alphamap horizontally?
vBulletin® v3.7.3, Copyright ©2000-2009, Jelsoft Enterprises Ltd.