You must be logged in to post messages.
Please login or register

Modding Discussions
Moderated by Alexastor, MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Tutorial: How to add advanced materials to your models
posted 12-12-15 04:41 PM EDT (US)   
How to add advanced materials to your models
such as playercolor, bumpmaps, transparency, fake water



Hello everyone! Today I’m gonna teach you on how to achieve things such as playercolor, bumpmaps and transparency textures to your new imported models for AoE3. The goal of this tutorial is to be simple and yet effective enough to make everyone able to get new advanced texture materials on their new models! So let us start?

To get this out from the way, I’m one of the worst teachers ever! And after sometime of wondering how would I come up with a good tutorial, I discovered that the best way was to keep it simple, no need to overcomplicate things, so here is a small but (what I think it is) a good tutorial on how to add new advanced materials to your models, such as playercolor, bumpmaps and transparency.

What tools do we need?
-A working version of 3ds Max 8 (IMPORTANT: not 3ds Max 2008, 3ds Max 8!)
-A working version of Age of Empires 3 (obviously)
-Knowledge on how to edit anim files (sugestion: see Mr SCP's videos on understanding anim files)
-Knowledge on how to import models to AoE3 (sugestion: see Mr SCP's videos on how to import models)
-And finally, (and perhaps most importantly) the following scripts!

Step One) Put the scripts on the 3dsMax8\Scripts\Startup folder

Once you done this, you are able to change the MATERIAL types in the material editor, from ‘standard’ to one of the following:

ESEffect_alphablend – Allows to set a diffuse texture with transparency, in the diffuse texture slot.
ESEffect_bumpspec – Allows to set a bump map + specular to a texture with a default diffuse texture.
ESEffect_bumpspec_mask_alphatest – Allows to set a bump map + specular in the bump texture and a diffuse texture with transparency in the diffuse texture.
ESEffect_bumpspec_mask_pixelxform – Allows to set a bumpmap + specular in the bump texture and a diffuse texture with playercolor in the diffuse texture.
ESEffect_water_nocolor – Creates the fake water models, such as the ones used on the homecities

Step Two) Simply add your desired material to your mesh. Assign the diffuse and bump textures, remember, things such as transparency and playercolor are defined in the alpha channel of the diffuse texture and specular map is defined in the alpha channel of the bump texture.

NOTE: [spoiler]As stated, the specular maps act as the default bumpmap texture’s alpha channel, but they are really sensitive on these scripts, you’ll have to make the alpha channel real dark in order not to have your models glowing like the sun…[/spoiler]

Step Three) At exporting, on the Granny Export Settings, click on ‘include tangent vectors’ (under the mesh sub)

Step Four) Admire your work

If you have questions regarding the issue, just ask and I'll answer as soon as possible! Do you find something not clear? Help me improving this brief tutorial so everyone can understand it!

Full credits go the Alexastor, who gave me the scripts and taught me how to use them (and for not being mad at me for taking too long at writing a tutorial )

Special thanks to Mr SCP too for being the one who teached me how to import to AoE3 in the first place!

This tutorial will have duplicates at Moddb and WotTA.com, links soon!

_________________________________________________________

Creator of The XX Century mod, look it up on ModBB and on WotTA subforums!!!

Want to learn how to add playercolor, bumpmaps and much more to your new models? Click here

[This message has been edited by Titan Joker (edited 12-12-2015 @ 06:11 PM).]

Replies:
posted 12-30-15 05:46 PM EDT (US)     1 / 12  
Thank you for sharing your knowledge. I ve pinned the thread as it is a really valueable source for the modders


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 12-31-15 02:59 AM EDT (US)     2 / 12  
This might sound stupid but what i dont really get is:

How I am supposed to define playercolor and transparency parts? My Parts allways get transparent.

and also thx for sharing my videos, i also had to rewatch one to get my textures placed at the meshes .

This was my test (as i had a 3ds file and it just use two textures.)


-You can see that the shadows are still rendered (even better visual if you make the full diffuse map in alpha)
-If you change your texture ingame it shows the old informations when it cannot be build (what we all used to know?)
-I can create/use fine structures like chains in the way they have to be (i have stronghold models in mind)

