Author Topic: 3D Tutorials and Links (20170222 Images Replaced 1/3)  (Read 53074 times)

Re: 3D Tutorials and Links
« Reply #15 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.
« Last Edit: December 02, 2011, 01:00:01 pm by Lizard »
Wasteland is a tricky business.

Re: 3D Tutorials and Links
« Reply #16 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.

Offline Haraldx

  • This forum... The memories... The history...
Re: 3D Tutorials and Links
« Reply #17 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.


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.


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.
I still can be reached over e-mail if you somehow need anything from me. Don't see a reason why you would, but if you do, e-mail remains the safest bet, as I do not visit this forum reliably anymore.

Offline Izual

  • Roaming entertainer.
    • Youtube
Re: 3D Tutorials and Links
« Reply #18 on: January 06, 2012, 12:55:21 pm »
Yes, but that uses alpha channel right?
My Youtube channel.

"Another problem is that we listen to the vocal players, who in many cases are wrong-headed."
- J.E. Sawyer

Offline Luther Blissett

  • Moderator
Re: 3D Tutorials and Links
« Reply #19 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

Not sure what it does with shadows and other things though.

Offline Haraldx

  • This forum... The memories... The history...
Re: 3D Tutorials and Links
« Reply #20 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.
I still can be reached over e-mail if you somehow need anything from me. Don't see a reason why you would, but if you do, e-mail remains the safest bet, as I do not visit this forum reliably anymore.

Re: 3D Tutorials and Links
« Reply #21 on: January 06, 2012, 02:17:54 pm »
alpha channel also break shadows
no Wez no fun...
http://rudo-brody.pl/uploads/2011-12-24_0012.png
everyday my english loose 1point :/

Offline Haraldx

  • This forum... The memories... The history...
Re: 3D Tutorials and Links
« Reply #22 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. ??? :(
I still can be reached over e-mail if you somehow need anything from me. Don't see a reason why you would, but if you do, e-mail remains the safest bet, as I do not visit this forum reliably anymore.

Re: 3D Tutorials and Links
« Reply #23 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.

Re: 3D Tutorials and Links
« Reply #24 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:




"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.




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."



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"





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)."


Re: 3D Tutorials and Links
« Reply #25 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?"




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:




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.



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 :)

Re: 3D Tutorials and Links
« Reply #26 on: January 06, 2012, 07:09:29 pm »
wow !!
no Wez no fun...
http://rudo-brody.pl/uploads/2011-12-24_0012.png
everyday my english loose 1point :/

Offline Haraldx

  • This forum... The memories... The history...
Re: 3D Tutorials and Links
« Reply #27 on: January 06, 2012, 08:59:02 pm »
Good tutorial (altough I knew most of the stuff), came in handy. ;)
I still can be reached over e-mail if you somehow need anything from me. Don't see a reason why you would, but if you do, e-mail remains the safest bet, as I do not visit this forum reliably anymore.

Offline Luther Blissett

  • Moderator
Re: 3D Tutorials and Links
« Reply #28 on: January 16, 2012, 02:06:00 am »
#3-1 Rigging introduction

Reading beforehand
Firstly, I would recommend reading through my previous short tutorials (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  - 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/)
Wings3D (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.


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.


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.


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.


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)

Offline Luther Blissett

  • Moderator
Re: 3D Tutorials and Links
« Reply #29 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 (New link 22/01/2012)
misaligned beret and texture.zip (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 :


[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



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



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.

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.



- 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.


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.



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



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".


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.



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



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 (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.
« Last Edit: January 22, 2012, 06:02:11 pm by Luther Blissett »