HOW TO: Import/modify/export LH

Thank you, but originally I wanted to change Zervers LH a bit. For that your seperated parts won't help me, because I think Zerver already made other changes to the LH. I always thought that a file is a file is a file, you know. That means: if I can open it once or create it from scratch and I save it, it should be possible to reopen it. A very simple example: if I create a txt file, do some changes and then save it, I can load it again whenever I want and I can make as much changes as I want. With a nif that isn't possible (at least not with blender). I could understand that if the nif was planed to be only used for civ4 and somebody wants to use it for an other game (by using a different file or import script). They would be similar file types, but not the same. But in this case the original file was from civ4 and the new one as well. That means: a nif is not a nif is not a nif... Sorry, I can't really understand that...
 
A save in blender creates a blend file - an export to nif creates a nif file. that might be your problem. Nifs are only created on export so hiting save doesn't do anything. And make sure you have your nif scripts configured.

After your export a nif you have to add the changed parts back to the original leaderhead (and save as that eaderhead) to get it read in-game (of course back-up your stuff).


This maybe tedious but if you lay out each step you are doing I can tell you where you are going rong, it took me a (long) while to inally get it figured out, but once you do its incredibly easy. And since the more LH makers the better I'll stick to helping you until you get it al figured out :D

EDIT: and maybe posting your created file I can see whats wrong. I know cyrus works since I did edit it before.
 
:wallbash: Do I write english in a that bad style that nobody understands me? I don't want to make change to cyrrus. I want to make changes to Zervers LH (Szent István), because it seems that the crown of cyrrus (the LH is based on Cyrrus, at least the head) has not been removed correctly. The problem is: I can't open / import it (I get errors instead). I only say "save" and "open" because that sounds more normally then "import" and "export". What actually is the difference between "import" and "open" and "export" and "save"? You open an existing file respectively you create a new one or replace the old. The one and only difference I can see is, that import / export is realized by a script. That's all. Sorry if this sounds harsh, it wasn't meant to be. I am glad that there is at least one guy that tries to help me. But if we discuss all the problems I have already made clear (or I thought I made them clear) in the first post, then there will be no progress.

