Ship animations?(please help!)

Talon1

Semi-Intermediate Add-on Dev.
Addon Developer
Joined
Aug 16, 2008
Messages
282
Reaction score
0
Points
0
Location
Secret Underground Moon Base? XD
Ok, i've made my very 1st ship, the X-1 (a simple tube & wing delta wing, single engine, and crudly textured airplane) 2 days ago, & also my 2nd ship, the X-2 (same as the X-1, exept this one has 2 booster engines at the back, a cockpit made out of a deformed sphere at the front, and a better texturing job) yesterday. But now I want to make a new ship called the X-3, but this time I want to make it have animated landing gears, but I have no idea how. So can someone tell how to?

Note: The program I use to make the 3D models is anim8or
 
Last edited:

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Unless you know C++, you'll probably want to use Vinka's Spacecraft3.dll to do this. You can pick it up here: http://users.swing.be/vinka/. Be sure to get the patch as well. Read the documentation that comes with Spacecraft3, and look carefully at the .ini files of the example Delta-Gliders that come with the package to see how the animation of the wheels are done.

As the animations are done with mesh groups, I'd really recommend picking up a copy of Ar81's Mesh Wizard to help identify the mesh groups you'll be animating. It's available at Orbit Hanger here: [ame="http://www.orbithangar.com/searchid.php?ID=2740"]Mesh Wizard 1.9d[/ame]

Good luck, and have fun!
 

Talon1

Semi-Intermediate Add-on Dev.
Addon Developer
Joined
Aug 16, 2008
Messages
282
Reaction score
0
Points
0
Location
Secret Underground Moon Base? XD
Thanks for the help

Thanks for the help n0mad23, my new ship the X-3 is flying nicely, but the gears still have a few problems.
This includes:

1. The rear left gear isn't moving

2. The front gear and rear right gear is moving, but their both not getting stowed in the right position

I think it's because the rotation points aren't in the right position, but I have no idea where are the coordinates of the true rotation points:hmm:

So I'll post my new ship on this thread, hoping that someone can help me fix the problem.
 
Last edited:

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
I had a look at your .ini file, and honestly I can't spot the problem. If it's any consolation, I find that so far in my limited SC3 animation experience most of my success comes from a hit and miss approach. Don't give up!

I would suggest upgrading to Spacecraft3 instead of using #2, just because it's the latest version.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
X-3 landing gear fix

I've been doing ALOT of modeling in Second Life as of late, and, been working quite a bit with rotations too. SL uses quaternions not Euler, but there are (thankfully) conversion functions so one can work in Euler, then convert to quats to do the actual rotations, either way, I've had quite a bit of experience toying with rotations as of late, so I tackled the issue and got it working... Try this X-3.ini :

[TEXTURE_LIST]
TEX_1=Exhaust_atrcs

[PARTICLESTREAM_1]
NAME=Contrail
SRCSIZE=8.0
SRCRATE=3
V0=150.0
SRCSPREAD=0.3
LIFETIME=3.5
GROWTHRATE=4
ATMSLOWDOWN=3.0
LTYPE=DIFFUSE
LEVELMAP=LVL_PSQRT
LMIN=0
LMAX=2
ATMSMAP=ATM_PLOG
AMIN=1e-4
AMAX=1

[PARTICLESTREAM_2]
NAME=Main
SRCSIZE=2.0
SRCRATE=10
V0=150.0
SRCSPREAD=0.1
LIFETIME=0.2
GROWTHRATE=16
ATMSLOWDOWN=1.0
LTYPE=EMISSIVE
LEVELMAP=LVL_SQRT
LMIN=0
LMAX=1
ATMSMAP=ATM_PLOG
AMIN=1e-5
AMAX=0.1