Also nice screenshot, is this a spoiler of your current work?


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 12-31-2015 @ 03:38 AM).]

posted 01-02-16 03:15 PM EDT (US)     3 / 12  
Thank you for pinning the thread Mr SCP! And sorry for the late response, I've been away for this last few days, but now I'm back and ready to take any question!

I have not understood your question 100%, but from the pic, the problem seems to be on the texture's alpha channel, as some parts of the roof appear slightly transparent. But I'll give you full explanation in any case...

First you need to define the type of material you want. If you want to use just transparency use the ESEffect_alphablend material, if you just want to add bumpmap and specular use ESEffect_bumpspec, if you want to want to add both bumpspeculars and transparency use ESEffect_bumpspec_mask_alphatest, if you want your model to use playercolor and bumpmaps you need to use the ESEffect_bumpspec_mask_pixelxform material and finaly, if you want to create fake water effects use ESEffect_water_nocolor.

If you want... let's say, a model that uses both playercolor and transparency you will need to assign different materials to different parts...

The transparency and playercolor are defined in the diffuse texture's alpha channel, while the specular is defined in the bump texture's alpha channel.

This is an example of what I did in my first test.

1) I set the material to ESEffect_bumpspec_mask_pixelxform
2) I made the texture. Here is the diffuse texture and here is the bump texture.
3) Exported it having in mind to check the 'include tangent vectors'
4) Voila

Altough optional, it should also be important to paint your alpha channels for your texture's all black while messing with them in 3ds Max, only after you should define what is black or white... otherwise you will export your model with their alpha channel's already defined by 3ds Max, whereas if you paint your alpha channel's all black you are free to determine what should be alpha or not...
-You can see that the shadows are still rendered (even better visual if you make the full diffuse map in alpha)
Yes that seems to be a problem I encountered very early... I have no idea what we can do something about it, but original AoE3 models render no shadows if transparency is active. Maybe it's the scripts themselves or I'm doing something wrong, I'll try to figure it out...
-If you change your texture ingame it shows the old informations when it cannot be build (what we all used to know?)
Not only that, but when I highlight/flash a building wich uses transparency the same happens, once again I have no answer for that...
-I can create/use fine structures like chains in the way they have to be (i have stronghold models in mind)´
Yes you can easilly achieve this and use the ESEffect_alphablend material... however you will face the same shadows problem and highlight problem... maybe you could make the chains a seperate attachable model, and since they are small you could use the noshadow tag on the chains in the anim file.
Also nice screenshot, is this a spoiler of your current work?
Heheh who knows... I could not get back much of The XX Century lost work... so I decided to move on... it will be a while untill an announcement of course...

_________________________________________________________

Creator of The XX Century mod, look it up on ModBB and on WotTA subforums!!!

Want to learn how to add playercolor, bumpmaps and much more to your new models? Click here
posted 01-02-16 04:02 PM EDT (US)     4 / 12  
Hey joker

Thx for the details. I skipped those two effects "ESEffect_bumpspec_mask_alphatest" and "ESEffect_bumpspec_mask_pixelxform" because i never needed a specular picture and also I cant edit bumpmaps . Well also nice tip with using different parts for different effects .
Yes you can easilly achieve this and use the ESEffect_alphablend material... however you will face the same shadows problem and highlight problem... maybe you could make the chains a seperate attachable model, and since they are small you could use the noshadow tag on the chains in the anim file.
I had a battering ram with roof in mind so the shadows wont cause problems


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 01-02-2016 @ 04:10 PM).]

posted 01-02-16 04:57 PM EDT (US)     5 / 12  
Glad to help !

_________________________________________________________

Creator of The XX Century mod, look it up on ModBB and on WotTA subforums!!!

Want to learn how to add playercolor, bumpmaps and much more to your new models? Click here
posted 01-07-16 12:00 PM EDT (US)     6 / 12  
So i worked at your plugin and I seemed to got the shadows fixed . But i don't know the exact reason so i uploaded the whole script

and another time bakeries xD


https://www.dropbox.com/s/xb5tlwmt1et0zhj/AOE3_Material_Editor.ms?dl=0

