Page 2 of 5 FirstFirst 12345 LastLast
Results 21 to 40 of 84

Thread: Editing worldterrain files (IWTE)

  1. #21

    Default Re: Editing worldterrain files (IWTE)

    Thanks, I will work on this and hopefully post some pics of a great looking settlement.

  2. #22
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Editing worldterrain files (IWTE)

    So...

    While all this is massive and i just dug a bit into the entire thing, I have a question (surprise, surprise )
    I read a lot about the functions with the .tga-pictures.
    However (maybe I just read over it in my confusion), I fail to see the sense of the terrain-.tga's. Of course, they can show you the terrain in Gimp, but can you modify the .tga of an existing settlement and then convert the edited .tga's back into .worldterrain-format?

    (I'm more mapper than modeler, so this would be more comfortable for me, although i have already created several models in Milkshape)
    Thanks!



  3. #23

    Default Re: Editing worldterrain files (IWTE)

    erm, yes, the point of the terrain tga's is you edit them and use 'replace with .tga' options to make a revised version of the .worldterrain

    pathfinding and vegetation tga's work similarly

    the only problem with doing it in GIMP is that the main terrain merge information is contained in the alpha channel and alpha channels are a pain to edit in GIMP - see the conversation 2 posts above between me and Eothese.

  4. #24
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Editing worldterrain files (IWTE)

    Quote Originally Posted by makanyane View Post
    erm, yes, the point of the terrain tga's is you edit them and use 'replace with .tga' options to make a revised version of the .worldterrain

    pathfinding and vegetation tga's work similarly

    the only problem with doing it in GIMP is that the main terrain merge information is contained in the alpha channel and alpha channels are a pain to edit in GIMP - see the conversation 2 posts above between me and Eothese.
    Alright.

    I was just asking, becasue, after I made my changes and chose "replace with .tga", nothing happened.
    (Yes, I made sure that I chose the right file paths 'n' stuff).
    So that had me a little bit confused.



  5. #25

    Default Re: Editing worldterrain files (IWTE)

    possibilities;
    there's an IWTE design feature in this where it ignores anything that isn't pure greyscale (so you can mask areas with colour) - if you ended up with the tga not pure greyscale that might be why there's no change...

    the tool normally produces a .worldterrain file with a new name (depending on quite what you put as the save setting) - did you check the date of the files and switch names so the newly created one is used?

    when you do the 'replace' check in the dos box for any error message..

    file path to .worldterrain is set from within the .world file - that may not be to the same folder (if you copied and moved a .world it could still be looking up the old location)



    also which areas did you change? if you changed the heights just at the edges and didn't manage to change the merge settings in the alpha channel - then you might have changed an area which doesn't influence the final terrain (because it's merged totally into the surrounding terrain)

  6. #26
    Nevada's Avatar Domesticus
    Join Date
    Jun 2007
    Location
    Bavaria
    Posts
    2,197

    Default Re: Editing worldterrain files (IWTE)

    Quote Originally Posted by makanyane View Post
    possibilities;
    there's an IWTE design feature in this where it ignores anything that isn't pure greyscale (so you can mask areas with colour) - if you ended up with the tga not pure greyscale that might be why there's no change...

    the tool normally produces a .worldterrain file with a new name (depending on quite what you put as the save setting) - did you check the date of the files and switch names so the newly created one is used?

    when you do the 'replace' check in the dos box for any error message..

    file path to .worldterrain is set from within the .world file - that may not be to the same folder (if you copied and moved a .world it could still be looking up the old location)



    also which areas did you change? if you changed the heights just at the edges and didn't manage to change the merge settings in the alpha channel - then you might have changed an area which doesn't influence the final terrain (because it's merged totally into the surrounding terrain)
    Checked all, but found nothing.

    For starters, I made a simple flat terrain in 150 150 150. I just wanted to test things, but, apparently, things didn't work out

    Thanks anyway, I'll just try it with the Starter Kit you uploaded instead of a vanilla settlement (thanks for that as well).



  7. #27

    Default Re: Editing worldterrain files (IWTE)

    Quote Originally Posted by Nevada View Post
    For starters, I made a simple flat terrain in 150 150 150. I just wanted to test things, but, apparently, things didn't work out
    It wouldn't come out looking completely flat unless you also set the merge values for all the points to 1 (or had all white alpha channel)

    I'd also suggest checking what is actually in the terrain file by using the 'view terrain in 2d window' option in IWTE - loading your revised file in that and checking it looks as expected (if you zoom the window out you get a similar impression to greyscale from the colour code used on the points).

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

    Default Re: Editing worldterrain files (IWTE)

    minor update to link Makanyane's explanation/diagrams on the merge factors.

  9. #29

    Default Re: Editing worldterrain files (IWTE)

    OK - as it was causing a lot of confusion with GIMP users the merge file for the terrain is now printed out (by latest version of wilddog's IWTE) as a separate tga instead of as the alpha channel to the terrain tga.

    If you use the "terrain1" tab, "create terrain TGA's" button on a settlement or fort .worldterrain file you will now get three TGA's

    1. a file with name ending wtbase.tga - this one represents the heights in greyscale according the the settings you selected - this height section is the component that can also be edited by conversion to ms3d model or in the 'amend terrain in 2d window' option of IWTE. Note that there isn't a method of editing the merge factors for it in ms3d.

    2. a file with name ending wtmerge.tga - this will be the same size as the above and represents the amount that the heights are merged into the surrounding terrain. White means they completely overrule the terrain and black means they are ignored, shades of grey create a transition. The values shown in this file can also be edited numerically in the 'amend terrain in 2d window' option, but are not displayed graphically in the view.

    (The above two components are present in all .worldterrain files, including ambients and techtrees, in techtrees the techtree terrain is merged onto of the settlement terrain.)

    3. a file with name ending wtbattlemerge.tga - this file is a fixed size, 256 x 256 pixels, regardless of the terrain size - it relates to a flat plane representing the height zero for placing the settlement, which is placed at the mid height position on the battlemap. This is used by the game engine to place the settlement (this component is only present in the settlement/fort files) -
    the greyscale colour in the tga shows how this theoretical plane merges with the surrounding battlemap. This component of the file can only be altered by using the 'create TGA's' and 'replace Battle Merge TGA' options.


    ************

    Some pics to try and explain how the merge components affect things;
    (view of settlement is from 'the back' so the tga's are at 180 degrees to the viewed angle, sorry....)

    Battlefield without settlement:


    Battlefield with Stone Fort A and vanilla .worldterrain file:

    the corresponding tga's generated from this terrain are shown superimposed, from left to right they are the
    wtbase, wtmerge, and wtbattlemerge

    With no merge applied to the terrain

    all white on the wtmerge means that there is no merge factor applied to the terrain heights - you can now see the width covered by this particular .worldterrain as it's acquired cliff edges at the perimeters...
    if you added 'merge distances' to this terrain using the option in the resize.worldterrain function, then you'd get a 'chamfered' edge that blended out that cliff, but it wouldn't be as natural looking as the hand drawn version in the vanilla file.

    With no merge applied to terrain or battlemerge.tga

    you can now see the full extent of that height zero plane, it's covering an area just beyond the possible fighting area. The unmerged terrain heights are still showing up with cliff edges, as this particular terrain has much of the edge section ending with -20 heights, so below the height zero plane.

    With no merge applied to terrain but battlemerge.tga completely black

    in this example none of the height zero plane is visible as the battlemerge.tga is set to pure black, so the plane is ignored and the terrain superimposed directly onto the battle map. The terrain section is still unmerged so you see cliff edges where the terrain width ends.

    Merged terrain and battlemerge.tga completely black

    here we're back to the original hand drawn terrain merge, but with the battlemerge affecting the height zero plane still completely black so that isn't appearing... the results of this look much more natural than having a large flat area appearing half way up a hillside, but may result in impractical deployment arrangements, if you have very hilly terrain and the attackers for a settlement end up deployed the wrong side of a natural cliff!
    Last edited by makanyane; January 19, 2021 at 11:22 AM. Reason: pictures fixed again

  10. #30

    Default Re: Editing worldterrain files (IWTE)

    Thanks for that explanation on the new options! will integrate it in my tutorial when i have time

  11. #31

    Default Re: Editing worldterrain files (IWTE)

    Hi, don't understand how to work with the tga files and what i have did wrong.

    1)I have resaized the Terrain tfrom 251x251 to 181x181.

    2)Shape the terrain in the ms3d.

    3)I resaized the terrain from 181x181 to 251x251, i didn't apply merge distance.

    4)I tested the map as leo said and I get this:
    Spoiler Alert, click show to read: 

    Spoiler Alert, click show to read: 

    Spoiler Alert, click show to read: 


    The terrain gone under the settlement gate and water,How can i resolve this?I tried different merge options with 15,15,15,25 but i had the same result.

    i have also checked the tga files:
    Spoiler Alert, click show to read: 

    I don't understand what i have to change in the tga to set the proper distance for the terrain and to set it in the rest of TATW map.
    I read the guide of makanyane but my wtbase tga is totaly different, Has it something wrong?

    Please can you explain step by step what i have to do?

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

    Default Re: Editing worldterrain files (IWTE)

    3)I resaized the terrain from 181x181 to 251x251, i didn't apply merge distance.
    If you simply reduce a terrain from 251 to 181 it will chop off the merge values. If you then edit it and don't apply a merge it extends the merge values that applied at the 181 distance. So if by the 181 value the merge isn't 100% you get straight edges as you've basically said keep whatever the merge value is and extend it. Normally by the outer bounds it should be a merge of 100% into the surrounding heights. (hope that makes sense?). Looks like your merge value is basically zero which gives the 'square cliffs effect' so you need that to merge!

    When using the TGA's the red and the blue value indicate values that are too high or too low so will remain untouched. ie your scale is wrong. It was set that way to allow specific fine tuning of heights. Only the grey values can be fine tuned so the map bottom left has very little you can change.

    You have to remember there are two merge processes in place in this . One is to merge the .world terrain into the surrounding area and the other is to merge the surrounding strat map into a flat plane on which the .world terrain sits.

    The pictures in makanyane's post #29 illustrate all of this.
    Last edited by wilddog; February 18, 2014 at 02:14 PM.

  13. #33

    Default Re: Editing worldterrain files (IWTE)

    ok thank you, now it's more clear.
    If my scale is wrong with too or slow heights how can i change them?
    When i create a TGA from WORDTERRAIN i have 3 parameter:

    -GREYSCALE CONTROLPOINT (GCP) i usually put it to 100 or 150

    -HEIGHT ASSIGNED TO GCP which is 0.0

    -GREY SCALE INCREMENTS PER HEIGHTS 3.0

    How i must change this parameters to set heights which i can change with GIMP?

  14. #34
    Dracula's Avatar Praefectus
    Join Date
    Jul 2007
    Location
    Greece
    Posts
    6,877

    Default Re: Editing worldterrain files (IWTE)

    Suppose that there is a mod for kingdoms and it has new american provinces. However they are in the place where there should be just jungles mosquitos and parrots. They all however load the trees of a european climat, you feel like in the Alps. Suggestions where to start ? It's incredibly annoying. To top it up, the original game m2TW I think doesn't have the palms&stuff I want to use. I think they came just with Americas Kingdoms. So how to load them etc ?

    Also where is the export descr unit file of the four kingdoms additions ?

  15. #35
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: Editing worldterrain files (IWTE)

    Quote Originally Posted by gosho View Post
    Hi, don't understand how to work with the tga files and what i have did wrong.

    1)I have resaized the Terrain tfrom 251x251 to 181x181.

    2)Shape the terrain in the ms3d.

    3)I resaized the terrain from 181x181 to 251x251, i didn't apply merge distance.

    4)I tested the map as leo said and I get this:
    Spoiler Alert, click show to read: 

    Spoiler Alert, click show to read: 

    Spoiler Alert, click show to read: 


    The terrain gone under the settlement gate and water,How can i resolve this?I tried different merge options with 15,15,15,25 but i had the same result.

    i have also checked the tga files:
    Spoiler Alert, click show to read: 

    I don't understand what i have to change in the tga to set the proper distance for the terrain and to set it in the rest of TATW map.
    I read the guide of makanyane but my wtbase tga is totaly different, Has it something wrong?

    Please can you explain step by step what i have to do?

    I dont know exactly what is happening there.

    red and blue areas on the tga are the ones you CANT EDIT, you need to adjust the parameters while creating the tga in order to get all the terrain editable, the less greyscale increments per height the bigger is the chance to get all the tga in grey so you can edit it all. however, As I know hennet anun is a mountain terrain so it will be very difficult to edit it all without blue or red areas, wich means you would need to make various edits, level by level, changing the heights and editing layer by layer, wich is a pain to do.

    try seting the greyscale increments per height to 0.1 and you will understand what Im talking about, but with this value things will get totally uniform and you wont be able to edit at all...

    you need to go through try and fail until you get your result.

    remember, red and blue areas canot be edited no matter what.

    More than this, read again what wildodg said.


    Im not a techincal guy, when I have problems like this I simply start all over again from zero if I dont get to understand what is happening.

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

    Default Re: Editing worldterrain files (IWTE)

    -GREYSCALE CONTROLPOINT (GCP) i usually put it to 100 or 150

    -HEIGHT ASSIGNED TO GCP which is 0.0

    -GREY SCALE INCREMENTS PER HEIGHTS 3.0
    This isn't that technical its an ability to understand a scale nothing more.

    All colours are in range 0 to 255. Grey scale means all 3 need to have the same value.

    You pick a control point to set the basic height you need. If you set 100 then it means the HEIGHT ASSIGNED TO GCP (of 100) is the value put in here so the default is greyscale of 100 means 0.0 meters height.

    You then set the scale of heights you want to set so GREY SCALE INCREMENTS PER HEIGHTS 3.0 means every 1 grey scale increment is equal to 1/3 of a metre eg grey scale 101 will 0.333 height and 103 will be 1m height. if you increase it to 4.0 it will mean its equivalent to 1/4 ie 0.25 of a metre in height.

    If you therefore want to change something with a lot of heights but choose a very small height scale eg 10.0 then you will see a lot of red and blue indicating areas which are too high or too low for your scale.

    If you don't understand maps and scales or maximums and minimums I wouldn't really try editing maps.

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

    Default Re: Editing worldterrain files (IWTE)

    Hi
    With the new release of the IWTE tool v14_07_A a lot of the IWTE editing has changed. For the new process you simply need to open the terrain file via the menu at the top left of the screen (not the normal buttons). This will open a series of images and a 3D map of the world terrain. You then simply change each layer via the painter process. Any change to heights will be reflected in the 3D view. This is lot faster than any of the older processes and there is also no need to either use TGA's or milkshape for this process.

    I'll add updating the tutorial to my 'to do list'.

  18. #38

    Default Re: Editing worldterrain files (IWTE)

    hello guys,
    Sorry for my stupid questions ....
    It happens to me that changing the .worldterrain * I do not see the result in the game.
    and yet I follow step by step tutorial leo.civil.uefs and also Wilddog.
    Why is this happening? rechecking the terrain file modification has been saved.
    I have to ask ... to display the map in the game just make a custom battle?


    Thanks to all

  19. #39

    Default Re: Editing worldterrain files (IWTE)

    Make sure you've found the newly created file - depending on which method you're using it with EITHER be in the same folder as the original .worldterrain (but with a number or file description added to the name)
    OR in a folder called IWTEsave in the same place as the .exe - check you've got the right file by looking at the 'date modified'

    rename/move that file so that it replaces the original one, and yes it should show up in custom battle

    if it's still not working I need more details about exactly what you're trying to do, and to which settlement

  20. #40

    Default Re: Editing worldterrain files (IWTE)

    I did everything ... replaced the original file with the terrain created with IWTE renamed to the original file name.

    The change is a small relief ... it's just to test ....

    and these are the three files, in order: base, merge and battlemerge.
    I have the operating system windows 8, it can be that it cause 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
  •