Biggles Posted November 4, 2003 Share Posted November 4, 2003 LotekK brought up a problem that I had found too. When trying to import a heightmap it seems to make no difference to the terrain. I tried greyscale bitmaps, LotekK says he's tried a variety of BMP formats and no luck. So if anyone has the juice on heightmaps, could you post some pointers here. I have noticed that you can manipulate the height on the 'heightmap' layer with the brush, but it doesn't seem very user friendly to me.. I just end up with lots of small jagged points Link to comment Share on other sites More sharing options...
LoTekK Posted November 4, 2003 Share Posted November 4, 2003 The brush-manipulation of terrain stumped me for a bit, but it turned out to be quite simple. Once you click on a point on the ground, moving your mouse up and down will raise and lower the terrain, which is fairly understandable. The kicker is that moving the mouse left and right will increase and decrease the radius of said altitude change. With a little practise, you should be able to gauge the fiddling needed for a desired result. Still stumped on the heightmap importing, though. Link to comment Share on other sites More sharing options...
Centurion Posted November 4, 2003 Share Posted November 4, 2003 I have noticed that the height maps are handled much more precise in the editor than in the game. I found this out when I tried to lift up the terrain to match the height of one floor tile for my bunker map. In the editor I was able to do this but in the game the terrain was back to ground level. So it seems that the height of the terrain is aligned to some sort of invisible grid and can therefore only be adjusted in certain steps. I thought that this is something to be kept in mind. Link to comment Share on other sites More sharing options...
Cpt. Barbossa Posted November 4, 2003 Share Posted November 4, 2003 I'm not the king of the hills, but I think I might help a little bit here. I experimented a lot with height maps and this is what I found out:For creating a height map I simply used Windows Paint (just using the default settings, which means 24-bit color bitmap). The size of the heightmap should be one pixel bigger than your S² map, i.e. if your map is 64x64 squares, then you should make a 65x65 pixel bitmap. One disadvantage - but at the same time it can be useful - by using Paint is, that there are only few levels of grey between white and black by default. So you can't really generate smooth hills, but the good thing is, that every level of grey is the same height as one floor level in the map. Okay, now let's get to importing the height map. Before you import the map, you should create a height map layer. Click on the ... in the height map layer, here you can adjust min and max height of the map. Try something like -10 for min and 20 for max and leave current height to 0. Now import the height map - the terrain should now be hovering above the grid and the surface should look a bit like your height map . By now I haven't quite figuered out how the min and max values for the height map layer work, but the method described above should do the trick.Hope this can help you! Link to comment Share on other sites More sharing options...
LoTekK Posted November 4, 2003 Share Posted November 4, 2003 The size of the heightmap should be one pixel bigger than your S² map, i.e. if your map is 64x64 squares, then you should make a 65x65 pixel bitmap.That would probably explain why my heightmaps weren't showing up, since I had created them exactly the same size as my testmap. I'll try this out when I go home today. Thanks, Cap'n! Link to comment Share on other sites More sharing options...
Cpt. Barbossa Posted November 4, 2003 Share Posted November 4, 2003 The size of the heightmap should be one pixel bigger than your S² map, i.e. if your map is 64x64 squares, then you should make a 65x65 pixel bitmap.That would probably explain why my heightmaps weren't showing up, since I had created them exactly the same size as my testmap. I'll try this out when I go home today. Thanks, Cap'n! I don't think that is a solution to your problem, because you can also use height maps that are smaller or bigger than your map. I only wrote that, because I made the experience that, if the height map is the same size as the map two edges of the map aren't affected.More important are the settings of the height map layer. See my earlier post on this Link to comment Share on other sites More sharing options...
LoTekK Posted November 5, 2003 Share Posted November 5, 2003 Okay, I've tried the heightmap thing again, and still no luck. Well, I got results with 8-bit greyscale .bmps, but not with the 24-bit. However, even with the 8-bit greys, the terrain only partially gets done properly. Well, a picture will say it better than I can: my 65x65 8-bit greyscale .bmp:https://www.lotekk.com/files/s2-editor-heightmap1.jpg And the result (similar results occur even after trying other heightmaps):https://www.lotekk.com/files/s2-editor-heightmap2.jpg If I use a flat grey heightmap, I get no terrain showing up whatsoever. The glitch isn't just in the editor, either, as starting up the game shows the same terrain as well. Link to comment Share on other sites More sharing options...
Centurion Posted November 5, 2003 Share Posted November 5, 2003 Hi there, I think we should consider the possibility that the height map feature of the editor is a little bit buggy. For example, I tried to get the terrain some levels above the grid so that I could use cellars and I tried to do this without importing a height map but only by adjusting the min, max and current height settings in the height map layer. It worked, the terrain showed up above the grid several levels after refreshing view and the height map layer was shown in the layers tab in a light grey. My soldiers, however, could not enter the cellars. The funny thing is that Barbossa tried the same and told me he did not experience any effect of the layer settings whatsoever. We also already noticed some other things that work distinctly different in the editor on his machine than on mine. Link to comment Share on other sites More sharing options...
LoTekK Posted November 5, 2003 Share Posted November 5, 2003 I think you're right. I've had problems with getting the heightmaps to work consistently. Sometimes I'll have to quit the editor and start it up again before it will import the heightmap properly (well, relatively anyways, as you can see from the above pics). Link to comment Share on other sites More sharing options...
Cpt. Barbossa Posted November 5, 2003 Share Posted November 5, 2003 Okay, I think I figured out the whole height map thingy When I used LoTekK's height map I got the same result, so I played a little bit more with bitmaps. And I think I know now how it's got to be done:What you use as a height map is - I think - not important. Very important is on the other hand how you set up your height map layer. I was mistaken myself when I posted that you could set up some negative value for minimum height. If you do so and you have pixels in the bitmap that are "blacker than 0" then you'll get those strange endless mountains . So the min value in the layer corresponds to the height of black pixels and the max value to white pixels. The bigger the difference between these values is, the more height difference is between each color of the height map.With correct settings LoTekK's bitmap worked for me. Link to comment Share on other sites More sharing options...
Biggles Posted November 5, 2003 Author Share Posted November 5, 2003 What were the 'correct' settings that worked for you? Link to comment Share on other sites More sharing options...
LoTekK Posted November 5, 2003 Share Posted November 5, 2003 What were the 'correct' settings that worked for you?I would assume a value of "0" should be right. I'm heading out now, though, so I won't be able to test this til later tonight. Link to comment Share on other sites More sharing options...
Cpt. Barbossa Posted November 6, 2003 Share Posted November 6, 2003 What were the 'correct' settings that worked for you?I would assume a value of "0" should be right. I'm heading out now, though, so I won't be able to test this til later tonight. LoTekK's totally right here. The height maps should work if you set min to a value greater or equal to zero and max greater than min. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now