[CONFIG]
MESHNAME="X-3"
SIZE=25
EMPTY_MASS=10000
FUEL_MASS=20000
MAIN_THRUST=6e5
RETRO_THRUST=3e5
ATTITUDE_THRUST=6e5
ISP=50000
TRIM=0.05
PMI=(15.5,22.1,7.7)
CW_Z_POS=0.09
CW_Z_NEG=0.09
CW_X=2.
CW_Y=1.4
CROSS_SECTION=(53.0,186.9,25.9)
COG=2.47
PITCH_MOMENT_SCALE=0.00005
BANK_MOMENT_SCALE=0.00005
ROT_DRAG=(1.5,1.5,1.5)
WING_ASPECT=0.7
WING_EFFECTIVENESS=2.5
LAND_PT1=(0,-5,9)
LAND_PT2=(-4,-5,-5)
LAND_PT3=(4,-5,-5)
VISIBLE=1
CAMERA=(0,1.22,35)
MAIN_PSTREAM1=Contrail
MAIN_PSTREAM1=Main

[ANIM_SEQ_0]
; landing gear
KEY=G
DURATION=6

[ANIM_COMP_0]
; front gear
SEQ=0
GROUPS=4
RANGE=(0.1,0.5)
ROT_PNT=(0,0,12)
ROT_AXIS=(-1,0,0)
ANGLE=-58

[ANIM_COMP_1]
; rear left gear
SEQ=0
GROUPS=1
RANGE=(0.1,0.5)
ROT_PNT=(-2.25,-.75,0.0)
ROT_AXIS=(0,0,1)
ANGLE=90

[ANIM_COMP_2]
; rear right gear
SEQ=0
GROUPS=0
RANGE=(0.1,0.5)
ROT_PNT=(2.25,0.75,0)
ROT_AXIS=(0,0,1)
ANGLE=-90

[EX_MAIN_0]
OFF=(0,0,-27.1)
DIR=(0,0,-1)
LENGTH=70
WIDTH=3

[EX_MAIN_1]
OFF=(-3,1.25,-27.3)
DIR=(0,0,-1)
LENGTH=50
WIDTH=1

[EX_MAIN_2]
OFF=(0,3,-27.3)
DIR=(0,0,-1)
LENGTH=50
WIDTH=1

[EX_MAIN_3]
OFF=(3.05,1.25,-27.3)
DIR=(0,0,-1)
LENGTH=50
WIDTH=1

Let me know what you think. Oh, btw, you had the right landing gear labeled [ANIM_COMP_5], and I noticed the front was zero, and the left was 1, so I changed the right to [ANIM_COMP_2] and that's why it wasn't working.
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Animation How to

gear-figure.jpg



Ok, I was afraid you were going to ask..lol

Well, the basic thing is to look at the gear (or whatever you're working on), and visualize the point of rotation, then move that point of rotation (you have to modify 2 axes, either x,y, x,z or y,z depending on the situation.
Esentially, you have to manually 'visualize' where the point of rotation is based on how the item is moving, then adjust so that you can 'move' that point to where it needs to be, in this case, it needs to be at the top of the landing gear. In the case shown here, the rotation point would need to move quite a bit to the left, then up a tad so that the rotation point is right at the top of the gear.

Hope that helps.
2783427636



-----Posted Added-----


Maybe you can help me out. I've been playing around with the animation feature of spacecraft3.dll, and I'm having issue figuring out how to group prims together into a single object. For example, the landing gear has 3 prims, two wheels, and the cylinder. How do you group them such that the gear piece moves as a whole, and separate it from the rest of the model?

Thanks in advance, SpaceNut
 

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Spacenut,

I'm not sure I understand your question. Are you wanting to group the 2 wheels, and the cylinder together, but have the wheels move separately as well? Or are you asking how to make the 3 prims move together as a single object?
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Spacenut,

I'm not sure I understand your question. Are you wanting to group the 2 wheels, and the cylinder together, but have the wheels move separately as well? Or are you asking how to make the 3 prims move together as a single object?


I was trying to figure out how to 'group' prims together so they move as a single entity. I figured it out, you simply list all the (what mesh files call groups, which are actually prims) in the .ini file.. such as

GROUPS=2,3,13,14,15,16,17,18

I wound up making my own mesh from scratch, including landing gear that were a bit more detailed, and I was trying to move the gear as a single entity. The groups= above does that. I can see where AR81's mesh viewer would be helpful in figuring out what prim is what (group), but it didn't like my mesh, which had 27 groups due to the detailed (8 prim each x3) landing gears. It gave me an overflow error. Instead, I manually specified each 'group' in the ini file, saved, and saw which prim moved when I triggered the landing gear. A bit tedious, but I got it worked out. Not planning to release, as it's just tossed together, but I'm cutting my teeth for an eventual release down the road (with animations!). Thanks for the reply, but I figured it out myself :)
 

