EDIT January 31st, 2022: This tutorial is being updated and moved to Google! Please refer to the new version wherever possible, as it has better optimisation & overall clarity.
https://docs.google.com/document/d/1otpZc7OyhgXwbK8KPFEl4ogVCACvSptYVBNI-uuFdac/edit?usp=sharing
(Double post, sorry.)
Metallic Markings
-Because no one else has said anything about them. And because they're pretty cool and I'm too tired to put anything that makes remote sense here. c:
Oh, and, let's use common sense, if you have no clue what you're doing, please don't start by doing this, start with actually making a normal preset first.
That's not to say I won't help you if you run into a problem. xD
You'll be needing 2 textures.
1, random dark scribbles, with some parts lighter than others,
And two, your actual texture, with transparency where the markings will go. I'm making Metal Legs. xD (Appears black in this post because I actually have this transparent so yea.)
Now, the code is actually quite simple here, you start with your basic,
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11body.png
}
}
}
}
Now as you may have guessed, we are going to put the metal down first, and your preset's texture goes over it.
So we can do this,
material preset_11_bodyMatL
{
technique
{
pass
{
texture_unit
{
texture preset_11metal.png
}
}
}
}
Now this next part is important. The effects to actually make this look metallic.
Specular & Env_Map
specular makes it shine in the light, env_map will make it actually look like metal.
Pay close attention to their placements.
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
}
}
You can test this much in-game if you'd like.
Or continue.
Now as you may or may not have noticed, everything above 1 texture_unit applies to everything below that one.
Adding another texture_unit just layers something over something else.
But we don't want to do that here, or your whole preset shall become a shiny Edward Cullen.
What do we do?
We add another pass.
Like so,
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
pass
{
texture_unit
{
texture preset_11body.png
}
}
}
}
See how we had to pass again, and repeat the brackets? It's not too difficult really. But one last thing, transparency! Add the alpha_rejection greater_equal 128 code!
And I also add ambience but that's just me, take it out if you want.
material preset_11_bodyMatL
{
technique
{
pass
{
specular 0.5 0.5 0.5 1
texture_unit
{
texture preset_11metal.png
env_map spherical
}
}
pass
{
ambient 0.5 0.5 0.5 1
alpha_rejection greater_equal 128
texture_unit
{
texture preset_11body.png
}
}
}
}
Done!
-
Thank WhiteLightHeart for motivating me to get off my butt and do something useful... oh, and for this post, this was originally a PM to her. ;P