Page 1 of 3 123 LastLast
Results 1 to 30 of 63

Thread: Tutorial: creating new vegetation for battlemaps

  1. #1
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Post Tutorial: creating new vegetation for battlemaps

    Creating new vegetation for battlemaps


    Mods are researching to create realistic/historical skins for their units and to see them besides the gamey trees of R:TW is in my opinion a waste of opportunity to have a certain style for the entire battlefield. This tutorial will show how to create your own trees for the use in battles.
    Making new vegetation will probably be done after making (a few) unit models, so I will assume that you will know how to model in 3ds max. The method I am describing results in a model with relatively few polygons.

    Cheers,
    Duke John



    Tools used in this tutorial
    Notepad
    3ds Max 6.0, the image indicates that a 3ds max command or menu option is used.
    PhotoShop
    CAS Importorter/Exporter made by Vercingetorix.
    In Appendix A below you can find some files that are probably helpfull when creating your own trees.

    Step 1: reference material
    Use google to search for images of trees and forests, or even better, take a walk in the woods. Do not use trees that are standing on their own, their growth and consequently shape is considerably different from trees growing in forests. Find a few close ups to extract a bark texture from.


    Step 2: modelling
    Yes, you will need to model your own tree and that is why you first needed to find reference material. First model a branch and a leaf. Give the branch a bark texture and the leaf a single colour.

    Copy/paste/rotate/move/scale the branches just as many times as you like. The trunk must be going straight up. Then copy/paste the leaves along the branches. The result can be something like this:

    See Figure 7 to see how the branches and leaves should not be lying in the same plane. This results in nicer shadows.


    Step 3: Creating the scene

    Rendering options
    Rendering > Render... or press F10.
    Set the output size to 512x512, or 256x256 if you want to use lower resolution textures.


    Figure 5

    Creating the camera
    Create > Cameras > Free Camera.
    Put the camera in front of the tree.

    Figure 6: front view. Figure 7: top view

    I don't know wether I changed anything but these were the settings I used:

    Now move the camera around until you have all the leaves and branches in view of your camera. The trunk does not need to be entirely in view as the actual ingame model will have a modelled trunk. Leave a bit of space empty so that you can place a bark texture later on. Check with a render to see wether this is the case:
    Rendering > Render... or press F10.
    Or with the Camera01 viewport active:
    Press F9.

    Creating light
    Put the omni-light to the front of tree and play around on the horizontal/vertical axis until you get a satisfying casting of shadows on the branches. See Figure 6 and 7 to see how I placed it. I don't know wether I changed anything but these were the settings I used (do make sure that the shadow options are checked):


    Setting the background
    After rendering the tree you will probably notice that the background colour is different than your leaf colour. To avoid having the background influencing the colours of the tree you will need to change it:
    Rendering > Environment... or press 8.
    Set the Background colour to something similar to your leaves and bark. You can play around with the Global Lightning Tint and Ambient level to get a nicer light effect.


    Figure #


    Step 4: Rendering
    Rendering > Render... or press F10.
    Make sure that the Viewport is set to Camera01, see Figure 5.
    Save the render by pressing the disk. Save as a 32-bit TGA file.



    Step 5: Adding bark
    Open the texture in PhotoShop. Now add the bark you used in step 2 to the rendered image from step 4. The bark texture should be large enough so there does not happen too much stretching. I use around 60x512 pixels. One third of the texture should gradually become darker to simulate the dirt at the base of the trunk.

    Make sure that the bark texture is not hidden by the alpha layer.
    Save the texture as a TGA.DDS file.


    Step 6: Modelling, part 2
    Yes, more modelling is needed. This time you will create the model that is used in the game. Below you will see a few views of how I model my trees. I tried alot of other variants but this was the one that was lowpoly and gave a good view from most directions. Model a trunk from a box that has 3 segments. The lower segment should use the darker bit of the bark texture. The trunk should not go all the way up. Let it kind of merge with the branch and leave texture.
    The textures showing the branches and leaves are placed on a big plus that has its ends split in two. Once you have modelled it for one side, copy the faces and flip them, so that the faces can be seen from all sides. The model below has just 64 faces. Make sure that the model only uses one texture which should be the one you made in step 5.


    Make sure that you have a scene root and attach the model to it. Now export the model as a CAS file using Vercingetorix' tool.


    Step 7: Adding the new vegetation

    Adjust the preferences of R:TW
    In R:TW make sure that the colours are 16bit, for example 1024x768x16. And that anti-aliasing is off. I do not know wether both settings are needed, but it works that way. This is needed to let R:TW generate sprites and textures. Shut down R:TW.

    Removing old vegetation files
    I shouldn't be writing this by now, but back up in case you screw up. Remove the files in:
    data\vegetation\
    data\vegetation\sprites
    data\vegetation\textures
    Remove:
    data\descr_vegetation.db

    Adding the new vegetation
    Place your CAS file in:
    data\models_vegetation\
    Place your TGA.DDS file in:
    data\models_vegetation\textures\

    Copy the folder:
    data\models_vegetation\textures
    And paste into:
    data\vegetation\

    Edit the vegetation entries
    In descr_vegetation.txt edit any tree entry so that it points towards your new vegetation model. For example:
    Code:
    model super_tree
    {
        level models_vegetation/ntw_tree_03.cas
    }
    model super_tree_01
    {
        level models_vegetation/ntw_tree_01.cas
    }
    model super_tree_02
    {
        level models_vegetation/ntw_tree_04.cas
    }
    Now scroll further down and you arrive at the climate entries that hold the information which vegetation is used. Edit any climate entry so that it points towards your vegetation entries. For example:
    Code:
    vegetation default_forest
    {
        layout 128 forest_layout.tga
        radius 1
        height_range 0.9 1.4
        aspect_range 0.9 1.1
        lod trees
        model super_tree_01
        model super_tree_02
        model super_tree
    }
    The layout entry points towards a tga that dictates how the trees are placed on the map (see the optional step below).
    The radius entry represents the diameter/radius(?) of the collision box that is put around the vegetation model. It can be 0.
    The height_range and aspect_range are multipliers to get the actual width and height of the vegetation model. The bigger the range the larger the variation.

    Optional: editing vegetation layout
    In data\battlefield\vegetation you will find two TGA files that have dots on them:
    forest_layout.tga
    scrub_layout.tga
    Each dot will be a vegetation model on the battlefield as the tga is tiled over the battlefield. You can change these tga's to make them more dense or whatever. The number in the layout entry should be powers of 2; 128, 256, 512. The number represents the scaling of the tga; the larger the less trees will be placed in the same space.


    Step 8: Generating the new vegetation
    Everything should now be in place. Start R:TW again. Loading should take a bit longer as the vege files and sprites are generated automatically by the engine. Make a new custom battle that has the climate that uses the new vegetation and admire your work





    Step 9: Postprocessing
    You may notice that your bark texture is different in hue than the branches. You can fix this either in PhotoShop or in 3DS max by editing lightning.

    The engine generates the sprites and textures as TGA files. When you are done with tweaking your vegetation I advise you to open the textures and sprites in data\vegetation\ and save them as TGA.DDS for better performance. The R:TW engine automatically reads the TGA.DDS files instead of the TGA ones.



    That was the end of the tutorial. I hope I have included every step. If it is not working for you then please describe your problem in detail and include screenshots if needed. Anything less is not honouring the time I put in researching and writing this method and you might not get a reply from me.

    Good luck,
    Duke John





    Appendix A: Tree creation tools
    I have made a pack containing some tools to setup and render your trees. Follow this tutorial to understand the whole process:
    https://forums.totalwar.org/vb/showthread.php?t=60901

    User Agreement
    None of the files included in the pack or the pack itself may be distributed without the consent of the Lordz, contact at:
    forum.thelordz.co.uk
    forums.totalwar.org/vb

    Download
    http://www.totalwar.org/Downloads/Rt...tree_tools.zip Please PM me if the link is broken.

    Contents
    ntw_tree_04.cas
    An example model for a regular tree. Texture can be found in the textures folder.

    rnj_pine_1.cas
    An example model for a pine tree. Texture can be found in the textures folder.

    setup_ntw_tree_04.max
    This is a 3ds max scene that contains a 3D tree that can be rendered using the camera01 view. Textures can be found in the textures folder.

    setup_rnj_pine_1.max
    This is a 3ds max scene that contains a 3D pine tree that can be rendered using the camera01 view. Textures can be found in the textures folder.



    I would love to see someone using my files to create a vegetation mod for R:TW. I am much too busy with Napoleonic: Total War 2 to do so myself. Have fun and good luck with making trees!

    Cheers,
    Duke John aka Lord Fishbone from the Lordz
    Last edited by Duke John; 08-07-2009 at 22:47.

  2. #2

    Default Re: Tutorial: creating new vegetation for battlemaps

    Wow, very impressive work. I must admit that of all the things I've thought to make new models for I've never thought of vegetation. Is that a picture of a real forest or an ingame screenshot? You are entirely right, with all the good work that is produced by modelers its a shame not to make the environment look realistic. Well done.
    Hegemonia Lead Modeller.

  3. #3
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Tutorial: creating new vegetation for battlemaps

    Is that a picture of a real forest or an ingame screenshot?
    Which modder doesn't like to hear that kind of compliments Hopefully with this tutorial more people will see that it isn't that hard and the result is far more effective at setting an atmosphere than adding another unit.

  4. #4
    Chief Biscuit Monitor Member professorspatula's Avatar
    Join Date
    Oct 2004
    Location
    Inside a shoe.
    Posts
    1,158

    Default Re: Tutorial: creating new vegetation for battlemaps

    Well that's a fascinating and well presented tutorial. I'd raise my hat to you, except I don't have it on my head, but you get the general idea. Probably.
    Improving the TW Series one step at a time:

    BI Extra Hordes & Unlocked Factions Mod: Available here.

  5. #5
    Shaidar Haran Senior Member SAM Site Champion Myrddraal's Avatar
    Join Date
    Feb 2004
    Location
    UK
    Posts
    5,752

    Default Re: Tutorial: creating new vegetation for battlemaps

    Very Very Very impressive, many thanks DJ, I've had a couple of conversations with other modders by MSN about this topic, lets just say they involved many smilies

  6. #6
    Shadow Senior Member Kagemusha's Avatar
    Join Date
    Mar 2005
    Location
    Helsinki,Finland
    Posts
    9,596

    Default Re: Tutorial: creating new vegetation for battlemaps

    This is great news.Thanks a lot DJ!
    Ja Mata Tosainu Sama.

  7. #7
    Back in style Member Lentonius's Avatar
    Join Date
    Nov 2005
    Location
    U.K
    Posts
    445

    Default Re: Tutorial: creating new vegetation for battlemaps

    it is fantastic when with the help of a great guide, thing previously unknown to most are simple to make. yay cheers again
    Hey, Im back

  8. #8
    Defender Troll Member Revolting Friendship's Avatar
    Join Date
    Nov 2004
    Location
    Ramvik, Sweden
    Posts
    385

    Default Re: Tutorial: creating new vegetation for battlemaps

    Duke John:

    Thats some impressive stuff. I applaud your skills. This will surely help us enhance the battlefield experience of our mod greatly, if Prometheus and Kagemusha is up for the work.

    lol

  9. #9
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Tutorial: creating new vegetation for battlemaps

    Wow those trees look really nice :)
    Great tutorial, too.

  10. #10
    aka AggonyAdherbal Member Lord Adherbal's Avatar
    Join Date
    Oct 2004
    Location
    Belgium
    Posts
    1,014

    Default Re: Tutorial: creating new vegetation for battlemaps

    very impressive stuff, happy to work with you in the Lordz team
    Member of The Lordz Games Studio:
    A new game development studio focusing on historical RTS games of the sword & musket era
    http://www.thelordzgamesstudio.com

    Member of The Lordz Modding Collective:
    Creators of Napoleonic Total War I & II
    http://www.thelordz.co.uk

  11. #11

    Default Re: Tutorial: creating new vegetation for battlemaps

    Perhaps we could merely all borrow DJ's models, they're amazing as it is. Besides, they're fairly generic trees, so I imagine they would fit the needs of most mods.

    BTW, what is the average vertex count of these models?
    Last edited by snevets; 02-08-2006 at 02:43.
    Hegemonia Lead Modeller.

  12. #12
    CeltiberoRamiroI Member Monkwarrior's Avatar
    Join Date
    Apr 2004
    Location
    Salduie/Caesaraugusta/ Sarakusta/Saragossa
    Posts
    828

    Default Re: Tutorial: creating new vegetation for battlemaps

    Quote Originally Posted by snevets
    Perhaps we could merely all borrow DJ's models, they're amazing as it is. Besides, they're fairly generic trees, so I imagine they would fit the needs of most mods.
    That's really a very good idea.
    Although only if Duke John agrees.

    I don't know how many types of trees can be included in RTW, but if it is so simple (for him) it is for sure that it would be faster than learning 3ds max (at least for me ).

  13. #13
    Senior Member Senior Member hoggy's Avatar
    Join Date
    Feb 2004
    Location
    Adel, Britannia
    Posts
    565

    Default Re: Tutorial: creating new vegetation for battlemaps

    Stunning job DJ, looks fantastic! I'll have a go at the tutorial when I get a mo.

  14. #14
    Seii Taishōgun 征夷大将軍 Member PROMETHEUS's Avatar
    Join Date
    Jul 2004
    Location
    La Città Eterna
    Posts
    2,857

    Default Re: Tutorial: creating new vegetation for battlemaps

    Great Tutorial , great mod , May be you are willing to create a new vegetation for the Ran No Jidai mod ?

    Creator of Ran no Jidai mod
    Creator of Res Gestae
    Original Creator of severall add ons on RTW from grass to textures and Roman Legions
    Oblivion Modder- DUNE creator
    Fallout 3 Modder
    Best modder , skinner , modeler awards winner.


    VIS ET HONOR

  15. #15

    Default Re: Tutorial: creating new vegetation for battlemaps

    Hehe, prometheus you've got to be the 10000 th person to ask already.

    But while I'm at it would you care to make the vegetation for Hegemonia?
    Hegemonia Lead Modeller.

  16. #16
    Harbinger of... saliva Member alpaca's Avatar
    Join Date
    Aug 2003
    Location
    Germany
    Posts
    2,767

    Default Re: Tutorial: creating new vegetation for battlemaps

    You shouldn't have released that tutorial, now everyone's nagging you

  17. #17
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Tutorial: creating new vegetation for battlemaps

    Duke,


    Think you can do Fangorn Forest by the end of the week? Thx.

    j/k

    Yes, a good tutorial :)

    If they brought out a patch for this would it be a vegetable patch?
    "One of the most sophisticated Total War mods ever developed..."

  18. #18

    Default Re: Tutorial: creating new vegetation for battlemaps

    DJ, I have a question for you:

    In what way are your trees different in a substantial way from vanilla trees? Because somehow your forests as a whole look a lot more realistic, and the tree density looks a lot better too...
    Last edited by SigniferOne; 02-10-2006 at 05:46.

  19. #19
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Tutorial: creating new vegetation for battlemaps

    The biggest difference is that I use a texture that on its own already resembles a tree. My model is designed in such a way that the texture looks good from almost all sides (flying high looking straight down is the exception).

    Most of the textures used by CA which on their own have little to do with trees and are applied to models that have little to do with trees. The result is recognized as being a tree but when put next to a real tree the mistakes become very visible. I guess that the artist thought that vegetation did not matter much and came up with a quick solution.

    I might release my trees as a minimod useable by any mod, but that won't happen before NTW2 has its first release.

  20. #20
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Tutorial: creating new vegetation for battlemaps

    A new example of what you can achieve:


  21. #21
    Member Member waitcu's Avatar
    Join Date
    Mar 2005
    Location
    China
    Posts
    100

    Default Re: Tutorial: creating new vegetation for battlemaps

    wow!!!! we just thinking of this question , thanks very much !!!!
    btw , do you know how to change the trees 3d model on campaign map ??
    i don't know where to setting it .:(

  22. #22
    Axebitten Modder Senior Member Dol Guldur's Avatar
    Join Date
    Apr 2005
    Location
    England
    Posts
    1,550

    Default Re: Tutorial: creating new vegetation for battlemaps

    Yes, I would be interested in that too.

    Great work, Duke.
    "One of the most sophisticated Total War mods ever developed..."

  23. #23
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Tutorial: creating new vegetation for battlemaps

    The source models will be released, probably next week.
    Last edited by Duke John; 02-15-2006 at 14:42.

  24. #24
    Bored Member Tux's Avatar
    Join Date
    Dec 2004
    Location
    Romania, Klausenburg
    Posts
    9,267

    Default Re: Tutorial: creating new vegetation for battlemaps

    Quote Originally Posted by waitcu
    wow!!!! we just thinking of this question , thanks very much !!!!
    btw , do you know how to change the trees 3d model on campaign map ??
    i don't know where to setting it .:(
    Well the models used in the camp map are in: data\terrain\aerial_map\tree_models
    So you just have to change them and export them after with a new skin path and new mesh. Also i think you can use the descr_climates.txt to create new forest types and the path of the models.

    Looks good there DJ, great job on the trees and on the tutorial.

  25. #25
    Senior Member Senior Member hoggy's Avatar
    Join Date
    Feb 2004
    Location
    Adel, Britannia
    Posts
    565

    Default Re: Tutorial: creating new vegetation for battlemaps

    Hi DJ, I had a go at following your excellent tutorial with some blossom trees. The tutorial works really well and I got them in game. Unfortunately I can’t seem to get RTW use the sprite files. It generated a sprite tga for the tree which looks correct, but as you can see it doesn’t appear to use it in game.

    It still uses an old pine sprite file even though default_forest_0 has the blossom tree on it. I’m using 1.5, I turned anti-aliasing off and have it set to 16bit colours. Also curiously, the game still has shadows for the old pine trees.

    - One section I’m unclear about is:
    Removing old vegetation files
    I shouldn't be writing this by now, but back up in case you screw up. Remove the files in:
    data\vegetation\
    data\vegetation\sprites
    data\vegetation\textures
    Remove:
    data\descr_vegetation.db

    When I remove all the contents of these folders the world has disappeared and the units are hovering in space. So to get my result I just deleted individual files that related to my tree. Should I only be deleting certain file types from these folders?

    Hope you can help.

  26. #26
    Member Member waitcu's Avatar
    Join Date
    Mar 2005
    Location
    China
    Posts
    100

    Default Re: Tutorial: creating new vegetation for battlemaps

    Well the models used in the camp map are in: data\terrain\aerial_map\tree_models
    So you just have to change them and export them after with a new skin path and new mesh. Also i think you can use the descr_climates.txt to create new forest types and the path of the models.
    thanks Alin , try it asap

  27. #27
    Seii Taishōgun 征夷大将軍 Member PROMETHEUS's Avatar
    Join Date
    Jul 2004
    Location
    La Città Eterna
    Posts
    2,857

    Default Re: Tutorial: creating new vegetation for battlemaps

    DJ what u think of the new trees of MTW2 ? do they look like the RTW ones in way of construction or something better? may be they can be improved later with ur technique?


    Creator of Ran no Jidai mod
    Creator of Res Gestae
    Original Creator of severall add ons on RTW from grass to textures and Roman Legions
    Oblivion Modder- DUNE creator
    Fallout 3 Modder
    Best modder , skinner , modeler awards winner.


    VIS ET HONOR

  28. #28
    The Dark Knight Member wlesmana's Avatar
    Join Date
    Jan 2005
    Location
    Indonesia
    Posts
    602

    Default Re: Tutorial: creating new vegetation for battlemaps

    Super mega ultimo thank you to Duke John for this tutorial. I have tried making new trees for a week now. This is the result:




    It's not much yet since I still need to tweak them a lot and make more than one model, but looks better than vanilla so far. I would've been pretty much impossible for me to come up with something like without the tutorial. Thanks again.

  29. #29
    Come to daddy Member Geoffrey S's Avatar
    Join Date
    Jun 2005
    Location
    Shell Beach
    Posts
    4,028

    Default Re: Tutorial: creating new vegetation for battlemaps

    Excellent tutorial! As you said it's a shame seeing so many beautiful models in so many great mods in contrast to the rather poor vegitation and landscapes of RTW; thanks to this tutorial I look forward to seeing many mods using this technique and looking all the better for it.

    I presume these new trees also have a noticeable effect on formations, such as phalanxes? Should be rather good for gameplay, making terrain more important than in regular RTW.
    Last edited by Geoffrey S; 02-20-2006 at 16:28.
    "The facts of history cannot be purely objective, since they become facts of history only in virtue of the significance attached to them by the historian." E.H. Carr

  30. #30
    Modder Member Encaitar's Avatar
    Join Date
    Oct 2003
    Location
    Melbourne, Australia
    Posts
    234

    Default Re: Tutorial: creating new vegetation for battlemaps

    Prometheus: the trees in that screenshot look identical to the trees from MTW (I spent quite a bit of time making maps with MTW, so I recognise the various models). Whether they're just placeholders for now or not, who knows (the look may well stay the same, but with a more 3-d model than the MTW ones).
    Encaitar Arandur

    Middle-earth: Total War Dev

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO