Jump to content

Getting a Simple Rotation animation from Blender to Game?


jamochawoke

Recommended Posts

Ok well it's actually a rotation and scale animation :P.

 

What I have are two semi-transparent spheres with different textures on them. This is my current attempt at the refraction object I mentioned in another thread. Got some things to work and I noticed all of Vanilla's (and Midas') refractions use animations to get the "warp" effect.

 

So I figured I could just scale the two spheres together to get them to "pulse" and then have them rotating. I followed a tutorial on how to do simple animations in Blender using keyframes and the timeline and everything seemed to have worked as I was able to play it in Blender and then exported the nif file, opened it up in nifskope, and it played in there too.

 

In-game however is another story. I noticed that my object is a static. Will that have any bearing on it? Will I need to make it an activator and attach a script? If so how do I get it to play all the time instead of onactivate? Just have the script run in gamemode?

 

Also, after looking at other activator object scripts they all have playgroups with names that are played like "forward" and "backward" or just "1".

 

I did try to make a script that just had the playgroup command but I don't have a name for the animation... and I don't know how to setup a playgroup name in Blender.

 

Any help?

Link to comment
Share on other sites

I have never made any activator animation, or other non-character ones. And I don't even know how to visualize the switch animation in Blender. But looking into the switch nif I can see some similarities.

 

First off, the names of possible AnimGroups as parameter for the playgroup command are hard-coded. They are the same as for character animations. See AnimGroups. So forward and backward are possible. The "1" you saw is only a playgroup flag which means "immediate".

 

When you look into the nif you'LL see a NiControllerManager node, which contains possible animations (NiControllerSequence). For ARSwitch01 these are forward and backward.

 

In the NiControllerSequence you might need to change cycle type from "CyCLE_Clamp" (one time) to "Cycle_Loop" (continuous). That's what you always have to change in cycling character animations, since Blender/export simply can't handle that.

 

THen for each animation you find a NiTransformInterpolator -> NiTransformData. There you find the animation data: rotation, translation, and scale. It's possible (for characters) to change these values, and even add or remove some elements. So this could be one way to change scaling.

Link to comment
Share on other sites

When you look into the nif you'LL see a NiControllerManager node, which contains possible animations (NiControllerSequence). For ARSwitch01 these are forward and backward.

 

In the NiControllerSequence

 

THen for each animation you find a NiTransformInterpolator -> NiTransformData

 

None of these are present in the nif. What is present are NiTextKeyExtraData and 2 NiTransformController nodes.

 

I had a look in to the static mesh of NDbarriersmallcrypt.nif (what I have been trying to copy this whole time as an effect) and I notice it DOES have:

 

1 NiControllerManager

4 NiControllerSequence

 

Am I just making the animation in Blender wrong or am I exporting it wrong?

 

 

This is how I did it:

 

1) Loaded up the nif file of the two spheres.

2) At frame 1 made a keyframe of the scale and rotation

3) At frame 11 changed scale and rotation and then made a keyframe

4) Repeated this every 10 frames

5) In the timeline chose the beginning and ending frames

6) Did a quick playback to see my changes in place and it animates correctly

7) Exported to nif using these settings:

 

Export Geometry + Animation (nif)

 

Force DDS Extension

Stripify Geometries

Stitch Strips

Smoothen inter-object seams

 

Export Skin Partition

 

Do Not Use Blender Collision Properties

Link to comment
Share on other sites

Sorry, jamochawoke, can't help you any further. :unsure: I would be interested though if you find a link on how to make these kind of animations for Oblivion.

 

How did you manage at all to change the animation of this mesh? Where does this NDbarriersmallcrypt.nif come from? Its not one of the vanilla meshes.

Link to comment
Share on other sites

It's from Knights of the Nine. There's two barrier nifs and they are pretty complex as they have emitter meshes, animated refraction meshes, construction set objects that don't show up in-game, and particle systems in them. They are the barriers that show up in the final fight with Umaril the Unfeathered before the spirit plane when you are in his Ayleid base. They keep you from going back and forth between zones and force you to progress through the zone as the quest script and different activators in the zone activate and deactivate them as the quest unfolds.

 

I think they were done in 3DS Max. I have a copy of Max but got so wrapped up in Blender haven't spent any time learning Max (and honestly not excited to learn a new 3D program from scratch either...).

 

I've seen simple rotations done like this before such as some of the animated staves by Trollf.

Link to comment
Share on other sites

Ok followed this http://niftools.sourceforge.net/forum/viewtopic.php?f=22&t=2716

 

and got those blocks in the nif you were talking about.

 

Still doesn't animate in-game. So I went ahead and made an activator with the nif in it and a script attached to playgroup forward 1 (the animation file kf was named forward so it set that as the playgroup name when I attached the .kf).

 

But... nothing.

 

I'm just really really frustrated right now :/

Link to comment
Share on other sites

Again, I feel with you, but no experience whatsoever. I don't even know how to make the animation visible in Blender. (Can you tell me?)

 

The post you have linked to talks about separating mesh and animation. Have you done that?

 

What "bone" are you using for animation? In the "ARSwitch01.nif" I was using as a reference before, I saw that the animation was controlled by something called "ARSwitch01 NonAccum". This is very similar to character animation where you have a "Bip01 NonAccum" bone.

Link to comment
Share on other sites

I'm just using simple mesh rotations and scales so there is no bone, just rotating the mesh around the obdata node. The nifs I was looking at also didn't have any bones animating them.... looked like mesh morphs.

 

The ARSwitch01.nif has a bone to control the actual switch and the switch mesh is rigged to that bone iirc. I'm not doing anything as fancy as that.

 

Apparently someone did exactly what I am trying to do here: http://www.gamefallout.com/help-with-animated-object-t36461.html

 

But I can't figure out how.

Edited by jamochawoke
Link to comment
Share on other sites

I don't even know how to make the animation visible in Blender. (Can you tell me?)

 

You can view animations in the render window or by splitting one of the 3D windows and in the windows button in the bottom left-hand corner you can switch it to "Timeline" view. Once in timeline view you can simply click the play button (there's play/pause/next/back buttons on the far right, might have to stretch it out to see it).

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...