for transparency you have to use the dropdown menu which i added into the ESEffectName menu.

The other value (textbox) is about lighting. I didnt had enough time to test it enough. At least if you write sth senseless in it the "gloss" effect from the Bump-map-alpha should stop

still i need to learn more about those bump maps. At least make them editable in gimp...
Altough optional, it should also be important to paint your alpha channels for your texture's all black while messing with them in 3ds Max, only after you should define what is black or white... otherwise you will export your model with their alpha channel's already defined by 3ds Max, whereas if you paint your alpha channel's all black you are free to determine what should be alpha or not...
nice to know

btw are there other things you got to know from alexastor ? Did he created this from the AOE3 dump file?


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 01-07-2016 @ 05:20 PM).]

posted 01-08-16 02:38 PM EDT (US)     7 / 12  
Wow! You never fail to impress me Mr SCP, neat job!

Altough you have it wrong there... Alexastor done everything, I was just the messenger that delivered the message ahah ;p there was no need for my name in that.

Are all the other scripts present in this? I suppose it's easier to handle for begginers and the transparency shadow is a great (and needed) addition. I tested and it seems to do very well!
The other value (textbox) is about lighting. I didnt had enough time to test it enough. At least if you write sth senseless in it the "gloss" effect from the Bump-map-alpha should stop
Will it stop or be reduced? Gloss is also needed, maybe with lesser priority but needed, you can decrease the gloss by turning the alpha channel of the bumpmap texture darker and darker.
till i need to learn more about those bump maps. At least make them editable in gimp...
I don't know if there are bumpmap plugins for gimp... there are already sites that make them, the only thing bad is that they come out in JPEG or PNG, but you can convert them to .TGA in GIMP. Here's one site
btw are there other things you got to know from alexastor ? Did he created this from the AOE3 dump file?
He also thought me how to give a model animations that are already in the game... like what you did with your papermill where you use the animation from a mill IIRC... only he extended it other things such as units and such however non-human-like models are still complicated to do...

I could ask him how he got this, I dunno if he created it or he got it from somewhere...

_________________________________________________________

Creator of The XX Century mod, look it up on ModBB and on WotTA subforums!!!

Want to learn how to add playercolor, bumpmaps and much more to your new models? Click here

[This message has been edited by Mister SCP (edited 01-08-2016 @ 03:43 PM).]

posted 01-08-16 03:37 PM EDT (US)     8 / 12  
Wow! You never fail to impress me Mr SCP, neat job!
Nice to know
(I even fixed your bot-picture link)

Also an Hooray to your work from my side. You are really a great guy
Altough you have it wrong there... Alexastor done everything, I was just the messenger that delivered the message ahah ;p there was no need for my name in that.
Feel honoured for sharing knowledge. I've been waiting for this pretty long (Alexastor announced it some months ago...)
Are all the other scripts present in this? I suppose it's easier to handle for begginers and the transparency shadow is a great (and needed) addition. I tested and it seems to do very well!
It's a mix of the pixelform script and the alphatest script. I dont know if you can combine the fakewater script with this one, as it uses more parameters

So what i ve in mind of is to make a test-tool where you can freely edit all these parameters and then doing Bulk-Conversions with only one or two parameters edited at a time. And see what got changed - yesterday I got for example darker textures and less gloss, but i need more info as it is pretty random at the moment to me^^. But well at least the testing have to wait until next week.
I don't know if there are bumpmap plugins for gimp... there are already sites that make them, the only thing bad is that they come out in JPEG or PNG, but you can convert them to .TGA in GIMP. Here's one site
thx
He also thought me how to give a model animations that are already in the game... like what you did with your papermill where you use the animation from a mill IIRC... only he extended it other things such as units and such however non-human-like models are still complicated to do...
always usefull. btw I think the missing piecee has to do with binding bones to meshes in the correct way. But i tried a lot and always failed
I could ask him how he got this, I dunno if he created it or he got it from somewhere...
that would be nice.And Give him my regards .

I dug yesterday in the dump and i found some references. While i couldnt find anything about the specpower parameter and just found 3(?) of the fakewater params. In case i have time i may do it again with a "regex search" instead oc a normal search


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 01-08-2016 @ 03:56 PM).]

