fodev.net

FOnline Development => 3D Development => Topic started by: Luther Blissett on September 30, 2011, 12:47:39 am

Title: 3D Tutorials and Links (20170222 Images Replaced 1/3)
Post by: Luther Blissett on September 30, 2011, 12:47:39 am
NOTICE :
Megaupload has been closed down (http://www.bbc.co.uk/news/technology-16642369) by "Federal prosecutors", as of 19th Jan 2012. The majority of these tutorial files were hosted on there. Will reupload them at some point soon. If anyone's previously downloaded these themselves and wishes to upload them somewhere, it would be much appreciated. [edit 22/01/2012] Most of it should be back up now. Still missing the base model files. Will have them shortly.
[edit 27/04/2012] Should be all relinked to mediafire now. Let me know if anything is missing.
[edit 22/02/2017] Have replaced images with new links, and replaced 3D "client only" with 3D "client/server and scripts".


#0 - 3D Tutorials and Links

It will take quite some time for all the 3D work to be complete. I would consider there to be enough time to learn basic 3D modelling, texturing or animating, then start to help out before it's finished. Even if you won't master these skills, there's plenty of tasks which can be done with entry level skills, and in some cases with little or no previous experience. I (and others) will try to outline some of the work that's been done and make files available so anybody interested can help out.

Most of the fine details are covered in the 3D Questions and Answers thread (http://fodev.net/forum/index.php?topic=13894.0), with perhaps a key point being :

"Question: Why 3D is needed? A good-ol 2D looks somehow better and I'm used to it.
Answer: Because 3D is much easier to customize. Adding helmets, new clothes, having more variations in color (such as being able to play as a black skinned character) playing as a ghoul, super mutant, etc."


We are aiming to replicate the art style as close as possible, hopefully with the final models appearing almost indistinguishable from the sprites they are based off, but with the obvious customisation and development advantages. Though these are initially being produced for use in Fonline 2238, I believe the intention is that all the models and resources will ultimately be available for anyone wanting to work on Fonline based projects.

Notes :
The 3D development has nothing to do with the upcoming wipe.
The 3D development is a community project, separate from the general development of Fonline 2238



#0 - 3D Tutorials and Links
Basic Resource Links, Development trackers, Forum Links, SVN Links, Snapshot links, Tutorials and Appendices




Some ways YOU can help

Preparing template files for other softwares
Base models saved in Max, Blender, others. Rigged skeleton transferred to Blender and others etc. Trying to make sure all base material is accessible in as many formats / programs as necessary, particularly focusing on Free and Open Source Software.

Weapon item coordinates
If you've managed to set up a test SDK, you can do this with just the SDK and a text editor. Forum link : Weapon and Items coordinates (http://fodev.net/forum/index.php?topic=16420.0)

Modelling items from the Misc item tracker
There are lots of unmade objects on here. Some are as simple as making a box and pasting a texture on, so suitable for beginners. Forum link :3D Miscellaneous Development Tracker (http://www.fo2238.fodev.net/wiki/3d_miscellaneous_items_development_tracker)

Modelling of suggested items
Armour and clothing models suggested in this thread. Particular focus on those which have been confirmed as "useful" by devs. Forum link : NEW armors/clothes suggestions (http://fodev.net/forum/index.php?topic=13876.0)

Resizing of armours for other body types
Many of the newer models have only been produced for the male hero model. They will need reshaping for female equivalents. At a later date, this will also need doing for other body types.

Rigging models
Many armour, weapon and object models will need rigging and testing. Tutorial on how to do this will follow shortly. At a later date, this may involve the rigging of other body types.

General opinions, testing, advice, support
Check through the 3D forums, test models in game, offer thoughts and suggestions

Others (not 100% confirmed)
Hair types (reshape VB ones, or make new ones)
Facial hair (beards and moustaches)
Improving existing models and textures (aiming for as close as possible match to sprites)
Production of normal and specular maps for models
Production of "in hand" and "ground" versions of armours?
Creating inventory icons for any new content


Further questions / notes
Please use the Questions and Answers 3D (http://fodev.net/forum/index.php?topic=13894.0) thread, unless the question specifically relates to what is written here.


These will need checking, adding to and adjusting. Please feel free to adjust / reedit etc. With adjustments, could be set up as a 3D intro page on wiki.
Title: Re: 3D Tutorials and Links
Post by: Surf on September 30, 2011, 01:20:09 am
Excellent, very good Luther! I am sure this will come in handy for a-many of people. I have stickied it - don't know if you forgot it or were just too humble. :P
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on September 30, 2011, 03:43:10 am
[edit 22/02/2017]Replaced image links

It's all taking longer than I thought to put this stuff together, but it's on its way :)

First half of "setting up 3D SDK" one below. Again, once finished it'll all need adjusting / revising / fixing etc. Apologies in advance if I end up doing a bunch of double posts whilst trying to put this stuff together.

A lot of this will probably need disassembling / reassembling for use on the Wiki, but if I just start to chuck all the information out there, we can discuss the best way of presenting it for clarity. Obviously the rigging one is the "biggy", but my notes are in a right mess, so I'm sort of trying to do it all in order so I don't miss stuff.

Also, each of these posts is going to be massive, so I'm going to "spoiler" them all. If anyone with editing powers has thoughts on the best way of presenting this info in the forum, i.e. "spoilering" individual sections but leaving the sub-titles visible or something, then please feel free to edit.


#1 - Setting up 3D SDK
This should cover the steps necessary to get a basic 3D compatible client up and running. From there, you should be able to test any of the existing game models, or add your own for testing in-game.


(continued below)
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on September 30, 2011, 05:02:18 pm
Wouldn't re-edit into the above post. It just sat spinning with "connecting" forever. This is just the hair, hat and increasing stats section.

Still got Adding items to yourself, Armour object / model linking basics and Parameter Summaries to follow.


#1 Setting up an SDK (continued)

Title: Re: 3D Tutorials and Links
Post by: Graf on October 01, 2011, 02:20:16 pm
Phew, that was epic. Great work, Luther. Keep it up. I've just finished (http://fonline.ru/forum/showthread.php?t=21866) translating it to Russian. Hopefully, I'll be able to translate everything without of a significant delay.
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on October 01, 2011, 05:54:31 pm
Excellent work, Graf :D

I checked the "google translate to English" version of yours, and it still seems to read fairly well, so it must be a good job. I also noticed there were some extra details which you've clarified in there which were missing from my original - for example, the points about Character ID (from SetCritParam) - I'll add these to the original too. If you see any other bits missing, then let me know, or edit them in to my original post yourself.

Should finish these bits later today :
Adding items to yourself
Armour object / model linking basics
Parameter Summaries

They're almost ready, but I had to stop yesterday to go out for the evening. The next "main" part (testing your own textures in game) will be quick to finish too - so should be ready tonight or tomorrow I think, then hopefully some of our skilled skin texturers (i.e. Johnny Rust and SmartCheetah etc) should be able to test their work in the game.

I'm still finding the rigging quite complex, so I think I'll add an extra step in there, to show how to rig a hat first - because this is very simple (all vertices attach to the same bone, so can be done in about a minute). I can add the more detailed armour ones after I've tested a few more things myself (I'm still learning, of course).

[edit] Added last part of #1 Setting up an SDK


#1 Setting up an SDK (continued, part 3)

Title: Re: 3D Tutorials and Links
Post by: White tiger on October 01, 2011, 08:50:27 pm
Excellent manual Luther!
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on October 02, 2011, 10:56:01 pm
Thanks! I have the next one ready now :)

Again, this is a first version, so it needs testing and checking for accuracy. If anyone spots any problems, errors or confusing parts, please point them out. Anyone with editing powers, feel free to edit the post to correct any problems.



#2 - Testing custom body textures
This should cover the steps necessary to test a custom base texture in the game. That covers either skin tones, or clothing layers.




I will be busy at "real life" for the next week, so there might be a slight delay before the next tutorials. The main one being the model rigging / skeleton tutorial. I'll still have enough free time to check the forum and answer questions, but probably won't have time to prepare files, screenshots and write up the next sections until a few weeks.

If anyone is feeling particularly adventurous, and doesn't mind a bit of "self-powered learning", they might want to try this quick tutorial. Note that for the "proper one" I'll have many of these files pre-prepared for you, making the process much simpler.

The very, very short guide to basic skeleton rigging
- Download Fragmotion and Wings 3D
- Import CR_HumanMaleStrong.X into Fragmotion and export as an .obj to make a "correctly aligned man"
- import this obj into wings, then import your 3d model
- align and resize the model in Wings3D, so it fits with the human
- delete the human and export the aligned model as an obj
- Load fragmotion and import some existing .x files to examine the rigging. Learn how it works.
- Import CR_HumanMaleStrong.X, then merge with a load of animations (walk, run, pickup, punch).
- Delete all the no_name bones and save this merged animation test file
- Read Fragmotion rigging tutorials from the internet
- Merge your "animation test file" with your 3d model and rig your model to the skeleton (hats are easy - attach all vertices to Head).
- Test the different animations in fragmotion. Adjust until it works. Save it.
- Delete human, and all animation data, leaving just your model rigged to skeleton.
- Export this as an .x file, using these settings (http://img441.imageshack.us/img441/1456/fragmoexport.png) or something similar.
- Put this x file and relevant textures in the right folders
- Look in the fo3d at how the other armours are attached
- Write something similar linking your files
- Test in game as in previous tutorials
- Reimport to Fragmotion and correct mistakes

I may have missed bits out, and lines such as "Read Fragmotion rigging tutorials from the internet" will obviously require a bit of work, but if anyone's got the time to learn a bit more themselves, there might be just enough there to work with. Otherwise, I'll write up a clearer step-by-step guide when I next have enough free time :)
Title: Re: 3D Tutorials and Links
Post by: Lexx on October 04, 2011, 12:19:17 pm
Thanks for the wall of text. It's very useful.
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on October 04, 2011, 12:59:00 pm
It all still needs testing, checking and improving in places - then once it's definitely working and correct, we can look at putting the same info onto the wiki.

I definitely wouldn't consider any of it to be "written in stone" - there are likely to be mistakes and incorrect information in there, and likely whole sections that are missing. Corrections and suggestions would be very welcome.

Ideally if someone who's not tried any of this before can volunteer to follow it all from start to finish, then report back here, we can hopefully find any problems and errors and correct them.

Alternative tutorials using different software or methods would also be very useful, as would bits covering any areas that have been missed so far.
Title: Blender rigging tutorial (Blender 2.5)
Post by: Lizard on November 08, 2011, 02:45:31 pm
For the starts, i assume, you're NOT familiar with the interface of Blender, so i'll provide you with step-by-step instructions and explanations, why i'm doing so.

- Setting up the object.
- Setting up the skeleton


Title: Re: Blender rigging tutorial (Blender 2.5)
Post by: Surf on November 08, 2011, 02:50:22 pm
Nicely done and easily understandable, I'm sure this will come in handy. :)
Title: Re: Blender rigging tutorial (Blender 2.5)
Post by: Graf on November 08, 2011, 04:23:58 pm
Finally this tutorial came out :) Thank you for sharing the priceless knowledge of the rigging mystery with us!

Do you mind if I'll translate it and publish it on the fonline.ru forum? (Your nickname will be noted, obviously).
Title: Re: Blender rigging tutorial (Blender 2.5)
Post by: Lizard on November 08, 2011, 04:54:49 pm
Finally this tutorial came out :) Thank you for sharing the priceless knowledge of the rigging mystery with us!

