Tree Planting

From Neverwinter Pedia

Jump to: navigation, search

It is obvious that Fransk is not a very friendly place, but a few trees should make the place looked better, right?

Contents

Shopping for a Tree

You may want to start shopping for a tree in the «Trees» department of LOWE'S. Wait, did I say LOWE'S? I mean Section F: Blueprints!

Spruce looks like a good tree to me. (Okay, so you don't like Spruce. Just pick any suitable tree you like.)

While we are at it (and the cursor has already turned into a spruce), we might as well plant two of the same trees next to each other. Simply click twice on the stage before you press the «Esc» key to detach the model of the tree (Spruce, in my case) from the cursor.

Remember to leave some gaps between the two trees. (Tall tree like spruce need their own elbow room for sunlight. The same goes for big trees like oak.)


Wow! That was quick, wasn't it?

Something is amiss. What are the chances that you will find two identical trees standing right next to each other in nature? Looks like the trees will need a little tweaking so that they will look a little more natural.


Tweaking the Trees

There are two ways to make identical trees look different:

  1. changing how the branches grow (through randomization), and
  2. changing their size/height/girth (height x width x depth).


Randomization

Randomizing the branches is a very nice way to make identical trees models look different. The NWN2 Developers have put in something call the Random Seed to allow randomization to occur at the seed level. [Note: A "Random Seed" is a number with the value from 0 to 999,999,999.]

Since randomization happened at the seed level, how a tree "looked" is determined even before it germinate! (Just kidding!)

In the following image, the two Spruces have the same Random Seed of "481259", hence they are identical.


A different Random Seed (1-6 digits) will result in a different looking Spruce. Here's what happen after I change the Random Seed of one of the Spruce (on the right) to 10200. It looked different from the "481259" Spruce! Try out several different numbers. Occasionally, you may come across a really uniquely looking tree.


For now, take note of the Scale property, found just above the Random Seed. In the image above, the selected Spruce has the Random Seed of "10200" and the scale of 1, 1, 1. We will be looking into the Scale property below.

[Note: One caveat to this approach is that every randomization seed requires quite a bit of processing power from the CPU, so if you generate many trees using Randomization Seed, your game may grind to a halt. The NWN2 developers recommend no more than 5 trees generated in this manner, per area.]


Resizing

There is another easier way (and less demanding for the CPU, too) to make identical tree models appear different: by resizing the model.

Since all 3D models are in fact contained within a cuboid (a so called 3-dimensional rectangle) — that's the green lines you see when you select a model — we can resize a model by changing the size of the cuboid.

A cuboid is essentially a box (or 3 dimensional rectangle) with the dimensions: width (w) x depth (d) x height (h). A tree grown within a cuboid will not be able to extend beyond the walls of the cuboid. Hence, by resizing the cuboid (by height, by width, or by depth), we can force the tree to appear differently.

Trivia: What do you call a cuboid that is equal on all sides (w=d=h)?


If you have changed one of the Spruce to "Random Seed = 10200", change it back to 481259. Or you can delete the Spruce (10200), and add a new one (by default, they all have a Random Seed of 481259).

Now, change the scale of the cuboid (Spruce) from 1, 1, 1 to 0.7, 0.8, 0.8. Check out the new tree in the image below: we have a smaller tree! (If you want a larger tree, use a number that is larger than 1. You can change from just 1 to all 3 numbers.)


Even though both of my Spruce are of Random Seed 481259, they really looked different. Since they are from the same Random Seed, there is no additional load on the CPU processing power. The game will run just as fast with two tree as it is with one tree!



Continue to » Practice No.1