-
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 http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg 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.
http://files.upl.silentwhisper.net/u...del_branch.jpg http://files.upl.silentwhisper.net/u...model_leaf.jpg
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:
http://files.upl.silentwhisper.net/u...model_tree.jpg http://files.upl.silentwhisper.net/u...ree_leaves.jpg
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
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg Rendering > Render... or press F10.
Set the output size to 512x512, or 256x256 if you want to use lower resolution textures.
http://files.upl.silentwhisper.net/u...er_options.jpg
Figure 5
Creating the camera
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg Create > Cameras > Free Camera.
Put the camera in front of the tree.
http://files.upl.silentwhisper.net/u...view_front.jpg http://files.upl.silentwhisper.net/u...e_view_top.jpg
Figure 6: front view. Figure 7: top view
I don't know wether I changed anything but these were the settings I used:
http://files.upl.silentwhisper.net/u...ra_options.jpg
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:
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg Rendering > Render... or press F10.
Or with the Camera01 viewport active:
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg 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):
http://files.upl.silentwhisper.net/u...ht_options.jpg
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:
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg 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.
http://files.upl.silentwhisper.net/u...nt_options.jpg
Figure #
Step 4: Rendering
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg Rendering > Render... or press F10.
Make sure that the Viewport is set to Camera01, see Figure 5.
http://files.upl.silentwhisper.net/u...ree_3dsmax.jpg Save the render by pressing the disk. Save as a 32-bit TGA file.
http://files.upl.silentwhisper.net/u...ree_render.jpg
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.
http://files.upl.silentwhisper.net/u..._tree_bark.jpg
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.
http://files.upl.silentwhisper.net/u..._model_top.jpghttp://files.upl.silentwhisper.net/u...odel_front.jpghttp://files.upl.silentwhisper.net/u...e_model_3d.jpg
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 :grin:
http://files.upl.silentwhisper.net/u...e_ingame_1.jpg
http://files.upl.silentwhisper.net/u...e_ingame_2.jpg
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
-
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.
-
Re: Tutorial: creating new vegetation for battlemaps
Quote:
Is that a picture of a real forest or an ingame screenshot?
Which modder doesn't like to hear that kind of compliments :shy: 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.
-
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.
-
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 :grin:
-
Re: Tutorial: creating new vegetation for battlemaps
This is great news.Thanks a lot DJ!:2thumbsup:
-
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:2thumbsup: cheers again:2thumbsup:
-
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.
:bow:
-
Re: Tutorial: creating new vegetation for battlemaps
Wow those trees look really nice :)
Great tutorial, too.
-
Re: Tutorial: creating new vegetation for battlemaps
very impressive stuff, happy to work with you in the Lordz team
-
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?
-
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.:idea2:
Although only if Duke John agrees.:inquisitive:
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 :no: ).
-
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.
-
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 ? :sweatdrop:
-
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?
-
Re: Tutorial: creating new vegetation for battlemaps
You shouldn't have released that tutorial, now everyone's nagging you ~:cheers:
-
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?
-
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...
-
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.
-
Re: Tutorial: creating new vegetation for battlemaps
-
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 .:(
-
Re: Tutorial: creating new vegetation for battlemaps
Yes, I would be interested in that too.
Great work, Duke.
-
Re: Tutorial: creating new vegetation for battlemaps
The source models will be released, probably next week.
-
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.:2thumbsup:
-
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.
http://www.awrate.com/chrishogg/images/btree.jpg
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.
-
Re: Tutorial: creating new vegetation for battlemaps
Quote:
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
-
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?
https://img106.imageshack.us/img106/1494/11an1.jpg
-
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:
https://img377.imageshack.us/img377/...est19cu.th.jpg
https://img97.imageshack.us/img97/64...est26vq.th.jpg
https://img377.imageshack.us/img377/...est34ok.th.jpg
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.
-
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.
-
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).