Do you mind if I'll translate it and publish it on the fonline.ru forum? (Your nickname will be noted, obviously).

Sure! :)

I'd like to ask someone to repeat this all by following instructions, i could've missed something. Ask, if necessary.

@Surf, Luther, Graf: Thanks, i appreciate your comments!
Title: Re: Blender rigging tutorial (Blender 2.5)
Post by: Luther Blissett on November 09, 2011, 02:55:20 am
You're an absolute legend. Should sticky this or merge with tutorial bits above.
Title: Re: 3D Tutorials and Links
Post by: Lizard on November 12, 2011, 04:45:59 pm
- Parenting objects and bones

- Adjust weighting with envelope method.

- Adding IK controls.

Well actually, you're set and done with rigging your character by now and you can start animating now. Animation tutorial will come up shortly.
Title: Re: 3D Tutorials and Links
Post by: Jotisz on November 12, 2011, 08:33:04 pm
A well written tutorial and with the previous one you posted its easy to understand for starters too.
Title: Re: 3D Tutorials and Links
Post by: Haraldx on January 05, 2012, 08:36:03 pm
Just something I found when playing old games.

Make flat, round end surfaces look extremely round with the cost of 2 tris
This is a fairly easy trick I found out while playing good old games like Delta Force 2. I want you to inspect this picture.
(http://img689.imageshack.us/img689/2742/clipboard101.jpg) (http://imageshack.us/photo/my-images/689/clipboard101.jpg/)

Now, don't pay attention to the bad rendering engine of the game, or the voxel based terrain, but pay attention to the gun model. Can you see it? If not, pay more attention to the scope. That's right, it looks extraordinary round for it's time. How much polygons do you say it has? 10 tris? 20 tris? 30 tris? The correct answer is 2 tris. How? Extremely easy. Instead of having an actual round scope over there, all we have is a plane with a texture on it. Still confused? Well, here, have this picture I made.
(http://img163.imageshack.us/img163/2742/clipboard101.jpg) (http://imageshack.us/photo/my-images/163/clipboard101.jpg/)

There's nothing else. Now, put that plane at the end of a scope, remove already existing end scope faces. Voila, you got an extremely round scope at the cost of 2 tris.
Title: Re: 3D Tutorials and Links
Post by: Izual on January 06, 2012, 12:55:21 pm
Yes, but that uses alpha channel right?
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 06, 2012, 01:11:54 pm
From tests previously, alpha channel seems to work :
http://fodev.net/forum/index.php?topic=2407.msg144736#msg144736 (http://fodev.net/forum/index.php?topic=2407.msg144736#msg144736)

Not sure what it does with shadows and other things though.
Title: Re: 3D Tutorials and Links
Post by: Haraldx on January 06, 2012, 01:14:52 pm
Yes, but that uses alpha channel right?
Yes, however, alpha channel used in high amounts may create lag (atleast so it was on Id Tech 3). If the engine is optimized (which I sadly doubt) we can achieve better results using alpha channel than using regular polygonal variation.
Title: Re: 3D Tutorials and Links
Post by: baaelSiljan on January 06, 2012, 02:17:54 pm
alpha channel also break shadows
Title: Re: 3D Tutorials and Links
Post by: Haraldx on January 06, 2012, 02:40:23 pm
alpha channel also break shadows
So, in shadows the plane would look like a plane instead of a round surface. ??? :(
Title: Re: 3D Tutorials and Links
Post by: TommyTheGun on January 06, 2012, 02:45:38 pm
Though it might be useful in the future - do we need it right now? I think that we can make cylinders with not so many polys that would look good enough from the iso view, hmm?

In any other case it's a nice trick, worth noticing.
Title: Re: 3D Tutorials and Links
Post by: TommyTheGun on January 06, 2012, 06:44:06 pm
Okay... Well... I did something like this... Hope that people checing 3D developement board may find it usefull. I's aimed toward those quiet ones, who know a bit about 3d modelling or want's to start knowing it, but are afraid they won't be able to at least try finishing the models. Also I don't have an access to Blender since I have a new notebook, so you will have to wait for some remaining pics. Well... Enjoy, I guess...

Oh. Also - If you think it's in the wrong subject (since it's not REALLY a tutorial and there might be some suggestions needed which may make a mess around here), be sure to write it here, so the moderator can move this post somewhere else :)

Some modelling / texturing hints


Whilst a real tutorial concerning creating new armours and texturing those is still needed, I thought about countless times when I asked Luther Blissett for help, getting some pretty useful information - and decided to put it all together and post it, in case it is of use to others.


Don't treat it like a real tutorial. It's rather a bunch of questions and answers that people new to 3D modeling (for FOnline purposes, as the nature of the questions indicates) may find interesting. Being a great teacher, as always, Luther suggested a "disclaimer" before I begin:

"Note that many of these suggestions and hints are not 100% accurate, or may no longer be accurate. There may be better methods of doing these things and some of these methods might be obsolete now, e.g. we have working engine highlights and shadows, so perhaps some of the texture 'hints' might be a bit wrong now. As these are collected from PM conversations throughout the past year, there were also things we didn't yet know about the FOnline engine at the time - so sometimes we had to guess."



It's also worth knowing that I'm using Blender - mostly we were discussing the whole matter without referring to specific programs, but you should probably keep that in mind as well.


To be strict about that - target of this... Erm... Article(?) = people that know very basics about 3D modelling and texturing and have no experience in going through modelling the whole armour/character and all the tricky stages.


That written, I would add - it might be inaccurate but still there's a hell lot of valuable information from Luther. If not for FOnline, then as a way of thinking about some problems and figuring them out.


To start with. Something obvious in theory but still very important :)


