Tutorial - Animated Textures With Blender

Post » Sat May 28, 2011 12:37 am

Tutorial
Animated Textures With Blender



Ok, this subject isn't new, but after I nearly had forgotten all the details after some month, I decided to write this small tutorial, so that I can read it again in case my memory does lack again some day!!! :)

What is new is, that you need not do any tweaks to the exported nif in NifSkope anymore to make it work. All you need is Blender and the newest test-build of the nifscripts. BIG THX goes to Amorilia and NifTools team who once again worked on the nifscripts for good old Morrowind to make this possible!!! The newest build needs still to be tested and some things might also be changed and/ or added in progress, but for animated textures it already does work fine and those of you familiar with Blender and interested in animation may get the nifscripts with that new feature here (see first post!!!):

http://niftools.sourceforge.net/forum/viewtopic.php?f=13&t=2604


Now to the tutorial!!! ;) I won't explain Blender basics to you now, you yet should know how to make a basic model and apply a UV-Map to it. If not, there are tons of good tutorials out on the net!!!


1. Let's say you wan't to make new water meshes, which is a thing requested rather often. Just make your 3D model, in most cases simple plane shapes and apply a UV-map to it. Now choose any texture you like for testing. You also need a camera capturing your model and a lamp to lighten the scene. I have hidden them (H=hide, alt+H=unhide) till I need them. Now go into the material buttons as you can see on the first image.

http://img62.imageshack.us/img62/3571/anitex01.jpg

On the very right in the panel "Map Input" there are the properties of the texture's ofset!!! To animate the texture you will just have to declare at what time (frame) the texture has to be at what position (offset). Now look at the next picture, there is a box where you can insert your desired frame. Frame with the lowest number will be your start frame, frame with the highest number you stop frame, if not declared otherwise.

You can insert a frame number by leftclicking inside the box and typing in manually. You can move single frames up and down using the arrows next to the box or jou can jump up and down 10 frames by pressing the direction keys on your keyboard up or down.


http://img251.imageshack.us/img251/5849/anitex02.jpg


2. My animation will begin at frame "1", so I will leave the box untouched. ´Now I go to the offset-properties and declare the starting position of my texture. In my case I leave it untouched too. To record your setting per frame you will have to insert a so called "key". Therefore you have to place the cursor above the material buttons window (it's the whole area at screen bottom!!!) and press "I" for "insert". As we want to record the offset, we choose "ofs".

Now we have to up with our frames somewhat, I went up to frame 100, which gives you the spead of a powerful streamy river I'd say. Note, you can influence the speed of the texture's movement across the mesh by changing the frames or the ofset. If I let the texture move a large distance in few frames it will get fast and the other way round. You will have to play with it to figure out the right speed and I'll show you how to preview it in Blender lateron!!!

At frame "100" I choose an ofset for x-axis of "10", which means, my texture will get moved from one end of the mesh to the other. You can try to type in higher numbers, but it will be resetedand replaced by "10". Now I record the new position of the ttexture by repeating the procedure. Cursor above the material buttons, press "I" and insert another key for ofset.

3. We're almost done, now let's preview our animated texture. You need to set up camera, lamp and mesh similar to what you see onm the picture. If you go to camera view you can position the whole thing more precise.

Now switch to the "Scene buttons" (shortcut F10) and in the "Anim" panel press "play" (note, frames have to be set back to "1" again to view the whole animation)!!! Left to the "Anim" panel you see the "Render panel", where I've set rendering size to 25% to make rendering the preview much faster.

http://img710.imageshack.us/img710/1029/anitex03.jpg

The speed of the animation here in Blender may differ a bit from that ingame though!!!


4. Last thing we have to do is exporting our model as nif with ssame settings as on the last picture

http://img534.imageshack.us/img534/3183/anitex04.jpg


Take the exported nif, put it into the meshes-folder or your subfolder, update texture paths (NifSkope), in case your test-texture isn't already one frome the MW textures-folder and in CS just set the nif up as an activator. Might be it even works as static, Vanilla nifs of that animation type do, but I haven't tested this for those exported with the new nifscripts yet. I bet it will work!!! :)


PS: I know, after all these years my english still isn't the best, so please ask if You can't figure out how I meant this and that or if I jsut made a mistake or left something important out!!!

Btw, can somebody please make me some new watermeshes for my current WIP?!!! :)


Greets, TheDaywalker!!!! :rock:
User avatar
Jarrett Willis
 
Posts: 3409
Joined: Thu Jul 19, 2007 6:01 pm

Post » Sat May 28, 2011 7:21 am

Thanks TDW.

This is an animated UV map right? I haven't messed with these before, but they look interesting.
What kind of effects can you/ have you made with this? I've got some interesting ideas for using it, with rotations and scalling.

