Speedtree Tutorial For NWN2
Speedtree Tutorial For NWN2
Alright guys, the guide is here at last! We will create a single cattail plant based on cattail cluster
from NWN2, with original textures but much better polycount. This tutorial is very basic, so anyone
can repeat the steps and get the idea.
1. What is SpeedTree?
SpeedTree is a procedural vegetation modeling software for architectural visualization, movies
and games. This Technology was developed by Interactive Data Visualization, Inc. about two
decades ago and it was revolutionary at the time. Ones of the first games to use it were The Elder
Scrolls IV: Oblivion (2006) and Neverwinter Nights 2 (2006).
Now SpeedTree is very popular and licensed by many game developers. You can see it in a bunch
of titles such as Player Unknown’s Battlegrounds (2017), Assassin’s Creed Odyssey (2018) and
Apex Legends (2019).
Recently, I found that NWN2 .spt files can be edited with SpeedTree versions 3, 4.1, 4.2 and
5.0, which means we can now create custom trees, shrubs, flowers and with some experience and
time, almost any kind of flora limited only by imagination (and NWN2 capabilities).
NOTE: I recommend to use SpeedTree CAD 4.2. SpeedTree CAD 3 can be very frustrating: you
need to press F5 anytime you make a change to your tree to see the difference, which is annoying.
SpeedTree 5.0 Modeler is relatively modern and pretty good compared to older versions, but
doesn't have backward compatibility.
2
2. Tree System in NWN2
Each tree has four “components”: 1) Model .spt with .dds or .tga textures, 2) Line in dialog.tlk,
3) Line in trees.2da, 4) Blueprint .utr file. Let’s prepare all that stuff before start working with the
plant itself.
2.1 Model and textures (.spt & .dds)
To find models and textures go to the …\Neverwinter Nights 2\Data\ folder where
SpeedTree.zip, SpeedTree_X1.zip, SpeedTree_X2.zip archives are located.
TIP: I recommend to unpack all that stuff in one folder and use them as a references.
Open SpeedTree.zip. As you can see, each tree has an .spt model file and a couple of .dds
textures, three in most cases: diffuse map for trunk, normal map for trunk and a diffuse with alpha
channel for leaves, branches, fronds (so called composite map).
NOTE: some of the trees have suffixes at the end of the file name: *C – Cluster, *FU – Fruits,
*F – Fall, *SP – Spring, *W – Winter, *WSnow – Snowy version.
Find and copy Cattailc.spt, CattailC.dds, CattailBark_N.dds, CattailBark.dds. Now go to you
Override folder in …\User\Documents\Neverwinter Nights 2\Override\, create CattailS
subfolder, paste files there. Rename Cattailc.spt to CattailS.spt; rename and convert
CattailC.dds, CattailBark_N.dds, CattailBark.dds into CattailS.tga, CattailBark_N.tga,
CattailBark.tga using Photoshop or any other graphics editor.
NOTE: renaming leave texture is crucial – it must match model name.
2.2 Adding a new line in dialog.tlk
Talk table or dialog.tlk is a file that contains all text in Neverwinter Nights 2 except for the
dialogs. Each piece of text in the file is identified by a number called a String Reference
(StringRef or StrRef). With 2DA/TLK Editor open dialog.tlk (located in the base game folder),
jump to the bottom of the document and add new StringRef number, name of tree and save the
file.
3
2.3 Adding a new line in trees.2da
Two-dimensional arrays or .2da are tables that contain presets and rules for all aspects of the
game. In our case, information about all trees is stored in Trees.2da (can be found in
…\Neverwinter Nights 2\Data\2DA_X2.zip). Copy Trees.2da to your Override\CattailS folder,
open with 2DA/TLK Editor (or any other .2da editor), add a new line as displayed in the picture
and save the file.
4
3. Tree System in NWN2
3.1 Setting up with SpeedTree CAD 4.2
Download SpeedTree CAD, unzip and run SpeedTree CAD 4.2.exe and you’ll see something
like this.
5
The figure below depicts the hierarchical structure used by the SpeedTree modeling engine to
represent the structure of a tree.
Now open CattailS.spt and let’s look at how the curious cattail cluster was made in NWN2: it’s
actually a single plant with a short trunk (invisible in the game) and level 1branches bent at 90
degrees, branches level 2 are replaced by fronds.
TIP: If you want to dig deeper into SpeedTree structure and functionality, I recommend you check
the attached .chm references.
3.3 Editing the tree
NOTE: One important thing you need to understand before you start working: SpeedTree isn't a
modeling tool - you can't just "add some branches here and there". It’s a generator and you work
not only with the instance that you see right now but with the whole preset. It may be useful to see
what other instances looks like by changing the Seed number (Global Tab → Seeds section →
Randomize).
TIP: SpeedTree CAD is a very buggy tool and crashes happen from time to time - save your work
often and with different filenames.
1) Go to Menu Bar → Maps → click Remove embedded composite data and Remove
embedded composite data.
6
2) To see leave texture go to Tree properties bar → Fronds → in the section Texture Maps into
Diffuse layer choose CattailS.tga.
3) Delete level 2 branches (Tree properties bar → Branches Tab → in the «Level» section
choose Level 2 and press «Edit» and «Delete») and hide the fronds and leaves (Toolbar → View
Fronds and View Leaves buttons).
4) Hide the fronds and leaves (Toolbar → View Fronds and View Leaves buttons) and let’s work
on the trunk. Go to Tree properties bar → Trunk Tab and change parameters as shown in the
picture.
Most of the parameters are self-explanatory although some are not so obvious. Try to play with
parameters and curves - you’ll see the difference. To make a dilation at the top of the stem (it's a
cattail flower) click to Radius profile graph, in the curve editor make a similar curve.
7
5) Now unhide fronds (Toolbar → View Fronds) and go to the Branches Tab. Change the settings
as shown in the picture:
8
7) Cattail should look good for now:
Save the file and launch the NWN2 Toolset. Under the Blueprints → Trees → Shrubs you’ll find
Cattail Singe.
That’s all, thanks for reading! Of course I didn’t cover many aspects here but this is enough to
start experimenting. My plan is make advanced guide for really complex tree in the future. If you
discover typos, errors or have any additions please contact me.
-Vermillion