posted 01-09-16 05:10 AM EDT (US)     9 / 12  
But here are some infos along with the latest test plugin which contains everything but the fake water. I also noted you'll loose all infos when you load a model with this material due a .dll error... i 'll have a look into this - just a warning
fixed

Plugin
Stylish Table of Informations i ve collected yet as .docx

https://youtu.be/LGBYsm5olH0


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 01-10-2016 @ 12:29 PM).]

posted 01-13-16 12:33 PM EDT (US)     10 / 12  
Thanks for the video! It's easier to learn with a video than with a written tutorial, I would make some too if I had the tools, but your videos make it easier to many new people to understand, (that's how I learn how to model remember? eheh) I hope many new modders are able to see it and be draw to modelling.

Alexastor seems to be very busy and he may have some free time in February, I asked him to see if he could jump in on this discussion and see what else can be done, but while he is busy it's unlikely.
always usefull. btw I think the missing piecee has to do with binding bones to meshes in the correct way. But i tried a lot and always failed
You have to create a standard biped object, name the bones correctly to the same name as AoE3's (just take a look in granny viewer or when importing a skinned mesh) and make sure the hierarchy of the bones is the same as the aoe3 model, you can change that in the hierarchy viewer, if you export, the unit will be able to use the aoe3 anims.

My only problem with this seems to be the attachments, like guns and such, they never seem to be attached correctly...

_________________________________________________________

Creator of The XX Century mod, look it up on ModBB and on WotTA subforums!!!

Want to learn how to add playercolor, bumpmaps and much more to your new models? Click here
posted 01-13-16 02:06 PM EDT (US)     11 / 12  
Thanks for the video! It's easier to learn with a video than with a written tutorial, I would make some too if I had the tools, but your videos make it easier to many new people to understand, (that's how I learn how to model remember? eheh) I hope many new modders are able to see it and be draw to modelling.
I was really exited when i noticed i got over 19.000 clicks so far for all videos as i wouldnt have thought of that. By the way i learned rubics cube (up to 5 x 5) and Java with videos and that gave me the idea for doing this myself

-For recording I was using Camstudio, which come along with a lot of rubbish 3rd party software if you have bad luck (like me). This is however the best solution for recording the Desktop. Shadowplay and Fraps dont support recording 3ds max for example. The only problem with this software is that i have to get my micro very close which leads to breathing sounds which i cutted out in Video Deluxe

-the editing is done with Magix Video Deluxe. Well this isnt free but i use it quite often.

-I also think i am missing a tutorial for texturing. If you happen to capture a workflow i would thankfully spread it (either as link or as upload)

-as a last note i must admit i still watch parts of my videos sometimes, because I often forget how to assign textures to models
Alexastor seems to be very busy and he may have some free time in February, I asked him to see if he could jump in on this discussion and see what else can be done, but while he is busy it's unlikely.
Sounds as he's still studying. I have a similar scenario
You have to create a standard biped object, name the bones correctly to the same name as AoE3's (just take a look in granny viewer or when importing a skinned mesh) and make sure the hierarchy of the bones is the same as the aoe3 model, you can change that in the hierarchy viewer, if you export, the unit will be able to use the aoe3 anims.
I know. But i ve been investing more time in getting the ingame-cinematic models to work with attack animations and succed
My only problem with this seems to be the attachments, like guns and such, they never seem to be attached correctly...
a)have you tried making an additional bone on the hand. I guess this should work and help a lot with getting the correct position

b)I was refering to the "mesh transformation", what means that you wont have a static mesh but it will follow the bone transformation -> human models


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 01-13-2016 @ 02:09 PM).]

posted 03-08-22 00:08 AM EDT (US)     12 / 12  
Although it has been a long time, so long that aoe4 has been released for half a year, I still want to ask a question, I have tried to change the background of the homecity, but there is no way to achieve the original shiny, and I do not know whether it will be answered now

[This message has been edited by dablive (edited 03-08-2022 @ 00:10 AM).]

Age of Empires III Heaven » Forums » Modding Discussions » Tutorial: How to add advanced materials to your models
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames