Looking for the steps to skinning one's own mesh

got past that nasty cube thing.....here is a real old TUT that was very useful from CRoland on UV mapping....

HERE

this is from 2006 so i dont know if the blender functions r the same
 
Humans, obviously, are not primitives. So you have to UV in stages, selecting a bunch of polygons which approximate one of the projection primitives. So the torso can be UV'ed by projecting a plane from the front onto those polygons.

So if I'm understanding correctly, basically I'd select all the faces on the front of the torso, for example, and then project a plane onto that selection, which would in effect flatten it out (?) and give it an easy to use rectangular shape (?), which I could then put onto the UV map (?).

Part of the problem with trying to work this out is that I can't find any options in blender to project a plane onto selected polygons. I've looked through the manual, looked online, I don't know if it has the ability to do this...unless, of course, I've missed something or am misunderstanding what you're saying, which is not improbable.
 
So if I'm understanding correctly, basically I'd select all the faces on the front of the torso, for example, and then project a plane onto that selection, which would in effect flatten it out (?) and give it an easy to use rectangular shape (?), which I could then put onto the UV map (?).

Part of the problem with trying to work this out is that I can't find any options in blender to project a plane onto selected polygons. I've looked through the manual, looked online, I don't know if it has the ability to do this...unless, of course, I've missed something or am misunderstanding what you're saying, which is not improbable.

Yes, although the UVs wouldn't appear neatly organised into a perfect rectangular - they would simply be fitted within the boundaries of a rectangle.

I did a quick search on the internet and found a workflow which says, "select the polygons you want to map, and then press 'U' or select Mesh->UV Unwrap to display the following popup menu:"

Manual-UV-UVCalc-menu.png

source

"Project from view" is the planar projection. So you would rotate your view so you're looking at the polygons from a decent angle and then use this option.

So my assumption is that the workflow is rotate the camera to look at the torso from the front, select the torso polygons, press 'U', select 'project from view, press 'U', select 'Unwrap' (the top one, not the smart projection one), arrange the UVs, close the UV window, rotate the camera to look at the back, select the back polygons... etc.

The other thing I should say, is that if you map your object in stages, you'll probably find that the smart projections will perform an awful lot better, so you could try selecting the entire torso (front and back) and smart projecting that. Same for doing the arms in one go, then the legs, then the head.
 
