Jump to content

Animated flipbook texture not working in-game


Recommended Posts

SOLVED

 

I created an animating texture in nifskope applied to a 2D plane using the NiFlipController and comparing with fireopenlarge which is also an animated texture. However, I'm at a bit of a standstill. The texture animates correctly in nifskope but only displays the first frame when I test it out in Oblivion. No animating textures seem to need a script telling it to play.

 

I'm providing a download link so you can check it out. The link contains the NIF and DDS textures of the flipbook test as well as "fireopenlarge" and associated textures so you can compare and contrast. Don't change the name of the folder as it will break the linkage of the textures and they won't show up on the model in nifskope.

 

http://www.mediafire.com/download/vv272dfpqqbcu6u/DS04_animTexture.zip

Edited by DarkSpyda04
Link to comment
Share on other sites

The game engine doesn't actually support animated textures, even though the meshes do. Meshes such as FireOpenLarge animate physically, but the texture remains static; it never cycles past the first texture file in the list. This is also true with the flame atronach mesh. One workaround is to use a script that combines a timer function (tutorial here) with the OBSE SetTexturePath command.

Link to comment
Share on other sites

SetTexturePath isn't working. Can I have a specific example of the usage of setTexturePath? So far I have "FlipbookREF01.setTexturePath textures\animateTexTest\Frame02.dds"

 

EDIT: Personal input here but it kills me that I have to wait so long for support. Back on the Resident Evil I 2 3 forums, you'd get your question answered in less than a day. And it bothers me so much when I have to sit here and can't get any work done. Sorry if I'm a bit opinionated but with how many people that mod Oblivion, this place ought to be more active. Maybe then you wouldn't end up having people with these brilliant, brilliant ideas get discouraged and give up.

 

I'm getting the feeling that this animated texture just doesn't like me. Do I maybe have to refresh the reference object somehow?

 

Okay, trying to get this to work IS F***ING DRIVING ME INSANE

Edited by DarkSpyda04
Link to comment
Share on other sites

Not sure what belongs into the path string, whether it's slash or backslash, if it starts with "textures" or somewhere else, but the path string itself must be defined in quotes, of course, or it won't be a string but tried to be interpreted as an EditorID or variable name. So a correct syntax example of your above line would be:

 

FlipbookREF01.setTexturePath "textures\animateTexTest\Frame02.dds"

I'm not 100% sure though if this function can work on a reference directly, as done here, or if it's one of those requiring a Base Object rather. But then it would affect all copies of the flipbook placed anywhere in the game at once.

However, the proper syntax for that approach would be:

 

setTexturePath "textures\animateTexTest\Frame02.dds" Flipbook01

"Flipbook01" here being the Base Object of the "FlipbookREF01" persistent reference.

I really do hope the first approach will work already though. The latter is less than sub-optimal in many regards.

 

One other thing coming into mind though is that usually items already placed in the game or rendered once do not update their visuals unless told so via Update3D.

Link to comment
Share on other sites

Hm... I used Update3D and the object flashed when tested out, proving that the texture did indeed refresh. However, it still did not update to Frame02. I have a feeling that I'm doing something wrong with SetTexturePath but it's hard to say what exactly. Trying the same with the base object didn't work, either.

Link to comment
Share on other sites

I think the issue is with the flipbook. It doesn't appear to be an object the texture of which is defined in the CS but rather in the NIF itself for each individual mesh of it.

SetTexturePath cannot access into NIF files, indicated by there not being a way to instruct it which NiTriStrips/Shapes block of a multi-mesh NIF is targeted to begin with.

Those OBSE functions can only ever access the object properties setup in the CS.

 

Now the original question remains. How do you make textures assigned in NIF files animate?

Link to comment
Share on other sites

To make the textures animate in nifskope, I compared and contrasted with fireopenlarge and did exactly what fireopenlarge did in order to get my own textures to animate.

 

-Inserted an NIFlipController

-Inserted NIFloatInterpolator

-InsertedNIFloatData

-Inserted 3 NISourceTexture

 

-Set NITexturingProperty controller to NIFlipController

-Set NIFlipController to NITexturingProperty

-Set NIFlipController Flags to 8

-Set NIFlipController frequency and stop time

-Set NIFlipController NumSources to 3 (since there are 3 frames)

-Set NIFlipController Sources to the source textures

-Set the path of each source texture

 

-SetNIFlipController Interpolator to NIFloatInterpolator

-SetNIFloatInterpolator Data to NIFloatData

-Set NIFloatData NumKeys to 4 (first key always starts at 0)

-Set NIFloatData Keys float data (first value is frame time, second is frame number)

 

Key0 - 0, 0 (play at time 0, this is the 0th frame)

Key1 - 0.5, 1 (play at time 0.5, this is the 1st frame)

Key2 - 1, 2 (play at time 1.0, this is the 2nd frame)

Key3 - 1.5, 3 (play at time 1.5, this is the 3rd frame)

 

The program seems to go through the textures automatically and I cannot manually tell it which ones to play. We could do some cool things if we could tell it which frame to do next but my current concern is getting the textures to animate in-game in any way I can.

 

I appreciate how your helping out, Drake and Vyper. Hopefully we can figure this out.

 

Hm... strange. I just noticed that the NIF animates when I preview it in the CS. Yet when I place the object somewhere in the game world and play the game or run the Havok Simulator, nothing happens. Of course the mesh doesn't have any attached .kf files but neither does fireopenlarge. Strange, strange, strange. Either way for what I intend to use the animation for I want to stay on the first frame and then start the animation on a trigger instead of looping automatically. I want to have a sphere dissolve on-trigger and animated textures is really the only way I can think of doing that. Doing what the SI Butterfly room did looks too complicated.

Edited by DarkSpyda04
Link to comment
Share on other sites

  • 4 weeks later...

CSE scripting had nothing to do with it. As it turns out, I simply forgot to include BSX flags in the NIF with "Havok" enabled. That's really all there was to it. Learned a lot more from Saidenstorm's site:

 

https://sites.google.com/site/saidenstorm/part6extendedanimationexports

 

To follow this tutorial, you need 3Ds Max 8, the Civilization IV plugin, and a DDS plugin.

 

Civ IV plugin

DDS plugin

 

You might also want the niftools plugin but it's not necessary for the tutorial.

 

When following the tutorial the sphere on the left following the spline does not appear to move in nifskope when you export it but I assure you it moves around when you get it into Oblivion.

 

EDIT:

 

Changing flags from "Clamp" to "Cycle" is also important or the object will be static.

Edited by DarkSpyda04
Link to comment
Share on other sites

  • Recently Browsing   0 members

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