Jump to content

UV Editing Advice/Mesh Export Advice

Recommended Posts

EDIT: So I've managed to get the UVs fixed by lining them up with the grapheneblock headmesh UVs but now it looks like the new blender 2.7 niftools won't export skin partitions correctly and I can't get the mesh to export properly with blender 2.49. Any help would be appreciated.


Hey, so I recently posted a topic here about a problem I was having with symmetrical eyes which guk successfully identified as being caused by the head mesh I was using having the incorrect vanilla UV map. So I switched to the ECE headmesh and everything is fine. For characters who were using the vanilla head mesh.


Now I've spent the last few days trying to recreate one of my characters who were using the Ashen race and simply can not get them looking acceptably similar to how they used to. So then I spent all yesterday trying to figure out if I could somehow transfer the UV map from the ECE mesh to the ashen race mesh, since they both have the same number of vertices and nearly-identical geometry, but can't quite seem to get it.


Ashen Mesh with original UVs



Close-up of the mismatched eyes (left eye with a mirrored copy of the right one shown under it):





ECE Mesh with original UVs





Using blender it seems like I manage to transfer the UVs from one mesh to the other and the UV image looks fine but none of the UV vertices seem to correspond to the correct ones in the mesh.


Here's the resulting abomination:





As you can see above, highlighting one vertex on the headmesh in edit mode is highlighting several in the UV map now, and none of them are in the right place.




If I had to guess I would think the vertices were perhaps ordered differently between the meshes but investigating the original meshes in nifskope show that their UV arrays are already nearly-identical except for a few cases where I assume the vanilla one is off around the eyes, which suggests to me the order should be the same. Then when I tried to sort the vertices by their position I got the same broken end result anyway.


I don't know if this is possible but it seems to me it should be possible to transfer the UVs between head meshes if they're both pretty much the same, with the same vertice count. The head meshes' geometry doesn't even look very different but swapping them out breaks the faces in game so I'm not really left with much choice other than fixing the Ashen head's UVs if I want to salvage those characters.


Does anyone have any idea how I might go about this?

Link to comment

Off the top of my head, I can think of a (somewhat tedious) way for you to do this.


Basically, you move the vertices of one uv map to match the vertex positions of the other.

This will involve moving them pretty much one-by-one. If you merge the two head meshes together, you can use blender's "snap to vertex" feature in the UV editor to match them up vertex-by-vertex. I recommend moving the unwanted head mesh to the side, so that it can be selected/deselected easily to hide it in the UV editor. When you're done, delete the vertices of the unwanted mesh.
If you need to preserve vertex order, this may interfere with it, but it may not since you're just adding new vertices and then deleting them.


Let me know if any of that needs clarification.

Link to comment

Thanks for your input.


I thought about editing it manually by using a screen overlay program to project the fixed UVs over the top and then lining them up but your way actually doesn't look like it'll be too much work if it exports properly.








Do you know if there's any way to zoom in further though? It seems to lock the zoom at about this size and it's not quite fine enough for the inside of the eye. Maybe I'm missing a toggle for that somewhere but google isn't turning anything up.


Edit: Nevermind, I just scaled the UVs way the hell up, apparently it wasn't locking to my window size they were just really tiny and the editor simply couldn't zoom in farther. Hopefully scaling them won't ruin anything if I shrink them back to where they were again.

Link to comment

No, scaling them up and back shouldn't affect anything. Let me know how it goes; If messed up vertex order proves a problem I have some ideas about baking the UV map itself as a texture that can be used to move the vertices to the desired positions.

Link to comment

No, scaling them up and back shouldn't affect anything. Let me know how it goes; If messed up vertex order proves a problem I have some ideas about baking the UV map itself as a texture that can be used to move the vertices to the desired positions.


Well, I finished realigning the UV vertices and almost everything looks okay. Swapping in the new mesh appears to have undone all of my custom sculpting in Racemenu, which isn't too awful, but for some reason it's doing something weird to the ears:








The tips of the ears now range from partially transparent to completely invisible depending on the light and angle. I've gone through all the NiTriShape and BSLightingShader data comparing and restoring the values to match the old mesh in nifskope and they both even have the same filesize now but can't find any reason for this to be broken. I thought maybe I'd made a mistake with the UV scaling, resizing it up to 10x and then back to 0.1x, and that maybe some vertices were outside the UV bounds but it doesn't look like that's the case. It's strange because I didn't even touch the mesh geometry apart from adding and then deleting the second head mesh and everything else is working fine.

Link to comment

If part of the uv map lies outside the bounds, it just displays the texture as if the texture tiles infinitely. Transparency is not a mesh issue, as far as I understand it, also I don't see long ears like that in your first mesh screenshot. I thought they were separate mesh objects, which would explain how a shader could be behaving differently between the face and ears. If they are the same mesh, I have no idea what's up with that. Try checking the normals, could be backface culling on incorrect normals.

Link to comment

The previous screenshots are from default presets, I've loaded one of my own character presets here with ears shaped using RaceMenu's elf ear sliders and Sculpt mode. It's weird because the ears show just fine in the Sculpt window, even when rotating the mesh, but when the head mesh is displayed in a character context the ears are broken.