USING OTHER's WORK


Looking at, then using and adjusting an existing model is a good way to start, since it's obviously easier to go with modifying an existing one than creating it from scratch. I wanted to create a Gunsmith's Outfit (an old idea of mine) and needed existing jacket to start with. I asked if I could use Luther's Combat Leather Jacket model, he mentioned few important things:


"It's good to share, use, reuse and modify stuff - if you look at what happened already with the 3D stuff - nothing happened for a while, then Karpov uploaded his Male_hero.obj - then after a week, half of all the models were done :-) It's also a little silly to have 20 different people all spending an hour making virtually identical boots from scratch, when then could just reuse some, and adjust them in 15 minutes."


Nevertheless - I asked for permission first and would suggest doing same thing, not to mention that you should always remember about including original authors of the model/texture in any kind of credits.



RECREATING A MODEL



Well - new models are one thing, there are still a lot of original sprites to be remade. It's not that easy to decide if few pixels were supposed to be stitches or bullets for example. You're gonna need to improvise. It's also good to ask around. There are a lot of Fallout fans that may have really nice suggestions:

(http://fo2238.fodev.net/wiki/images/1/1d/Nmmexiaa_sw.gif)


"For the texturing, you're working from a very unclear sprite, so you have to invent a little yourself I think. It's difficult to work out what some of the details are, so you have to interpret them yourself, guess, and decide. Ultimately, unless anyone disagrees too much, whatever you choose is correct."


TRIS/QUADS


You probably know the difference between Tris and Quads already. I've read once that every static object should be made of Tris and every character/creature should be made of quads. Turns out that's not the way it works:


"For the final model you hand in, I think everything should be triangulated - but you only really need to do this when you're finished. When you are working on the model, it doesn't matter which way it's done. I find it easier to model with quads (four sided shapes), then triangulate once it's finished.

I sometimes manually triangulate simpler models (connecting every vertex by hand) or sometimes just "click auto-triangulate" and let the computer do it."



I would like to point out two things tough. We were talking about specific armor that didn't need to bend in any way. In some other cases you may want to keep the quad in the place where the model bends cause that way it may look more natural while animated.


Second thing is - after some time with a Blender (or any other program for that matter) you begin to understand why there's the difference between using option of automatic triangulation and triangulating manually. There are cases when program messes up whole process a bit, leaving you with more polys than you would have when doing the whole operation manually. Being a begginer myself, I would suggest combining two options, meaning you have to check the whole model and make some changes if you see that computer messed anything up.

(http://img143.imageshack.us/img143/6569/hatautotriang.png)


BELTS, HOLES, SLEEVES


Having troubles with modelling some things, I decided to go the easy way, making the belt as a cylinder. Usually you shouldn't go the easy way just because you're to lazy to do it the proper way, this time it turned out pretty good:


"One thing which I learnt after giving that model to Karpov is that it's not necessary to make "holes" in the jacket. The jacket can be a solid object, and it doesn't matter if objects are inside each other - so for example with the belt, you don't need to make a hole for the man to fit through (the way it is now will work perfectly fine) - and likewise, the inside of the sleeves doesn't need a hole through it etc."


(http://img192.imageshack.us/img192/3408/tribalsimple.png)
Here's a nice example of Tribal's strap.


Also it has one advantage - it saves you a lot of polys. If you're gonna create a belt as a strap (yeah, as a normal belt, just like the real life belt ;) ) you gonna spend way more tris/quads - and we try to keep'em as low as possible.


[waiting for the right impage here]


Ideally - you never need to create details you wont see anyway - remember that you won't have the chance to take off that belt, so you don't need to worry how it's gonna look when it's off the character.


FLOATING CUBES


My model needed a pack of cigarettes behind the strap on his shoulder, I didnt know how to create it. Placing a cube textured as a cigarettes, floating "into" the shoulder is easier. But is it a good way, or should it be the part of the jacket?


"Regarding "floating cubes", this is also fine. When the model is animated, a "skeleton" is put inside the model, and this is connected to each of the objects - so when an arm on the skeleton moves, the sleeves and gloves will also move with it.


If you have a solid object, such as a metal shoulder pad, it is probably better that it is "floating". When doing the animating, if it was connected to the clothes underneath, it would bend when the cloth does. If it is a separate object, the metal shoulder pad can stay still when the arm moves."



[waiting for the right image here]


Further info from Luther :
"To clarify, if a shoulder pad was "joined" onto a jacket, then the shoulder pad would bend and change size as the arm moved, as its edges would be joined onto the bending jacket material. If instead the shoulder pad is 'floating' as a separate object, then all its vertices can be connected to one bone, and it will maintain its shape as the arm rotates."



UNIMPORTANT DETAILS


While it's always good to keep some details, even if they're gonna be hardly noticible, you should remember about polycount. I was wondering if the holster of my model gonna be smooth enough. I was actually going to increase numer of polys - what for, I don't know:


"[...]remember that we must try and keep the poly count (triangle number) as low as possible - simple is always better than complicated for this[...]


A good rule I am using for these models, is to think "When the model is as small as a Fallout character on screen, would this look any different". You could actually go further with this, and possibly crop a few more vertices from it"


(http://img442.imageshack.us/img442/2968/example1c.png)


So that's that - you have to remember that even with maximum zoom, the model is still gonna be small. There's also another thing - your model doesn't need EVERY detail you want to include - remember that you're gonna texture it later. You can draw every single button or for example a line (or a shadow) that represents a fold etc.


COMBINING


Sometime theres a need to combine base model with some additional part. For example - if you want normal trousers instead of tight-like ones which you can make by colouring legs of base character. I had a problem with that and that's what we came up with:

http://img560.imageshack.us/img560/5456/tommytrouserscopy.png
[Large Image]


"Also remember that it doesn't matter if the trousers go "through" the original model (intersecting), so they can be solid inside - you don't need to cut holes through them for the legs to fit."


At the end, best way to do it, is to widen the parts of original legs and "float" the trousers-part into the leg. You have to remember that trousers-part needs to be separate part and should not be connected with original base model. Top vectors of that part should be in exact same coordinates as vectors of original model - as shows the picture below. That way it should be smooth and easy to connect base texture with the trousers part so it looks as one part after texturing.


[waiting for the right picture here]


Further info from Luther :
"To further clarify here, we also have the 'DisableSubset' command in the fo3d files - it would be perfectly fine to add new legs to your model, then use this command to disable the legs of the original model, to reduce the chance of them overlapping. In effect, we can disable the base model legs and replace them with a new set"


[waiting for the right picture here]


UNWRAPPING


Unwrapping is unbelievably easy - as long as you are working with a simple cube. Other then that - it gets complicated and you may have some problems until you get used to it. Here's a bunch of Luther's advices:


"For the theoretical side, look at some of the existing models - many of them will follow the same sort of patterns. It seems quite common to split :

a) under the arms, from armpit to waist
b) from the neck to the shoulder
c) at the waist, and round the arms at the top of the shoulder
- These will give you a flat front piece and flat back piece.
d) Arms are split underneath
- This should give you something a bit like a rectangle for each arm
e) down the sides of the leg
f1) either 'underpants shape', also split at the sides (like male base model) or
f2) split down front and back of pelvis (like female base model)
- This gives either
-- a front and back underpants shape, with two rectangular legs (see male base model)
-- two upside-down "L shapes", i.e. a rectangle with a bit sticking out at the top (see female base model V2)


