Looking for the steps to skinning one's own mesh

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?

Yes, all the colors you see, including white, have been assigned to their mesh parts.
 
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.

Wait, lol, I was responding a line at a time. I don't know if problem solved or not (I picked the easy lines to respond to first). In blender, you choose a part of the mesh and can then "assign" a material to it. That's what the button says, heh. For example, I select only the hat part, and then give it a name, assign/choose a color to it, go to a material window, and then choose all my settings (like reflection level, hardness of material, etc.) I don't know if that assigns a UV to the mesh, but it's what allows the color to show up in both the blender window and in the rendering.
 
Assigning a material is not the same thing as assigning UVs. And even if, in Blender, it does assign UVs when you do this, they won't be sensible UVs, so you will still need to go through the process of assigning them manually.

Materials are just the place where you say what colour the material is, how shiny, whether it's got a bump, reflection, all that guff. That's fine and all for rendering within Blender. But in a game, you only get the data that the exporter spits out and the game reads in. Civ uses shaders for the characters which are, in essence, it's own material making everything you select in Blender's material irrelevant. Instead, you provide Civ with the mesh (which includes vertex data, UV data, vertex weight data, and polygon data), a bone hierarchy, the animations, and a diffuse texture (and some other textures, but let's not get into that just now). The diffuse texture does all your colouring and for this to work correctly, you need UVs assigned to your mesh.

You don't need to "save" the UV data - it's part of the vertex data, and it gets exported inside the FBX file.

If you mean "save" in the sense of "when I close the UV editor in Blender does it update the mesh?" then I couldn't tell you. It should do, but there may be a button you need to press.

But as I said, the process should be akin to the following:

1. Select the polygons you wish to map (e.g. the torso)
2. Rotate the view so you are looking at the torso
3. Press (I think it was) "U" to bring up that list of projection options
4. Choose "project from view"
5. Press "U" again
6. Choose "Unwrap" (I assume this is the command to open the UV Editor)
7. Tweak the UVs so they are laid out nicely and position them in a part of the map where you want the texture for the torso to be painted.
8. Close the editor (choosing any save option that is necessary, but it probably won't be)
9. Go back to step one but now pick polygons from a different part of your mesh (eg. back).
10. Repeat until you've mapped the entire mesh
11. Select all the polygons.
12. Press "U" and click "Unwrap"
13. Check that all your UVs are laid out nicely and nothing is overlapping (unless intentionally so, like in a mirrored object like mine)
14. Printscreen that view, crop the image to the boundaries of the map (Blender may have an option for saving out an image of the UVs), and paint over it.
 
"You don't need to "save" the UV data - it's part of the vertex data, and it gets exported inside the FBX file."

That was my question...was wondering if it got "saved" when exported to FBX, but I was having so many thoughts I couldn't form the question properly.

So it seems the step I'm missing is assigning the UV to the mesh (as you've tried to get me to understand, lol:hammer2:). I had trouble wrapping my mind around this because I hadn't found any reference to it in the Blender tuts, and trying to understand it conceptually without knowing that it even existed in Blender was like trying to understand what an apple tastes like without actually eating one. I had no idea how to translate what you were saying into actual practice. However, although the link that Bernie provided is a bit outdated, it appears to be heading in that direction. We'll see how it goes. Fortunately, you've provided me with enough of a foundation that I now know what I'm looking for.
 
Quick question: the rifleman_sref.dds in Nexus Buddy works as the sref for any dds file you add to the BaseTextureMap?

(btw, still reviewing everything you said and trying it out. I also did that tutorial and got a cube in the game the way it was supposed to be, but haven't yet been able to do the same thing for my unit. Going back and trying again.)
 
CaptainBinky:
Hey, there. :wavey:
I've reviewed your posts, including your recent one (thanks for writing it out in steps like that!) and did the tutorial Bernie linked. The following has been my process...(then I talk about tweaking it per your instructions) :

Unwrap the mesh to the UV editor (I've tried about 30 different ways now). Since I've already associated materials to the mesh following Deliverator's guide, I can bake it into an image. (see below)
TexMode2.jpg
EDIT: It looks like I wasn't in Texture Mode but in Shaded Mode actually.
I then save that image as a dds, reload it into Blender making sure my mesh overlaps it correctly, (at this point I've tried both combining all textures on the mesh into one--per Deliverator's guide--as well as leaving them be) then I export to FBX, open Nexus Buddy, include my dds file, check granny viewer, export to modbuddy, build solution, etc. Always the same result: psychobee.

Here's an example trying to emulate what you did with your great prophet (I kept it very simple, just to see if I could put the color in the right places in game) :
BanBoxes.jpg
(Sorry, I forgot to include the overlapping mesh in the example, but I exhaustively unwrapped front and back of each part--boots, shirt, hat, etc, and put them in their respective areas.)

Just to clarify, it doesn't really matter how the image is laid out as long as the UV coordinates are pointing to their respective texture, is that right?

So, for example, even though this may be excessive, since all the polygons are there in the right places, in theory it should work, no? :
MeshPlaced2.jpg
(Just so you can see what's underneath) :
Underneath.jpg

In the tutorial I mentioned, it has us save our UV map as an image and then instructs us to paint it and reload it into Blender as a dds, like what you said in your steps. We create a material that's linked to the mesh and then assign our dds to that material.
CubeUV2.jpg

happycubes.jpg
Using the tutorial, I got the cubes with their textures into the game.


Using the same process, I tried it with my unit, but this is what I got:
MyUnit2.jpg

Now, there's a tricky part--I don't know if it's the same in the program you use, but in the tutorial for blender you have to create "seams" from the vertices, connecting them all. I found that if I didn't do this right (or not at all), the cube mesh would unwrap in different numbers of planes and cause the textures to display incorrectly. I studied a few tutorials on this before even starting this thread, so I was prepared. Again, I've tried the same process with my unit, but the big problem is, if you don't put the seams in the right places before unwrapping, as I said, it skews the mesh unwrap incorrectly. I don't know if this is the essential problem--but before even talking to you, I think I was basically doing what you've instructed, even though I didn't understand the process and was blindly following a few different Blender tutorials. In retrospect, now that I understand better what's going on (thanks to you), it appears that perhaps I had already done what you said--in other words, baking the mesh in Blender automatically gives me an image to map to...I just save that as the dds I'm using with Nexus Buddy. Since the image is baked from the UV coordinates, it would seem that it's ready to go and the coordinates would be "saved" when exported to FBX.
(This is my baked image)
Underneath.jpg

Of course, I may have no idea what I'm talking about, lol; I'm just speculating. But as I mentioned on the first page, I've had this feeling that there's some hidden tweak in blender that I'm not doing. And I wonder if the "seam" thing is it. I've looked at tutorials for doing this, and tried to do it, but the cube tutorial makes seams from every vertice (and hence, every edge)...
(example)seams.jpg

but you can't make a seam from every vertice with a complex mesh. I tried that and it just creates a huge mesh...I mean, mess, lol. *hic*

I'm getting close to giving up and starting from scratch with a new model. Maybe something clunky and boxy with very few polygons. Think a robot bandito in the ancient era would be too anachronistic?:lol:

I've also read that blender can sometimes have bugs (although the recent version seems pretty clean), and I wonder if that might be an issue as well.

Oh my god, all my attachments just disappeared. :gripe:Jeez, I gotta re-upload them all again.
 
Sorry if this is overload; I wanted to show you pics of what I've been doing. As an experiment, I did the whole mapping process, etc., but used a completely black image as my dds:
black.jpg

So, apparently it is mapping to the image I give it (I just wanted to be sure).

Then I tried it with no image at all:
notex.jpg


What are those distortions on the surface? Something is screwing up the graphic. I think that whatever's doing that might be messing up the skin too.

And I'm still curious why I was able to get it to work once. It seems like too much of a coincidence that I got lucky and the UV coords happened to be in the right place.
 
So, for example, even though this may be excessive, since all the polygons are there in the right places, in theory it should work, no? :

That's correct, yes.

Geez, that makes literally no sense at all. I blame Blender ;) It seems to be making this process needlessly complicated.

In your second post with the completely black textures, those distortions you can see are being caused by the SREF texture.

But this is a bit of a mystery to me now. Your UVs are clearly there, you have a texture that matches them, yet in-game the UVs on your model are quite clearly different to those in your picture of the UV Editor. Something has changed between the screengrab of your UVs and exporting it into the game. But then it doesn't seem to even render in Blender correctly.

But repeating the process with the cube works fine. You have me stumped, Blu. Your method seems fine so this can only be a quirk with the way Blender does things which is, unfortunately, outside of my knowledge. If you want to email me the FBX it produces, I can have a look and see what it's exported (captain dot binky at gmail dot com)? Or you could send me the Blender file itself but I should warn you that my knowledge of Blender is pretty much zero ;) But maybe there'll be a button or command with something I recognise somewhere. For what it's worth, I have some respect for anyone who makes anything in Blender. I hate it, it's horrible. :D
 
giantbanditos.jpg
The world is being taken over by giant German banditos!!!

:D

That's correct, yes.

Geez, that makes literally no sense at all. I blame Blender ;) It seems to be making this process needlessly complicated.

Yes, I have discovered that Blender is needlessly complicated.

As you can see, I finally figured it out! You were correct that the UV wasn't mapping to the right places, but not because the UVs weren't there...or even because they weren't pointing where they were supposed to. It was because I didn't push ONE SINGLE BUTTON! I did everything you're supposed to do but didn't click "add" in the material window. Holy steaming piles of *!%@...all that time I spent re-doing everything over and over...and the fifty tutorials and manuals and wikiBlender articles I went through never said, "Oh, and make sure you push the 'add' button." Haha!:lol:
button.jpg
 
If you want to email me the FBX it produces, I can have a look and see what it's exported (captain dot binky at gmail dot com)? Or you could send me the Blender file itself but I should warn you that my knowledge of Blender is pretty much zero ;) But maybe there'll be a button or command with something I recognise somewhere. For what it's worth, I have some respect for anyone who makes anything in Blender. I hate it, it's horrible. :D

Thanks a lot for offering to do that. Fortunately, you've been saved from having to sully your hands anymore with Blender. And I've been saved from Psychobee driving me to madness in the dark hours of the night. (Oh, and I have re-tested my results and saved the working file...so as long as I can remember what I did, lol...but harping on about it is actually good for the memory).

"It may be pointless to beat a dead horse, :deadhorse:
but that's a horse you won't soon forget." --Me

:p
 
And I gotta say, one thing I've definitely gained from this process is a fairly solid understanding of how it works. As frustrating as it was, I've enjoyed working this out with you and actually learning what's behind it all. I don't know how many people in the world wanna know about UV mapping, but this thread has served to provide a good, basic concrete understanding of it...all cuz of you. So thanks again for putting up with my noobishness...I don't feel like so much of one anymore.
:)

(What color would you like your shrine...and do you mind naked Amazons?):D
 
In your second post with the completely black textures, those distortions you can see are being caused by the SREF texture.

By the way, I'm still getting a bit of that with the working units (although you can't see it in my pic because, coincidentally, the unit icons are covering them). Would replacing the SREF in Nexus Buddy with, say, a blank one get rid of it?
 
Now I can go back and put in some better texture...and tweak the armature a bit...add all the new animations I need now and stick it in my mod. Still a couple of weeks work ahead probably, but I wanted to solve this dilemma before proceeding. I have a mounted unit in my mod, too, but animating a horse seems like it would be difficult and time-consuming. Maybe I could steal one from Civ 4.
 
To be honest, I'm not completely sure in what manner the SREF maps are produced - I haven't yet got round to making any myself. But I would presume that they are either the greyscale map of how much specular reflection there is, or it's a colour map of what is reflected. I would put a (small) amount of money on the former though. In which case, a black texture would zap it away completely, yes. In fact, if the reflection is additive a black texture would zap it away in the second case too ;)

(Pink, and sexy Amazonian ladies is fine by me ;))
 
Back
Top Bottom