Custom Leaderhead Development Thread

Ekmek put that lot up. If it's verbatim text, rather than information (which IP doesn't apply to normally), then you can challenge the use of your copyright material without permission... I'd start with a polite note on the talk page for that page. It needn't even be a full legal challenge, just an expression of your annoyance.

Well copyright is hardly the point. If only for providing people the most up to date information (the wiki is out of date now) it would be useful to have a link there...

Also in case any information was to later prove inaccurate, it would be a good idea to show the source of the info so people can put the information in context. "Oh some modders who worked this out this isn't Firaxis saying 10,000 poly count. But ah, I see they only checked Catherine's model."
 
I hope this stuff will also be added to our own modding wiki, the modiki, right :)

If someone wants to maintain a page there with the information from here (and other places if they exist), they can please themselves. Just that I'd appreciate a link, same as the Civ Wiki. It's easier for me if I just worry about this thread though. If whoever does it PMs me, then I can give them a nudge when I add more info to the first post.
 
If someone wants to maintain a page there with the information from here (and other places if they exist), they can please themselves. Just that I'd appreciate a link, same as the Civ Wiki. It's easier for me if I just worry about this thread though. If whoever does it PMs me, then I can give them a nudge when I add more info to the first post.
I'd maintain it if I had the know-how. That is to say, I know what I'm doing with the CivV wiki (I work with MediaWiki a reasonable amount). I don't understand the 3D graphics enough to summarise it is all. A "see also" at the bottom is no problem, of course (not against any rules we've been given) - you can add it yourself just as easily.

If someone wants to summarise the new info since that stuff was copied, I'll make sure it's up there, and will update it any time I'm prodded that there's new info, but really it's not that much effort to update, and anyone can do it.

On the subject of which, while this wiki is "official" in that it's hosted and kept-an-eye-on by 2K, it's not as if the content is official. All of the useful stuff is community-supplied. I wasn't aware that anyone was under any contrary impression.

Anyway, I'll add that see-also now.
 
I hope this stuff will also be added to our own modding wiki, the modiki, right :)?
See, that just seems like duplication of effort to me. Unless you want the wiki to be free to contain rampant 2K-bashing, I guess. I'm going to be focussing on the official wiki, as that's the one I came across first. Firaxis and 2K folks are there, and will hopefully notice (and point out) if people run off on an irrelevant/erroneous tangent. They do actually respond to things and give information as well.
 
The detail you're putting into Alfred is outstanding!

Thanks :)

Not far off now - full body painted, just crown and props (and a bit of tidying up)...

attachment.php
 

Attachments

  • Alfred2a.jpg
    Alfred2a.jpg
    143.5 KB · Views: 8,740
Investigations into Wonder exporting. Not directly relevant but related so I thought I'd stick it in here where Nexus fiddlers are known to be ;D:

Wonders have between 3 and loads of materials in them, depending on which wonder it is and how complex they are.

For example the Pyramids have 3:

Pyramid - Uses the 'BuildingShader' and has a Diffuse map and a Building specular reflection map.
HBPyramid - The material for the half-built version of the wonder.
Tree cut - A landmark stencil shader, I would assume this is a stencil of what it covers on the ground so that when it's placed on a tile with trees it knows which of the trees to stencil out?

Other wonders may have additional decals, as well as decal 'tree cut' materials, as well as possibly secondary BuildingShader materials.

So I guess what I would want to do is rip all these materials across, and fudge the 'BuildingShader' one to point at the right texture map.

I'm toying with the idea of writing an app that should allow you to fudge the texture maps for units or buildings by using one of the firaxis gr2's to pilfer the materials from. It's tricky though so can't promise it'll be today.
 
Very nice....I've been trying to create a new unit asset using some of the information I found on the thread, but with no luck. After importing, the model gets distorted in nexus but looks normal when I open it with grannyviewer. Also, the textures do not seem to be added when importing through Nexus.

The model was created in 3dsmax and exported using the 2010 fbx format(the fbx plug-in is the 2011 version). I cannot figure this out for the life of me. Am i missing something or is it because you were able to decompile and modify the dll? Maybe you can help point me in the right direction. Any help would be appreciated.

I included some screens to explain what I mean.





Love the Alfred model by the way.:goodjob:
sorry its been a long night
 
Hi blazekid87,

Firstly, don't worry about the textures not appearing - this is a bug with the tool and will hopefully get patched at some point.