[waiting for the right picture here]


One thing you should consider is to take an item of clothing you own, which is most similar to what you're modelling, and see where it is stitched together, then cut the UV map according to this. After all, a real shirt is made up from flat shapes cut from a sheet of cloth, and sewn into a 3D object. Ignore the fine details, but essentially you will find that a real shirt and trousers will be cut in exactly the way described above (normally with the female base model trousers option)."

Title: Re: 3D Tutorials and Links
Post by: TommyTheGun on January 06, 2012, 06:44:35 pm


BASE TEXTURE


After getting a base model, I was wondering if I should or maybe shouldn't mess with it's texture. Comes out:


"You can create a new base texture for the body, but it is not essential unless it includes parts of the main model i.e. a shirt / trousers which should go with the rest of the model.

Leave the human skin as it is, as this will be used when they make the other skin colours in game - but the trousers and vest, I think it is okay to paint over"


Further info from Luther :
"I have a better understanding of the 'subsets' now. If you look at the subset information in the previous tutorial [LINK], basically you can paint over any part of that base texture, as long as you paint the entire of one subset section. For example, you can paint an entire sleeve, or a short sleeve - as long as the short sleeve stops at the edge of the subset. Any area you do not wish to change can be ignored, and left for the base skin tone to deal with."



It means you don't need to create a special body/main texture while creating Power Armour cause it's not gonna be visible, you're gonna need one for unzipped jacket if you want to paint a shirt with some sort of symbol for example.


"For clothing which is only a tight shirt and trousers (like if you were making a new bluesuit Vault Suit), this should be painted onto the texture, rather than modelled as separate 3D clothes."


TEXTURE SIZE



That matter is very clear. The texture that's gonna be used ingame will have around 512/512 pixels MAX, but remember it's easier to create the texture as big as possible at the beggining, and the resize it to the right size.


Further info from Luther :
"I work on all my textures at 1024x1024 initially. This makes it much easier to edit or correct things when changes need to be made. For the final models, many are currently 256x256, though even this may be dropped to 128x or lower. If you're submitting a model, it's probably best to send your texture at the larger size, which will help others who may wish to alter, edit or make alternative version based upon it. It can be resized easily at a later date by whoever is implementing the model into the game"



SIMPLE TRUTH



Creating textures for a model or changing them is always challenging since you have to imagine how it looks wrapped around the model. Also - you have to create it from different pieces or paint it yourself. It's a good thing, Luther reminded me to keep many layers - not only the one indicating seams - it's best to use different layer for every bit of texture. So you got Boots on one layer, Jacket on the other, Pants on the third one. (You can even divide it and create another layers for other details like pockets etc.) Though it's not a rule, sooner or later it will save you a lot of time - when you gonna need to change some details or gonna need similar, but not the same texture.


[waiting for the right picture here]


CONNECTING THE SEAMS


After you actually unwrap the model, you may have some hard times making a texture properly so the seams area connects the right way. It's not always possible, but:


"If it is possible, I leave "seams" (where the edge of one object meets the edge of another object) in a basic flat colour, or completely black shadow - then the edges are certain to match. If your seams are all on the underside or hidden side of the model, this should work fine"


[waiting for the right picture here]


SMALL, YET DETAILED


It's not that easy to create a good texture for such a small object. It needs to be detailed, but then again if theres too many details, it won't look good from iso view and you won't gonna know what's what. So the simple way to do it right (so it seems to be detailed from far away) is:


"Exaggerate highlights and shadows. For a model of this size in-game, the shadows must be very dark, and the highlights very light, otherwise they can't be seen clearly. Use the "dodge" and "burn" tools in Photoshop to lighten and darken areas."


"For a modern game like New Vegas, you want everything to look as "photo-realistic" as possible - it's on a real human form, appears large in game, has lighting and shinyness effects etc. For these Fallout models, we want everything to look as "Fallout" as possible - so "photo-realistic" isn't important. What is important is exaggeration of shadows and highlights - so think more like [warhammer figurine] than [orc turbo render]."



Further info from Luther :
"The painted shadows and highlights is one of the areas which I'm less sure about now, as there has been some excellent work done on the lighting, specular and other shaders since this was written - bringing us a lot close to a modern 3D game engine. However, stylistically we're still aiming for the more cartoon-like Fallout-sprite-look, so I still think it's true to a smaller degree and would suggest the exaggeration of highlight and shadow is a little less severe than I'd originally recommended. However, the Combat Leather Jacket guy was done entirely with this method in mind, and he looks pretty sweet with the recent tests, so perhaps it's not such bad advice after all?"

(http://img830.imageshack.us/img830/6002/combatleathersiljan.png)


ZOOMING OUT


It was always a problem for me to imagine how the texture would look ingame. Well.. You never know exactly until you check it on the model, but there's a simple way to get a picture, just so you know if you're heading the right direction.


"I think the zooming out was very useful for me - it really helped to clarify which parts of the model would be visible - it's only a "simulation" of seeing it in game, but gives a good enough idea to work with - like at 100%, the jacket and shirt are very separate, but when they're small, they blend together, so you highlight the edges."


TWEAKING UP THE DETAILS



It starts to look like Something and again - you zoom out the view, getting... Nothing. What now?

http://img26.imageshack.us/img26/3128/suggestions.jpg
[Large Image]


Notice how a silly "shine" effect on the buckle changes it from "some grey weird thing" into a "real, round buckle". You don't need additional polys or super shader creating soft, detailed shadows - its just a few swoops of brush in Photoshop or whatever it is you are using for textures.

Another thing is a hole in a holster. As written before - you don't need to actually create it as a model. You can draw it. If you do it right way, having in mind isometric view and possible poses of your character, you can do it the perfect way - so there always seems to be a hole from every given point of view.

Also Luther's idea of working with the "shadows" (the cigarette part) shows a lot. You can see how it changes from flat texture into multiple layers.

Note, that you probably won't see much of it from our FOnline view, but believe me it can make a difference. After all - it's about your model "having a soul" as well ;).


"Adding detail is always nice - it's not always visible, but sometimes it leaves a few pixels, which "suggest" that something is there. The player's imagination decides what it is then (see bullets / stitches discussion for Combat leather jacket) - in the end, it didn't matter which they were, but the fact that SOMETHING was there made the difference."


The important thing is - those details won't hurt and won't have infuence on your computer's performence so it's a different matter then adding polys.


And here's Luther's tip for Photoshop users:

