|
Thread: Converting 3D NiF-format to Heroes3, step by step | This thread is pages long: 1 2 · NEXT» |
|
itsjustme
Promising
Known Hero
|
posted July 04, 2010 07:05 PM |
bonus applied by angelito on 11 Jul 2010. |
|
Converting 3D NiF-format to Heroes3, step by step
List of games used NIF-format for 3D:
Dark Age of Camelot
Defense Grid: The Awakening
The Elder Scrolls IV: Oblivion
Empire Earth II
Empire Earth III
Fallout 3
Freedom Force vs The 3rd Reich
The Guild 2
Kohan II: Kings of War
Playboy: The Mansion
Red Ocean
Sid Meier’s Civilization IV
Sid Meier’s Pirates!
Sovereign Symphony
Warhammer Online: Age of Reckoning
Call of Cthulhu
Dark Age of Camelot
The Elder Scrolls III: Morrowind
Entropia Universe
Freedom Force
Futurama
Prince of Persia 3D
0. What is it.
1) NIF-files contain models of units.
2) KF-files contain animations for models. Some animations can be applied to different models, and some can not.
3) DDS- and TGA (in rare cases) files - this is texture for models.
4) MAX-files is format for 3DS, can contain models, scenes, animations.
I. What we need.
1) 3DS MAX. Installed.
2) NifTools MAX plugin. Installed. Download
3) To simplify works, create directory, where you will be based currently worked model(s). It is now work directory.
4) And, of course, you need model(s) to work. Copy model (NIF-, KF-, DDS-files from directory) to work directory.
Ib. What I recommend.
3) IrfanView with "formats" plugin or any other fast viewer for DDS-graphic files. Download
4) Paint.NET for converting from DDS to other graphic formats (PNG, BMP, not remmended JPG) or other such program (DDS Converter).
5) NifSkope to view NIF- and KF-files. Download
II. Customize your 3DS MAX.
1) Add work directory. Open menu "Customize->Configure User Paths...". In the popup window select the tab "External Files" and add folder with you model's directory ( Ia, 3).
2) To prevent "cyan-pixel's problem" . Open menu "Customize->Preferences...", select tab "Rendering", check "Don't Antialias Against Background".
3) See in lower right corner (viewport panel). It is a panel to change viewport only. Right click on this panel. In popup window "Viewport Configaration" select tab "Layout". Click in "Perspective"-rectangle and check "User" viewpot. OK.
4) Maximize viewport for better viewing, by clicking in "Maximize Viewport Toggle" button in viewport panel. (click again to minimize)
5) Maximize your 3DS (if not maximized). Restore it and try to set size of you 3DS, like in screenshot. Viewport must have width 450 pixels, height - 400, plus or minus some pixels. This manipulations helps you to better placing model before rendering. After this operation maximize window again for better viewing model.
You can also check "Match Bitmap" in "Viewport Background" and you can always work in maximized window.
III. Opening model, animation.
1) Open Menu "File->Import..." and select NIF-file with model to import. If you find "freeze" in filename, don't open it - it is not what we are looking for. Open this file. I am opening "Berber Cavalry" from one mod for Civ4.
2) In popoup window check options, what I am recommending for you. Click "Import".
3) Now, as you see, model is loaded and automatically selected. Save this model as max-file, I recommend to save with short name, for example I save this as "berbcav.max". Now I named it just model.
Press F9 on keyboard and see. Hehe, 5% of all works done.
4) Now, import animation, i.e. KF-file. Remember, that you must have opened model before import KF-files. Menu "File->Import...", select, for example, KF with "run" suffix.
Verify, that you have all chcked boxes in popup window and import animation.
5) Position of model have changes. To play animation or view one of the frames, you can drag slidebar in animation panel or click in number of frame, or click in "Play Animation" button.
6) Save animation as max-file. I name it "berbcav_run(16)", because it is running animation an have 16 frames. It is very useful to save action and number of frame in animation-file.
7) Now open model again, import other animation and save it with adequate filename. Repeat this for all animations, what you need.
8) If you see, that animation is bad, try to reset viewport (File->Reset) of 3DS, import model and import animation again. You can try also to close 3DS MAX and open again, instead of reset. If animation is bad again, try to use other animation or other model - they are maybe broken or imcompatible. During imports, I have one bad animation. After 3DS-restart it is imports correctly.
IV. Prepare scene and Renderer.
1) Now you have all animation, what you need. For example, my list:
berbcav_attb(21).max
berbcav_atta(21).max
berbcav_idle(80).max
berbcav_hurtb(21).max
berbcav_hurta(22).max
berbcav_fortb(19).max
berbcav_forta(18).max
berbcav_diea(31).max
berbcav_run(16).max
You need to make special scene for rendering. Find in your list max-file with longest animation. In my list it is "berbcav_idle(80).max". Open this file.
Also I recommend for you to use special background image with same hexes, as in battlefield.
2) By using viewport panel's tools "Arc Rotate Selected", "Zoom", "Pan View" change position of view to Heroes3 format.
3) OK, scene is ready, save it with "base" suffix. For example "berbcav_base.max".
4) Now you need to customize Renderer. Menu "Rendering->Environment...". In popup window change "Background:Color" to cyan (or other) and change "Ambient" to 160 (or other.
5) Menu "Rendering->Render...". Select "Common" tab. Set "Range" (0 : 80) (here 80 is a number of frames in current animation). Set "Width" 450 and "Height" 400. Set name for rendered images. Remember, that for Heroes3 format you need names with length 12, where 3 of this is extension, 1 - dot, 4 - number of rendered frame.
6) Open "Renderer" tab and check "Antialiasing, select "Filter" "Catmull-Rom" (or other at your own risk).
7) Now you need to clear scene. Menu "Edit->Select All" (or CTRL+A), Menu "Edit->Delete" (or Del). Scene cleared, save it.
Also, you can remove grid in scene - menu "Views->Grids->Show home grid".
V. Rendering.
1) For render you need to merge animation into "base"-scene. Open "base"-scene. Menu "File->Merge...", select animation and merge it. In popup window click "All" to add all from animation. OK. Remember nuber of frame in merged animation. For example, I merge attack-animation with 21 frames.
2) If model merged good, but place of model is not, you can use tool "Select And Move" in top-toolbar and change position of model by moving mose at your own risk(!).
3) Rendering. Open menu "Rendering->Render..." (or press F10), go to "Common" tab. In "Time Output" subsection set "Range" from zero to number of frame in current animation (21 for me). Go to "Render Output" subsection, click on button "Files...". In popup window set name for your frames. For example, I set name "BecAtS" (Berberian cavalry Attack Straight). Set File Format to BMP (in following popup window you must set "RGB 24-bit" BMP). OK. Press big button "Render". While renderer works, you can see all rendered frames.
If you see, that images too dark or light, change "Ambient" color in menu "Rendering->Environment..." and render again.
4) For Heroes3 format you need 3 different attack (same as for shooting and dragon breath): attack straight, attack up, attack down. Now we have only attack straight. To make attack up or down, maximize 3DS, select all in scene ("Edit->Select All" or Ctrl+A), check menu "Edit->Rotate" (or click "Select and Rotate" in top toolbar), in low panel check button "Offset Mode Transform Type-In" (for precise changing) and put in "Z:" (vertical rotation)45 degree (or other). Now you have scene for attacking up. In render window change name for files (for me "BecAtU" - attack up). Render it! After render type in "Z:" -75 degree (or other), change name for frames and render.
5) Repeat this operation for all animation (clear scene, merge animation, change name for frames and change range of animations, render), what you need. This is all!
Thanks to Salamandre for some spell-checks, "testing" tutorial and advices.
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 04, 2010 07:09 PM |
|
|
|
T2_2112
Supreme Hero
|
posted July 04, 2010 07:11 PM |
|
Edited by T2_2112 at 19:13, 04 Jul 2010.
|
AMAZING, give him some star pls time to mass-pro 3D
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 05, 2010 07:54 AM |
|
|
I would like to add that animations from other games are much longer and detailed than Heroes ones. Unfortunately the attack and shoot HoMM animations are hardcoded on impact and giving too many frames i.e. to shoot will make the game crash. Also many will think that nice turn around can be added when attack up/down, or shoot up/down but they will do nothing else except delay the impact and screw visually the battle field timings.
So far, attack impact is triggered somewhere between 5th and 7th frame (and get hit/defend follows this pattern as well!) and shoot greatly depends of the original unit. Orcs will shoot later (4th-5th frames) while archers on 2nd. So far I was unable to replace Gran Elves, game always crash, no matter the number of frames. If anyone can en-light me on that, it will be appreciated. In general shoot frames should not exceed 10 frames, attack 14-16 (you can use turn around at the end of attack to pivot back to standing frame).
Defend and Get hit should not start with standing frame, because when hit, standing frame is already in use. In general I skip the first 3-4 frames of them, same for returning back. It is a matter of taste after all, but still, too many frames which look good in def tool will not always have the desired effect in game. That's why it is always good to test the unit before ending the def.
I am still a bit confused about end moving frames, because I can't slow the def in Cranim.txt settings to see exactly what is going on (except move). My guess is that those frames are added to every action when unit moves, so the attack is delayed too. So far, I noticed that a lot of frames on "end move" will screw the turn left/right too.
And of course the perfect def would be the one where the body does not pivot when attacking down/up, but it requires breaking the animation and combine parts, a little more advanced knowledge of 3DS, which I don't have.
____________
Era II mods and utilities
|
|
LizardWarrior
Honorable
Legendary Hero
the reckoning is at hand
|
posted July 11, 2010 10:42 AM |
|
|
I donwload a model for 3DS and tried to put in heroes,but there is a proble with texture,I don't know how to put texture,how I can enalble texture?,please help me.Here in my 3DS max
Images of how is it:
____________
|
|
itsjustme
Promising
Known Hero
|
posted July 11, 2010 10:54 AM |
|
|
Short Answer for Lizzard Warrior and other warrior with untextured models.
Press "M" (open "Material Editor"), click on pipette ("Pick material from object"), click mouse on model and go to "Maps" subsection in Material Editor. With different shaders we have different wayys to set texture. For "Anisotropic", click on "Diffuse Color" and go to "Bitmap Parameters", click on "Bitmaps:" and select required texture.
|
|
LizardWarrior
Honorable
Legendary Hero
the reckoning is at hand
|
posted July 11, 2010 11:11 AM |
|
|
thanks
____________
|
|
Octavius
Hired Hero
For Conqueror
|
posted July 13, 2010 10:12 PM |
|
|
Thanks very much
____________
Sorry for my English...!
I want only to help...
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 14, 2010 07:00 AM |
|
|
I would remove Empire Earth II and III from the list, they use a nifcache extension which is impossible to break....but all add-ons to RTW are working.
____________
Era II mods and utilities
|
|
itsjustme
Promising
Known Hero
|
posted July 14, 2010 07:12 AM |
|
|
Quote: I would remove Empire Earth II and III from the list, they use a nifcache extension which is impossible to break....but all add-ons to RTW are working.
Empire Earth deleted from list.
And RTW is not used NIF-format.
About addons - good news. :-)
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 14, 2010 07:17 AM |
|
|
It seems one CIV modder managed to extract only buildings from EEII but he said that the method is long and tricky. Messaged him about more hints and waiting.
____________
Era II mods and utilities
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted July 14, 2010 07:41 AM |
|
|
Quote: And of course the perfect def would be the one where the body does not pivot when attacking down/up, but it requires breaking the animation and combine parts, a little more advanced knowledge of 3DS, which I don't have.
Quote myself: I should speak less and learn faster.
Pivot feature achieved.
____________
Era II mods and utilities
|
|
Avatar
Promising
Supreme Hero
|
posted July 18, 2010 12:47 PM |
|
|
I don't know anything about modding, but... what about Disciples 3? There's some tools for this game and maybe there's posiibility to convert d3 units into h3 style....
Look:
http://bitsmithy.com/forum/viewtopic.php?f=11&t=8&p=10&sid=a6d8a2a5015c6313869218321c96bf7c#p10
http://disciples3.ru/forum/showthread.php?t=7113
____________
|
|
itsjustme
Promising
Known Hero
|
posted July 18, 2010 12:59 PM |
|
|
Quote: I don't know anything about modding, but... what about Disciples 3? There's some tools for this game and maybe there's posiibility to convert d3 units into h3 style....
Look:
http://bitsmithy.com/forum/viewtopic.php?f=11&t=8&p=10&sid=a6d8a2a5015c6313869218321c96bf7c#p10
http://disciples3.ru/forum/showthread.php?t=7113
Thanks for links, but I have no D3 for testing.
____________
Hundreds of DEFs
|
|
T2_2112
Supreme Hero
|
posted July 18, 2010 05:40 PM |
|
Edited by T2_2112 at 17:40, 18 Jul 2010.
|
Quote: I don't know anything about modding, but... what about Disciples 3? There's some tools for this game and maybe there's posiibility to convert d3 units into h3 style....
Look:
http://bitsmithy.com/forum/viewtopic.php?f=11&t=8&p=10&sid=a6d8a2a5015c6313869218321c96bf7c#p10
http://disciples3.ru/forum/showthread.php?t=7113
1st link about the texture, 2nd i do not know, rus lang, i can not read it but thank you may be i will buy D3 for test
|
|
LizardWarrior
Honorable
Legendary Hero
the reckoning is at hand
|
posted August 07, 2010 09:48 AM |
|
|
you frogot a game who use DDS,Heroes of might and magic V
____________
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted May 15, 2012 09:35 PM |
|
Edited by majaczek at 22:22, 15 May 2012.
|
Please help me. I'm trying to rip content from mods for Oblivion using nifskope.
The problem is I have to combine two NIF files (model NIF and skeleton.nif from same directory) and I fail, but believe there's some automatic way. Animation is applied to skeleton.nif but textures and shapes are attached to model NIF file (for example Elephant.nif). I tried simple branch copy but it doesn't seem to work (skeleton walks but mesh doesn't). Could I get any help on this? (note the model work in the game, but Oblivion ALWAYS attach skeleton.nif to any model, and I fail do it automatically in nifskope).
@Down
I tried to do this without 3ds max (only nifskope or other free tools).
I finally managed to do it. It's way how it works for oblivion meshes:
1) copy all non-bones objects from model mesh to skeleton mesh
2) apply animation. if you copied original bones it won't work, but now it should.
PS: Here is newer NifSkope http://sourceforge.net/projects/niftools/files/nifskope/
I'll try to manage doing it with only free tools.
|
|
itsjustme
Promising
Known Hero
|
posted May 15, 2012 10:06 PM |
|
|
In model importing dialog in 3ds Max you must check that you import skeleton too and write where this skeleton.nif placed.
____________
Hundreds of DEFs
|
|
Salamandre
Admirable
Omnipresent Hero
Wog refugee
|
posted May 15, 2012 11:30 PM |
|
|
I don't know any way to convert nif files to bmp frames required in Heroes III. Without 3DS max I don't think it's gonna work.
|
|
majaczek
Supreme Hero
Work at Magic Dimmension
|
posted May 16, 2012 01:24 PM |
|
Edited by majaczek at 19:11, 16 May 2012.
|
It should work if we playback an animation on a model in a niftool (which autor suggest for previev only) and capture the screen as video.
I managed to guess what to do for skeleton.nif and model mesh to play animation correctly in nifskope, but gimp GAP is definately not the best tool to split captured video into frames - I would prefer something more direct like in this tutorial. The problem is I won't pay for 3ds max, I don't like to reset track of trial intalled, and I prefer to use free tools than doing piracy. Any way known to do almost the same on free software?
EDIT: Hmmm this http://niftools.sourceforge.net/wiki/Blender should be enough...
EDIT: okay.
1)nifskope (preparation)
1a)merge model with skeleton (copy/paste)
2a)Spells->Block->RemoveById (default options) to remove invisible blocks so they do not make problems with texturing
3a)save as ...
2)blender with niftools
2a) import ssaved NIF with choosen kf
2b) place camera (you could save it for later)
2c) render one frame to check if there is no obvious errors
2d) render animation to images (would be jpg, I do not know how to force Bmp)
3) Gimp with GAP
3a) combine to multi-layer xcf (for easy batch conversion)
3b) do some batch editing
3c) reduce colors to palette of nnn colors
3d) export as frames to bmp files
4) Deftool
4a) combine frames
4b) fix position
4c) export as def
result http://mir.cr/R49Z48IM (for test only, not suitable for game)
problems so far:
2) it need nif as one file and separate kf file, else you would need to merge bones by hand (I chooosen former). If invisible block were not removed the would render as black and you have to reload nif for each kf animation - better to remove them in nifskope (as advised). A bit problems with setting camera. Output frames are high quality jpeg but you need to reduce number of colors later anyway.
3) very much of options to choose, gimp GAP may work unstable with some movie files (no problem with multi layer images or multi frame images). No problems separate of this.
4) You need to reduce number of colors before converting to DEF or you would end with broken palette. I still have problems with a few colors in palette - I should reduce number of colors further probably (to not exceed number of non special colors - 220 was too much probably) or even preset first colors of palette. I would like better tool for def composing.
PS: before exporting to def colors were intact. note also that I haven't properly fixed the background color to transparent yet. Current DEF posted is demo only and is more than 5MB because of high resolution (much higher than it would be for creature DEF) - watch it in DEF(pre)View.
EDIT: Here is a gif exported for those with no Defview
http://mir.cr/EWDVG2EM (2MB). Because of not choosing transparent color there's a bit of noise near outside edges.
So I finally managed with free tools only... would anybody help about palette or have replacement for DEF-tool?
|
|
|
|