So far I've tried replacing the BSLightingShaderProperty node with the one from the old mesh and right clicking the mesh in NifSkope > Mesh > Face Normals, which if I understand it correctly should flip all the normals to face outward. I'm not sure how the normals would have gotten borked in the first place but that didn't change anything anyway. Next thing I'm going to do is just import the original asymmetrical mesh into blender again and immediately export it to see if that's what's breaking it. I'm using blender 2.7 with latest NifTools which supposedly is capable of handling Skyrim meshes without any of the version-changing, material-deleting fuckery that was necessary with older tools but we'll see.


And if that doesn't shed any light on it then I probably will just shrink the ears and use equippable ones because I've lost way too much time on this already.


Thanks for bearing with me by the way, really. I know how frustrating it can be to try and help the unhelpable.

Link to comment

The situation with modding is that everyone has to solve a hundred unique problems. I guess it comes with working with such a tangled mess of dependencies. 
I must be very much behind because I thought that niftools were still stuck in the stone age with Blender 2.49b. In the past I've had to use a tedious workflow; creating in the current blender, appending to blender 2.49, and exporting to .nif from there. More recently, I've used body slide outfit studio, where you just export from blender to a .obj, and Outfit Studio imports that and weight paints it. That was for outfits, of course, and I imagine that head meshes are a different beast, given that they use morph targets/shape keys for expressions. 

If all else fails, and if you think the problem may lie in blender's .nif scripts, then you may try either of these methods. They'll have their own annoying problems, but such is our lot.

I hope that one day, there'll be an open standard game mesh format that BGS adopts instead of using .nif.

Link to comment
  • 2 weeks later...

So, I finally came back to this after taking a break from skyrim out of frustration and I've made... I'm not sure I can call it progress, but it's something.


I imported the default ashen headmesh into blender and then immediately exported and as I guessed the ear tips were missing just like they were on the fixed mesh. So before trying with the convoluted old blender 2.4 procedure, which I've never had much luck with, on a whim I tried importing the headmesh into outfit studio and exporting again to see if that would somehow fix what blender broke.


And I found the missing vertices:










What the fuck. I thought maybe the weights on these vertices might have gotten messed up but in outfit studio they look okay so I am at a loss as to how this happened. And it still seems to be discarding any vertex sculpting I've done to the face for some reason.




Weights don't look broken:




I guess next, unless anyone knows why only the ear vertices are breaking on export, I'll run the headmesh through one of the old blender tutorials and see if I can export a working copy which I can then fix the UVs on.

Link to comment

So I've started working my way through one of the old export tutorials with the headmesh and I've found what seems to me a likely culprit:


It looks like the vertices under this skin partition are being broken on export in blender 2.7.





So I prepared the mesh for blender 2.49 import following these two tutorials: Blender NIF Import - Export Tutorial and Creating Skyrim Armor in Blender and once the mesh was loaded I simply added a new material and set up some new skin partitions but for some reason it simply refuses to export any skin partitions at all. I'm using partition names BP_BRAIN, BP_HEAD and BP_HEAD2 as placeholder partition names and made sure all faces belong to a partition and none of them overlap but still none of the partitions are being exported.







Does anyone have any idea what might be going wrong? I feel like I'm so close to having this solved and being able to enjoy my game again but I just can't figure it out and googling things like "skyrim blender not exporting skin partitions" only turns up a handful of threads on the matter and the few of them are solved ended with the topic creators essentially saying 'lol I fixed it thanks!:D' and giving absolutely no indication what was wrong.


This whole thing is just driving me nuts. Why can't these assets be easier to work with?

Link to comment

I don't know to much on this topic but sometimes I run into issues like this when converting outfits..  & sometimes can be over looked, perhaps are you exporting with a dirty skeleton?

Thanks for the input. I don't think I'm using a dirty skeleton, I'm importing the same blender-ready headmesh again with these settings and making sure the head is selected:




I've also tried with a fixed full body skeleton just to see but had the exact same result: no dismemberskininstances in nifskope.

Link to comment

Well, by your example my skeleton appears to be coming in clean but when I look at your import settings I notice my blender 2.49 nifscripts are behind yours and doesn't have the bone priorities option. I'll update those and see if that helps any. Thanks.


EDIT: No luck, I updated the nifscripts and used your export settings but the skinpartitions are still missing from the exported mesh. I'm wondering if maybe the partition faces are overlapping somehow but they shouldn't be. The way I set them up is I'm selecting everything but the ears and neck and assigning those faces to the head first. Then I select the inverse of head, remove the neck faces and assign the rest to ears. Then I select the inverse of head again, remove the ear faces this time and assign the rest to the neck. As far as I'm aware that should result in all the faces being applied to different vertex groups and if I cycle through the groups selecting the faces that belong to them none of them appear in multiple groups. Is there something I'm missing? The tutorials just say to create the partitions and assign the faces but it just won't export them...

Link to comment

Thanks, I gave the X-Blender bundle a shot but I still can't get the skin partitions to export. On a whim I even tried deleting the 3 partitions and adding all the faces to a single BP_HEAD partition but it was still missing from the exported mesh. Clearly I'm doing something wrong setting up the partitions but I have no idea what it might be. The tutorials just say to create the partitions, make sure they match the Fallout naming convention, and for each one select the faces that belong to it and click assign, which all seems easy enough and it looks like the partitions are properly created but they just won't export. I've uploaded the blend file below with a blank dds to use for export if anyone wouldn't mind taking a look at it. I just can not find any indication where I'm going wrong.


I hate asking that of people but I'm finally completely stuck.


Link to comment


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...