Author Topic: Meshing  (Read 12245 times)

0 Members and 1 Guest are viewing this topic.

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« on: September 05, 2006, 01:41:47 AM »
I have a feeling Simba's found a simpler way to do this (possibly with blender) but this is how I've done it so far.

This will only cover modelling, since coding and skinning are already covered in things like APE. (and I'm not much at coding or skinning anyway)

Also: I could do this in a zip and all, but I don't have FrontPage, I only have word, and since there's a tutorial forum, it kinda made sense to put it here?

The basics: What you can, and can't do (as of so far)



This is a mesh: This is the shape of your animal. The 'bones' or 'rig' control the movement. When you change a mesh, it might not fit the bones: This doesn't matter. The movement adjusts vertices: Hence, your animal will still move as it has to, but collision detection (which wasn't much in the first place) will be shot: ie, if you make the neck longer on a grazing animal, the head should work fine, but when it grazes it's head may go through the ground.

I haven't tried editing the rig setup, as I've had practice with modelling in general but not texturing and rigging (hence why my textures are rubbish, which will hopefully change when I get some animation education =P) So all the animations will be the old animal's, but if you make the face longer, it will still eat fine and everything apart from collision.



The places where lines meet are called vertices, and it's this you will be editing. The zebra has 458 vertices, if I remember rightly.

To my knowledge, because the animation relies on moving vertex point, you can't add or delete vertices (so things like winged wolves are out, unless you want wings like a plane =P)

Ok then:
What you need:
Nifskope.

...Yeah, that's the basic essential. You can use Nifskope, on its own, if you have the patience for trial/error or practiced in xyz space, because you'd be editing numbers manually.

3DS Max + nif importer is useful, but not worth the hassle of buying/'obtaining' a copy for the one thing you will be using it for: getting the names of vertices so you're not trial and erroring to find one point.

Blender + nif importer... now I haven't found how to export with blender without losing data. When importing/exporting, it tends to merge duplicate vertices, which results in lost data, since the rig counts on vertex number reference to move it and removal of some scrambles it.

Next post: Actually doing the editing.

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« Reply #1 on: September 05, 2006, 02:10:30 AM »
Lets say you have your NifSkope, and the .nif file you have to edit. If your .nif is in the same file as the textures and the references are correct, you will see the textures (which makes it handy to see how the texture stretches and any holes)

In the menu at the top, set View>Block list (on) and View>Block list details (on). This will give you two windows, and the image in the corner of your animal.

Also set View>Block List Options> List (if it's not already) because it makes things easier to spot.

The mesh itself, should be (animalname)LOD0:0 in the block list. Clicking this will highlight the mesh in green, and show up the block details. Some parts may be obscured: don't worry.



If the other meshes are getting in your way, make a backup of the first nif (which you should do anyway to be safe) and delete the other 'LOD(number): (number). This clears your way to see the mesh you're editing, and you can copy the new mesh across later.

Next to data in the block list details, it should say a number[NiTriShapeData]. Find this number in the block list.

NumVertices is the number of points your mesh has.
Under 'HasVertices' there will be 'vertices' with a plus next to it. Clicking this will extend the menu for every one of those vertices.

And this is what you change. However, NifSkope doesn't tell you which vertex is what.

Now, if you have 3DS Max, you can click on the vertex you want to change there, and it'll tell you the number. (Since NifSkope counts from 0 and Max from 1, you may need to subtract one to get the number in NifSkope). If you have blender, you can see the location of points and search by that, but not the number references.

But lets say you have blender, and you can't get the points.

The 'Draft' Model

Make the mesh in Blender as you like it. This isn't a how-to-use-Blender tut, I suggest the help website for help with the program, as it takes some getting used to.

Now export the nif, as a different filename (IE, don't overwrite your original)

If your nif export/import doesn't work or you don't have a plugin, you may be able to export a .obj by right clicking the LOD0:0>.OBJ>Export and edit that, then make a copy of the nif file and import the .obj. But I haven't tested this method, so it may or may not work.

Open two instances of NifSkope, so you can look at the old and new model side by side.

If the new model has the same number of vertices, then you may be able to get away with using it straight off (try testing it ingame).
Otherwise, you have some copying across to do. With my Zebra to Unicorn, I lost about 18 vertices dotted all over.

Copying the draft across, duplicates included
With the two open side by side, in my experience Blender (editing a nif, not sure about obj) doesn't change the order or vertices, but does merge duplicates.
So go down the vertices list and look for any differences. (or just copy them straight across and if something unexpected moves, it's a duplicate)

Now, either a different number is:
  A vertex you have edited
  A vertex that has been merged.

Check that the same number isn't later down the list (it shouldn't be far), or, move the vertex by adding 1 to the beginning of it (since most are 0.something) and see if the same part moves for each. If so, change the old one to match the new (minus the 1, of course)

Duplicates

These are what caused the holes in my first unicorn mesh (fixed now).

If you move a point, and instead of moving everything around it you're left with a gap (or more), then you've got a vertex that was in exactly the same place
Scroll the list and find the vertex that has exactly the same xyz position as the other one did (before you changed it, you may want the original/backup open in another NifSkope since there isn't an 'undo' button.) and change it to match. This should eliminate your gap.

Save Often NifSkope tends to crash. A lot. (It is free, afterall)

So you deleted the other meshes to see this one clearly.
Open the new (one mesh) .nif in NifSkope, find the NiTriShapeData you were editing, rightclick and Block>Copy.
In the same instance of NifSkope, go to open, and open your original. Find the NiTriShapeData for the LOD0:0 mesh, rightclick and Block>Paste Over
Paste OVER is essential, as otherwise you'll just add a node, instead of overwriting the old one, and the LOD0:0 will still refer to the original.

Edit 3: Good luck on all your meshing, I hope that wasn't too complex! The unicorn's out now, if anyone does come across major problems with the mesh I guess the tut will need to be deleted, but I've never had any problems on my comp.
« Last Edit: September 06, 2006, 04:44:47 AM by Littlemog »

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« Reply #2 on: September 07, 2006, 10:31:14 AM »
Ok, if anyone had trouble finding what they were looking for in NifSkope:

http://www.t3rbo.com/photo/view.php?img=d72d5f91b34a60ec83494c29e6842dec

Blender butchers files. I haven't found a way around it yet. But if you can make something in Blender, export as a seperate Nif, open them at the same time (Ie open NifSkope twice so they're both running at the same time), find the models with the same vertex numbers (next to "num vertices" as in screen shot") and copy across (I find making both windows the same size and flipping between them, scrolling down to the next 'page' in both so you're looking at the same part of the list, flipping between them again, helps me find differences faster unless I've changed the entire thing)

Occassionally (as I found with the zebra/unicorn) Blender will reduce the number of vertices as well, which requires a bit more guess work for the missing ones.

Good luck and I hope the screenie makes things a bit clearer for you!

edit: Very silly of me, I didn't even mention where to get NifSkope (and Blender)

http://niftools.sourceforge.net/ NifSkope, (plus Blender and Max plugins) There are also some forums there for NifSkope, but they're more experienced in modding RPGs than ZT2.

http://www.blender.org - official Blender site. (you can't export something that goes straight into ZT2 but you can save and copy across to the .nif you want.)
« Last Edit: September 07, 2006, 02:02:23 PM by Littlemog »

Offline Zooasaurus

  • Pooper Scooper
  • *
  • Posts: 74
Meshing
« Reply #3 on: September 09, 2006, 01:15:52 PM »
Ok, Im stuck at the part with nif skope where you said "Hasvertices and Numvertices and such.
I cant figure out how to change the animal, I went allover, but I couldn't find anything, could you please help?

Wait, sorry found it, thanx for the great tutorial
« Last Edit: September 09, 2006, 01:19:27 PM by Zooasaurus »

Offline I-Mile

  • Pooper Scooper
  • *
  • Posts: 7
Meshing
« Reply #4 on: September 10, 2006, 12:03:39 AM »
Maybe you can tell it how you found it!
because, I'm stuck with that too!

Offline k_mac

  • Pooper Scooper
  • *
  • Posts: 32
Meshing
« Reply #5 on: September 10, 2006, 02:11:41 AM »
I'm stuck too. I don't know how to get the animal into blender. Can you please help me?

Offline Radar

  • Snow Tigers
  • Zookeeper
  • *
  • Posts: 370
    • http://
Meshing
« Reply #6 on: September 10, 2006, 08:29:36 AM »
I am having one problem. Everytime I try to save with nifskope it says: failed to write nif.
How can I fix this?

Offline Gloria

  • Zookeeper
  • *
  • Posts: 139
Meshing
« Reply #7 on: September 15, 2006, 06:23:28 AM »
Lordy... can you say LEARNING CURVE? ;)

I already had Blender (my husband DLed it awhile ago), but I can't seem to get the NIF importer working. My computer thinks the installer for it is a virus and won't let me DL it... so I tried DLing the .zip file for it and manually putting the files in the scripts folder for Blender, but it still doesn't seem to be working.

I just wanted to play around with it, but I guess it must be a little over my head since I can't even get the program to work. :p

Oh well.  I'll have to go fiddle with it some more.

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« Reply #8 on: September 23, 2006, 07:38:27 AM »
You don't 'need' blender, if you're willing to have a bit of trial and error on which vertices are which, it just makes things a little simpler.
Getting the animal into blender: download and install the blender plugin (if it'll work, sorry I don't know about the plugin not working - you can right click on the TriShapeData file and ".OBJ > Export" (or something similar) and open that in NifSkope, then when you've edited and saved that, import it into a copy of the animal (".OBJ > Import" ) and copy across like you would originally.

I'm not sure with the "failed to write nif" problem... if you're overwriting something, check it isn't read only, and make sure you haven't messed or deleted with anything else in case it's that thats causing the problems.

Offline ThePantherKing

  • Pooper Scooper
  • *
  • Posts: 56
Meshing
« Reply #9 on: October 16, 2006, 01:22:56 PM »
I cant get NifScope It says page not available when I open link?????

Offline SageofWater

  • Raptor Pack
  • Zookeeper
  • *
  • Posts: 284
Meshing
« Reply #10 on: October 16, 2006, 01:56:28 PM »
I can get the model into nifskope easy but i cant find the file to actually edit it. I asked a friend and he cant figure it out either and i really wanna learn how to do this.

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« Reply #11 on: October 17, 2006, 05:17:13 AM »
The file to actually edit it? You should have two columns in the Block List window (make sure block list is ticked in one of the menus if it's not there)
Then you need to find the animals name followed by LOD0:0 (or just 0:0) in the RIGHT column.

The mesh should highlight if you click that.

A few underneath that, you need to find NiTriShapeData in the LEFT column (the right column will be blank). When you select that, the mesh will not be highlighted. You need "Block list details" ticked in the menu (sorry I can't be specific on WHICH menu, NifSkope isn't on the college comps and we can't install new software on here (standard uni rules as far as I know))

The link in my last post should show you what they look like if you're having a problem with that.

As for not being able to get nifskope - you may have to try again later, or just google NifSkope and see if you can find an alternate download in case the place has moved.

Offline ThePantherKing

  • Pooper Scooper
  • *
  • Posts: 56
Meshing
« Reply #12 on: October 19, 2006, 12:12:59 PM »
how do you add body parts like say, 2 tails or a horn, or something

Offline Sonic_The_Hedghog

  • Pooper Scooper
  • *
  • Posts: 53
Meshing
« Reply #13 on: October 19, 2006, 09:11:30 PM »
You cannot add body parts at all... I may be stupid but I know that :P

Littlemog, could you repat this in idiot language.

Offline ThePantherKing

  • Pooper Scooper
  • *
  • Posts: 56
Meshing
« Reply #14 on: October 22, 2006, 11:46:34 AM »
Then how was the unicorn made?!?!?!?!

Offline Sonic_The_Hedghog

  • Pooper Scooper
  • *
  • Posts: 53
Meshing
« Reply #15 on: October 22, 2006, 01:03:04 PM »
The horn does not move. It is a simple part of the body that he made by expanding the forehead. You can't go to far with it though. You can't have multiple heads, differen joints. Like wings on a horse to make pegasus. It simply cannot be done. We would have to code and model for a while like BF does in order to do anything like it.

Offline Simba

  • Zookeeper
  • *
  • Posts: 409
Meshing
« Reply #16 on: October 22, 2006, 08:26:08 PM »
Ok now I think most people are confused, tell y'all one

1. Open the nif in blender
2. Edit the model as you like (appropriate) using certain keys, Grab(G), Rotate(R), Scale(S) and use right click to select a single vertex/object, and for selecting multiple vertices/objects, hold ctrl and drag the the mouse pointer over the req. v/o
3. Now that y'all have editted the model in blender, Go to the Scripts Window, then click the Scripts button > Systems > Scripts > Config Editor, click Export,
4. Now in the Nif versions column it is usually 4.0.0.2, change it to the correct Zt 2 nif version, 10.0.1.0!
5. Y'all know what to do now! Select the whole nif and go to File > Export > Netimmerse/Gamebryo file  and save! (now that's all with blender)
6. Now open the nif you've saved, in Nifskope!
7. In the Blocklist Details(In case you 'ven't opened it got to View > Blocklist Details) Find NiTriShapeData, not the last one the one before it somewhere a few lines above(usually only 2 NiTriShapeData(s)' ll be there)
8. Click it, and Right click it and Block > Copy
9. Then in the same instance of NifSkope open your original Animal's model, eg. For my Wyvern, I need to open my original Secretary Bird's model, and find the NiTriShapeData, again not the last one! and Right click on it and Block > Paste Over!
10. Now you gotta save your nif that's all!

I hope y'all find it easy, that's all I did and it worked perfectly! thanks to
littlemog for helping me out in this too!

EDIT: they are all partly right but use 3ds max instead of blender!
« Last Edit: December 29, 2006, 12:32:08 AM by Simba »

Offline Littlemog

  • Pooper Scooper
  • *
  • Posts: 62
    • http://
Meshing
« Reply #17 on: October 23, 2006, 06:24:54 AM »
^ That's brilliant : manually copying the vertices across takes SO long and it's so very agrivating when it goes wrong after all that =P

The unicorn's horn isn't "added" - it's moved. When I get my computer sorted, I'll try getting a closeup of its head compared to the zebra with the wireframe on, but essentially - that's not a horn, it's a pointy forehead. The game still thinks it's a forehead.

Because of the way the game does animations, you couldn't ADD bits unless you added the programming for those bits - I don't know how to, and I don't know anyone that does. I still don't know whether it animates by moving rigging that moves vertices by location or points on the body directly (like moving leg would be either everything within the radius of a set point, or otherwise some particular parts, eg "vertex 63" or something, but judging just how badly the garm was on the first attempt, I'd go for the second.)

Offline I-Mile

  • Pooper Scooper
  • *
  • Posts: 7
Meshing
« Reply #18 on: October 23, 2006, 07:10:53 AM »
Now mine question:
How do you edit the model?

Offline Bigcatkeeper

  • Pooper Scooper
  • *
  • Posts: 32
    • http://
Meshing
« Reply #19 on: October 24, 2006, 05:20:25 AM »
Hi,
im keen to learn how to edit meshs, but I am having some trouble trying to figure out what to do. If I click (animalname)LOD0:0 in the block list (in Nifskope) it doesn't display the mesh in green and also I can't open .nif files in blender, it just gives an error. I have installed the correct plug-in. Also would it be possible to make legs thinner etc through mesh editing?

How did you guys learn to use these programs? Have you got links to any guides?

Thanks
« Last Edit: October 24, 2006, 05:25:33 AM by Bigcatkeeper »

Offline Gloria

  • Zookeeper
  • *
  • Posts: 139
Meshing
« Reply #20 on: October 24, 2006, 01:07:06 PM »
http://www.blender.org/cms/Tutorials.243.0.html#807

Blender Tutorials!

The trick to Blender is that it involves using both the keyboard AND the mouse. I'm certainly no pro at it, but after following the tutorials I at least was able to play around with the meshes. :)

Offline catc

  • Gl?bal Moderator
  • Zookeeper
  • *
  • Posts: 111
    • http://z7.invisionfree.com/ZooMania/index.php?http://s7.invisionfree.com/ZooMania/
Meshing
« Reply #21 on: October 25, 2006, 11:17:51 AM »
Quote from: Bigcatkeeper;150147
Hi,
im keen to learn how to edit meshs, but I am having some trouble trying to figure out what to do. If I click (animalname)LOD0:0 in the block list (in Nifskope) it doesn't display the mesh in green and also I can't open .nif files in blender, it just gives an error. I have installed the correct plug-in. Also would it be possible to make legs thinner etc through mesh editing?

How did you guys learn to use these programs? Have you got links to any guides?

Thanks

To make it easier, all you have to do is click on the model in NifScope and it will direct you to a line that says "NiTriShape" in the block details.  After that, go a few lines down until you find the nearest line that says "NiTriShapeData".  Once there, click on the little plus sign next to it and a long list appears below you.  Look through that new small list until you find a line that says "Vertices" and click the plus sign next to it as well.  Another list below it appears and you should see a long list of various lines with "X-#### Y-####...".  Double click these lines and a few bars appear with arrows pointing up and down.  Just click those arrows whether up, or down and go to another line and click it (doesn't matter which as long as you can find the line the you just changed again in case you want to edit that line again).  Now you should see a change in the model above you and usually it would be that it made a certain area stretch until it makes it look like either a cone or a flat long triangle.  Like littlemog said, you would just have to guess which vertices are which when editing that area.  After you are done all you need to do is save it and make sure that when you save it and the tiny little window pops up to ask where to save it at and how to rename the nif into, make sure you include ".nif" at the end so,
Instead of this:
editedfile

Do this:
editedfile.nif

Also, the lines on the model don't have to be green, they can be any color.  All you have to do is go to "Render>Set Highlight Color...>choose the color you want on the color wheel>click "ok"

As for not being able to get your model into blender, make sure you do not go to "File>Open" instead go to "File>Import>NetImmerse/GameBryo (.nif & .kf)...".  Now right there just simply search for your nif file, make sure you click on the nif and now click "Import NIF".  That should at least get it into blender.

Offline ThePantherKing

  • Pooper Scooper
  • *
  • Posts: 56
Meshing
« Reply #22 on: October 29, 2006, 07:46:29 PM »
What Do I open in blender to get to editing and making different shapes?

Offline mikaboshi

  • Little Miss Snarky Pants
  • Game Warden
  • *
  • Posts: 4131
  • Sweet Sassy Molassy!
    • Artifex
Meshing
« Reply #23 on: October 29, 2006, 11:48:50 PM »
You have to open the NIF files that are located in entities\units\animals\(animal name here)

Offline ThePantherKing

  • Pooper Scooper
  • *
  • Posts: 56
Meshing
« Reply #24 on: October 30, 2006, 12:13:15 PM »
hmmmm... it says not supported by blender or somethin like that