Thanks a lot for looking that up. I've tried that option actually. That's what I meant before when I said I knew how to copy the mesh onto the map (but I probably wasn't very clear). Here's what happens, using the torso:
banditoFINAL14testing9_Bandito.jpg

Then unwrapped:
banditoFINAL14testing9b_Bandito.jpg

Just to give a clear view of what this command does...
shirt.jpg
(shirt copied onto the map exactly as it appears on the mesh)
Btw, you can see how complicated my mesh has become. I used a subsurf command and then apparently changed the topology (which according to what I've read prevents you from getting your old, simple mesh back). Anyway...

As you can see, I still can't get uniform planes to cover the map. I tried this process like how you described and put together this bake (I've temporarily abandoned putting in more texture and such until I can get it to display properly):
halfbaked.jpg

which resulted in this:
pyschobee.jpg
(psychobee)

Okay, here is warrior_diff:
warrior_diff.jpg

How is mine so significantly different that it produces such a bizarre skin?

Another Question: On your Great Prophet image, the main part of his head, for example, stays within its corresponding polygons (or vice versa, the polygons stay around the head) but then other shaded material stretches out to the edge of the plane. Is this accomplished through the method you mention in that post? applying a plane to the head's polygons? I can't figure out how to create what you show in that image in Blender, lol. Arrr. Sorry to be such a pain in ass.

As an experiment, I'm going to try to moving the elements around in my image file the way you have them (using paint.net), and then creating planes behind them and filling them up with color, just to see what happens. In other words, screw blender, haha, I'm gonna see if I can create your example with me own two hands.
 
got past that nasty cube thing.....here is a real old TUT that was very useful from CRoland on UV mapping....

HERE

this is from 2006 so i dont know if the blender functions r the same

Oh, yeah, I did see this before, but it had some outdated commands so I went looking for a more up-to-date explanation and then forgot about it. However, in going back to it again, it looks more promising than I had given it credit for. Thanks again for linking that. I'm gonna try it out.
 
Hmmm... it's very difficult to see just from the pics where you're going wrong. Comparing two textures doesn't help since a texture is just, well, a picture. You can draw it however you like. The important thing is whether the layout of the UVs corresponds to that texture, so we'd need to see the UVs overlayed on the texture like I did with the Great Prophet pic to see what's going wrong.

Your second image looks about right (aside from those rogue polygons in the bottom right), so you'd just need to select these UVs, rotate them so the neck is at the top and it's nicely aligned, and then scale and position them into whichever section of your map you intend to use for the body. Do this with all the bits until it's all laid out nicely.

In terms of your "psychobee" image, how does this differ from how it displays in Blender? Screengrab the viewport and get a pic of your UVs overlayed on the texture, and we might be able to figure out what's going on.

The way I mapped my prophet was to work with half a mesh. He's horizontally symmetrical, so I only need the left-hand (or right-hand) side of the model. Map that - the head was projected from the side, and then the UVs were pulled around in the UV editor to produce the tweaked layout you can see. When it was all textured, I then duplicated the half-a-mesh, flipped it, and welded it together.
 
CaptainBlinky: Okay. I'm taking that all in...
While I digest that, you mentioned something that I've been wondering about--namely, how does the map know which body parts to go on? That might be the key thing that my brain is being really dense about...that I can't wrap my head around (or "unwrap" as the case may be...I need a smart projection for my brain). I copy/unwrap/put a part of the mesh on the UV map, then I bake it, save it and then open it up and turn it into a dds file. How does, say, the arm in the dds file know to go around the arm on the model? Is the information linking certain areas embedded in the image file? One reason I ask is because I had a problem with paint.net and creating icons for the mod I made. Other people's mods show their icon atlases backgrounds as black, but if I did that in paint.net it would screw up the icon, so I had to work around it. I'm wondering if the dds file has an alpha(?) layer that's getting messed up...or the original .tga file has the right information embedded into it but isn't surviving the whole process. I'm probably making this sound way too involved, but it was an issue for me with getting icons into the game.

I'll upload an image of my unit and the UV map, so you can compare all the info. Thanks for checking in and keeping tabs on this...if you're able get me through this I will build a CaptainBlinky shrine in my next mod!

I still need to go do that tutorial Bernie linked.
 
Right I think you're fundamentally misunderstanding how UV mapping works Blu :D It's one of these things that will just eventually 'click' and then you'll be scratching your head trying to work out why you were ever so confused, trust me :D

The image is entirely, completely, and 100% separate from the UVing process. Forget about the image - it can be literally anything at all - a checkerboard, a frog, or the desired texture map - it doesn't matter. Nothing gets embedded in the file.

So, "how does an arm on a DDS file know to go on the arm on the model?".

It doesn't. You're thinking about it the wrong way round.

The arm on the model is assigned UVs - all a UV is, is a point in space. So like how a vertex has an X,Y,Z to tell it where it lives in world-space, it also has co-ordinates which say where it lives in texture-space. Texture space is 2-Dimensional (unlike world-space) which is convenient, because so are textures. We use 'U' and 'V' to describe the axes of texture space just so they don't get confused with world-position axes, but you can think of 'U' as 'X' and 'V' as 'Y'. So UVs of [0,0] is the top-left of your texture and [1,1] is the bottom-right. values outside of this range wrap so if you had a rectangle whose UV co-ordinates were [0,0]. [10,0], [10,1],[0,1] the texture would get tiled 10 times along X and only once along Y.

So...

The point is, it is where you put your UVs which define where the arm should be drawn on your texture map. If you already have a texture map, you should position your UVs for the arm such that they match up with the texture. If your UVs don't match with what is drawn in your texture, you will end up with a weird-looking model ;)

Therefore, if you use a smart-unwrapping tool to generate UV co-ordinates you may well end up with a neat layout, but the chances of this aligning with a pre-created texture are essentially zero - you will need to modify your UVs to match.

As for icons - yes, the icon DDS files need to have an alpha channel otherwise they'll display as squares rather than circles (assuming you have a circular alpha for each icon, that is). If you're seeing the Firaxis files displaying on black, then I'd wager there is a button somewhere to display the alpha that you're missing.

(By the way, there's no "L" in "CaptainBinky" - everybody seems to do this, maybe I should change my name :D)
 
The way I mapped my prophet was to work with half a mesh. He's horizontally symmetrical, so I only need the left-hand (or right-hand) side of the model. Map that - the head was projected from the side, and then the UVs were pulled around in the UV editor to produce the tweaked layout you can see. When it was all textured, I then duplicated the half-a-mesh, flipped it, and welded it together.

This is something else I don't quite understand. This is probably a dumb question, but I only see one side of the head in your image file. When you say you duplicated the half, flipped it, and welded it together...where is that in the image? It looks like only one half of a head...and that might be my problem actually: maybe I'm not mapping the entire mesh. I've been trying to use the diff images as a model for what I need to create--if I map the front and back of everything, I get a lot more information/polygons/islands than what your image or the game's diffs look like--like the "smart projection" example on the first page. Of course, in my case, my mesh isn't completely symmetrical (part of the problem of creating a mesh without knowing about mapping first--after adding the mirror image of the mesh I made tweaks here and there where I thought it could look better). Anyway...so, when I make my head, for example, WAIT! Are you saying that you have to weld the mesh onto the UV map? Or are you saying you flipped it and welded the textured mesh to the other side of your model? Gah, I hope I'm not tiring you out with all this.

Hey, Bernie, if you're still checking up on this thread, please add anything you think might be helpful...or tell me I'm a lost cause too if you want, lol.
 
(By the way, there's no "L" in "CaptainBinky" - everybody seems to do this, maybe I should change my name :D)

Oops! Good thing you told me before I built my shrine.

As for where the stuff goes on the UV map, that's why I was asking if it matters where you put arrange the polygons (maybe I didn't say it that way though). Apparently arrangement of the textures doesn't matter, but the arrangement of the polygons does? I just posted all the stuff you see, so I need to take some time and go over everything you said. I won't barrage you with anymore questions...for the time being :D

Gonna upload a couple pics like I said if you wanna take a look. They'll be up in a minute. Thanks again. (The English language needs less redundant ways of saying "thanks".)
 
This is something else I don't quite understand. This is probably a dumb question, but I only see one side of the head in your image file. When you say you duplicated the half, flipped it, and welded it together...where is that in the image?

Remember, UVs are just co-ordinates and every vertex has one. So, where are the UVs for the other side of the mesh (if you notice, it's not just the head, there's only half a chest, half a back, only one hand and foot, one leg, one arm)? Well, they're there - you just can't see them because they're directly on top of the other side of the mesh's UVs.

It's like this:
attachment.php

The top shows my texture with it's texture co-ordinates (0,0 is the top-left, 1,1 is the bottom-right).

Underneath, there's my mesh. It's symmetrical and made up of two quads. Next to each vertex of the mesh, I've written the UV co-ordinates I've assigned to each vertex. Notice how the top-left vertex has the same values as the top-right vertex. The result is the image is mirrored on the mesh. Imagine this was a head, both sides of the head would have identical UVs, so in your UV unwrap tool you'd only see the UVs for half of the mesh because both sides would be displaying one on top of the other.
 

Attachments

  • texture_example.png
    texture_example.png
    11.8 KB · Views: 146
I don't know how to take a screenshot of my model, but here's the rendered image, which looks the same as it's displayed in Blender. (Btw, blender refers separately to "material" and "texture." Not sure if that's a universal thing or specific to blender...but right now I only have "material" applied to the mesh but no "textures"...in blender those refer to the bumpmaps that add, well, texture, like stucco or wood --like I said, I don't know if that's just blender or what, so pardon me if no explanation was needed. Anyway, this is how the image looks in blender.)
MyDude2.jpg

(I was trying to avoid uploading this image before putting it into my mod, which is why I used the cube example before. But better to show you what I'm doing.)
 
I'm still digesting the first half of this page, but I'm getting there...haha, I feel like the clouds are starting to part a little (but someone up there is still laughing at me :lol: )

So...I see how I was looking at it backwards, doh! We're telling the mesh where to look for its texture, not the image where it's supposed to go. Do I got that? K, moving on...
 
Just materials, no textures? To hazard a guess, have you set up your model so the various mesh parts are being coloured by a material? In other words, you've selected a white material for the body, yellow for the hat, etc etc?

If so, yeah that would explain the discrepancies between Blender and Civ.

The game will be ignoring those material settings. If you want the hat to be yellow, you will need to assign UVs to the hat and then paint the part of the texture the hat's UVs correspond to yellow.

So I imagine what was happening before is that various parts of your mesh had default UVs which would have been pointing all over the place on the texture. You didn't see this effect in Blender because you were just looking at the materials. As soon as it went in the game, you were seeing the texture applied to the mesh and got a bit of a mess.

EDIT: Re your last reply... YES, you've got it! :)
 
Back
Top Bottom