Regarding your skin there, how many bones are you using and which shader have you assigned in the material editor?

You need a skinned shader applied to get a skinned model animated (and displaying correctly) in the asset viewer - there's one there called "unit skinned" or something like that. Note that this shader has a bone limit of 32, so if there are more bones in your model, you'll get errors in the skin until you have reduced the bone count to 32 or less.

edit: I should also note, that there are various other complications preventing us from getting these exported units in-game at the moment.

(and also, your model is fabulous!)
 
Thanks for the help, I just opened up the model and there was 67 bones so that might have been the problem. Really 32 bones? Will this be something they will be fixing in the future or is that all we have to work with?:eek:

Ill give it a try and see how it works out. Although I must admit Im no artist and the model isn't mine. Its a free model I found online that I had used to make a game before. Thought it would be nice to stick the marine unit back in the game.:mischief:

Yea I realize that actually getting them in the game is impossible atm but its nice to get a head start and learn the tools a little for when the time finally comes.:D
 
Thanks for the help, I just opened up the model and there was 67 bones so that might have been the problem. Really 32 bones? Will this be something they will be fixing in the future or is that all we have to work with?:eek:

Well if you consider how small the units are in-game, 32 bones is plenty - you don't need fingers, multiple toes, more than 3 spine bones, etc.

So you're looking at:

Hand, forearm, upperarm, clavicle x2
Toe, foot, calf, thigh x2
Root, pelvis, spine, spine1, spine2, neck, head

which is 23 bones, leaving loads free for props and whatnot :)
 
I think it worked, well aside from the textures anyway.:king:



Thanks for your help, can't wait to finally get this bad boy in there :lol:



Ill be following up on this thread to see if you guys have made any progress. I have this dreaded feeling that due to all the bug issues in the game the nexus patch will be the last thing on their agenda. Lets hope it doesnt take months, but we'll see:rolleyes:
 
Hello all. I've been playing around tonite and I've kind of made something useful here.

http://www.theindiestone.com/lemmyandbinky.com/civ2/GrannyMaterialHackerv2.zip

weee2.jpg


This tool can be used to copy the entire material set of a Firaxis model onto your own exported gr2 model. You can also reset the textures the materials point to to your own dds files. (See below for current limitations).

So to use it, place it in your Nexus directory and run it.

You select a firaxis gr2 in the top text box using the browse button.

Then you can browse the structure of it, to see what materials are in the gr2, and what textures are set on those materials.

You can, if you wish, replace any of the textures by double clicking the paths in the last column, to allow you to browse for a new texture. They should be in your Resources/DX9 directory.

Then select YOUR gr2 in the 'My GR2' section, this is the model that you exported in Nexus (the all black version. this file should be placed in the Resources/Common directory) or your duplicate of the first model if you're doing a unit re-skin .

If you only have one material, or just one mesh making up your model, then you can ignore the 'mesh -> material binding' section and just click HACKIFY!

This will transfer all the materials across to your GR2, with your new textures selected in each one. It will save the gr2 out as 'yourfilename_new.gr2' in the common directory. You will need to rename and remove the '_new' from the name of your main gr2 so it'll get picked up by the nexus viewer, I just did it like this so there would be no unsavoury overwriting going on.

It doesn't quite work for everything (the texture path for the wonders / buildings textures seems to also be stored in a place I can't easily get and it seems to be using that one instead of the material setting) but we've tested it with the unit shader and it seems to work a treat. This means we've technically got everything we need for doing units.

