Check in's

2004-06-08
2004-06-26
  • David Burnett

    David Burnett - 2004-06-08

    After a couple of days off I've made a few check in's. Hopefully this will be the last check in before 1.3, except one if redbaron get me a better formula for the base height etc to maximum and minimum height, so if your favourite bug has not been fixed now is the time to shout about it.

    Todays check in should fix the following bugs...
    965420
    3D preview: flat heightfields doesn't show up

    965405
    Typo in Terragen properties dialog

    965400
    all Worleys: pG shuts down when Neighbours == 0

    Other fixes since 1.2

    963294
    Terragen file format: base height + elevation

    959168
    Update of preview icons

    959149
    ".pov" gets added to .ter file name

    959148
    existing files are overwritten without warning

    945167
    Terrain > Run: handling of invalid file/path name

    Dave

     
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-08

      Hi Dave,

      the guy who was supposed to deliver the formula was me, actually. ;)

      Matt gave me permission for publishing the code. But because I don't have access to it *right now*, please gimme a few hours...

      Best, Ralf.

       
    • David Burnett

      David Burnett - 2004-06-10

      Take your time, I'll probably release 1.3 sometime in the weekend after next (19-20th).

      Meanwhile I've updated the website which can be accessed through
      http://planetgenesis.sf.net/index2.html

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-14

      Dave,

      as you might have already noticed, I sent you an e-mail. :)

      A strange thing happened (using the latest CVS sources): Is it just me or doesn't loading of previously saved files work anymore (gives a "java.lang.InstantiationException: GUI.NoiseComponent"...)?

      Best, Ralf.

       
    • David Burnett

      David Burnett - 2004-06-14

      The change to the Terragen code has been checked in, along with a partial fix for the loading of saved file.

      The saved file fix will now allow you to load files but will occasionally fail to join them. I'll fix the rest before the next release. It may be a good point to look over the make preview code and try to fix the bug where it refreshes the previews too often.

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-15

      A few things regarding the Terragen terrain file output:

      1. Elevation (height scale) and Baseheight shouldn't be visible in the properties dialog. As they are calculated, their values should be evaluated only prior saving the file. This might make the class HeightAdjustment in TerragenFactory.java obsolete which is fine with me (in general) since this would also remove the "strange" behaviour when changing a value, TAB'ing through the other edit fields, and getting different values for the ones I previously entered. (Hope this wasn't too confusing ;)

      2. The unit descriptions (meters/TG units) should be added for max./min. height fields in the properties dialog like you did for the Scale value. BTW, are they measured in meters? I do believe so but I'm not 100% certain yet because of 1.)

      3. Another thing that I want to mention: Not only the TG properties dialog but most of pG's dialogs show Maximum first, Minimum second. Since I'm used to the opposite, I mix them up quite a lot of times. Is this a common way to have these two placed?

      4. The default height range for TG terrains should be something like 0..500 or 0..1000 since Terragen and its atmospheric model works best when the terrain "starts" around zero meters/TG units, as far as I know.

      5. And while I'm at it, let me point you to bug #959152. Again, this isn't a major one, it's merely to have this whole TG topic completed soon and being able to go on with more interesting "stuff". :o)

      Ralf.

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-15

      One more thing you can include to the list of fixed issues above: Speed improvement for the first "pass" (Scaling Noise); at least on Windows. ;)

       
    • Roter Baron

      Roter Baron - 2004-06-16

      Agree to Ralf's list, but to make point 4.) sure... I would recommend a default height range of... let's say 0...100 *terrain units* or 0...1000 *metres*. I think these are "well known" settings, otherwise there could appear very "needled" or artificial results.

       
    • David Burnett

      David Burnett - 2004-06-18

      Okay I just checked in fixes for loading, it now links correctly and updates the icons correctly. It also fixes the way PerlinWorley init's so that it loads consistently.

      I've changed the Terragen panel, it should match Ralf's idea's.

      Dave

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-19

      Didn't have tested the latest CVS version thoroughly yet (probably tomorrow) but nice work on the Terragen terrain properties panel.

      Just one thing though: Say I want to have my terrain from 0 meters to 1000 *meters* (default) and I'd also like to have an MPS (meters point spacing) of 30.0 (default) and I create my terrain, it has then a height range of 0..30,000 *meters*. I assume this happens by multiplying by MPS (again?)...

      But great job apart from that! :o)

      Ralf.

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-19

      Well, I had another short test with the latest sources. This is what I have found (all probably minor things):

      1. 3D preview: Should reset rotation/scale/position values to default when opened again. Or maybe a "Reset view" button somewhere...

      2. Terragen terrain properties panel: Should stay on top. ;)

      3. Loading .pG files: I often get black functions/combiners after loading a file. Maybe a general "update" of the preview icons is necessary?

       
    • David Burnett

      David Burnett - 2004-06-19

      1. Maybe the later, at the moment people can move the terrain to where they think it looks the best while they tweak it. One for a later release.

      2. Should be fixed, for all terrain types.

      3. It should be doing a full refresh with last nights release (it's GMT+1 where I am). Pull the latest release again, sometimes the anonymous CVS mirror can be a bit slow. If it's still has problems send me the pG file.

      4. Alright there is no 4 but the Terragen calculations have been tweaked, I had to divide by the scale (MPS). Once again due to the use of integers the actual heights you get will not be perfect, but should be within 0.5 * MPS. 

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-19

      Hi Dave,

      1. Fine with me for the moment. ;)

      2. Yes, works great.

      3. I fetched the latest sources a couple of minutes ago (the changes were already available). I'm at GMT+1 myself, by the way. Unfortunately, the update didn't help much. An e-mail with the .pG file is on its way...

      4. Cool. I noticed that already but *I* do not have any problems with that. Maybe somebody else will, though. ;)

      5. Yes, number 5. ;) It shouldn't be possible to enter values for MPS <= 0 or Minimum == Maximum in the Terragen terrain properties panel.

      6. Sorry to say that but there also a problem with the new Terragen terrain dimension (129x129). Please have a look:

      http://www.ralf-lehmann.de/pg/pg_129.png
      http://www.ralf-lehmann.de/pg/ter_129.png

      Seems that it's caused by downsizing or something (it's not just the very noticeable horzontal and vertical edges; the whole Terragen terrain looks not as smooth as it does in higher resolutions). Maybe the easiest thing to do for now is to remove this one from the drop down list and to take care of it later on. Or maybe leave it as an open bug/RFE until somebody else makes a request :) (sorry, I didn't expect any problems with just adding another terrain size entry...)

      Ralf.

       
    • David Burnett

      David Burnett - 2004-06-19

      1. Good.

      2. Hoo-rah

      3. Got the e-mail, it does the same here. How many components ? :-)

      4. I might give the math a once over, I suspect the base height is slightly off, it might need a better way to round it.

      5. I was planning on introducing more validation eventually, it one of those boring things that developers hate doing, like documentation ;-)

      6. I saw something like that when I put none supported sizes
      in. There was a grid like effect on the terrain when rendered.  I'll have to save a 129x129 ter from Terragen to compare.

       
    • David Burnett

      David Burnett - 2004-06-19

      3. Should now be fixed in CVS.

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-20

      3. ;) Well, this one has been actually used for my "circles" picture (see the "rendered examples" thread). Most of the component "overhead" is the rough scale thingy... BTW, loading and preview icons seem to work now!

      4. It would certainly be nice if one gets the exact values that were entered. If you have an idea how to achieve this, I'm all for it. But it wouldn't be a huge problem otherwise...

      5. Oh yeah, that's true! :)

      6. I do not use this terrain size myself but I have never seen a result like this coming out of Terragen...

      Ralf.

       
    • David Burnett

      David Burnett - 2004-06-20

      I think Terragen cheats.

      Create a terrain in Terragen, scale it to between 0 and 1000m and save it. Poke around inside the save file and the base height is 480 and the height scale is 1080
      so the real scale is  -60 to 1020.
      I guess then it then scales the noise to fit between 0 and 1000 using that range.

      Ralf can you point me at that code again, my spam filter appears to have eat your e-mail when I upgraded it.

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-20

      Sure. On the way... :o)

       
    • David Burnett

      David Burnett - 2004-06-26

      Well here we go again.

      I've had another go at the maths, this is based on what Terragen appears to do rather than what it does in theory based on the specs.

      It appears to be at the same level of accuracy as MacTerragen with regards to the actual values in the min and max sizes. i.e. if you create a terrain in MacTerragen, scale in to 0...1000 save it and load it again you get the same min ad max numbers as loading a new pG terrain (to 4 decimal places).

      Hoipefully the won't be the different numbers with the PC version of  Terragen.

      I've also swapped the max and min text boxes around :-).

      It should all be checked in be now (along with a initial fix for
      the NaN problem on the 3D preview).

       
    • Ralf Lehmann

      Ralf Lehmann - 2004-06-26

      I'm confident that both (TG Windows and TG Mac) uses the same formulas for this. However, there's a known bug in the current incarnation of TG which doesn't occur very often (didn't I already mention that?):

      Say you dig a deep, deep hole (a very deep hole!) into the terrain (within Terragen), save it and load it afterwards, there's a chance that you will get a spike in the middle of that very hole which ranges from the lowest point to the highest point of the terrain, so to say.

      I strongly believe that this is a bug which is caused by some overflow/underflow when calculating/converting the values prior saving the terrain file. One can work with the current terrain flawlessly as long as it's data is stored in te memory but as soon as it gets saved/loaded, the problem is definitely noticeable (in rare occasions).

      This one is a problem that 'belongs' to Terragen itself but since pG uses the exact same 'formulas' now, it might be that pG produces this unwanted results as well.

      I do not know whether checking the converted values prior saving

      if (RAW_value < -32768) {RAW_value=-32768}
      if (RAW_value > 32767) {RAW_value=32768}

      is the proper way to work around this but I'm going to do some tests during the next couple of days...

      Let me know what you think about this...

      Ralf.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks