Language Coding
Learn to translate Zoo Tycoon 2 animal names and Zoopedia entries using language XML files.
- Zoo Tycoon 2
- Scripting
- Reading time
- 8 min
- Comments
- 0
Learn to mesh, rig, animate, and code foliage using Blender and Nifskope.
by Hendrix
Danger
Difficulty: Advanced
Note
It’s best to start with a plant/tree that’s already skinned and coded! Knowledge of Blender and Nifskope is required!
Mesh your foliage item in Blender. Also UV it if required. (Go through Meshing tutorials if you don’t know how to mesh)
You have to give the foliage your own nodes.
Press SPACEBAR and select Add > Armature. Use Extrude to form the armature so it suits the tree.
Tip
Use not more than 5 nodes for the wood, otherwise animating gets too difficult. Use Another node for the leaves, so they can be moved a bit more.
Now you have to weight-paint the model to the nodes. If you’re not familiar with weight-painting, dalturge eplained it quite well in this topic:
Weight Painting Tutorial - Dalturge
The branches nodes should have full influence on your model (on the branches as well as on the leaves), so they are red.
For the leaves node, paint with low opacity (0.25 or similar) on the leaves. Make sure you have some places without influence for the leaves.
Now split the window of blender, in one screen you enable the timeline and the other one stays in 3D View.
Move to pose mode of the Armature.
Set the time frame to 50.
Press A so all nodes are selected.
Make sure the time controller on the timeline is on 0.
Press I > LocRot.
Move the time controller over to 10.
Now rotate each node a little bit (not more than a few degrees).
Selct A so everything is selected.
Press I > LocRot.
Repeat this till the time controller is on 50.
Now move the time controller back to 0.
Click the downside arrow (copies the current pose to the buffer).
Move the time controller back to 50.
Click the upside arrow (pastes the pose from the buffer).
Now, again select A and press I > LocRot.
Make sure the cursor is over the 3D Window and press Alt + A so you can watch the animation.
Note
If the foliage doesn’t move fluently, you have to repeat the stuff from above so it moves fluently.
Make sure you’re in the object mode and press A so everything’s selected. Export the model(s) and the armature.
Open the exported nif and a random foliage nif.
Remove the WHOLE NiLodGroup using Block > Remove Branch.
Go in the Block Details of the Scene Root node, open children and adjust the numbers so there is no more none-value.
Warning
IF YOU DONT DO THIS, THE GAME MIGHT CRASH!
Now, go to the exported model:
Click the play icon in nifskope to test if your animation works!
Select the origine node (maybe Scene Root) and rename it to something else, eg. the name of your foliage. Make sure there is NO Scene Root node in your exported model. Now use Copy Branch to paste the whole exported model into the BF model.
Make sure the node you have just renamed to the name of your foliage project is A CHILD of the Scene Root.
Also make sure that the NiKeyFrameControllers are also included!
Click the play icon again in nifskope to test if your animation still works!
Adjust the alpha properties and add a stencil property if required!
Important
Don’t forget to save!
Now you’re almost finished!
Open your foliage’s XML and paste this:
<BFForceUpdateWhenVisibleComponent />
below the model’s line.
So the mainobject part should look like this:
<BFNamedBinder binderName="mainObj">
<instance>
<BFPhysObj>
<BFSimpleLODComponent isBFR="true" modelfile="entities/objects/foliage/Sigillaria_Savannah/Sigillaria_Savannah"/>
<BFMultiGroundFitComponent heightOffset="0.0" forceTopLevel="true" />
<BFForceUpdateWhenVisibleComponent />
</BFPhysObj>
</instance>
<shared>
<BFSharedPhysVars>
<virtualNodes>
<Dock_Rampage1 y="-1.75" />
<Dock_Rampage2 x="-2.5" />
<Dock_Rampage3 y="2.5" />
<Dock_Rampage4 x="2.5" />
</virtualNodes>
</BFSharedPhysVars>
</shared>
</BFNamedBinder>
OK, that’s it! If you have any problems or questions, please PM me!
Learn to translate Zoo Tycoon 2 animal names and Zoopedia entries using language XML files.
by Ghost
Learn to disable animal cleaning and make animal waste invisible and odorless.
Comments 0
Log in to join the conversation.
No comments yet.