martyj Posted February 8, 2014 Share Posted February 8, 2014 I'm using Leadwerks 3.1 (Steam edition) atm. I will upgrade as soon as the C++ version comes out. I was wondering how I could add multiple terrain per a scene. I have a map that I'd like to implmenet with a vast range of textures. The heightmap size is 12288x7543. Quote Link to comment Share on other sites More sharing options...
MajorAF Posted February 9, 2014 Share Posted February 9, 2014 I would like to know more about this as well. I suggested a tutorial for this in the Tutorial forum, but I'm not sure no one noticed it. I also saw in the blogs that this guy was looking at huge terrains and what not, but nothing else has come up yet. 1 Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2014 Share Posted February 10, 2014 This is currently not possible in the editor. You would have to make your own terrain generation/import module. This is not the easiest thing to make yourself though. It is not something that can be easily done with just a tutorial. This requires advanced algorithms, shader knowledge and a huge amount of finetuning. Quote Link to comment Share on other sites More sharing options...
Farcical Posted February 10, 2014 Share Posted February 10, 2014 I haven't tried this yet but am considering it. Since there are 16 layers in the editor maybe you could set min/max limits to each type of texture. For instance layer 2 at max 20, layer 3 min 20 max 50, layer 4 min 50 max 70 etc. I haven't worked on terrain for a while so this may not be completely accurate but that is the idea. Kind of like the real world with texture and vegetation changing at different altitudes. This would take a lot of planning but it seems that it would be possible. You may have to adjust your terrain heights manually to accommodate this method. Like I said I haven't tried this yet but will soon. Hope it works because I need the same option. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 10, 2014 Share Posted February 10, 2014 @Thorne: The current terrain editor works the way you are describing it. This terrain editor is limited to terrain sizes of 4048 x 4048. Quote Link to comment Share on other sites More sharing options...
Rastar Posted February 10, 2014 Share Posted February 10, 2014 @martyj; There are a couple of questions that you should probably answer to yourself before putting work into this: What is actually the "real-world" size of your terrain? If the heightmap size you have given is the number of pixels - how many units (meters) per pixel do you have? More than 1 m/pixel? Very large maps will create problems due to floating point errors far away from the origin (say, more than 16k in either direction), leading to rendering artifacts and physics problems. There are ways to counter this, but it's an additional complexity. Do you really need such a large terrain? Does your game idea call for it? How fast will the player move through the terrain? How are you filling such an enormous terrain with interesting gameplay? The dimensions of your heightmap are slightly unusual, normally you will find powers of two, and most often square dimensions (like 1024x1024, 2048x2048 and so on), not the least because GPUs are optimized for handling textures of those dimensions. Objects (trees, enemies, houses, ...) for such a terrain can't be kept simultaneously, they will have to be streamed in and out according to player movement. EDIT: @MajorAF, just saw your post in the Tutorial Request thread. As far as I know, Combat Helo uses terrain tiles that are streamed in and out of memory. But that's not part of the built-in Leadwerks 2 terrain, but a custom implementation. You might ask community member "Flexman" about this, he's one of the authors. But again, all of these large terrain solutions are hand-crafted and don't come with the engine. Quote Link to comment Share on other sites More sharing options...
martyj Posted February 11, 2014 Author Share Posted February 11, 2014 @Rastar The heightmap is for a MMO. Is there a easy way to switch out different terrains depending on the area you are in? I don't need to implmenet the full sized for a while but in the full vision I would want to. I just want to know is it possible to have, let's say a WoW sized terrain with leadwerks. Even if it's soley in the C++ version Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted February 11, 2014 Share Posted February 11, 2014 This can not be done with just a single command from the API. If you want to stream other world parts in your current level, then you will have to make your own implementation. Like said by Rastar, that is pretty complex and requires a custom made solution. you can load another level if you want to which has different terrain, but then you will want to discard the old one 1 Quote Link to comment Share on other sites More sharing options...
Rastar Posted February 11, 2014 Share Posted February 11, 2014 As Aggror said - possible: yes, easy: no. You basically have two options: 1) Use the built-in terrain and map system. Split your terrain over several maps and change the maps during run-time. You could pre-load the next map in a separate thread to reduce swapping time, but the transition will be visually noticeable, so you might need a loading screen or something like that. 2) Implement a streaming terrain solution. Leadwerks currently doesn't provide a lot in that area (few engines do), so you would have to do everything yourself. For example, you could use tiled meshes arranged in a checkerboard-like pattern and load/unload them (and their contents) as the player moves. It probably depends a little on how much experience in game development you have. If you are just starting out, consider doing something smaller, otherwise you might quickly get frustrated. Otherwise - it's a fascinating journey ahead of you, but a long and twisted one.. 2 Quote Link to comment Share on other sites More sharing options...
Flexman Posted February 14, 2014 Share Posted February 14, 2014 I'm fascinated by Rastar's terrain mesh tessellation exploration. With large landscapes once you've licked the problem of the terrain mesh you have to deal with vegetation then any civilization layer for roads/buildings and finally collisions. It all adds up to (as Rastar says); a long and twisted journey. So I would seriously consider something small if you can get away with it. Having multiple-terrain objects in a scene and having everything in it parented to the terrain entity would be ideal. Quote 6600 2.4G / GTX 460 280.26 / 4GB Windows 7 Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT Tricubic Studios Ltd. ~ Combat Helo Link to comment Share on other sites More sharing options...
Naughty Alien Posted February 15, 2014 Share Posted February 15, 2014 ..im not sure, are we talking about 'infinite' terrain here or actually, several different terrains?? Quote Link to comment Share on other sites More sharing options...
YouGroove Posted February 15, 2014 Share Posted February 15, 2014 Simple "Tiled" terrain system for big terrain outdoor and games like Flying games for example, with some simple culling system. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.