Raunhofer 13 Posted April 11, 2010 (edited) Hi, Does somebody know, what file extention I should use when saving wilbur terrain file, so that I can later edit the file? For example if I save as my wilbur terrain project in .png, and then re-open the .png file to the wilbur again, the terrain's heightmap will change. - If you don't understand or have my problem, please, tell me how do you save and use wilbur, if you want to continue your terrain creating some other day? <object width="640" height="385"><param name="movie" value="http://www.youtube.com/watch?v=wXNz9ilDysA&hl=en_US&fs=1&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/watch?v=wXNz9ilDysA&hl=en_US&fs=1&rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object> Edited April 13, 2010 by Raunhofer Share this post Link to post Share on other sites
trezza 10 Posted April 11, 2010 (edited) I haven't used wilbur much, you should record the number for the highest altitude point and lowest point and keep it safe, that way you can just work on getting the shape right and then when you're importing it into visitor you can specify those values in the .PBL file. As long as you have those numbers you could just save your terrain as a .png or whatever image file available and then import it back into wilbur, I don't know if you can put in the maximum and minimum altitudes in wilbur though. Edited April 11, 2010 by trezza Share this post Link to post Share on other sites
shezan74 11 Posted April 11, 2010 I don't know if you can put in the maximum and minimum altitudes in wilbur though. i've had the same problem yesterday and i was unable to set an altitude range in wilbur. So i used the "import feature" by setting my min-max levels on pbl on re-import phase Share this post Link to post Share on other sites
[aps]gnat 28 Posted April 12, 2010 Seen the same problem, and never seen a way to avoid. Except to save the Wilbur file in several other "Back-up" formats too. Share this post Link to post Share on other sites
Bartchie 10 Posted April 12, 2010 If you mean changing level of a water, you can do it in shader options. You don't have to use .pbl to import it back to Wilbur. Just import/open generated .png greyscale file. It's better not to change anything with terrain but with the shader options. So it's easier to keep your job (terrrain) and just mess arround with altitude setup in shader so it will generate greyscale .png file good. Share this post Link to post Share on other sites
Raunhofer 13 Posted April 12, 2010 (edited) Thanks for answering. Makes my working with wilbur a lot of easier :) But: How can I change the min/max values, when importing? I can't find a way to import .png file. Open file works, but the heightmap will be ruined. Edited April 12, 2010 by Raunhofer Share this post Link to post Share on other sites
Homer Johnston 0 Posted April 13, 2010 It is possible that you don't know how everything works: A heightmap PNG, or 16-bit grayscale image, only contains pixels. Each pixel has a "brightness" value which ranges from 0 (black) to 65535 (white). In other words, there are 65536 different shades of gray for each pixel in your PNG. An ideal heightmap always has at least one pixel which is completely black (0) and one pixel which is completely white (65535); this allows for the most detailed terrains, using every value possible. When you import a PNG into Wilbur, this is all it knows: that 0 is the bottom, and 65535 is the top. Wilbur simply assigns Z values equal to the pixel values, so when you import a black/white PNG into wilbur, I think you will get heights from 0 to 65535. When you import a PNG into Visitor, the PBL file tells Visitor to scale this 0-65535 range to your minHeight maxHeight values. Can you describe exactly what you mean by "ruined"? After you do this, then I'm sure someone will be able to help you find a good solution. Share this post Link to post Share on other sites
Raunhofer 13 Posted April 13, 2010 (edited) Yes, that's exactly what happens when I import the .png back to the wilbur. The highest spot of the pic will be 65536. And that leads us back to my question: How can I prevent that happening? ATM I can't edit the wilbur-made .pngs, because it will cause exactly that what Homer Johnston explained. Some of you already said that I should choose the correct min/max values when importing the file, but how should I do that? OR do you mean that I should manually change the color values of the .png? It is possible that you don't know how everything works:A heightmap PNG, or 16-bit grayscale image, only contains pixels. Each pixel has a "brightness" value which ranges from 0 (black) to 65535 (white). In other words, there are 65536 different shades of gray for each pixel in your PNG. An ideal heightmap always has at least one pixel which is completely black (0) and one pixel which is completely white (65535); this allows for the most detailed terrains, using every value possible. When you import a PNG into Wilbur, this is all it knows: that 0 is the bottom, and 65535 is the top. Wilbur simply assigns Z values equal to the pixel values, so when you import a black/white PNG into wilbur, I think you will get heights from 0 to 65535. When you import a PNG into Visitor, the PBL file tells Visitor to scale this 0-65535 range to your minHeight maxHeight values. Can you describe exactly what you mean by "ruined"? After you do this, then I'm sure someone will be able to help you find a good solution. Edit: OOOR do you mean that I should make the .png file to contain its highest spot as a height of 65535 and the lowest 0 by purpose? I never thought this kind of solution, as it looks in wilbur's 3D view pretty awful, but I guess it might work, thanks to visitor's .pbl file. Please confirm, if that's the way it is meant to be done. Edited April 13, 2010 by Raunhofer Share this post Link to post Share on other sites
[aps]gnat 28 Posted April 13, 2010 Some of you already said that I should choose the correct min/max values when importing the file, but how should I do that? Unfortunately only experimenting, but if you know the min and max values from Wilbur, it helps. Start with low numbers, then expand min and max until its starts to look good. example class cfg{ PNGfilename="terrain.png"; squareSize=20; originX=0; originY=0; minHeight=-82; maxHeight=218; }; note the NEGATIVE min number OR do you mean that I should manually change the color values of the .png? Edit: OOOR do you mean that I should make the .png file to contain its highest spot as a height of 65535 and the lowest 0 by purpose? No, its unlikely you get any success that way. I never thought this kind of solution, as it looks in wilbur's 3D view pretty awful If your terrain doesn't look good or interesting in Wilbur, then theres very little point trying to get it into Visitor. Experiment in Wilbur (with dozens of variables !! ) until you get something that looks almost realistic and usable. Then and only then try exporting/importing it. Share this post Link to post Share on other sites
icebreakr 3159 Posted April 13, 2010 I recommend you to draw roads and color the places where towns will be. Then you'll get ideas for new Wilbur modifications - guarranted ;) Share this post Link to post Share on other sites
Raunhofer 13 Posted April 13, 2010 Gnat;1607886']Unfortunately only experimenting' date=' but if you know the min and max values from Wilbur, it helps.Start with low numbers, then expand min and max until its starts to look good. example[/quote'] I'm not sure if you understood me correctly. I have no problems in importing the .png files to visitor or anything with the visitor. The problem is wilbur itself. The question was originally: How to re-load the old wilbur .png project file back to the wilbur, so that the heightmaps will stay same as they were when the file was created first time. At the moment I have to do my work with wilbur at once and when I'm done and closed the wilbur, I can't edit the saved .png anymore. So if I later remember "damn I forgot to add that one small island", I can't add it anymore... Share this post Link to post Share on other sites
[aps]gnat 28 Posted April 13, 2010 As I said, save the file as a file other (wilbur) formats also, not just PNG. To test, make any wilbur terrain, save it as any of the formats available, then reload each format to see which don't change the heightmaps. Share this post Link to post Share on other sites
Raunhofer 13 Posted April 13, 2010 Gnat;1608007']As I said' date=' save the file as a file other (wilbur) formats [u']also[/u], not just PNG.To test, make any wilbur terrain, save it as any of the formats available, then reload each format to see which don't change the heightmaps. But what now when every of them does change it :) edit: I added youtube vid of the problem to the first post. Share this post Link to post Share on other sites
[aps]gnat 28 Posted April 13, 2010 (edited) !! .... Theres like 30 different file formats there and none worked !? I just save as TERRAGEN .ter file and then reloaded as a .ter file and it worked fine / heightmap min and max remains unchanged! FYI, another way to get Wilbur data to Visitor. In Visitor read in an XYZ file. Edited July 21, 2011 by [APS]Gnat Share this post Link to post Share on other sites
Homer Johnston 0 Posted April 13, 2010 (edited) Just to make sure my first post was clear on the 0-65535 topic: Using a PNG file with a full range as close as possible to 0 --> 65535 is best-practice. The reason: If your Visitor map has a height range of -50 to +450m (500m), then each value from 0 --> 65535 in the PNG will increase in height by 0.0076m (500m / 65535). This means you get very accurate control over the height. If you were to scale the PNG pixel values down to, say, 0 --> 500 to "fix" it in Wilbur (thus leaving values 501 to 65535 unused), this would mean that when the PNG was used for Visitor, the minimum height resolution would be 1 meter (and you would have to specify a max height of 65535 in your PBL). If Wilbur imports a PNG with heights from 0 to 65535, it is a good thing. What you need to know, is how to get wilbur to display the terrain heights as something that makes sense to you. PNG is a "dumb format": gray intensities cannot be negative or contain decimals. Wilbur can probably display the 0-65535 range on another scale for working with it, but I don't know how... Worst case scenario - do as Gnat says: load PNG into Wilbur, save as new type (Terragen or HFZ maybe?), then work on it as the more-flexible format instead. Export to PNG again when done. Wilbur will always export any format to a PNG with the lowest point as black (0) and the highest point as white (65535). Edited April 13, 2010 by Homer Johnston Share this post Link to post Share on other sites
Raunhofer 13 Posted April 13, 2010 (edited) Just to make sure my first post was clear on the 0-65535 topic:Using a PNG file with a full range as close as possible to 0 --> 65535 is best-practice. The reason: If your Visitor map has a height range of -50 to +450m (500m), then each value from 0 --> 65535 in the PNG will increase in height by 0.0076m (500m / 65535). This means you get very accurate control over the height. If you were to scale the PNG pixel values down to, say, 0 --> 500 to "fix" it in Wilbur (thus leaving values 501 to 65535 unused), this would mean that when the PNG was used for Visitor, the minimum height resolution would be 1 meter (and you would have to specify a max height of 65535 in your PBL). If Wilbur imports a PNG with heights from 0 to 65535, it is a good thing. What you need to know, is how to get wilbur to display the terrain heights as something that makes sense to you. PNG is a "dumb format": gray intensities cannot be negative or contain decimals. Wilbur can probably display the 0-65535 range on another scale for working with it, but I don't know how... Worst case scenario - do as Gnat says: load PNG into Wilbur, save as new type (Terragen or HFZ maybe?), then work on it as the more-flexible format instead. Export to PNG again when done. Wilbur will always export any format to a PNG with the lowest point as black (0) and the highest point as white (65535). Ok, I understand your point, but when I import the .png back to the wilbur, the .png's highest point will be 65535, right? But what if I then want to add even more higher hill for example than there already is? Edited April 13, 2010 by Raunhofer Share this post Link to post Share on other sites
Homer Johnston 0 Posted April 13, 2010 Hm, I think it is correct to say this: Whenever you export to PNG, Wilbur will always scale all Z values to the full range of 0->65535 (black to white) in the resulting image. Tallest mountain will be completely white, deepest valley will be completely black. Share this post Link to post Share on other sites
Raunhofer 13 Posted April 13, 2010 Hm, I think it is correct to say this:Whenever you export to PNG, Wilbur will always scale all Z values to the full range of 0->65535 (black to white) in the resulting image. Tallest mountain will be completely white, deepest valley will be completely black. Ok, it seems that wilbur's features aren't the best possible way to do these heightmaps. As for example handling the 1024x1024 sized picture is damn buggy and sometimes you just have to re-start your wilbur and that causes the problem which we have been talking here already... I guess the same work can be done with normal image editing tools for example photoshop. Share this post Link to post Share on other sites
Homer Johnston 0 Posted April 13, 2010 Did you try saving it as a terragen image, re-loading that, and editing it as a different file type instead? Photoshop will work, but it is very difficult to visualize the 3D aspect of the terrain while looking at a grayscale image... Share this post Link to post Share on other sites
Raunhofer 13 Posted April 14, 2010 Did you try saving it as a terragen image, re-loading that, and editing it as a different file type instead? Unfortunately opening the .ter file crashes my wilbur. Share this post Link to post Share on other sites
djotacon 190 Posted February 5, 2017 I found a solution for this "very old" thread problem: Quote You'll have to do some math, unfortunately. The general process to scale an image to a specific altitude range looks like: 1) Decide what the highest and lowest values in your input image represent. Let's assume that the lowest grayscale level is altitude 100 and the highest grayscale level is altitude 25000. 2) Load the image into Wilbur as a grayscale image (File>>Open, type as Grayscale Image Surface). 3) Use Filter>>Mathematical>>Span. Set Low to your lowest desired value and High to your Highest desired value. Click OK. 4) Look at the image. It is now scaled to the desired altitude range. https://www.cartographersguild.com/showthread.php?t=6197 Old but gold... Share this post Link to post Share on other sites