Better Quality 3D Leader Support in Nexus Buddy 2.2

Deliverator

Graphical Hackificator
Joined
Feb 12, 2008
Messages
4,806
Location
London, UK
Reposting this here from the Nexus Buddy thread:

One of the things I wanted to improve on in Nexus Buddy was the support for 3D Leaders. Up to now the meshes created by performing Overwrite Meshes from BR2 didn't create vertices with Tangent and Binormal vectors. I suspected that this was the reason why the normal map textures weren't applying correctly so I had a go at adding these additional values. This has definitely lead to normal maps being applied to BR2 sourced meshes in a way that much more closely matches the quality of the vanilla leader.

Here is the vanilla Casimir leader (although with different scene/lights - I was playing around!):



This is the closest it was possible to get with the Blender 2.7x BR2 script and Nexus Buddy 2.1. Notice that due to the normal maps not appearing the beard, clothing and metal crests lack texture detail:



I've updated the BR2 export script to calculate new Normals, Binormals and Tangents for each vertex and then updated Nexus Buddy to read in these values and write them into the .gr2. After hooking up the original materials you can see the normal maps now appear for the beard, clothing and metal. As well as removing the crown I also upscaled the sceptre to prove I've modded the mesh in Blender. There a few differences due to the amount of processing and calculation involved in getting the model to and from Blender, but these are fairly minor and the texturing of the model is significantly improved.



There's some tidyup to do, and then I'll release a new version of the Nexus Buddy and the Blender 2.7x scripts. After that I should write a little tutorial to pull together all the info on 3D Leader modding.

Also I wanted to test importing elements from Civ 4 Leaderheads. I successfully added the helmet from this Civ 4 Alexander model to Civ 5. I had adjust the hair mesh quite a bit in Blender to make sure there was no hair showing through the helmet.







Also I tested a reskin of Casimir. The limitation with reskins is that we can only access the lower resolution DX9 textures and then only via Texmod. If uMod adds support for DX10/11 then we might eventually be able to get the higher resolution textures.



I'll upload the 2.2 Nexus Buddy on Monday and aim to have the tutorials up by the end of July.
 
Holy crap wow. I wonder what this means for leaderheads with two leaders in it! (ala Vietnam).

......Failing that, anyone up for making an Inuit, Dene or Cree leaderhead? :crazyeye:
 
Holy crap wow. I wonder what this means for leaderheads with two leaders in it! (ala Vietnam).

......Failing that, anyone up for making an Inuit, Dene or Cree leaderhead? :crazyeye:

the one issue with two leaders is that they share a camera which means they'll be centered on it. I coul put two leaders together and a non-moving back ground but I think the centering issue is the problem.
 
Just spitballing - but would there be a way to put an invisible faux leader in the middle of them that would offset the camera?
 
Just spitballing - but would there be a way to put an invisible faux leader in the middle of them that would offset the camera?


the models need to resad the fxsxml. See the scene.xml - it has a space for the leader and the background. Its what I did for Civ. I just made the other sister the background and then added a wall behind her and repositioned her camera that was tied to the nif. Civ5 uses one camera for both background and leader which is the problem.
 
Does the BR2 with new maps applies to blender models/nb2s that were made with the older scripts?

The important part is that you need to export from Blender 2.7x using the new script and then do the overwrite using 2.2 with the new Leader checkbox set. So you could open old .blend files in Blender 2.7x and export them that way or import old .nb2 files direct into Blender 2.7x.
 
I wonder, does this normal fixing Leader Checkbox thing work with landmark too? I've been having issues with putting height maps to landmark type materials; not sure if it was related at all...
 
I wonder, does this normal fixing Leader Checkbox thing work with landmark too? I've been having issues with putting height maps to landmark type materials; not sure if it was related at all...

There's nothing to stop you trying it. Really the different the check box makes is just that the mesh vertices will have binormal and tangent data, so it could make a difference to the landmarks as well.
 
So where do the 2.7x scripts go? 2.7 has more scripts folders and where ever I put your py scripts Blender does seem to add it to the options in files.

You add them from blender now. If you go to file -> User Preferences then select the Addons tab and click install from File... and then you need to enable it and save.
 
You add them from blender now. If you go to file -> User Preferences then select the Addons tab and click install from File... and then you need to enable it and save.

Thx. that was painful.

Any idea how to do the bone weight copy script? googling for 2.7 hasn't helped at all
 
Thx. that was painful.

Any idea how to do the bone weight copy script? googling for 2.7 hasn't helped at all

Its included with blender 2.7 now so you don't need to download it. With you meshes selected just go to Weight Paint mode and click on Transfer Weights in the Tool Shelf.
 
Thx. that was painful.

Any idea how to do the bone weight copy script? googling for 2.7 hasn't helped at all

See Wolfdog's tutorial here - Transfer Weights from one mesh to another is built into Blender 2.7x.
 
Thanks. I'll see if it covers the copy and paste function which was really useful.

as for normals:

I opened Churchill.blend that I did in 249 and opened it in 274. Then I exported the br2. I opened the new nexusbuddy (more stable, thank you!) and then did the overwrite in additional actions with the leader br2 checked.

Since Churchill is a boneweight copy of Civ4 I used those files for the leader_skin material but it came out with this stripe along his head. which is weird because all the dds files are split from the back and not the face (like units usually are to make a half face be a whole).

It may have something to do with the blur or irradiance or env files. But i coudn't track it down. Once I actually finish churchill I'll release it as version 1 then look into more. the other thing I'm thinking about is just starting one in blender 2.74 to see if maybe its the material carryover is the issue.
 

Attachments

  • churchill27.jpg
    churchill27.jpg
    65.2 KB · Views: 224
Thanks. I'll see if it covers the copy and paste function which was really useful.

If you mean copy and paste between Blender sessions, then the equivalent feature in 2.7x is the Append function which allows you to load all or part of one .blend file into another one. Very handy.

as for normals:

I opened Churchill.blend that I did in 249 and opened it in 274. Then I exported the br2. I opened the new nexusbuddy (more stable, thank you!) and then did the overwrite in additional actions with the leader br2 checked.

Since Churchill is a boneweight copy of Civ4 I used those files for the leader_skin material but it came out with this stripe along his head. which is weird because all the dds files are split from the back and not the face (like units usually are to make a half face be a whole).

It may have something to do with the blur or irradiance or env files. But i coudn't track it down. Once I actually finish churchill I'll release it as version 1 then look into more. the other thing I'm thinking about is just starting one in blender 2.74 to see if maybe its the material carryover is the issue.

It looks like it might be an issue with the vertex normals/binormals/tangents coordinates themselves. If you upload your files I can have a look and see if I can resolve the issue.
 
Sorry for the delay

the churchill blend was done all in 249

The stalin blend was all done 274 - when I did the overwrite with leader checked in additional actions you can even see the line down the middle in grannyviewer. Probably the same with the churchil file but I didnt check with granny viewer since I was mostly done when I tried the 274 stuff with him. overwriting with your new button and not having the check doesnt show the stripe.

thx
 

Attachments

  • TestBlends.rar
    1.1 MB · Views: 133
Sorry for the delay

the churchill blend was done all in 249

The stalin blend was all done 274 - when I did the overwrite with leader checked in additional actions you can even see the line down the middle in grannyviewer. Probably the same with the churchil file but I didnt check with granny viewer since I was mostly done when I tried the 274 stuff with him. overwriting with your new button and not having the check doesnt show the stripe.

thx

OK, I'll have a look this weekend and see if I can find out what is going on.
 
Ok, it does look like an error with the calculation of the binormal and tangent coordinates for the normals that are pointing directly along an axis. If I rotate the face mesh slightly I don't get the issue. I'll investigate further - it should be fixable.
 
Top Bottom