AGAIN: everything is installed correctly (latest Blender, Pyffi, latest Python, latest script. This is not the problem. Actually I already read that others had problems open, or import if you like that more, nifs that already have been changed by other modders. It seems to me, that the import / export script doesn't work 100% correctly. As I tried to say in my last post, nif seems to have no or a sleazy standard. I think Zerver didn't make his LH with Blender, I guess he used 3ds max. But it seems to me that even a Blender saved / exported file can not be opened / imported correctly with blender again (to figure this out was why I started to work a bit with Cyrrus, I don't want to create a new LH, this is far to complicated for me; alright there may be more steps needed for saving that nif correctly). This seems to be strange to me. Firaxis have done the same things with the LH's then you do (probably with an other program and more professional (don't want to criticize you: it's their job and they get money for it whereas it is a hobby for you and you have other things in mind as well)) and these files can be imported / opened without problems. This is the point I can not understand. Openoffice and MS Office can both open and save doc files. There is no compatibility problem. But there seems to be one with nifs. I guess I am at the wrong place here, too, because this obviously a blender related problem. Just wanted to hear if you guys have the same problems, if you know a workaround or if you heard that the folks writing that import script are already about to fix this. So if you want I can upload that LH from Zerver. If you watch it a while animated from inside the game (civilopedia), I think you will see what I mean. Then try to import / open it in blender or whatever you are using. I bet you'll have the same problems. Shall I upload it?

BTW: I already tried older versions of blender, too (sometime the latest isn't the best), but same thing.

BTW2: Maybe I should mention, that I got errors when open the LH in sceneviewer, too. It seems to be alright in Nifscope. I had those problems also when I had a look at some of Zervers units, too (but I haven't tried to import / open these in blender). Don't know what he is doing with his graphics...

EDIT: I tried to configure the script, too. There was some kind of default value set for civ4, but I think they were more about exporting, not importing.
 
I am always cool.:cool:

Okay, I haven't deleted the cam and the light. Good hint. The main problem is still: I can not import Zervers LH. If I can not import it I can not remove any lights and any cams.

NifScope? Hmm... Maybe not, but NifScope is not the problem at the moment. Nevertheless I will look after that.
 
Okay, I have tried to import the nonshadered one, this is what I get:
error.jpg


I am uploading now the LH's files (ca. 5mb), wait for my next post (if you can).

EDIT: I used the import preferences shown on a screenshot in a thread somewhere on civfanatics. I tried to find that thread, but I couldn't.

My Nifskope is 0.9.6. I will have a look if there is a newer one. But Nifskope isn't the problem, I could open that nif with NifSkope. SceneViewer doesn't work with it.
 
Here is the link to the LH: click

These are my xml definitions:
<LeaderheadArtInfo>
<Type>ART_DEF_LEADER_MAGYAR_Istvan</Type>
<Button>Modules/Hungary/leaderheads/Istvan/Btn_LH_Magyar_Istvan.dds</Button>
<NIF>Modules/Hungary/leaderheads/Istvan/Cyrus.nif</NIF>
<KFM>art/LeaderHeads/Cyrus/Cyrus.kfm</KFM>
<NoShaderNIF>Modules/Hungary/leaderheads/Istvan/cyrus_noshader.nif</NoShaderNIF>
<BackgroundKFM>Modules/Hungary/leaderheads/Istvan/Willem van Oranje_BG.kfm</BackgroundKFM>
</LeaderheadArtInfo>

I only made some small changes to the textures, but that problem with the former crown of cyrus I mentioned before were already in before that. If you watch the LH you may take a close look on it to see what I mean. I can see it very well on my widescreen laptop.
 
I had a similar problem with a UB I'm working on and figured that a mesh with transparency properties was the problem. In your case, I think you have a node without a mesh, something Blender don't get. I will look at your file when my civ will be released. Check in Nifskope for a NiTriStrips node without a NiTriStripsData or something.
 
Yeah that istvanfile is messed up. the regular cyrus won't loaded (as you probably noticed) and the nonshaded on loaded but when I exported I got the scaling error etc. So 3 things:

1) You are just as unlucky as I was with charlemagne to pick a leaderhead that doesn't work right on the first go, so its not you its the nif :D

2) Too save you weks of heart ache, I took the hat and beard off of Zerver's Istvan and then exported them as a nif and then imported them into my separated cyrus and then removed the crown. So attached is a cyrus, no crown, with a beard and hat. But note for the cyrus it reads tgas not dds so it might appear pink if you don't convert the dds to tga via gimp.

3) I hope doing it for you doesn't stop you from LH making :D I recommend trying out some other leaderhead, standard game, and mess with that to get proficient. Atleast you got tenacity to stick with it so post or PM if you have questions.


PS: I wrote down some tips HERE
 
Thank you for your efforts. I tried to replace the nonshadered nif with your one, but no effect. The shadered cyrus is merged with parts from other lhs. So I also tried to open the cyrus.nif with Sceneviewer (with lots of errors) and simply replace the mesh with the one of your file. That seemed to work, but Sceneviewer crashed when I tried to save the file. Maybe this is also possible with nifSkope but I am not experienced with that program. I have to read some tuts.
 
you'll have to use nifskope. You'll need to have two different nifskopes open. what you'll do is open a cyrus (shaded or non) then remove the branches (trisahpes) of the body and crown etc and with my file you'll copy branches (trishapes) and paste the trishapes on the node where similar stuff is. For the hat and beard just apste the branch in the same ninode. Then check it out in sceneviewer where you'll have to put the eyes back in etc.
 
Hmmm... I've done what you said and I followed the instructions of C.Roland at the beginning of this thread. These shadows disappeared (so that problem is solved), but I got other troubles instead.

Have a look at these pictures (the texture is a bit blurry, because of my graphic preferences in civ4; my machine is a bit weak):

a)
Spoiler :
problem.jpg

(before changing anything, I have marked the shadows for you, there were more, but not visible on this picture)

b)
Spoiler :
pisti.jpg

(after NifSkope-work, ingame screenshot)

c)
Spoiler :
pisti_b.jpg

(after NifSkope-work, in Sceneviewer)

So firstly some parts of his body disappeared / are malformed. I have already corrected the pasted parts in Sceneviewer and had a look at the values twice. I am wondering that the head seems to be alright, because both parts belong to the same mesh... There are also parts (for example the hands) that have totally disappeared. I knew that sometime parts are not displayed in Sceneviewer. On my laptop lots of parts are not displayed (the eyes fly in the air because there is no head), but in the game it's correct. These pictures are taken on my desktop pc where the LH was displayed correctly before I made these changes. I also get some errors when open the LH in Sceneviewer (they were already in before these changes):
Cannot find shader TLeaderheadShader_20, Implementation -1
Failed to find shader TLeaderheadShader_20, Implementation -1
(twice)
Cannot find shader TLeaderheadShaderNoSkin_20, Implementation -1
Failed to find shader TLeaderheadShaderNoSkin_20, Implementation -1
(also twice)
I got similar errors when I worked with some of Zervers units. Do these errors man something?
Secondly his face looks a bit glassy / shiny / plastic. Can that be corrected?
 
I can add shaders on to it, as far as I know I've been the only one successfully to do it without 3Ds max. :p

I was planning on writing a tutorial a while back but the demand didn't seem very large until now, I'll try to get around to it when I can.
 
coola32,

THe missing stuff is because when you imported you didn't assign it to a vertex. The best way (I know) to do this is in blender click on the part you want to add (say charlie's suit) the go to edit mode and hit A (select all) then go back to object mode and making sure the suit is still selected (it should be unless you clicked somewhere in object mode) SHIFT-Click what you want to join it to, in this case cyrus's body (you can click his head BUT NOT the skeleton triangles sticking out) the go to mesh join objects. the objects are now joined. go to edit mode and select torse in the lower left corner (making sure the suit is still highlighted) and then click assign. this assigns the suit to the torso. if you want it to replace arms etc you'll have to reassign stuff.

I hope this helps - reading bernies how to rig tutorial has pictures and will help. but thats the problem you need to rig the suit to cyrus's body.
 
Well, I would do that if I could only import that file in Blender... Haven't tried that again, but I bet it won't work. At least not the "merged" shadered Cyrus.

EDIT: I tried to import it in Blender again, but no chance. I get a python error. The console writes slightly different stuff as in the screenshot above. I had also a closer look at Sceneviewer. After replacing the cyrus part of Zervers LH there are two errors less. Don't know if I could open the LH if I would solve those problems. Is there a way to find the causes for these errors (compare with post #254)? I couldn't find out how to search for those automatically, neither in NifSkope nor in Sceneviewer.
 
Okay, I've done some further work to solve this problem. My idea was to find a solution for those errors Sceneviewer reports hoping Blender will be able to import the nif then. I was successful, after I searched the corresponding entries for an hour, to make the nif loading in Sceneviewer (not Blender) without errors. There were 4 entries of "has shader" with value "yes" that have referenced to "TLeaderheadShader_20" or "TLeaderheadshaderNoSkin_20". I have switched them to "no". As I said Sceneviewer loads it without any trouble. I hoped I can do what ekmek said and then switch the "has shader"'s back to yes, but no success: damn Blender still fails to import. I get some mysterious python errors... I do not know much about nifs. I guess I have switched of the Shaders of the LH, so it should be nonshadered now. According to Ekmek it should be possible to import this kind of nif. Well, it isn't. I couldn't import the nonshadered nif before, maybe the versions of Blender, import script etc. I have installed on my system don't work correctly together. Could one of you try to import that file, please? You can load it from here. Ah, I made the model using the dds texture again, so you only have to add this file to the files I have posted some days ago (link is above in one of my previous posts in this thread).
 
Ups... yeah I forgot that little thing... I have uploaded to adrive: click

I really don't want to redo the whole thing, I already get headache when only doing changes...

Isn't there an other method to assign that to a vertex (without Blender)?
 
Back
Top Bottom