View Poll Results:

Voters
0. You may not vote on this poll
  • 0 0%
Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 150

Thread: sea edges

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Muizer's Avatar member 3519
    Patrician Artifex

    Join Date
    Apr 2005
    Location
    Netherlands
    Posts
    10,796

    Default Re: sea edges

    Well I spoke in haste. I dug up my notes and this is what I wrote about how I think the ground type and heights interact:



    Groundtypes: shown in the background is a beach running from top left to bottom right, with land in the upper right and sea at the lower left.

    Heights: Overlayed on it is a piece of the triangulated network that makes up the 3D surface. The height values in the tga and hgt are the elevations at its nodes. As such they are placed under the center of the ground type tiles.

    Now imagine the height nodes under the beach tiles being +1 and the nodes under the sea being -1. In this case the coastline* will run along the pink line. I think it should be closer to or under the dark blue line. That is what I do in the hgt anyway by simply setting the height to 0 under the protruding beach tiles.
    In the tga you can approach this in several ways: drop the height under the offending beach tiles to 0 or lower the height under the adjacent sea tiles. Vanilla does the latter btw: A value of (1,1,1) corresponds to about +20m while a value of (0,0,255) corresponds to -30.


    * the intersection of the flat 0 altitude plane and the 3D wireframe.
    Last edited by Muizer; December 03, 2006 at 05:52 PM.
    "Lay these words to heart, Lucilius, that you may scorn the pleasure which comes from the applause of the majority. Many men praise you; but have you any reason for being pleased with yourself, if you are a person whom the many can understand?" - Lucius Annaeus Seneca -

  2. #2

    Default Re: sea edges

    Well, what I finally got was spitting image to D (middle right column), in places where I had 1,1,1 for corners I got the tiny edition blue triangles, never had the big ones btw... (on second look, my triangles are more like in E, stangely - but no outer browns in my case)

    Replacing them with 2,2,2 solved it immediately.

    BTW noticed on one occasion - by mistake, how else - that if you have 0,0,0 land behind that 1,1,1 outer edge and then go up again, you get something pretty much resembling sandbanks. Must play with that a bit more...
    Last edited by Spurius; December 04, 2006 at 01:07 PM.

  3. #3
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: sea edges

    Spurius
    Just curious does any campaign settings or monitor resolution or graphics cards affect what you see do you think? Otherwise I can't think why we can be seeing different results? I know that zoomed out doesn't show so much (obviously) also what happened when you tried the 0,0,0 land types. For a TGA file they cause me big problems - either flashing land masses or I've had big height spikes in the past.

  4. #4

    Default Re: sea edges

    Thank you all for your research, it has all been very helpful!
    Clients: Caius Britannicus, Waitcu, Spurius, BrandonM, and Tsar Stephan.
    http://www.totalwardai.com

  5. #5
    Tsar Stefan Dusan IV's Avatar Loonatic on the loose!!
    Join Date
    Dec 2006
    Location
    Belgrade, Serbia
    Posts
    458

    Default Re: sea edges

    First of all, great work guys without your dedication and time spent on this problem, I wouldn't have realised what is causing it.

    Muizer is absolutely right about heights being in the middle of the pixel from map_heights.tga
    Great thinking Muizer, You were so close, I just finished Your thought....

    That bug has nothing to do with overlaying textures from different .tga files like regions, ground types....
    I have one region on my map, and that three pixels are drawn only in heights map, they are water in ground types and regions files (tried every combination - add them just in the regions file, just in the ground types file, and all other combinations, the result is same = same bug over, and over, and over again)

    So, here is my explanation:

    From left to right:
    1. 3 pixel island on 4x4 pixels of water (black=island, blue=water)
    2. Red dots represent vertexes, as Muizer said, in the middle of each pixel(height values, dots on black fields=height 1, dots on blue fields=height 0)
    3. Now let's connect heights with value 1 with those with value 0
    4. Outline the connections...
    5. Finally, triangulate, (smoother border, which is basically a border edge of the 3d model in game) which gives us resulting little island in the game itself...

    So this would be the shape of my little island:


    But, HEY, it doesn't, it looks like this:


    Why? Am I so fool of #$@^?
    No, it is because diagonals for triangulation of the mesh go in ONLY ONE DIRECTION!!!
    If they go in both directions the resulting mesh would have doubled the number of polygons which will then result of cpu speed.....

    That is why only bottom left and upper right corners have bugs-they use the same diagonal that actually doesn't exist!

    This is how it is actually computed:



    And the result is (with the white line representing the waves that actually respect the proper two-diagonal triangular mesh, and the red triangles are bugs that we see on our map):



    That's it, I know WHY, but dunno HOW.
    If anyone knows HOW, please help Your dedicated mapers, so we could be more productive.

    Regards, TSDIV

  6. #6
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: sea edges

    Not sure what you now are asking by HOW? To remove the bug don't you just change the colour of the blue (if the bug is in the sea) and change the heights value if its on the land. Both are done on the heights.tga.
    The only height you don't use is 0,0,0 the sea heights are variations on the blue.

  7. #7
    Tsar Stefan Dusan IV's Avatar Loonatic on the loose!!
    Join Date
    Dec 2006
    Location
    Belgrade, Serbia
    Posts
    458

    Default Re: sea edges

    Well, I never got the bug in the sea, but I can't get rid of the bug on the land, no matter what value I enter (0,0,0 makes flashing screens, so it's ou of the question, offcourse)
    Even with 1,1,1 i got bugs on every single bottom left or top right corner on the map....

    Any suggestions, coments? Anything? This is really getting on my nerves...

    Should I change min/max values in descr_terrain?

    When do You get the sea bug on land?

  8. #8
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: sea edges

    Tsar Stefan Dusan IV
    If you look at the post of mine on December 4th on this thread with the different little islands you can see when you get the sea showing up as a corner on the land and when the land shows up as a corner of the sea. The heights are shown for it so it should be straight forward to see what is happening.

    The cure is to make the heights slightly higher eg switch to 2,2,2 or for the seas to change its value making it darker which has the same effect (I don't know an algorithm for determining the exact values for the blue).

    Assuming we are talking the same bug.

  9. #9
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Coastal Problems

    Hi Guys,

    Can you help me out with this problem:




    How do I fix these coasts? I used all types of heights, 000,111,222,333. None worked so far. I would appreciate some tips.

  10. #10

    Default Re: Coastal Problems

    All coastal tiles which border the sea on either the top right or bottom left have that problem. Try 3 3 3 land next to (diagonally) 0 0 253 sea. and for the rest 1 1 1 with 250 sea should be ok.

  11. #11

    Default Re: Coastal Problems

    I've figured out a possible cause of you problem.

    In the heights map, coastal squares with a water square up and to the right should only be a 1,1,1 or 0,0,0 square. Consider any blue or 0,0,0 to be a water square.

    It won't rid the map of all of them, but most of that kind of glitch should go away.

  12. #12
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: Coastal Problems

    Quote Originally Posted by Aya Reiko View Post
    I've figured out a possible cause of you problem.

    In the heights map, coastal squares with a water square up and to the right should only be a 1,1,1 or 0,0,0 square. Consider any blue or 0,0,0 to be a water square.

    It won't rid the map of all of them, but most of that kind of glitch should go away.
    Hey thanks alot. I will get to this ASAP and see if thats my problem.

  13. #13

    Default How do we get rid of the square tiles on coastal regions on big maps?

    On every mod I have tried that uses map dimensions bigger than than vanilla map we see an unpleasant looking angular shape and squareness on the coastline tiles.

    I remember seeing a post that mentioned a corrected regions file in RTW that the game engine used to round and smooth these tiles to make the coastline appear far more realistic. This file is not being used by MTW2 mods I have used, so I wonder if the game is doing it automatically on the vanilla map files, but not on resized maps.

    This needs to be resolved if we want our bigger maps to have nice flowing round coastlines like the vanilla map

    You can see what I mean on this map I was experimenting with. You can actually count the pixel lines on this map.(this is not the map I'm working on, it is a long road bigmap i was practicing on and it will not find it's way into any mods)
    Last edited by Conte Martinengo; March 22, 2007 at 04:14 PM.
    • Leonardo II Martinengo ‎(* 1440 ca + 1484)‎, condottiero. Sposa Battista, figlia di Gentile da Leonessa, celebre condottiero, che gli portò in eredità una porzione della Signoria di Sanguinetto.
    • Capitano generale della Serenissima.
    • La famiglia Martinengo Delle Palle creato Conte con i discendenti dalla Serenissima nel 1522.

  14. #14
    deRougemont's Avatar Yeoman
    Join Date
    Nov 2006
    Location
    North Carolina, USA
    Posts
    2,539

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    This is one of the reasons I can't play on the "Big Map". I feel like I'm playing Civ III. It would be really nice if the coast-tile issue could be fixed.






  15. #15

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    I see gameplay as the most important aspect, but the gameplay should also be asthetically pleasing to the eye.
    I know there is a solution for this problem, I just can't find the post anywhere on the web.
    I would like the next tw release to use a 3d campaign map based on satelite terrian data. Some flight sims use this data, it looks awesome. I'd love to manage my kingdom in an interface using 3d terrain viewer technology.
    • Leonardo II Martinengo ‎(* 1440 ca + 1484)‎, condottiero. Sposa Battista, figlia di Gentile da Leonessa, celebre condottiero, che gli portò in eredità una porzione della Signoria di Sanguinetto.
    • Capitano generale della Serenissima.
    • La famiglia Martinengo Delle Palle creato Conte con i discendenti dalla Serenissima nel 1522.

  16. #16

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    The 0,0,0 tiles in the heights map are the ones that smooths out coasts.

    It is how you go from this
    to this.

  17. #17

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    Thanks!!
    I will experiment.
    This means the qualtiy of the map appearence can be be improved simlpy by making the effort of shading the 0,0,0 tiles in the correct places.
    • Leonardo II Martinengo ‎(* 1440 ca + 1484)‎, condottiero. Sposa Battista, figlia di Gentile da Leonessa, celebre condottiero, che gli portò in eredità una porzione della Signoria di Sanguinetto.
    • Capitano generale della Serenissima.
    • La famiglia Martinengo Delle Palle creato Conte con i discendenti dalla Serenissima nel 1522.

  18. #18
    Laetus
    Join Date
    Mar 2007
    Location
    London, UK
    Posts
    1

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    Been having similar problems.

    Any tips as to placing the 0,0,0 tiles? I've had a quick go simply outlining the coast entirely with black and it improved things somewhat, but I guess I have to get a bit more artistic with it.

  19. #19
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    I wonder... I'm guessing that for the vanilla files the smoothing happens when the .hgt is being exported. Might experiment a bit with that when I get a fresh map for modding on my hands.

  20. #20
    Indefinitely Banned
    Join Date
    Jun 2006
    Location
    Calgary, Canada
    Posts
    13,967

    Default Re: How do we get rid of the square tiles on coastal regions on big maps?

    Good new. I've solved the coastal problems. I'll write up a detailed tutorial later. But for now I'll run down the basics.

    1) Make all sea into 0,0,253
    2) Paint all coasts 1,1,1

    Now the important part:
    3) Whenever a coast hugging sea pixel's corner "points" towards a land pixel you have to make that land pixel 2,2,2.


    This has smoothed out and made ALL my coasts beautiful and aesthetically agreeable.

    If you don't understand, just wait for when I post a details and illustrated tutorial on fixing the coastal problems.

Page 2 of 5 FirstFirst 12345 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •