in
Welcome to Lionhead Community Sign in to Windows Live ID | Help

Last post 08-31-1999, 17:41 by Peter Dobrovka. 13 replies.
Sort Posts: Previous Next
  •  08-31-1999, 17:41 242804

    Hi! I am working on a 3D Transport Tycoon like game. Currently we are not commercial, maybe we become if we ever finish the project. I know very many 3D landscape engines but they all look ugly. Including our own. When I first saw the B&W screenshots I nearly fell off my chair and I have only one question: How did you do it?! Does this landscape derive from a simple heightfield array or is it something different? How do you blend the different textures into each other? What API did you use? Peter ------------------ Wanna see the development of a 3D Transport Tycoon? Check out the Way-X Homepage: http://www.digitalprojects.com/way-x
  •  09-02-1999, 21:48 242805 in reply to 242804

    Nice. Like the river. ------------------ Philip M. Galea http://www.cee.hw.ac.uk/~ceepmg/
  •  09-03-1999, 9:39 242806 in reply to 242804

    Hi Philip! Your screenshots look ! But after downloading your program I could not enable the textures. It isn't documented in the readme either. The terrain and the water look like the former landscape engine of Nicholas Anderson (http://www.ceenda.freeserve.co.uk/) The Altavista screenshot that you present as the goal of your engine is also the goal of our engine. I think the B&W screenshots reached this already but there is no reply to my question. Your engine has one texture for the land. The variations derive from the colors. The water is a second layer with another texture. Restriced to a certain level of height. We have a different approach: We do not modify the colors but have textures for every type of terrain and the blendings. The water is a terrain as the others. This allows us to have rivers and waterfalls and seas in the mountains. But I am not satisfied with the look. There is a discussion to make the water a second layer but we have to solve rising problems with the height and the edges of the water layer. They tend to hang over the land. Peter
  •  09-04-1999, 21:39 242807 in reply to 242804

    On the black and white engine they use procedural texturing to get the blending in the landscape. See the lionhead diaries, there's a bit about it in there. Procedural texturing means (I gather) creating the textures up on the fly using maths rather than a texture map. I've kind of come to the same problem as you (see my post in programming) but it seems to me there are about 4 ways I can think of to get this blending : 1) Use single textures that have cunningly been created to allow texture coords to merge landscape types (this is what I'm trying, despite much discouragement ) 2) Use hardware multi texturing if your 3d card supports it, via direct 3d, or I think there's an ARB extension to opengl for it. (My card doesn't support it, but I know TNT's do) 3) Use alpha blending and make more than one pass to blend textures. This is possible, but may not be as efficient as true multi texture coz you do the 3d math twice. 4) Use procedural texturing. Hope this helps. If any of you have got an answer to my question in programming, it would be cool (!) ------------------ Lead programmer, Steaming Turd Studios
  •  09-05-1999, 8:06 242808 in reply to 242804

    Hi, Scrambled_Egg! I took a look at your HP and downloaded your landscape engine. It looks very interesting. You have one BMP-texture, using the left side for low terrain and the right side for snowy mountain caps. But you are using only small stripes of this BMP, therefore you get strange stripes in the terrain. You wrote: > 1) Use single textures that have cunningly been created to allow > texture coords to merge landscape types (this is what I'm trying, > despite much discouragement ) So you are trying what we want to leave? I will try to take a look into this diary. I already did but saw only boring stuff and a fat naked women so I decided not to revisit it. Peter ------------------ Wanna see the development of a 3D Transport Tycoon? Check out the Way-X Homepage: http://www.digitalprojects.com/way-x
  •  09-05-1999, 8:06 242809 in reply to 242804

    Very sad, I hoped that somebody of the B&W team would have some words for me. Peter ------------------ Wanna see the development of a 3D Transport Tycoon? Check out the Way-X Homepage: http://www.digitalprojects.com/way-x
  •  09-05-1999, 13:54 242810 in reply to 242804

    I've moved on quite a bit since that downloadable version you've got, I'm today gonna try using vertex lists in opengl, and drawing the triangles individually, then setting the tex coords for each triangle independently. Hopefully this will give me the results I'm after. I think the reason that lionhead guys (and a lot more pro game programming guys) don't answer questions like this is that: a) they might well be under contract not to reveal any important technical information (which this is) about the game b) they wouldn't want to, because the more people know these kind of techniques, the more competition for jobs (!) c) they're too busy writing black & white (which they would have you believe )
  •  09-05-1999, 14:36 242811 in reply to 242804

    Skip the b) part because it's pure bullocks. Every competent programmer knows these things.
  •  09-08-1999, 15:53 242812 in reply to 242804

    The mesh is a grid/height field. There are 256x256 (sometimes 512x512) in the landscape and each cell is scaled to (about) 5 meters. We don't use texture tiles in the traditional sense. Instead the in-game textures are generated at run time and throughout the game (remember the landscape morphs anyway) from a number of pre-drawn material textures (rock, grass, snow, etc,) that tile with themselves but not each other (these are 256x256 pixels and drawn by myself) . Now here's the tricky bit; these are arranged in 'stacks' and applied to the height-field so that they 'fade' from one material type to another at different altitudes. We then use a noise map to randomise the fade somewhat so it doesn't look like a contour map (regular bands). We also apply a 'bump' map (not dynamic) which adds extra detail across the materials and further randomises and confuses the effect. We then add a 'layer' of higher detail (looks like pebbles) above the terrain when you get in close to stop the bilinear filtering looking too blurry. This also helps the 3D objects to sit on the landscape better. Any number of 'stacks' can be applied to a perticular landscape adding even more variety. It sounds slow but actually it's not at all. there are no 'borders' as such because everything fades together (we have edtors to control all individual aspects). There needs to be a different approach for regular details such as roads, paths, etc, but that'll be another overlayed layer again. At the moment the landscape shadows are generated using a pre defined shade map (one pixel per cell). Soon the shadows will be generated dynamically dependant on the slope of the map cell. shadows of static objects are drawn into the trexture. Moving objects generate a realtime 'shadow sprite' which is mapped onto a couple polys and fololows the object around. ------------------ Paul McLaughlin Head Of Art Lionhead Studios
  •  09-08-1999, 17:42 242813 in reply to 242804

    Cheers, Paul, some great ideas there (I'm working on my clone right now! (only kidding)) ... nice to hear we're all programming on the same planet ... Oh, and Eddy, thanks for the (eventual!) praises!
  •  09-08-1999, 18:29 242814 in reply to 242804

    Thank you very much for the explanation, Paul! So if I understand it right, there are 7 texture layers per polygon: 1. Land texture, generated throughout the game 2. Second texture, fading with first 3. Noise map 4. Bump map 5. Pebbles layer 6. Shade map 7. Shadow sprite This is enormous! And you say is it not slow at all! How many polygons do you use per heightfield? How many heightfields are visible at one time in the game? What is the FPS on what hardware? Do you use Direct3D? Peter
  •  09-09-1999, 12:06 242815 in reply to 242804

    Well 1 and 2 are pretty much done ar runtime and can consist of any number of materials (rock, grass etc) but other than that I seem to have explained it pretty well if you managet to attive at those conclusions. It's not slow at all, particularily when compared to real world landscape modifications such as continental drift, weather erosion etc . No really the slow bit is in generating the textures not displaying them on screen. Of course the whole thing also has to morph between / neutral and evil in-game which is a different kettle of fish altogether. ------------------ Paul McLaughlin Head Of Art Lionhead Studios
  •  09-09-1999, 13:30 242816 in reply to 242804

    But you generate these textures only somtimes during the game and not every frame? Another question: you say the landscape is a quadric heightfield - but the world of B & W is a globe, or did I misunderstand something? Peter
  •  09-10-1999, 14:38 242817 in reply to 242804

    Yes we only update the textures sometimes, not every frame. No B&W isn't a globe (at the moment). Perhaps you're thinking of Populous 3. That was an apparent globe but it was still a quadratic heightfield. There didn't seem to be any serious problems distorting it to appear spherical. Bear in mind though that there were two engines; one for the 'normal' game view and one when it was zoomed far out. even zoomed out you didn't see a hemisphere more the curvrd end of a parabolic sheet, if you see what I mean? ------------------ Paul McLaughlin Head Of Art Lionhead Studios
View as RSS news feed in XML