(http://img715.imageshack.us/img715/5343/suggestions2.jpg)


MAKING ALTERNATIVE TEXTURES



If you want to add more than one variant of the texture for your model, here's a quick way of doing it. Obviously - just to give you an idea how you can start your changes:

http://img339.imageshack.us/img339/7634/suggestions3.jpg
[Large Image]


AND DON'T GIVE UP


I had a moments when I was pretty sure I won't be able to finish the texture. I mean - come on, how am I suppose to create something that looks like jacket? Can't create it out of few pictures combined into one - it's gonna be too detailed. I'm not talented when it comes to drawings... What now?


"Very roughly, you can fill the area with a flat colour, then use "burn tool" in photoshop to make shadows, then "dodge tool" to make a few highlights, then keep redoing it until it looks right - that's probably 90% of the work I do on a texture anyway."


As simple as that - you actually keep doing it, it looks silly at beggining, but after few tries you come up with something not that silly anymore. Then you begin to have your own ideas how to make the texture more interesting and BAM, that's the moment when you stop thinking what, where and how, you're a chineese child in Nike factory - you just do it!


SO...


I'm using blender and photoshop on the very basic level, but with some help and very valuable hints, that basic level was enough to create a nice looking model. Eventualy you finish your work with something like this.
(http://img6.imageshack.us/img6/2650/heoutscreen3.jpg)


So I guess it's worth trying. After all - In the worst case - you learn something new.


I hope this would be helpfull to someone as it was to me :)


ALSO IF ANY OF US WAS WRONG IN SOME STATEMENT OR SOMETHING CHANGED SINCE WE WERE DISCUSSING IT, PLEASE LET ME KNOW. IF YOU HAVE ANYTHING INTERESTING TO ADD AT SOME POINT, DO NOT HESITATE, WRITE ANY SUGGESTIONS - THAT WAY THIS TINY ARTICLE CAN BECOME WAY MORE HANDY FOR OTHERS :)
Title: Re: 3D Tutorials and Links
Post by: baaelSiljan on January 06, 2012, 07:09:29 pm
wow !!
Title: Re: 3D Tutorials and Links
Post by: Haraldx on January 06, 2012, 08:59:02 pm
Good tutorial (altough I knew most of the stuff), came in handy. ;)
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 16, 2012, 02:06:00 am
#3-1 Rigging introduction

Reading beforehand
Firstly, I would recommend reading through my previous short tutorials (http://fodev.net/forum/index.php?topic=18777.0) (i.e. 3D compatible SDK etc). This will make it much easier to understand some of the points and phrases here - and also help you to test the final result. Also I would severely recommend looking at Lizard's tutorial Rigging in Blender (http://fodev.net/forum/index.php?topic=18777.msg159798#msg159798)  - he very clearly explains how the whole system works, which will make the following explanations much simpler to understand (I won't go into such fine detail myself).

When we eventually find a way to properly move models from Blender into the game, my following tutorial may be obsolete, but for the time being, it should work :)

Programs
I'll be using these programs :
Fragmotion (http://www.fragmosoft.com/ (http://www.fragmosoft.com/))
Wings3D (http://www.wings3d.com/ (http://www.wings3d.com/))
Photoshop 7.0
Notepad

Obviously you can quite easily replace Photoshop with GIMP (or a newer version of Photoshop), and use any text editor. I'll be giving program specific instructions for Wings3D and Fragmotion, though you should be able to achieve the same or similar through other software.

Fragmotion
Later in this tutorial, we're going to be using Fragmotion to rig the armours and clothing. It's not the most elegant solution, but it does seem to have given me files which will work in-game. Three advantages of Fragmotion are 1) It will directly import .x files used in the game, so you can explore, assess and edit them, 2) It's very quick to learn, and 3) You can use the trial version forever, assuming you are willing to type in a "prayer" once per week to reactivate it. Of course, if you can afford to do so, buying it would help the small independent developer.

Firstly though, the model needs to be prepared and aligned. Though this could be done in Fragmotion, I'd recommend to use whatever your preferred 3D modelling program is, for the sake of speed and simplicity. We're basically just going to align the pieces with a base man model, then reexport as obj. I'm going to use Wings3D for this.

Complexity of Rigs
There's a big difference in the difficulty level of rigging various types of model. In essence, you're telling every vertex (little dot) on the 3D model what bone it is connected to, and the strength of that connection.

Hats
Hats are very easy. Most helmets will be too. It's pretty much a case of attaching every vertex to the same "Head" bone at 100% strength. The hat will move where the head moves.