It will allow you to transfer the material from an existing building / wonder onto your new one (we managed to get the pyramids materials and textures displaying on a test object in nexus, we just couldn't alter what texture it was pointing to), so if you want to test your wonder in-game in the meantime you can replace the unpacked dds files for the wonder you're ripping the materials from in the DX9 directory and it should work properly for your wonder that shares them (but will display the wonder you used to transfer from incorrectly using your texture, obv, but who cares if you're just testing).

ALSO assuming you can open the source dds's for reference, this tool will allow for proper unit reskinning! it will allow you to duplicate, say, the rifleman.gr2 to superrifleman.gr2, run the tool to point him at a new dds file, and therefore reskin units! All without ever going into Nexus! WEEE!

Mesh -> Material Mapping

For cases where you have multiple meshes and/or materials, and you only want certain materials adding to specific meshes, you can use this section to 'unbind' materials from your meshes. The program by default binds every material to every mesh, to ease in use of the tool when doing simple material hacks.

For cases where you have multiple materials (builders / leaders for example, when support is in for them) you may for example want one material assigning to each mesh part of the model. To do this you can select each of your meshes in the box on the left, to show all the bound or unbound materials in the boxes to the right. By default they will all be in the bottom 'bound' section. Select each material you don't want to be bound to this mesh and click 'unbind' to take that material off that mesh.

Then click HACKIFY! when you're happy.

UPDATE

Success! Building retexturing is a go!

Uploaded a new version:

http://www.theindiestone.com/lemmyandbinky.com/civ2/GrannyMaterialHackerv3.zip

Read the enclosed readme file for more info!

This one has the following changes:

1) Civ5NexusAnimBugFix.exe - Nexus animation bug fix patch. Will fix the problem with exporting animations and them all being 5k empty files. Apply this and animations will export from Nexus perfectly.

2) MaterialMapperNexusPatch.exe - another patch that, when installed, will allow the Material Hacker to finally copy and change Building textures! This is not required unless you want to edit materials on buildings, so if you're just reskinning units then ignore this.

3) To get buildings to work, you need to rename the materials to match the names of the meshes. For example if you make a wonder called MyWonder with the following meshes in it all occupying the same space within the FBX file:

MyWonder
Tree cut
HBMyWonder

The first being your wonder model, the second being a flat stencil shape on the ground (say a circle) that specifies where to avoid drawing trees if your wonder is placed on a forest tile (this one is assumption) and the third being the model of your wonder when it's half built. (It's possible you don't *need* all three, in which case just ignore the HB and Tree cut materials, but they *may* be a requirement it's unclear yet)

...and you're using the Pyramids as your base, so you select Pyramids.gr2 in the 'Source GR2' box. You should see the following materials in the Pyramid file:

Pyramid
Tree cut
HBPyramid

Load your MyWonder model into the 'My GR2' so the meshes appear in the box below. Here you can see what your meshes are called.

There is a 'rename' button now next to the materials list at the top. So rename these materials to match your meshes:

MyWonder
Tree cut
HBMyWonder

Then click on each of your meshes, and see on the right it will show all three materials are in the 'bound' list box, showing that all three materials are bound to that mesh. So select the two incorrect ones (with differing names) and click 'unbind' to move them into the top box. Once all three materials are set up, and you have substituted the appropriate textures, then you can click on the HACKIFY! button and it should spit you out your model with the correct textures set up.

This may be all that's needed to enable wonder modding as well as unit modding. We'll have to see if any more issues crop up though.
(Note version 1, before the mesh binding feature went in is linked here, in case there's any problems or bugs with the new version: http://www.theindiestone.com/lemmyandbinky.com/civ2/GrannyMaterialHacker.zip)
 
Interesting lemmy. Is this going to allow people to just reskin existing assets or can more be done?
 
Interesting lemmy. Is this going to allow people to just reskin existing assets or can more be done?

You can do completely new assets too. But the problems at the moment are:

1) Animation bug means no animations are possible with the distributed tools. This rules out new units. But I have a fixed DLL right here for that, I just daren't link it since it's not been okayed by Firaxis.

2) Material issue means that at the moment, new buildings / wonders would require an existing building/wonder's texture to be replaced in the DX9 directory, so while new buildings / wonders are possible, it's really only useful for testing as when the actual main game wonder you used in the process is built it'll be displaying your wonder's texture instead, unless of course you also remove the affected wonder in your mod.

re: 2) I'm working on a solution for, but it's hard as while the unit shader uses the textures you set in our program, the buildings / wonders shaders seem to use a different texture path in part of the file that's not exposed by the publicly accessible Firaxis Granny File interface. AGAIN I can easily overcome that here, but it would involve hacking two additional DLLs to expose functions that are currently marked as internal, so wouldn't feel comfortable distributing it. There may be a solution in binary editing the file directly after it has been saved. I'm looking into it.

re: reskinning. If you can open the original DDS (i.e. they're not munged) so you can replicate the UV mapping, then with this system you could make a new replicated model with the new DDS references, so you can do new reskinned unit variants in mods now.
 
EDIT: According to Binky you CAN open some dds's, in this case reskinning is a go go.

Yeah, the dds textures for units open fine and can be edited.
 
Back
Top Bottom