n0mad23

Addon Developer
Addon Developer
Joined
Feb 10, 2008
Messages
1,078
Reaction score
17
Points
0
Location
Montesano
Website
soundcloud.com
Spacenut,

Nice one. You'll continue to find that animations tend to be a bit tedious in creating, but ultimately well worth the effort. As another "cutting teeth" while looking towards an eventual release, hopefully we'll be able to compare some notes along the way.

One thing I really like about using Mesh Wizard is its ability to merge groups of identical materials and textures which becomes really important once your mesh gets complicated enough (consolidated, my Tortoise has over 350 groups). Naturally, this makes finding groups to be animated a bit easier to find.
 

Talon1

Semi-Intermediate Add-on Dev.
Addon Developer
Joined
Aug 16, 2008
Messages
282
Reaction score
0
Points
0
Location
Secret Underground Moon Base? XD
Thanks

Thanks for the help guys. Right now, i'm working on my new ship called the DeltaFighter. This ship has already been made by She'Da'Lier in orbit hanger mods, but it doesn't work; so i'll try to recreate it.
Later on, i'm also going to make the A2, a hypersonic airliner of the future (but it's still just a concept).
 

SpaceNut

New member
Joined
Jun 15, 2008
Messages
316
Reaction score
0
Points
0
Location
Lorain
Making life easier

I got the idea today at work of making a sort of template to make visualizing rotation points easier. I'll be working on it tonight, and post it if I get it done. It'll be a obj file you can import and paste into any existing mesh you're working on, then save it out as an obj file to covert to a mesh, then, in orbiter you'll have an 'overlay' in all 3 dimensions to help you locate rotation/attachment points. I'll let you all know how it comes out.

EDIT:
OK, I made my template thingy, I just need to do some work on the texturing (to add info).
It works great!

Some things I've learned about doing the rotations:
If:
Rotation Axis = X axis
Modify Rotation Point (ROT_PNT) on the Y and Z axes.

If:
Rotation Axis = Y axis
Modify Rotation Point (ROT_PNT) on the X and Z axes.

If:
Rotation Axis = Z axis
Modify Rotation Point (ROT_PNT) on the X and Y axes.

See the pattern, whatever axis of rotation, the rotational point is moved by adjusting the other two axes.

The initial rotation point is (0,0,0), which is at the center point of the mesh.

From the center of the mesh, and facing the mesh as if you were standing in front of it...
X positive is is to the left
X negative is to the right
Y positive is forward
Y negative is backward
Z positive is up
Z negative is down


Hope this information is helpful :)

EDIT AGAIN:

Ok! It's done. Usage is pretty simple. Load the 3ds file into anim8or (or whatever), load your mesh, copy it, and paste into the helper template mesh (center it on origin), and export it as a 3ds or obj or whatever you do on your way to making a mesh. After you've converted it to a mesh, name it HelperTemplate.msh and drop it in the mesh folder and run the scenario. There's an included doc that extracts to the addon doc folder, and spacecraft3.dll and the config file are included, so you can skip overwriting them if you want, I just included them in case someone doesn't have it.

Feed back welcome, enjoy!
http://homepages.roadrunner.com/johanlaurasia/HelperTemplate.zip
 
Last edited:
Top