(http://img687.imageshack.us/img687/3132/03r1hat.png)
Fragmotion : Combat Armour Helmet - all rigged to head bone at 100%

Armour made of plates or sections
If the armour is made of separate pieces i.e. elbow pad, gloves, boots, chest plate etc, then again this should be quite straightforward. Mostly a case of attaching the vertices of each object to the nearest bone, following the direction and pattern of the base human.

(http://img694.imageshack.us/img694/3483/03r2plates.png)
FM : Combat Armour - rigged in sections to nearest bone at 100%

Basic clothing
If the clothing follows the shape of the normal human quite closely, you essentially want to look at copying the layout of links on the base model - chest to Spine_1, stomach to Spine_2 etc. Study the base model, and attach the equivalent areas in a similar manner. Shoulders and pelvis may be quite difficult, legs and arms pretty easy.

(http://img190.imageshack.us/img190/7079/03r3bendyjacket.png)
FM : Leather Jacket - Note yellow 50% lines on joints

Loose or long clothing
This will be much more difficult - clothes which hang past the legs (i.e. skirts or long coats) will need to be connected to several different bones, and you may have to constantly tweak and adjust the weighting to get this to work. Alternately, you may want or need to add an extra subskeleton to control the flow of the clothing (see NCR Ranger longcoat rig) - though you will need to make acomplete set of animations to do this.

(http://img17.imageshack.us/img17/2277/03r4longcoat.png)
FM : NCR Long Coat - Note extra subskeleton and overall complexity

Following parts
3-2 : Preparing a model for rigging
3-3 : Rigging a basic model : Hat

later on, I hope to add :

3-4 : More complex rigging, and controls in Fragmotion
3-5 : Other options and oddities (animations changing, new characters)
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 16, 2012, 02:08:30 am
#3-2 : Preparing a model for rigging

Preparation and alignment intro

So, before we rig the model, we need to make sure it's the correct size and in the correct place relative to the base human. This should work in any 3D software. I'll give a quick and simple explanation for Wings3D, but you should be able to do this in any 3D modelling application. We're only really using the size and move commands.

Basically our overall aim here is :
- Take the correctly aligned reference model
- Import the model to be rigged
- Resize and move the new model, so it is in the correct place
- Check it for any clashes with the human model
- Re-export, ready for rigging.

Files for use here
If you're following along with this, download these files. I'd recommend you take the aligned human one anyway.

3-1 Aligned human.obj (http://www.mediafire.com/?y1xwnz6ut7hmn97) (New link 22/01/2012)
misaligned beret and texture.zip (http://www.mediafire.com/?tmed0wea5l9lk7o) (contains 3-2 beret wrong place.obj and armor_all_beret.png) (New link 22/01/2012)

Using Wings3D to align the model

Open Wings3D. It'll look roughly like this :
(http://img860.imageshack.us/img860/8530/0301wingsempty.png)

[edit] If you don't have the "Outliner" and "Geometry Graph" on the right hand side, they can be activated from the "Window" menu at the top.

Brief overview of controls and layout
This is just an explanation of controls. Skip if you already know them, or are using different software.

Aligning the hat model

Different 3D programs use different default scales, rotations and setting upon export, so you might find that models are laying face down, or really small etc. To work with this, we're going to import a "correctly aligned man" (he's simply an .obj export from the CR_HumanMaleStrong.x which had been imported into Fragmotion). If we then adjust our model to match him, and export through Wings3D and Fragmotion, he should end up in game at the correct size and stood upright.

Firstly, import our "correctly aligned man"
FILE > IMPORT > OBJ > select file > 3-1 Aligned human.obj

(http://img718.imageshack.us/img718/4825/0308manimported.png)

You should end up with this guy here. You may need to zoom out (mousewheel down)to see him. You should have one object (Default Body) in the geometry window, and a selection of materials in the outlines. Though we don't need these right now, these materials correspond to the subsets on the main model.

Now we want to combine this with our hat we want to rig.
FILE > IMPORT > OBJ > select file > 3-2 beret wrong place.obj

(http://img651.imageshack.us/img651/7365/0309littleman.png)

You should have this guy there now, wearing a rather poorly made little beret. He's also too small and in the wrong place. If you're working with someone else's files, this will often happen, so you need to know how to correct this. If you cannot see the little man, you can use the mouse scroll wheel to zoom out, and the press-down-scrollwheel to turn into "rotate camera".

So, firstly let us select the little man. Either click Beret and Body in the Geometry Graph, or use the "Whole object select" button and drag a box round the little man and his hat. If you press the A key, it will focus the camera onto the little man. You can now rotate and zoom from this point.

NOTE :
It's preferable for someone to export an armour object with a "base human" attached, because it allows us to "match the humans" like this, thus ensuring the armour is in the correct place. If the armour is on its own, you will have to adjust and resize "by eye" only.

Resizing and rotating multiple objects
Note that the beret and small man are built from two separate objects.  This will have an effect on our resizing and rotating tools - namely that if we resize / rotate in "object, edge or face" modes, each object will separately resize or rotate from its own centre point.
(http://img85.imageshack.us/img85/9947/0310resizefail.png)
In object mode, his hat and body resize about their own centres - so they stay in the same place, and resize "into" each other.

To compensate we can either :
1) Resize / rotate in vertex (little dots) mode
this will adjust the objects as one whole, so the hat stays on the head, in its relative position.
2) Temporarily combine the objects (select both, RMB > Combine)
If there's only a couple of objects, this will work fine. We can separate and rename them later. However, if the model is made of lots of smaller pieces, this could end up very messy.
3) Resize / rotate from a specific point
We can use the advanced commands to specify a point to resize or rotate from. If for example, you select the bottom of both feet as this point, everything will scale from this point, keeping the different objects in the correct place.

In this case, I'm going to just use the vertex mode.

NOTE :
In many cases, you may be able to do this very quickly by using the "align centre", "put on" "absolute commands" and other similar options. The following is not the quickest way to do this, but it is easier to follow and the "essence" of the instructions should be transferrable to other programs relatively easily.

Moving and resizing commands

For this specific example, the following series of commands should get you roughly in place. You might want to tweak things a little further yourself. Note that you can press the TAB key to enter a specific value. They're all the default LMB commands.

(http://img252.imageshack.us/img252/3913/0311vertexresize.png) (http://img4.imageshack.us/img4/8338/0312move.png)

- Select beret and small man
- Switch to vertex (little dots) mode
- Scale Uniform 1000%
- Move Y (up) about 58
- Rotate Y 180
- Move z (back) 43
- Move x (sideways) -113

This should get us roughly into place.
(http://img841.imageshack.us/img841/3568/0313approxplace.png)

If you click on the little "blocks" on the right side of the Geometry Graph (view as solid/wireframe), you can switch each object to wireframe mode and back, which should help to see the alignments. Basically, you want both of the human models to overlap as closely as possible.

(http://img854.imageshack.us/img854/5791/0314wireframecheck.png)

Continue making minor adjustments to the scale and position until you feel the bodies are overlapping closely enough. If you can get most of the red (selected) and black (non-selected) vertices to be in the same place, you should be fine.

Removing spare bits and checking for clashes
So, assuming that worked, we can delete the 2nd body, just leaving us with the default body (from "correctly aligned man) and the hat

- Press Space bar to deselect everything
- Select the Body object by clicking on the left hand cube in the geometry graph
- Press the delete key

(http://img703.imageshack.us/img703/9449/0315seemscorrect.png)

We should now have the hat placed on the alignment man. Me may want to check for further clashes - occasionally you will find from certain angles that the head sticks through the top of the hat, for example.

Adding the texture
It's a lot easier to spot these clashes if one of the objects has its texture attached, so will go through this now.

File > Import image
Select the armor_all_beret.png, which should now appear in the outliner window.

Switch to "Object Mode", then select the beret object.

Pick a material - you likely have a few default ones (if not, right click on one and duplicate it). Select it in the outliner, right click and rename to "beret" or similar, then right click and "assign to selection".

Next, drag and drop the texture onto the beret material and select Diffuse. If the texture doesn't appear on the model, right click the material settings and set the vertex colours to "ignore".
(http://img688.imageshack.us/img688/4927/0319dragmaterial.png)

Hopefully, the hat should be coloured in red. Zoom out, rotate and check from various angles that the head does not protrude through the hat.  Sometimes it's useful to turn the object into wireframe and see if there are any vertices or edges which are too close to the edge of the hat. You may have to increase the size slightly, or slightly move individual edges, faces or vertices to make things fit. "Move face normal" may be useful for this.

(http://img808.imageshack.us/img808/4809/0316checktexture.png) (http://img703.imageshack.us/img703/8350/0315bseewire.png)

Obviously, if you wish, you can drag textures onto the base human model to see roughly what things will look like.

(http://img27.imageshack.us/img27/5151/0317alltexturelook.png)

Exporting it
Now we've got the beret in the correct place, with material and texture attached, so can now export it.

Select the beret object, then go to : File > Export selected > obj

Make sure to pick "Export Selected", or to delete the alignment man and his materials, else you'll end up with the whole lot in your hat file.

This obj file is now aligned correctly to the "base man", and therefore his skeleton, so we can import it into Fragmotion and rig it quickly and easily. Remember, you can use your preferred 3D program, though there may be a matter of "export scale" in some programs. If someone can test in Blender, Max etc we can find this out.

Regarding the files made so far, here's one I made earlier :
Beret export selected.zip (http://www.mediafire.com/?fid2lp7h4fv0csn) (contains obj, mtl and same texture file) (New link 22/01/2012)
This is the correctly aligned beret file.

Though I've used the hat in this example, the process is essentially identical for any other armours etc.
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 16, 2012, 02:10:31 am
#3-3 : Rigging a basic model : Hat

Intro

I'm not going to go into much detail here. The rigging of such a hat is very straightforward, so initially I'm pretty much going to give you a quick step-by-step of "click this and that" and get the model in-game. The next part(s) of this tutorial will more clearly show how to use Fragmotion, how to rig more complex armours and test animations. However, the process is essentially the same, so the more adventurous may wish to play around with some of the other files and work it out for themselves.

If you haven't already, this would be a good time to read Lizard's Tutorial on Rigging in Blender (http://fodev.net/forum/index.php?topic=18777.msg159798#msg159798) as you should find this very useful in understanding how the skeleton structure works, and he has gone into infinitely more detail than I am going to.

Disclaimer : I can not say for certain that this method is perfect. Karpov has been rigging the "official models" so far using a biped system in Max, and this is quite different. However, as said - I have tested this and it is working in game. All the "extra files" in the earleir SDK tutorials have been done using these methods.

General skeleton and bone info
A bit of basic info to begin with, is a few diagrams of how the rigging and skeleton are put together :

Strenth of connections
(http://img52.imageshack.us/img52/5625/skeletondiagram1strengt.png)
All the little yellow dots are the vertices of the model, the blue circles are the bones and the coloured lines are the connections between those. The colours represent the strength of the connection between these. Each vertex is connected to either one bone at 100%, or several bones at fractions of 100%. The bone display in other programs works differently - in this one we have little circles with sticks connecting them, which is not quite as informative as the "connected triangles", but ultimately it's displaying the same information. To briefly look at the general pattern of things, if you consider the model to "begin" in its centre and grow outwards to the limbs, most of the model is 100% connected to the bone preceding it as we move away from this centre. Some areas with complex joint movement (i.e. shoulders, pelvis) have several looser connections instead. Generally speaking, armours will follow the same pattern.

Names of bones
(http://img195.imageshack.us/img195/2497/skeletondiagram2labelbo.png)
Here's a map of the bone layout. The animations are connected to the names of these bones. They should mostly be self explanatory. Some sections (especially the ponytail) aren't immediately clear from this angle, but still hopefully you can get a rough idea of the structure. When importing an .x file from those already in game, Fragmotion seems to duplicate all the bones with a "no_name" copy. As far as I've found from testing, all the no_name bones can (or should?) be deleted.

It's also worth noting that through my or Fragmotion's error, the model is effectively flipped left to right - notice that the "right leg" is from our perspective, not from the model's own right. This is the other way round in game, so if you have a non-symmetrical model, you will need to flip this as well. We will need to do this with our beret.

Bone tree structure
(http://img859.imageshack.us/img859/2259/skeletondiagram3structu.png)
Hopefully this is fairly self-explanatory. These are the parent/child bone relationships (covered well in Lizard's tutorial), forming the entire "tree" of the skeleton. You can also see the ponytail bone segments a little more clearly from this angle. Looking at those connection strengths again, by looking from this angle, hopefully you also get a flavour of how the vertices and bones are connected i.e. on the left leg, everything from toes until the ankle connects to L_Foot, then everything until the knee connects to L_Calf, then everything on the rest of the leg connects to L_Thigh. When it reaches the pelvis, because of the motion of the legs at this point, it becomes quite complicated.

I'm a little unsure regarding the handles (L_Handle and l_handle_1 etc) - two are disconnected from the main tree, and two are included in the hands, though this is what's displayed from an imported .x model, and appears to work in game.

With this in mind, we should again have a quick look at these examples of other armours :
(http://img687.imageshack.us/img687/3132/03r1hat.png) (http://img694.imageshack.us/img694/3483/03r2plates.png)
(http://img190.imageshack.us/img190/7079/03r3bendyjacket.png) (http://img17.imageshack.us/img17/2277/03r4longcoat.png)

If you compare what we see here with the human model above, it should be fairly clear how the structure works. Basically, you want to study the existing models. As mentioned, you can import existing .x files into Fragmotion. Import them and have a look at a few. Try and find one which is similar to what you're rigging, then you can pretty much just rig yours in the same manner.

For more complex ones we'll need to test the rig against a full set of animations, but we'll cover that later. For now, we're doing a hat - so it's simply a matter of connecting the entire hat model to the head bone at 100%. We don't need to test this against running and walking etc, because of its simplicity.


Getting started

Download these (you may have the beret already) :

human_skeleton_only.ugh (http://www.mediafire.com/?7kgbc4ei6f1641x) (Karpov's male hero skeleton) (New link 22/01/2012)
Beret export selected.zip (http://www.mediafire.com/?fid2lp7h4fv0csn) (contains obj, mtl and same texture file)
(New link 22/01/2012)

So, start Fragmotion. It is a trial-based "nag-ware", though it will let you run the program in a fully functional manner if you have "typed a prayer" to run it for one week. As said previously, it's made by a small independent developer, so if you're able, I'd suggest you try and support that by purchasing the full version.

Otherwise, type in the "code" as suggested :
(http://img197.imageshack.us/img197/2430/fragmotioncopynaggs.png)

Very quickly, you should have a screen roughly as follows
(http://img252.imageshack.us/img252/7207/0322fragopened.png)

Brief controls / layout overview

Note that it has one of those "drag bits about and reposition them" interfaces, so may be slighly different. Each window / panel can be enabled from the Window menu at the top. All the buttons have tooltips on mouseover, if you feel like exploring. Otherwise, we'll just look at these :

Viewing options
(http://img829.imageshack.us/img829/8979/0320fragbuttons.png)
Show backfaces
Show the back of faces from "hollow" shapes.

Show bone assignments with lines / vertices
The coloured lines from the pictures previously, showing connection strengths. On or off / same but with the colour of the dots themselves

Show vertices / skeleton
Vertices or skeleton visible

Show axis / show grid
XYX axes and grid visible

Side panel
(http://img684.imageshack.us/img684/7695/0321selectstuff.png)
The top half of the side panel will contain things like objects, skeletons, animations etc. We will briefly use the "models" tab to select the hat, but otherwise won't need to use it in this example. Beneath should be a section labelled "Tools", including things such as select, transform, skeletal animation etc. Have a look through for future reference, but again we're only going to need "select" and "mesh" in this example.

Very brief control overview
RMB : Rotate
Scroll wheel : Zoom
LMB : select (dependent on select menu in tools section)
MMB : (scroll wheel press down) drag camera panning


Importing and rigging the hat

So, firstly we need to bring the skeleton in.
File > open > human_skeleton_only.ugh

Assuming "view skeleton" is switched on, you should see this :
(http://img849.imageshack.us/img849/4029/0324fragskellyimport.png)
You should recognise this guy's shape from the earlier diagrams. If you click on the "Skeleton" tab on the upper-right panel, you'll see the skeleton tree, as shown in images earlier

Adding the hat
We add extra things to this "project" by using "Merge", rather than using "open" (which would replace our current skeleton). Note that "merge animation" can be used when testing animations.

File > merge > 3-4 beret export selected.obj
If you exported one of these yourself, then search for that file name.

It will ask which things to import. In future, you may wish to be selective about this, but for now, just take the default.
(http://img543.imageshack.us/img543/6210/0325fragimportpopup.png)

Hopefully the hat appears now. If you've got "vertices" view button switched on, you'll see the hat covered in the little yellow dots.
(http://img440.imageshack.us/img440/5287/0326fraghatisthere.png)

At this stage, we must remember that the model is flipped. if we want it to be the other way round, we can change this now. We will select the beret "group" and flip it. Of course we could have done this in the earlier alignment stage if I was better at remembering what I was doing whilst writing tutorials :)

Flipping
Go to the models tab in the upper right and double click on "group > beret_beret". This should highlight the hat in a bright shade of red.

Change Tools (bottom right) to Mesh, and click "Mirror".
In the panel below, click :
Origin 0,0,0
Direction Across X plane
Mirror all is off
Click Invoke

This should flip the model round like so :
(http://img198.imageshack.us/img198/39/0327fraghatflips.png)

Rigging the hat
Now, the actual rigging bit. In this example, you will be pleasantly surprised by its simplicity.

Again, go to this panel in the bottom right and go to :
Tools>Select>Select Bone
Click on the "Head" bone, like so :
(http://img715.imageshack.us/img715/7167/0328fragselecthead.png)

Your vertices should already be selected (pink dots instead of yellow). If not go to :
Edit>Select all>Vertices
(http://img535.imageshack.us/img535/6028/0329fragselectallvertic.png)

Now go to the top menu, and select
Bone>Assign selected vertices to bone (or simply press CTRL+B)
(http://img824.imageshack.us/img824/214/0330fragassignvertctrlb.png)

A little window should come up. Drag the slider into red until it's as above (Head, 1.000)
(http://img52.imageshack.us/img52/3726/0331fragdraggyslides.png)
Now click "set"

You can close this subwindow now. If you've got the "Show bone assignments with lines" button switched on, you should see this.
(http://img839.imageshack.us/img839/4226/0332fragrigged.png)

This is now rigged. Well done.

Exporting
Go to the top menu, then File> Export > Direct X
Use these settings (other settings may work)
(http://img585.imageshack.us/img585/1456/fragmoexport.png)

A nice filename might be "armor_male_beret.x"


Testing the model in game

If you've already read the previous SDK ones, you can probably work this out for yourselves, but we'll go through it quickly anyway.

Files and folders
In your 3d testing folder (you do have one, right?), copy these as follows :
armor_male_beret.x to \Client\data\art\critters
armor_all_beret.png to \Client\data\textures

Now we need to edit the fo3d file. Go to
\Client\data\art\critters\_FOHuman.fo3d and open it in notepad or similar.

Scroll down until we get to layer 4 (param 154)

Code: [Select]
# Head --------------------------
Layer 4
  Value 5 Root DisableLayer 7 Attach armor_%anim%_combatarmorhelmet.x
  Value 6 Root Root Attach ATR_PowerArmorhelmet.x
[...]

At the end of this, we add :

Code: [Select]
Value 35 Root Attach armor_%anim%_beret.x Texture 0 armor_all_beret.png
Of course, you may use a different value instead of 35, depending on how much other stuff you've got in there. As explained in previous tutorials, this will attach our model to value 35 on layer 154. The %anim% line will refer to armor_male_beret.x and armor_female_beret.x as necessary (we've only made the male model in this case, but it would be the same for the female).

Codes in game
Start your singleplayer 3d test and follow as indicated in the earlier tutorials.

These lines should give you the hat
Code: [Select]
~getaccess admin password
~ param 0 154 35

He has a hat on.

Obviously, you can also do a
Code: [Select]
~param 0 153 13
~param 0 155 13

Then you get
(http://img580.imageshack.us/img580/4589/0323beretingame.png)

So, that's a very simple rig - it's difficult to do wrong. At some point in the near future, I'll try and finish writing up and preparing a few extra bits, possibly including :

- Rigging various armours
- More thorough description of how Fragmotion works
- Testing armours against multiple animations
- Reimporting rigs to correct errors

and later on, possibly even :
- Adjusting the existing animations to create your own
- Rigging new base humans
- Rigging new unique critters with animations

Hopefully the more adventurous amongst you can look at what we've gone through so far and learn a little more yourself - it'll be quicker than waiting for me to prep all the files, screenshots etc :P

Of course, as with previous tutorials, please feel free to ask questions, offer recommendations or corrections.
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 28, 2012, 07:08:20 pm
Has anyone had a go at this? Does it make any sense? I've got several further stages of rigging and animation to explain, but if I'm not making any sense with the more basic stuff, I think that needs fixing first :)

Any feedback on things which could be made clearer or better? Has anyone tried this and succeeded?
Title: Re: 3D Tutorials and Links
Post by: DanteAligheri on January 30, 2012, 02:55:44 am
Yes Luther, it's pretty awesome! Very easy to follow and good to start with I suppose, I mean I don't ever do any of this and I did it is why I say so. To the harder stuff!!!
Title: Re: 3D Tutorials and Links
Post by: Luther Blissett on January 30, 2012, 04:31:03 am
That's good to hear :)

I'll see about trying to put something together for more complex armours as soon as I have a suitable chunk of free time (could be this week, could be a month).
Title: Re: 3D Tutorials and Links
Post by: Jotisz on March 10, 2012, 04:43:06 pm
I think a little texturing tutorial may come in handy.
This one is a real basic one targeted to those who have used blender before and know its user interface. To make it easier there is an obj that can be used for this tutarial get it from here and import it to the scene.
http://www.2shared.com/file/ESg5O50z/texturing_tutorial.html
And here is what the end result may be.
(http://img11.imageshack.us/img11/352/donepu.png) (http://imageshack.us/photo/my-images/11/donepu.png/)

After importing the object go to front view
(http://img259.imageshack.us/img259/618/kpernykp20120310155419.png) (http://imageshack.us/photo/my-images/259/kpernykp20120310155419.png/)

To make it simple we will use two materials one for the glass and one for the labbel. Go to the material tab and add materials to the object, you may rename the material to glass and the next one to label. Use the + button to add materials to the object.
(http://img535.imageshack.us/img535/8571/kpernykp20120310155433.png) (http://imageshack.us/photo/my-images/535/kpernykp20120310155433.png/)
After you created 2 materials switch to Edit mode. Select the area that will be the label and use the assign button on the materials tab.
(http://img846.imageshack.us/img846/4109/kpernykp20120310155515.png) (http://imageshack.us/photo/my-images/846/kpernykp20120310155515.png/)
The next step would be making seams. Seams are lines that tells how the uv will look like. Select the following edges then press ctrl+e and choose mark seams.
(http://img838.imageshack.us/img838/9812/kpernykp20120310155659.png) (http://imageshack.us/photo/my-images/838/kpernykp20120310155659.png/)
After this select the whole modell and create an uv map. Press u and choose Unwrap. This will generate an uv map along the seams we created.
The next step is to change the 3d view to UV image editor
(http://img191.imageshack.us/img191/9159/kpernykp20120310155744.png) (http://imageshack.us/photo/my-images/191/kpernykp20120310155744.png/)
As I said I assume that those who try to do the tutorial know the basics of blender. Try to make the uv map look like this:
(http://img717.imageshack.us/img717/2333/kpernykp20120310155825.png) (http://imageshack.us/photo/my-images/717/kpernykp20120310155825.png/)
Now that we have an uv map its time to create a texture. Select uvs and choose export uv layout.
(http://img267.imageshack.us/img267/3249/kpernykp20120310155831.png) (http://imageshack.us/photo/my-images/267/kpernykp20120310155831.png/)
It is time to edit the uv map with your choice of photo editing software.
When you are happy with your label save it and go back to Blender. Select the material of the label. Then go to the texture tab. Add a new texture to it choose image as type then locate your own texture.
(http://img403.imageshack.us/img403/7471/kpernykp20120310155849.png) (http://imageshack.us/photo/my-images/403/kpernykp20120310155849.png/)
After its added scroll down till you see mapping. Select coordinates as uv and on the layer choose your own uv layer.
(http://img94.imageshack.us/img94/5348/kpernykp20120310160135.png) (http://imageshack.us/photo/my-images/94/kpernykp20120310160135.png/)

If you did all as it was written here then you should see the label on the bottle after pressing render. If the picture is too dark add more light to the scence or set enviroment lighting or ambient occlusion on.
Title: Re: 3D Tutorials and Links
Post by: Ox-Skull on March 11, 2012, 11:56:04 am
Thanks a bunch for that jotisz, it has helped me a alot in advancing my knowledge of getting textures onto my model.

IM EXCITED. :D

Ox
Title: Adding specular maps
Post by: Karpov on March 11, 2012, 09:01:58 pm
How to add a specular map to a weapon (AKA "Polish my gun")
Now that we have the proper weapons I will start importing the rest. But none of them will have specular maps. So I made this tutorial for when that time comes.

First of all I have to explain how the weapons work in the game.

There is a file called _FOhuman.fo3d inside the data/critters folder. Open with text editor.
  Find Right Handle. After "Layer 1" we have a lot of lines beggining with "Value". The number next to it is the Item ID for each weapon, and right
after that it says "attach" and the name of the model file.

Code: [Select]
Value 13   Attach WP_bazooka.x      (some parameters here)
This example shows number 13 which is the rocket launcher. But this is will only show the model and it's default texture in the game.
  If we want to use a different texture, and/or add a specular map to it we will need to create a new config file for this weapon.

We create a simple txt file inside data/critters. Rename it WP_bazooka.fo3d (change the extension too, don't leave it txt).

Inside this file we will write this:

Code: [Select]
Include _VBWeapon.fo3d name WP_bazooka

Effect 3D_SpecularMapping.fx
EffDef Floats Specular_Power 8.0

Texture 0 ITEM_bazooka.tga
Texture 2 ITEM_bazooka_spec.tga

Save it. Now we need to create 2 textures, first one (Texture 0) is the diffuse texture, but it can be skipped if the default texture is fine.
The second one (Texture 2) is the specular map. Both texture files go under data/textures. Specular power value can be changed to make the
 surface more or less polished.

Now we go back to _FOHuman.fo3d and change our line:

Code: [Select]
Value 13   Attach WP_bazooka.xto
Code: [Select]
Value 13   Attach WP_bazooka.fo3d
(don't change the following part of the line)

  This will tell the engine to look for the file we just created instead of a plain 3d model, and the file we created will point to the model itself.



How to create the texture.

It's easy, using the diffuse texture as a guide, paint white where the weapon should shine, and black where it should not. You can play with
 inbetween values to give nice effects. Also, it can be tinted if you want the weapon to shine in a specific color.

(http://img684.imageshack.us/img684/3881/itembazooka.jpg) (http://img210.imageshack.us/img210/9164/itembazookaspec.jpg)

From the first texture I created the specular map. Note how I paint black the section of the texture that will be the inside the barrel, because I don't want the inside to shine. Also there is a lighter stripe, which I wanted to make a bit more shiny.