I'll test out the meshes for you if no one else has (though someone probably has I guess). :)
P.S you use way too many exclamation marks!!!!!! :P
User avatar
Chris BEvan
 
Posts: 3359
Joined: Mon Jul 02, 2007 4:40 pm

Post » Fri May 27, 2011 11:20 pm

Yap, it should be "Animated UV-maps", but I guess people can better get a picture of what this is about by using the word "texture"!!!

Sofar I tested this on new waterfall meshes and an animated weapon. Didn't test sizing the UV yet, can't think of what for I should use this??? Rotation isn't suported in Blender, just normal ofset!!! I have made no special test-meshes, I always use simple square planes for testing, nothing I could send you!!! :)


PS: Sry for the vast amount of exclamation marks, but as the content of my posts is absolutely boring most of the time plus this forum does not support dealing out electro-shocks to get the readers' full attention, I have to use those signs...and I love it!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! :rock:


TheDaywalker :rock:
User avatar
Rachyroo
 
Posts: 3415
Joined: Tue Jun 20, 2006 11:23 pm

Post » Fri May 27, 2011 10:58 pm

Haha, it's okay!!!

Somehow I got 'make some new water meshes' mixed up with 'test some new water meshes'... I have no idea how! :wacko:
If you need some watermeshes made, you should ask C_Mireneye, he made some great waterfalls:

http://www.gamesas.com/index.php?/topic/1077252-wip/page__view__findpost__p__15740012

Well, very nice tutorial mate, I'll have to try it out.
You should put it into a .pdf or .doc file and get it posted up on Nexus or PlanetElderScrolls, these CS forums don't get much attention.
User avatar
Catherine N
 
Posts: 3407
Joined: Sat Jan 27, 2007 9:58 pm

Post » Sat May 28, 2011 3:38 am

The other often-requested feature is the "flip" controller which cycles through a series of images (eg. the water meshes) - the Blender NIF scripts have support for these for almost forever, and NifSkope has had spells for adding and managing them since 1.0.21 :)

Hrm... that gives me an idea, to combine a flip controller with a UV controller for flowing water... :rolleyes:

Edit: how's this (http://www.sendspace.com/file/msrz47)?
User avatar
Josephine Gowing
 
Posts: 3545
Joined: Fri Jun 30, 2006 12:41 pm

Post » Sat May 28, 2011 2:26 am

That water .nif looks really good. :)

Did you use NifSkope or Blender to make that? And which would you suggest using for making NiFlipControllers?
Could you perhaps, if you have time, and if there isn't one already, write a tutorial on how to make them, and combine it with TDW's and get it posted up somewhere, perhaps the Wiki?

Sorry if I'm asking you to explain something really obvious, I haven't tried making animated textures before, but could really use the knowledge for making a certain creature in the future. :)
User avatar
Prue
 
Posts: 3425
Joined: Sun Feb 11, 2007 4:27 am

Post » Sat May 28, 2011 9:23 am

I used NifSkope - I already had the flip controller, and hand-coded the UV controller :) Look for the spells "Texture->Add Flip Controller" on a NiTexturingProperty, and "Texture->Edit Flip Controller" on a NiFlipController - http://i211.photobucket.com/albums/bb189/NifTools/NifSkope/flipcontroller_edit.png should be self explanatory (and yes, you can manually edit entries, and texture paths are adjusted once you hit save) ;)
User avatar
TIhIsmc L Griot
 
Posts: 3405
Joined: Fri Aug 03, 2007 6:59 pm

Post » Fri May 27, 2011 8:54 pm

Too bad I can't use nifskope 1.2.0 and higher. My PC always gives me an error like windows tried to execute the programm in an unusual way... :(


TheDaywalker :rock.
User avatar
marina
 
Posts: 3401
Joined: Tue Mar 13, 2007 10:02 pm

Post » Fri May 27, 2011 7:43 pm

Thanks, that looks really easy as well. I'll have to try it out later. :)
User avatar
Epul Kedah
 
Posts: 3545
Joined: Tue Oct 09, 2007 3:35 am

Post » Fri May 27, 2011 6:54 pm

Can anyone confirm that this works with latest Nifscripts? I'm using Blender 2.49b and the latest version of nifskope which crashes when trying to open the nif. :(

I get the error:

Array keys much too large. 1081902660 bytes requested
failed to load bloock number 4 (NiUVData) previous block was NiUVController

User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Post » Sat May 28, 2011 8:30 am

Never mind, I figured this out. Gotta use latest beta of nifscripts and Pyffi for it to work.

Good tut! :thumbsup:
User avatar
Maya Maya
 
Posts: 3511
Joined: Wed Jul 05, 2006 7:35 pm


Return to III - Morrowind