Difference between revisions of "Making Rides"

m (Assign an animation to an object)
(Some proper-name fixes. Some changes to make it clearer.)
Line 1: Line 1:
 
There comes a time when you want to have a ride to take the player from one place to another, and you'd want that ride to be a little more complex than just a platform moving backwards and forwards.
 
There comes a time when you want to have a ride to take the player from one place to another, and you'd want that ride to be a little more complex than just a platform moving backwards and forwards.
  
The purpose of this tutorial isn't how to use [[SubWorlds]], as that subject has already been covered, no the purpose of this tutorial is how to use a Wizard that has been written by Grogyan with help from FunkyWyrm on Blender Artists and Lontahv here at the Guild of Writers
+
The purpose of this tutorial isn't how to use [[SubWorlds|Subworlds]], as that subject has already been covered, no the purpose of this tutorial is how to use a Wizard that has been written by Grogyan with help from FunkyWyrm on Blender Artists and Lontahv here at the Guild of Writers
  
  
Line 11: Line 11:
 
Also note that because this wizard isn't finished you will not be able to do things like pitch, roll and yaw
 
Also note that because this wizard isn't finished you will not be able to do things like pitch, roll and yaw
  
So this script will evolve along with PyPrp
+
So this script will evolve along with PyPRP
  
 
[http://grogyan.googlepages.com/Curve2IPO.zip Curve2IPO.zip]
 
[http://grogyan.googlepages.com/Curve2IPO.zip Curve2IPO.zip]
  
Just extract to your Blender Scripts directory the same as you would do with PyPrp
+
Just extract to your Blender Scripts directory the same as you would do with PyPRP
  
  
Line 41: Line 41:
 
== Making it a path ==
 
== Making it a path ==
  
One of the most important steps is to make sure its a path, so in the "Curve and Surface" pane, click the button "CurvePath" and whether the curve is already in 3d mode or not you should see in the 3D window a whole bunch of little arrows, these point the direct of te curve, currently the wizard will only handle a single direction of curve.
+
One of the most important steps is to make sure its a path, so in the "Curve and Surface" pane, click the button "CurvePath" and whether the curve is already in 3d mode or not you should see in the 3D window a whole bunch of little arrows, these point in the direct of the curve, currently the wizard will only handle a single direction of curve.
  
  
Line 76: Line 76:
 
== Adding Alc script ==
 
== Adding Alc script ==
  
this i'm going to leave blank because there are too many ways that this can be done.
+
this I'm going to leave blank because there are too many ways that this can be done.
  
But if you do want to use it for rides, then I suggest reading [http://guildofwriters.com/wiki/SubWorlds Sub Worlds]
+
But if you do want to use it for rides, then I suggest reading [http://guildofwriters.com/wiki/SubWorlds Subworlds]
  
  
Line 94: Line 94:
 
Also in the "Buttons" window under "Logic" or by pressing "F4" make each one an "Actor" and "Dynamic".
 
Also in the "Buttons" window under "Logic" or by pressing "F4" make each one an "Actor" and "Dynamic".
  
Now when you export your Age with PyPrp your ride will be waiting for you.
+
Now when you export your Age with PyPRP your ride will be waiting for you.
  
  
 
== Last thoughts ==
 
== Last thoughts ==
  
It is recommended that if you are using the curve as a ride for the avatar to ride on, that you create a new scene just for the ride, and set it up as a "Sub World".
+
It is recommended that if you are using the curve as a ride for the avatar to ride on, that you create a new scene just for the ride, and set your ride up as a Subworld.
 
This is how Cyan does it, and is good practice to follow their lead.
 
This is how Cyan does it, and is good practice to follow their lead.

Revision as of 22:15, 17 August 2008

There comes a time when you want to have a ride to take the player from one place to another, and you'd want that ride to be a little more complex than just a platform moving backwards and forwards.

The purpose of this tutorial isn't how to use Subworlds, as that subject has already been covered, no the purpose of this tutorial is how to use a Wizard that has been written by Grogyan with help from FunkyWyrm on Blender Artists and Lontahv here at the Guild of Writers


The Wizard

This wizard is not finished yet but is usable

Also note that because this wizard isn't finished you will not be able to do things like pitch, roll and yaw

So this script will evolve along with PyPRP

Curve2IPO.zip

Just extract to your Blender Scripts directory the same as you would do with PyPRP


Create a curve

Before you can use this wizard you need to do some things, first of all you need a curve, and not just any curve, it must be a Bezier Curve, so either using the Add menu on the top tool bar or press the spacebar in the 3D window select Add -> Curve -> Bezier Curve (recommended)or Add -> Curve -> Bezier Circle for cyclic curves ie curves that go round in "circles"

Switch to edit mode and for in the case of a single Bezier Curve select a knot, a knot has two handles on either side amd whilst holding down the Ctrl key left click your mouse and place curve segments.


Making it a 3D curve

Great you have a curve, so now what, are you wanting it in 3D space or not, well assuming you want it to be a curve in 3D, you need to switch back to Object mode, so press the "Tab" key. Now in another window, make it a buttons menu. Switch to the editing buttons or press the "F9" key

You should now see a whole bunch of buttons and settings relating to curves called in the "Curve and surface" pane.

Looking in this pane you should see a button called "3D" by selecting this you'll be able to manipulate the curve in all 3 dimensions


Making it a path

One of the most important steps is to make sure its a path, so in the "Curve and Surface" pane, click the button "CurvePath" and whether the curve is already in 3d mode or not you should see in the 3D window a whole bunch of little arrows, these point in the direct of the curve, currently the wizard will only handle a single direction of curve.


Animation length

Next is the step where you tell the wizard how long or smooth the animation will be, so still in the "Curve and Surface" pane look for a box that says "PathLen" and change the value here for how long the animation will be in game, (recommended you stay in a length divisible by 30 and leaving no remainder), if the animation cuts out too soon then you'll need to do the following. Switch to the Scene buttons or press "F10", select the "Anim" tab in the "Anim Bake" pane and then change the "End" value (in frames) to something higher. This is a global setting so it will affect all animations in your Age if this number is too small.


Giving it a name

Now I have done most of the work for you here, so all you need to do is give the curve a name, give it something meaningful. You can do this this way (recommended), in the 3D window open up the "Transform Properties" mini window, you can also press the "N" key while the mouse cursor is in the 3D window. Where it says "OB:" enter a name to the curve.


Generate the interpolation 2D curves

Ready to generate your interpolation curves? Make one window a "Ipo Curve Editor" window or split an existing one. Go back to the 3D window and select the curve in "Object Mode" Switch one window temporaily to a "Scripts" window and from the menu select Scripts -> Wizards -> Curve2IPO If you want you can look in the Blender console to see a printout off all the curves generated.


Assign an animation to an object

I recommend you add an "Empty" to the 3D window, make it X-ray. With the empty selected, and with the "Transform Properties" mini window still up, make sure all values here are zero for Location (Loc) and rotation (Rot). In the "Ipo Curve Editor" find a drop down menu. Select the animation generated by the wizard.

Adding Alc script

this I'm going to leave blank because there are too many ways that this can be done.

But if you do want to use it for rides, then I suggest reading Subworlds


Complex ride

He he, now for the the fun stuff. If you havn't done so already you can preview the animation in the "3D Window" by pressing Alt+A, and press "Esc" when you have had enough.

You can model anything you want for the ride, but it must be at the "world origin", thats where all 3 axes meet, you can also make animations for any mesh seperate and triggerable by regions and AlcScript, which I am not going to go into here.

Just remember that with everything modelled around the world origin, you need to give them each a constraint, so in the "Buttons" window, select the "Objects" button or press "F8". On the far right hand side here you'll see a pane called "Constraints", add one for each mesh. Each will be a constraint "ChildOf". Enter in the "OB:" box the name of the Empty and press "Enter". Also in the "Buttons" window under "Logic" or by pressing "F4" make each one an "Actor" and "Dynamic".

Now when you export your Age with PyPRP your ride will be waiting for you.


Last thoughts

It is recommended that if you are using the curve as a ride for the avatar to ride on, that you create a new scene just for the ride, and set your ride up as a Subworld. This is how Cyan does it, and is good practice to follow their lead.